From 2b53ad07ec71094a4119800f310c0e9104c3fad6 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Sep 2015 13:24:05 +0200 Subject: [PATCH 001/288] Reset codebase Let's start from scratch! --- .env.example | 2 - app/Accounts/InvalidRoleException.php | 4 - app/Accounts/Role.php | 30 - app/Accounts/RoleRepository.php | 17 - app/Accounts/SendConfirmationEmail.php | 45 - app/Accounts/User.php | 184 - app/Accounts/UserCreator.php | 69 - app/Accounts/UserCreatorListener.php | 8 - app/Accounts/UserPresenter.php | 39 - app/Accounts/UserRepository.php | 82 - app/Accounts/UserUpdater.php | 86 - app/Accounts/UserUpdaterListener.php | 8 - app/{Providers => }/AppServiceProvider.php | 2 +- app/Auth/AuthServiceProvider.php | 30 + app/Bin/Paste.php | 62 - app/Bin/PasteCreator.php | 42 - app/Bin/PasteCreatorListener.php | 7 - app/Bin/PasteForkCreator.php | 38 - app/Bin/PasteForm.php | 12 - app/Bin/PastePresenter.php | 32 - app/Bin/PasteRepository.php | 22 - app/Comments/Comment.php | 144 - app/Comments/CommentObserver.php | 17 - app/Comments/CommentPresenter.php | 100 - app/Comments/ReplyForm.php | 11 - app/Core/EloquentRepository.php | 88 - app/Core/Entity.php | 63 - .../Exceptions/EntityNotFoundException.php | 4 - .../NoValidationRulesFoundException.php | 4 - .../NoValidatorInstantiatedException.php | 4 - app/Core/FormModel.php | 47 - .../EventServiceProvider.php | 2 +- app/Exceptions/Handler.php | 13 +- app/Forum/Replies/Reply.php | 58 - app/Forum/Replies/ReplyCreator.php | 59 - app/Forum/Replies/ReplyCreatorListener.php | 8 - app/Forum/Replies/ReplyDeleter.php | 20 - app/Forum/Replies/ReplyDeleterListener.php | 7 - app/Forum/Replies/ReplyForm.php | 11 - app/Forum/Replies/ReplyPresenter.php | 55 - .../Replies/ReplyQueryStringGenerator.php | 18 - app/Forum/Replies/ReplyRepository.php | 12 - app/Forum/Replies/ReplyUpdater.php | 39 - app/Forum/Replies/ReplyUpdaterListener.php | 8 - app/Forum/SectionSidebarCreator.php | 42 - app/Forum/Threads/Thread.php | 178 - app/Forum/Threads/ThreadCreator.php | 124 - app/Forum/Threads/ThreadCreatorListener.php | 8 - app/Forum/Threads/ThreadDeleter.php | 30 - app/Forum/Threads/ThreadDeleterListener.php | 7 - app/Forum/Threads/ThreadForm.php | 32 - app/Forum/Threads/ThreadPresenter.php | 120 - app/Forum/Threads/ThreadRepository.php | 84 - app/Forum/Threads/ThreadSearch.php | 27 - app/Forum/Threads/ThreadUpdater.php | 48 - app/Forum/Threads/ThreadUpdaterListener.php | 8 - app/Forum/Threads/ThreadVisitation.php | 16 - app/Forum/Threads/ThreadVisitationUpdater.php | 19 - app/Github/GistEmbedFormatter.php | 12 - app/Github/GithubAuthenticator.php | 80 - app/Github/GithubAuthenticatorListener.php | 29 - app/Github/GithubUserDataReader.php | 37 - .../Controllers/Admin/OverviewController.php | 15 - .../Controllers/Admin/UsersController.php | 90 - app/Http/Controllers/Auth/AuthController.php | 241 +- .../Controllers/Auth/PasswordController.php | 4 +- app/Http/Controllers/ChatController.php | 10 - app/Http/Controllers/Controller.php | 35 +- .../Forum/ForumRepliesController.php | 146 - .../Forum/ForumThreadsController.php | 255 - app/Http/Controllers/HomeController.php | 4 +- app/Http/Controllers/PastesController.php | 82 - app/Http/Controllers/UsersController.php | 100 - app/Http/Middleware/Authenticate.php | 9 - app/Http/Middleware/EmailConfirmed.php | 52 - .../RouteServiceProvider.php | 14 +- app/Http/routes.php | 88 +- app/Jobs/Job.php | 2 +- app/Markdown/HtmlMarkdownConvertor.php | 32 - app/Policies/.gitkeep | 0 app/Providers/CommentServiceProvider.php | 19 - app/Providers/GithubServiceProvider.php | 41 - app/Providers/HashidsServiceProvider.php | 17 - .../ForeignLanguageSpamDetector.php | 2 +- .../PhoneNumberSpamDetector.php | 2 +- app/{Content => Spam}/SpamDetector.php | 2 +- app/{Content => Spam}/SpamFilter.php | 6 +- .../SpamServiceProvider.php} | 8 +- app/Tags/Tag.php | 22 - app/Tags/TagCollection.php | 16 - app/Tags/TagRepository.php | 44 - app/Users/User.php | 38 + composer.json | 13 +- composer.lock | 520 +- config/app.php | 18 +- config/auth.php | 2 +- config/forum.php | 39 - config/purifier.php | 32 - config/services.php | 14 +- database/factories/ModelFactory.php | 5 +- database/seeds/UserSeeder.php | 2 +- phpspec.yml | 1 + public/.gitignore | 1 - public/config.rb | 26 - public/favicon.ico | Bin 5686 -> 0 bytes public/images/jquery.fs.naver-icon.png | Bin 209 -> 0 bytes public/images/laravel-io-logo-dark-v2.png | Bin 1970 -> 0 bytes public/images/laravel-io-logo-dark-v3.png | Bin 1970 -> 0 bytes public/images/laravel-io-logo-dark.png | Bin 1709 -> 0 bytes public/images/laravel-io-logo-small.png | Bin 1700 -> 0 bytes public/images/laravel-io-logo.png | Bin 2333 -> 0 bytes public/images/pattern.png | Bin 2804 -> 0 bytes public/javascripts/bin.js | 357 - public/javascripts/forum.js | 142 - .../foundation/foundation.abide.js | 194 - .../foundation/foundation.alerts.js | 52 - .../foundation/foundation.clearing.js | 516 - .../foundation/foundation.cookie.js | 74 - .../foundation/foundation.dropdown.js | 177 - .../foundation/foundation.forms.js | 533 - .../foundation/foundation.interchange.js | 280 - .../foundation/foundation.joyride.js | 850 -- public/javascripts/foundation/foundation.js | 440 - .../foundation/foundation.magellan.js | 135 - .../foundation/foundation.orbit.js | 412 - .../foundation/foundation.placeholder.js | 179 - .../foundation/foundation.reveal.js | 330 - .../foundation/foundation.section.js | 400 - .../foundation/foundation.tooltips.js | 208 - .../foundation/foundation.topbar.js | 300 - public/javascripts/markdown_editor.js | 44 - public/javascripts/vendor/ZeroClipboard.swf | Bin 1071 -> 0 bytes public/javascripts/vendor/custom.modernizr.js | 4 - public/javascripts/vendor/epiceditor-md.js | 1414 --- public/javascripts/vendor/garlic.js | 425 - .../google-code-prettify/lang-apollo.js | 2 - .../vendor/google-code-prettify/lang-basic.js | 3 - .../vendor/google-code-prettify/lang-clj.js | 18 - .../vendor/google-code-prettify/lang-css.js | 2 - .../vendor/google-code-prettify/lang-dart.js | 3 - .../google-code-prettify/lang-erlang.js | 2 - .../vendor/google-code-prettify/lang-go.js | 1 - .../vendor/google-code-prettify/lang-hs.js | 2 - .../vendor/google-code-prettify/lang-lisp.js | 3 - .../vendor/google-code-prettify/lang-llvm.js | 1 - .../vendor/google-code-prettify/lang-lua.js | 2 - .../google-code-prettify/lang-matlab.js | 6 - .../vendor/google-code-prettify/lang-ml.js | 2 - .../vendor/google-code-prettify/lang-mumps.js | 2 - .../vendor/google-code-prettify/lang-n.js | 4 - .../google-code-prettify/lang-pascal.js | 3 - .../vendor/google-code-prettify/lang-proto.js | 1 - .../vendor/google-code-prettify/lang-r.js | 2 - .../vendor/google-code-prettify/lang-rd.js | 1 - .../vendor/google-code-prettify/lang-scala.js | 2 - .../vendor/google-code-prettify/lang-sql.js | 2 - .../vendor/google-code-prettify/lang-tcl.js | 3 - .../vendor/google-code-prettify/lang-tex.js | 1 - .../vendor/google-code-prettify/lang-vb.js | 2 - .../vendor/google-code-prettify/lang-vhdl.js | 3 - .../vendor/google-code-prettify/lang-wiki.js | 2 - .../vendor/google-code-prettify/lang-xq.js | 3 - .../vendor/google-code-prettify/lang-yaml.js | 2 - .../vendor/google-code-prettify/prettify.js | 30 - .../google-code-prettify/run_prettify.js | 34 - .../google-code-prettify/tomorrow-night.css | 141 - .../vendor/jquery-ui-1.10.3.custom.min.js | 6 - public/javascripts/vendor/jquery.fs.naver.js | 259 - public/javascripts/vendor/jquery.js | 9789 ----------------- public/javascripts/vendor/jquery.min.js | 6 - public/javascripts/vendor/mousetrap.min.js | 9 - .../javascripts/vendor/redactor/button1.png | Bin 153 -> 0 bytes .../vendor/redactor/redactor-iframe.css | 201 - .../javascripts/vendor/redactor/redactor.css | 808 -- .../javascripts/vendor/redactor/redactor.js | 6053 ---------- .../vendor/redactor/redactor.min.js | 12 - public/javascripts/vendor/redactor/style.css | 26 - public/javascripts/vendor/tabby.js | 267 - public/javascripts/vendor/tabby.min.js | 1 - .../javascripts/vendor/toastr/toastr.min.css | 1 - .../javascripts/vendor/toastr/toastr.min.js | 1 - public/javascripts/vendor/zclip.min.js | 12 - public/javascripts/vendor/zepto.js | 2000 ---- public/scss/_elements.scss | 7 - public/scss/_settings.scss | 24 - public/scss/app.scss | 47 - .../scss/modules/__clean-module-skeleton.scss | 40 - public/scss/modules/_alert.scss | 45 - public/scss/modules/_bin.scss | 292 - public/scss/modules/_buttons.scss | 65 - public/scss/modules/_comments.scss | 85 - public/scss/modules/_empty-state.scss | 57 - public/scss/modules/_filter.scss | 74 - public/scss/modules/_footer.scss | 91 - public/scss/modules/_form.scss | 114 - public/scss/modules/_forum.scss | 245 - public/scss/modules/_global.scss | 107 - public/scss/modules/_header.scss | 87 - public/scss/modules/_markdown.scss | 172 - public/scss/modules/_naver.scss | 14 - public/scss/modules/_navigation.scss | 84 - public/scss/modules/_pagination.scss | 76 - public/scss/modules/_profile.scss | 67 - public/scss/modules/_reply.scss | 70 - public/scss/modules/_section-headers.scss | 106 - public/scss/modules/_sidebar.scss | 106 - public/scss/modules/_solution.scss | 80 - public/scss/modules/_tags.scss | 95 - public/scss/modules/_user.scss | 160 - .../bourbon/_bourbon-deprecated-upcoming.scss | 13 - public/scss/vendor/bourbon/_bourbon.scss | 59 - .../scss/vendor/bourbon/addons/_button.scss | 273 - .../scss/vendor/bourbon/addons/_clearfix.scss | 29 - .../vendor/bourbon/addons/_font-family.scss | 5 - .../vendor/bourbon/addons/_hide-text.scss | 5 - .../bourbon/addons/_html5-input-types.scss | 56 - .../scss/vendor/bourbon/addons/_position.scss | 42 - .../scss/vendor/bourbon/addons/_prefixer.scss | 49 - .../vendor/bourbon/addons/_retina-image.scss | 32 - public/scss/vendor/bourbon/addons/_size.scss | 44 - .../bourbon/addons/_timing-functions.scss | 32 - .../scss/vendor/bourbon/addons/_triangle.scss | 45 - .../scss/vendor/bourbon/css3/_animation.scss | 52 - .../scss/vendor/bourbon/css3/_appearance.scss | 3 - .../bourbon/css3/_backface-visibility.scss | 6 - .../bourbon/css3/_background-image.scss | 48 - .../scss/vendor/bourbon/css3/_background.scss | 103 - .../vendor/bourbon/css3/_border-image.scss | 55 - .../vendor/bourbon/css3/_border-radius.scss | 22 - .../scss/vendor/bourbon/css3/_box-sizing.scss | 4 - public/scss/vendor/bourbon/css3/_columns.scss | 47 - .../scss/vendor/bourbon/css3/_flex-box.scss | 320 - .../scss/vendor/bourbon/css3/_font-face.scss | 23 - .../bourbon/css3/_hidpi-media-query.scss | 10 - .../vendor/bourbon/css3/_image-rendering.scss | 13 - .../vendor/bourbon/css3/_inline-block.scss | 8 - .../scss/vendor/bourbon/css3/_keyframes.scss | 43 - .../vendor/bourbon/css3/_linear-gradient.scss | 41 - .../vendor/bourbon/css3/_perspective.scss | 8 - .../vendor/bourbon/css3/_placeholder.scss | 29 - .../vendor/bourbon/css3/_radial-gradient.scss | 44 - .../scss/vendor/bourbon/css3/_transform.scss | 15 - .../scss/vendor/bourbon/css3/_transition.scss | 34 - .../vendor/bourbon/css3/_user-select.scss | 3 - .../vendor/bourbon/functions/_compact.scss | 11 - .../vendor/bourbon/functions/_flex-grid.scss | 39 - .../vendor/bourbon/functions/_grid-width.scss | 13 - .../bourbon/functions/_linear-gradient.scss | 13 - .../bourbon/functions/_modular-scale.scss | 40 - .../vendor/bourbon/functions/_px-to-em.scss | 8 - .../bourbon/functions/_radial-gradient.scss | 23 - .../vendor/bourbon/functions/_tint-shade.scss | 9 - .../functions/_transition-property-name.scss | 22 - .../helpers/_deprecated-webkit-gradient.scss | 39 - .../helpers/_gradient-positions-parser.scss | 13 - .../helpers/_linear-positions-parser.scss | 61 - .../bourbon/helpers/_radial-arg-parser.scss | 69 - .../helpers/_radial-positions-parser.scss | 18 - .../bourbon/helpers/_render-gradients.scss | 26 - .../bourbon/helpers/_shape-size-stripper.scss | 10 - .../scss/vendor/foundation/_alert-boxes.scss | 107 - .../scss/vendor/foundation/_block-grid.scss | 71 - .../scss/vendor/foundation/_breadcrumbs.scss | 124 - .../vendor/foundation/_button-groups.scss | 89 - public/scss/vendor/foundation/_buttons.scss | 230 - public/scss/vendor/foundation/_clearing.scss | 227 - .../scss/vendor/foundation/_custom-forms.scss | 278 - .../vendor/foundation/_dropdown-buttons.scss | 115 - public/scss/vendor/foundation/_dropdown.scss | 151 - .../scss/vendor/foundation/_flex-video.scss | 46 - public/scss/vendor/foundation/_forms.scss | 409 - public/scss/vendor/foundation/_global.scss | 363 - public/scss/vendor/foundation/_grid-5.scss | 214 - public/scss/vendor/foundation/_grid.scss | 188 - .../scss/vendor/foundation/_inline-lists.scss | 53 - public/scss/vendor/foundation/_joyride.scss | 217 - .../scss/vendor/foundation/_keystrokes.scss | 57 - public/scss/vendor/foundation/_labels.scss | 85 - public/scss/vendor/foundation/_magellan.scss | 23 - public/scss/vendor/foundation/_orbit.scss | 340 - .../scss/vendor/foundation/_pagination.scss | 140 - public/scss/vendor/foundation/_panels.scss | 83 - .../vendor/foundation/_pricing-tables.scss | 131 - .../vendor/foundation/_progress-bars.scss | 71 - public/scss/vendor/foundation/_reveal.scss | 136 - public/scss/vendor/foundation/_section.scss | 391 - public/scss/vendor/foundation/_side-nav.scss | 69 - .../vendor/foundation/_split-buttons.scss | 167 - public/scss/vendor/foundation/_sub-nav.scss | 84 - public/scss/vendor/foundation/_switch.scss | 266 - public/scss/vendor/foundation/_tables.scss | 84 - public/scss/vendor/foundation/_thumbs.scss | 53 - public/scss/vendor/foundation/_tooltips.scss | 117 - public/scss/vendor/foundation/_top-bar.scss | 570 - public/scss/vendor/foundation/_type.scss | 435 - .../scss/vendor/foundation/_visibility.scss | 322 - public/scss/vendor/neat/_neat-helpers.scss | 8 - public/scss/vendor/neat/_neat.scss | 21 - .../neat/functions/_new-breakpoint.scss | 16 - .../scss/vendor/neat/functions/_private.scss | 107 - .../scss/vendor/neat/functions/_px-to-em.scss | 3 - .../scss/vendor/neat/grid/_fill-parent.scss | 7 - public/scss/vendor/neat/grid/_grid.scss | 5 - public/scss/vendor/neat/grid/_media.scss | 51 - public/scss/vendor/neat/grid/_omega.scss | 79 - .../vendor/neat/grid/_outer-container.scss | 8 - public/scss/vendor/neat/grid/_pad.scss | 8 - public/scss/vendor/neat/grid/_private.scss | 21 - public/scss/vendor/neat/grid/_reset.scss | 12 - public/scss/vendor/neat/grid/_row.scss | 17 - public/scss/vendor/neat/grid/_shift.scss | 10 - .../scss/vendor/neat/grid/_span-columns.scss | 45 - .../scss/vendor/neat/grid/_to-deprecate.scss | 57 - .../scss/vendor/neat/grid/_visual-grid.scss | 41 - public/scss/vendor/neat/settings/_grid.scss | 7 - .../vendor/neat/settings/_visual-grid.scss | 5 - public/scss/vendor/normalize/_normalize.scss | 402 - public/scss/vendor/typeplate/_typeplate.scss | 818 -- public/stylesheets/app.css | 1 - resources/assets/sass/app.scss | 0 resources/lang/en/validation.php | 1 + resources/views/admin/users/edit.blade.php | 72 - resources/views/admin/users/index.blade.php | 64 - resources/views/auth/signup.blade.php | 41 - resources/views/bin/_cartalyst-ad.blade.php | 4 - resources/views/bin/_editor.blade.php | 6 - resources/views/bin/_logo.blade.php | 1 - resources/views/bin/_scripts.blade.php | 10 - resources/views/bin/_sidebar_toggle.php | 1 - resources/views/bin/_styles.blade.php | 6 - resources/views/bin/create.blade.php | 35 - resources/views/bin/fork.blade.php | 36 - resources/views/bin/raw.blade.php | 1 - resources/views/bin/show.blade.php | 35 - resources/views/chat/index.blade.php | 9 - resources/views/emails/confirmation.blade.php | 17 - resources/views/errors/503.blade.php | 2 +- resources/views/forum/_index.blade.php | 27 - resources/views/forum/_sidebar.blade.php | 15 - resources/views/forum/_tag_chooser.blade.php | 27 - .../views/forum/_thread_summary.blade.php | 20 - .../views/forum/replies/_create.blade.php | 16 - resources/views/forum/replies/_show.blade.php | 41 - .../views/forum/replies/delete.blade.php | 23 - resources/views/forum/replies/edit.blade.php | 27 - resources/views/forum/search.blade.php | 53 - .../forum/threads/_index_summary.blade.php | 43 - .../views/forum/threads/_thread.blade.php | 42 - .../views/forum/threads/create.blade.php | 94 - .../views/forum/threads/delete.blade.php | 23 - resources/views/forum/threads/edit.blade.php | 70 - resources/views/forum/threads/index.blade.php | 52 - resources/views/forum/threads/show.blade.php | 49 - .../views/forum/threads/throttle.blade.php | 16 - .../views/layouts/_code_prettify.blade.php | 9 - resources/views/layouts/_flash.blade.php | 20 - resources/views/layouts/_footer.blade.php | 57 - .../views/layouts/_markdown_editor.blade.php | 9 - resources/views/layouts/_one_column.blade.php | 7 - resources/views/layouts/_top_nav.blade.php | 40 - .../_two_columns_left_sidebar.blade.php | 11 - resources/views/layouts/bin.blade.php | 33 - resources/views/layouts/default.blade.php | 65 - resources/views/users/_sidebar.blade.php | 14 - resources/views/users/profile.blade.php | 59 - resources/views/users/replies.blade.php | 35 - resources/views/users/settings.blade.php | 40 - resources/views/users/threads.blade.php | 33 - .../ForeignLanguageSpamDetectorSpec.php | 8 +- .../PhoneNumberSpamDetectorSpec.php | 8 +- spec/{Content => Spam}/SpamFilterSpec.php | 12 +- tests/Functional/Forum/OverviewTest.php | 17 - tests/Unit/GitHub/GistEmbedFormatterTest.php | 49 - tests/Unit/GitHub/GithubAuthenticatorTest.php | 133 - .../Markdown/HtmlToMarkdownConvertorTest.php | 54 - 375 files changed, 266 insertions(+), 45905 deletions(-) delete mode 100644 app/Accounts/InvalidRoleException.php delete mode 100644 app/Accounts/Role.php delete mode 100644 app/Accounts/RoleRepository.php delete mode 100644 app/Accounts/SendConfirmationEmail.php delete mode 100644 app/Accounts/User.php delete mode 100644 app/Accounts/UserCreator.php delete mode 100644 app/Accounts/UserCreatorListener.php delete mode 100644 app/Accounts/UserPresenter.php delete mode 100644 app/Accounts/UserRepository.php delete mode 100644 app/Accounts/UserUpdater.php delete mode 100644 app/Accounts/UserUpdaterListener.php rename app/{Providers => }/AppServiceProvider.php (93%) create mode 100644 app/Auth/AuthServiceProvider.php delete mode 100755 app/Bin/Paste.php delete mode 100644 app/Bin/PasteCreator.php delete mode 100644 app/Bin/PasteCreatorListener.php delete mode 100644 app/Bin/PasteForkCreator.php delete mode 100644 app/Bin/PasteForm.php delete mode 100644 app/Bin/PastePresenter.php delete mode 100755 app/Bin/PasteRepository.php delete mode 100644 app/Comments/Comment.php delete mode 100644 app/Comments/CommentObserver.php delete mode 100644 app/Comments/CommentPresenter.php delete mode 100644 app/Comments/ReplyForm.php delete mode 100644 app/Core/EloquentRepository.php delete mode 100644 app/Core/Entity.php delete mode 100644 app/Core/Exceptions/EntityNotFoundException.php delete mode 100644 app/Core/Exceptions/NoValidationRulesFoundException.php delete mode 100644 app/Core/Exceptions/NoValidatorInstantiatedException.php delete mode 100644 app/Core/FormModel.php rename app/{Providers => Events}/EventServiceProvider.php (96%) delete mode 100644 app/Forum/Replies/Reply.php delete mode 100644 app/Forum/Replies/ReplyCreator.php delete mode 100644 app/Forum/Replies/ReplyCreatorListener.php delete mode 100644 app/Forum/Replies/ReplyDeleter.php delete mode 100644 app/Forum/Replies/ReplyDeleterListener.php delete mode 100644 app/Forum/Replies/ReplyForm.php delete mode 100644 app/Forum/Replies/ReplyPresenter.php delete mode 100644 app/Forum/Replies/ReplyQueryStringGenerator.php delete mode 100644 app/Forum/Replies/ReplyRepository.php delete mode 100644 app/Forum/Replies/ReplyUpdater.php delete mode 100644 app/Forum/Replies/ReplyUpdaterListener.php delete mode 100644 app/Forum/SectionSidebarCreator.php delete mode 100644 app/Forum/Threads/Thread.php delete mode 100644 app/Forum/Threads/ThreadCreator.php delete mode 100644 app/Forum/Threads/ThreadCreatorListener.php delete mode 100644 app/Forum/Threads/ThreadDeleter.php delete mode 100644 app/Forum/Threads/ThreadDeleterListener.php delete mode 100644 app/Forum/Threads/ThreadForm.php delete mode 100644 app/Forum/Threads/ThreadPresenter.php delete mode 100644 app/Forum/Threads/ThreadRepository.php delete mode 100644 app/Forum/Threads/ThreadSearch.php delete mode 100644 app/Forum/Threads/ThreadUpdater.php delete mode 100644 app/Forum/Threads/ThreadUpdaterListener.php delete mode 100644 app/Forum/Threads/ThreadVisitation.php delete mode 100644 app/Forum/Threads/ThreadVisitationUpdater.php delete mode 100644 app/Github/GistEmbedFormatter.php delete mode 100644 app/Github/GithubAuthenticator.php delete mode 100644 app/Github/GithubAuthenticatorListener.php delete mode 100644 app/Github/GithubUserDataReader.php delete mode 100644 app/Http/Controllers/Admin/OverviewController.php delete mode 100644 app/Http/Controllers/Admin/UsersController.php delete mode 100644 app/Http/Controllers/ChatController.php delete mode 100644 app/Http/Controllers/Forum/ForumRepliesController.php delete mode 100644 app/Http/Controllers/Forum/ForumThreadsController.php delete mode 100644 app/Http/Controllers/PastesController.php delete mode 100644 app/Http/Controllers/UsersController.php delete mode 100644 app/Http/Middleware/EmailConfirmed.php rename app/{Providers => Http}/RouteServiceProvider.php (73%) delete mode 100644 app/Markdown/HtmlMarkdownConvertor.php create mode 100644 app/Policies/.gitkeep delete mode 100644 app/Providers/CommentServiceProvider.php delete mode 100644 app/Providers/GithubServiceProvider.php delete mode 100644 app/Providers/HashidsServiceProvider.php rename app/{Content => Spam}/ForeignLanguageSpamDetector.php (94%) rename app/{Content => Spam}/PhoneNumberSpamDetector.php (90%) rename app/{Content => Spam}/SpamDetector.php (85%) rename app/{Content => Spam}/SpamFilter.php (79%) rename app/{Providers/ContentServiceProvider.php => Spam/SpamServiceProvider.php} (64%) delete mode 100644 app/Tags/Tag.php delete mode 100644 app/Tags/TagCollection.php delete mode 100644 app/Tags/TagRepository.php create mode 100644 app/Users/User.php delete mode 100644 config/forum.php delete mode 100644 config/purifier.php delete mode 100644 public/.gitignore delete mode 100644 public/config.rb delete mode 100644 public/images/jquery.fs.naver-icon.png delete mode 100644 public/images/laravel-io-logo-dark-v2.png delete mode 100644 public/images/laravel-io-logo-dark-v3.png delete mode 100644 public/images/laravel-io-logo-dark.png delete mode 100644 public/images/laravel-io-logo-small.png delete mode 100644 public/images/laravel-io-logo.png delete mode 100644 public/images/pattern.png delete mode 100755 public/javascripts/bin.js delete mode 100644 public/javascripts/forum.js delete mode 100644 public/javascripts/foundation/foundation.abide.js delete mode 100644 public/javascripts/foundation/foundation.alerts.js delete mode 100644 public/javascripts/foundation/foundation.clearing.js delete mode 100644 public/javascripts/foundation/foundation.cookie.js delete mode 100644 public/javascripts/foundation/foundation.dropdown.js delete mode 100644 public/javascripts/foundation/foundation.forms.js delete mode 100644 public/javascripts/foundation/foundation.interchange.js delete mode 100644 public/javascripts/foundation/foundation.joyride.js delete mode 100644 public/javascripts/foundation/foundation.js delete mode 100644 public/javascripts/foundation/foundation.magellan.js delete mode 100644 public/javascripts/foundation/foundation.orbit.js delete mode 100644 public/javascripts/foundation/foundation.placeholder.js delete mode 100644 public/javascripts/foundation/foundation.reveal.js delete mode 100644 public/javascripts/foundation/foundation.section.js delete mode 100644 public/javascripts/foundation/foundation.tooltips.js delete mode 100644 public/javascripts/foundation/foundation.topbar.js delete mode 100644 public/javascripts/markdown_editor.js delete mode 100644 public/javascripts/vendor/ZeroClipboard.swf delete mode 100755 public/javascripts/vendor/custom.modernizr.js delete mode 100755 public/javascripts/vendor/epiceditor-md.js delete mode 100755 public/javascripts/vendor/garlic.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-apollo.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-basic.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-clj.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-css.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-dart.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-erlang.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-go.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-hs.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-lisp.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-llvm.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-lua.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-matlab.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-ml.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-mumps.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-n.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-pascal.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-proto.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-r.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-rd.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-scala.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-sql.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-tcl.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-tex.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-vb.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-vhdl.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-wiki.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-xq.js delete mode 100755 public/javascripts/vendor/google-code-prettify/lang-yaml.js delete mode 100755 public/javascripts/vendor/google-code-prettify/prettify.js delete mode 100755 public/javascripts/vendor/google-code-prettify/run_prettify.js delete mode 100644 public/javascripts/vendor/google-code-prettify/tomorrow-night.css delete mode 100755 public/javascripts/vendor/jquery-ui-1.10.3.custom.min.js delete mode 100644 public/javascripts/vendor/jquery.fs.naver.js delete mode 100755 public/javascripts/vendor/jquery.js delete mode 100644 public/javascripts/vendor/jquery.min.js delete mode 100644 public/javascripts/vendor/mousetrap.min.js delete mode 100755 public/javascripts/vendor/redactor/button1.png delete mode 100755 public/javascripts/vendor/redactor/redactor-iframe.css delete mode 100755 public/javascripts/vendor/redactor/redactor.css delete mode 100755 public/javascripts/vendor/redactor/redactor.js delete mode 100755 public/javascripts/vendor/redactor/redactor.min.js delete mode 100755 public/javascripts/vendor/redactor/style.css delete mode 100755 public/javascripts/vendor/tabby.js delete mode 100644 public/javascripts/vendor/tabby.min.js delete mode 100644 public/javascripts/vendor/toastr/toastr.min.css delete mode 100644 public/javascripts/vendor/toastr/toastr.min.js delete mode 100644 public/javascripts/vendor/zclip.min.js delete mode 100755 public/javascripts/vendor/zepto.js delete mode 100644 public/scss/_elements.scss delete mode 100644 public/scss/_settings.scss delete mode 100644 public/scss/app.scss delete mode 100644 public/scss/modules/__clean-module-skeleton.scss delete mode 100644 public/scss/modules/_alert.scss delete mode 100644 public/scss/modules/_bin.scss delete mode 100644 public/scss/modules/_buttons.scss delete mode 100644 public/scss/modules/_comments.scss delete mode 100644 public/scss/modules/_empty-state.scss delete mode 100644 public/scss/modules/_filter.scss delete mode 100644 public/scss/modules/_footer.scss delete mode 100644 public/scss/modules/_form.scss delete mode 100644 public/scss/modules/_forum.scss delete mode 100644 public/scss/modules/_global.scss delete mode 100644 public/scss/modules/_header.scss delete mode 100644 public/scss/modules/_markdown.scss delete mode 100644 public/scss/modules/_naver.scss delete mode 100644 public/scss/modules/_navigation.scss delete mode 100644 public/scss/modules/_pagination.scss delete mode 100644 public/scss/modules/_profile.scss delete mode 100644 public/scss/modules/_reply.scss delete mode 100644 public/scss/modules/_section-headers.scss delete mode 100644 public/scss/modules/_sidebar.scss delete mode 100644 public/scss/modules/_solution.scss delete mode 100644 public/scss/modules/_tags.scss delete mode 100644 public/scss/modules/_user.scss delete mode 100755 public/scss/vendor/bourbon/_bourbon-deprecated-upcoming.scss delete mode 100755 public/scss/vendor/bourbon/_bourbon.scss delete mode 100755 public/scss/vendor/bourbon/addons/_button.scss delete mode 100755 public/scss/vendor/bourbon/addons/_clearfix.scss delete mode 100755 public/scss/vendor/bourbon/addons/_font-family.scss delete mode 100755 public/scss/vendor/bourbon/addons/_hide-text.scss delete mode 100755 public/scss/vendor/bourbon/addons/_html5-input-types.scss delete mode 100755 public/scss/vendor/bourbon/addons/_position.scss delete mode 100755 public/scss/vendor/bourbon/addons/_prefixer.scss delete mode 100755 public/scss/vendor/bourbon/addons/_retina-image.scss delete mode 100755 public/scss/vendor/bourbon/addons/_size.scss delete mode 100755 public/scss/vendor/bourbon/addons/_timing-functions.scss delete mode 100755 public/scss/vendor/bourbon/addons/_triangle.scss delete mode 100755 public/scss/vendor/bourbon/css3/_animation.scss delete mode 100755 public/scss/vendor/bourbon/css3/_appearance.scss delete mode 100755 public/scss/vendor/bourbon/css3/_backface-visibility.scss delete mode 100755 public/scss/vendor/bourbon/css3/_background-image.scss delete mode 100755 public/scss/vendor/bourbon/css3/_background.scss delete mode 100755 public/scss/vendor/bourbon/css3/_border-image.scss delete mode 100755 public/scss/vendor/bourbon/css3/_border-radius.scss delete mode 100755 public/scss/vendor/bourbon/css3/_box-sizing.scss delete mode 100755 public/scss/vendor/bourbon/css3/_columns.scss delete mode 100755 public/scss/vendor/bourbon/css3/_flex-box.scss delete mode 100755 public/scss/vendor/bourbon/css3/_font-face.scss delete mode 100755 public/scss/vendor/bourbon/css3/_hidpi-media-query.scss delete mode 100755 public/scss/vendor/bourbon/css3/_image-rendering.scss delete mode 100755 public/scss/vendor/bourbon/css3/_inline-block.scss delete mode 100755 public/scss/vendor/bourbon/css3/_keyframes.scss delete mode 100755 public/scss/vendor/bourbon/css3/_linear-gradient.scss delete mode 100755 public/scss/vendor/bourbon/css3/_perspective.scss delete mode 100755 public/scss/vendor/bourbon/css3/_placeholder.scss delete mode 100755 public/scss/vendor/bourbon/css3/_radial-gradient.scss delete mode 100755 public/scss/vendor/bourbon/css3/_transform.scss delete mode 100755 public/scss/vendor/bourbon/css3/_transition.scss delete mode 100755 public/scss/vendor/bourbon/css3/_user-select.scss delete mode 100755 public/scss/vendor/bourbon/functions/_compact.scss delete mode 100755 public/scss/vendor/bourbon/functions/_flex-grid.scss delete mode 100755 public/scss/vendor/bourbon/functions/_grid-width.scss delete mode 100755 public/scss/vendor/bourbon/functions/_linear-gradient.scss delete mode 100755 public/scss/vendor/bourbon/functions/_modular-scale.scss delete mode 100755 public/scss/vendor/bourbon/functions/_px-to-em.scss delete mode 100755 public/scss/vendor/bourbon/functions/_radial-gradient.scss delete mode 100755 public/scss/vendor/bourbon/functions/_tint-shade.scss delete mode 100755 public/scss/vendor/bourbon/functions/_transition-property-name.scss delete mode 100755 public/scss/vendor/bourbon/helpers/_deprecated-webkit-gradient.scss delete mode 100755 public/scss/vendor/bourbon/helpers/_gradient-positions-parser.scss delete mode 100755 public/scss/vendor/bourbon/helpers/_linear-positions-parser.scss delete mode 100755 public/scss/vendor/bourbon/helpers/_radial-arg-parser.scss delete mode 100755 public/scss/vendor/bourbon/helpers/_radial-positions-parser.scss delete mode 100755 public/scss/vendor/bourbon/helpers/_render-gradients.scss delete mode 100755 public/scss/vendor/bourbon/helpers/_shape-size-stripper.scss delete mode 100755 public/scss/vendor/foundation/_alert-boxes.scss delete mode 100755 public/scss/vendor/foundation/_block-grid.scss delete mode 100755 public/scss/vendor/foundation/_breadcrumbs.scss delete mode 100755 public/scss/vendor/foundation/_button-groups.scss delete mode 100755 public/scss/vendor/foundation/_buttons.scss delete mode 100755 public/scss/vendor/foundation/_clearing.scss delete mode 100755 public/scss/vendor/foundation/_custom-forms.scss delete mode 100755 public/scss/vendor/foundation/_dropdown-buttons.scss delete mode 100755 public/scss/vendor/foundation/_dropdown.scss delete mode 100755 public/scss/vendor/foundation/_flex-video.scss delete mode 100755 public/scss/vendor/foundation/_forms.scss delete mode 100755 public/scss/vendor/foundation/_global.scss delete mode 100755 public/scss/vendor/foundation/_grid-5.scss delete mode 100755 public/scss/vendor/foundation/_grid.scss delete mode 100755 public/scss/vendor/foundation/_inline-lists.scss delete mode 100755 public/scss/vendor/foundation/_joyride.scss delete mode 100755 public/scss/vendor/foundation/_keystrokes.scss delete mode 100755 public/scss/vendor/foundation/_labels.scss delete mode 100755 public/scss/vendor/foundation/_magellan.scss delete mode 100755 public/scss/vendor/foundation/_orbit.scss delete mode 100755 public/scss/vendor/foundation/_pagination.scss delete mode 100755 public/scss/vendor/foundation/_panels.scss delete mode 100755 public/scss/vendor/foundation/_pricing-tables.scss delete mode 100755 public/scss/vendor/foundation/_progress-bars.scss delete mode 100755 public/scss/vendor/foundation/_reveal.scss delete mode 100755 public/scss/vendor/foundation/_section.scss delete mode 100755 public/scss/vendor/foundation/_side-nav.scss delete mode 100755 public/scss/vendor/foundation/_split-buttons.scss delete mode 100755 public/scss/vendor/foundation/_sub-nav.scss delete mode 100755 public/scss/vendor/foundation/_switch.scss delete mode 100755 public/scss/vendor/foundation/_tables.scss delete mode 100755 public/scss/vendor/foundation/_thumbs.scss delete mode 100755 public/scss/vendor/foundation/_tooltips.scss delete mode 100755 public/scss/vendor/foundation/_top-bar.scss delete mode 100755 public/scss/vendor/foundation/_type.scss delete mode 100755 public/scss/vendor/foundation/_visibility.scss delete mode 100755 public/scss/vendor/neat/_neat-helpers.scss delete mode 100755 public/scss/vendor/neat/_neat.scss delete mode 100755 public/scss/vendor/neat/functions/_new-breakpoint.scss delete mode 100755 public/scss/vendor/neat/functions/_private.scss delete mode 100755 public/scss/vendor/neat/functions/_px-to-em.scss delete mode 100755 public/scss/vendor/neat/grid/_fill-parent.scss delete mode 100755 public/scss/vendor/neat/grid/_grid.scss delete mode 100755 public/scss/vendor/neat/grid/_media.scss delete mode 100755 public/scss/vendor/neat/grid/_omega.scss delete mode 100755 public/scss/vendor/neat/grid/_outer-container.scss delete mode 100755 public/scss/vendor/neat/grid/_pad.scss delete mode 100755 public/scss/vendor/neat/grid/_private.scss delete mode 100755 public/scss/vendor/neat/grid/_reset.scss delete mode 100755 public/scss/vendor/neat/grid/_row.scss delete mode 100755 public/scss/vendor/neat/grid/_shift.scss delete mode 100755 public/scss/vendor/neat/grid/_span-columns.scss delete mode 100755 public/scss/vendor/neat/grid/_to-deprecate.scss delete mode 100755 public/scss/vendor/neat/grid/_visual-grid.scss delete mode 100755 public/scss/vendor/neat/settings/_grid.scss delete mode 100755 public/scss/vendor/neat/settings/_visual-grid.scss delete mode 100755 public/scss/vendor/normalize/_normalize.scss delete mode 100755 public/scss/vendor/typeplate/_typeplate.scss delete mode 100644 public/stylesheets/app.css create mode 100644 resources/assets/sass/app.scss delete mode 100644 resources/views/admin/users/edit.blade.php delete mode 100644 resources/views/admin/users/index.blade.php delete mode 100644 resources/views/auth/signup.blade.php delete mode 100644 resources/views/bin/_cartalyst-ad.blade.php delete mode 100644 resources/views/bin/_editor.blade.php delete mode 100644 resources/views/bin/_logo.blade.php delete mode 100644 resources/views/bin/_scripts.blade.php delete mode 100644 resources/views/bin/_sidebar_toggle.php delete mode 100644 resources/views/bin/_styles.blade.php delete mode 100755 resources/views/bin/create.blade.php delete mode 100644 resources/views/bin/fork.blade.php delete mode 100644 resources/views/bin/raw.blade.php delete mode 100755 resources/views/bin/show.blade.php delete mode 100644 resources/views/chat/index.blade.php delete mode 100644 resources/views/emails/confirmation.blade.php delete mode 100644 resources/views/forum/_index.blade.php delete mode 100644 resources/views/forum/_sidebar.blade.php delete mode 100644 resources/views/forum/_tag_chooser.blade.php delete mode 100644 resources/views/forum/_thread_summary.blade.php delete mode 100644 resources/views/forum/replies/_create.blade.php delete mode 100644 resources/views/forum/replies/_show.blade.php delete mode 100644 resources/views/forum/replies/delete.blade.php delete mode 100644 resources/views/forum/replies/edit.blade.php delete mode 100644 resources/views/forum/search.blade.php delete mode 100644 resources/views/forum/threads/_index_summary.blade.php delete mode 100644 resources/views/forum/threads/_thread.blade.php delete mode 100644 resources/views/forum/threads/create.blade.php delete mode 100644 resources/views/forum/threads/delete.blade.php delete mode 100644 resources/views/forum/threads/edit.blade.php delete mode 100644 resources/views/forum/threads/index.blade.php delete mode 100644 resources/views/forum/threads/show.blade.php delete mode 100644 resources/views/forum/threads/throttle.blade.php delete mode 100644 resources/views/layouts/_code_prettify.blade.php delete mode 100644 resources/views/layouts/_flash.blade.php delete mode 100644 resources/views/layouts/_footer.blade.php delete mode 100644 resources/views/layouts/_markdown_editor.blade.php delete mode 100644 resources/views/layouts/_one_column.blade.php delete mode 100644 resources/views/layouts/_top_nav.blade.php delete mode 100644 resources/views/layouts/_two_columns_left_sidebar.blade.php delete mode 100644 resources/views/layouts/bin.blade.php delete mode 100644 resources/views/layouts/default.blade.php delete mode 100644 resources/views/users/_sidebar.blade.php delete mode 100644 resources/views/users/profile.blade.php delete mode 100644 resources/views/users/replies.blade.php delete mode 100644 resources/views/users/settings.blade.php delete mode 100644 resources/views/users/threads.blade.php rename spec/{Content => Spam}/ForeignLanguageSpamDetectorSpec.php (89%) rename spec/{Content => Spam}/PhoneNumberSpamDetectorSpec.php (95%) rename spec/{Content => Spam}/SpamFilterSpec.php (70%) delete mode 100644 tests/Functional/Forum/OverviewTest.php delete mode 100644 tests/Unit/GitHub/GistEmbedFormatterTest.php delete mode 100644 tests/Unit/GitHub/GithubAuthenticatorTest.php delete mode 100644 tests/Unit/Markdown/HtmlToMarkdownConvertorTest.php diff --git a/.env.example b/.env.example index d4e0cc656..e355f355f 100644 --- a/.env.example +++ b/.env.example @@ -17,8 +17,6 @@ MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null -NOCAPTCHA_SITEKEY= -NOCAPTCHA_SECRET= GITHUB_ID= GITHUB_SECRET= GITHUB_URL= diff --git a/app/Accounts/InvalidRoleException.php b/app/Accounts/InvalidRoleException.php deleted file mode 100644 index 78487a4c5..000000000 --- a/app/Accounts/InvalidRoleException.php +++ /dev/null @@ -1,4 +0,0 @@ - 'required', - ]; - - public function users() - { - $this->belongsToMany(User::class); - } -} diff --git a/app/Accounts/RoleRepository.php b/app/Accounts/RoleRepository.php deleted file mode 100644 index 7f2cacb60..000000000 --- a/app/Accounts/RoleRepository.php +++ /dev/null @@ -1,17 +0,0 @@ -model = $model; - } - - public function getRoleList() - { - return $this->model->lists('name', 'id'); - } -} diff --git a/app/Accounts/SendConfirmationEmail.php b/app/Accounts/SendConfirmationEmail.php deleted file mode 100644 index b0587d888..000000000 --- a/app/Accounts/SendConfirmationEmail.php +++ /dev/null @@ -1,45 +0,0 @@ -mailer = $mailer; - } - - /** - * Send a confirmation email to the user to verify his email address - * - * @param \Lio\Accounts\User $user - */ - public function send(User $user) - { - $this->mailer->send( - $this->view, - ['confirmationCode' => $user->confirmation_code], - function (Message $message) use ($user) { - $message->to($user->email); - $message->subject('Verify your email address for your Laravel.io account'); - } - ); - } -} diff --git a/app/Accounts/User.php b/app/Accounts/User.php deleted file mode 100644 index 538c49920..000000000 --- a/app/Accounts/User.php +++ /dev/null @@ -1,184 +0,0 @@ - 'unique:users,github_id,', - 'email' => 'required|email|unique:users,email,', - 'name' => 'required|alpha_num|unique:users,name,', - ]; - - private $rolesCache; - - public function roles() - { - return $this->belongsToMany(Role::class); - } - - public function getRoles() - { - if (! isset($this->rolesCache)) { - $this->rolesCache = $this->roles; - } - - return $this->rolesCache; - } - - public function isForumAdmin() - { - return $this->hasRole('manage_forum'); - } - - public function setRolesAttribute($roles) - { - $this->roles()->sync((array) $roles); - } - - public function hasRole($roleName) - { - return $this->hasRoles($roleName); - } - - public function hasRoles($roleNames = []) - { - $roleList = app(RoleRepository::class)->getRoleList(); - - foreach ((array) $roleNames as $allowedRole) { - // validate that the role exists - if (! $roleList->contains($allowedRole)) { - throw new InvalidRoleException("Unidentified role: {$allowedRole}"); - } - - // validate that the user has the role - if (! $this->roleCollectionHasRole($allowedRole)) { - return false; - } - } - - return true; - } - - private function roleCollectionHasRole($allowedRole) - { - $roles = $this->getRoles(); - - if (! $roles) { - return false; - } - - foreach ($roles as $role) { - if (strtolower($role->name) == strtolower($allowedRole)) { - return true; - } - } - - return false; - } - - // Forum - public function forumPosts() - { - return $this->hasMany('Lio\Comments\Comment', 'author_id')->where('type', '=', \Lio\Comments\Comment::TYPE_FORUM)->orderBy('created_at', 'desc'); - } - - public function forumThreads() - { - return $this->hasMany('Lio\Forum\Threads\Thread', 'author_id')->orderBy('created_at', 'desc'); - } - - public function forumReplies() - { - return $this->hasMany('Lio\Forum\Replies\Reply', 'author_id')->orderBy('created_at', 'desc'); - } - - public function mostRecentFiveForumPosts() - { - return $this->forumPosts()->take(5); - } - - public function getLatestThreadsPaginated($max = 5) - { - return $this->forumThreads()->paginate($max); - } - - public function getLatestRepliesPaginated($max = 5) - { - return $this->forumReplies()->with('thread')->paginate($max); - } - - public function hasCreatedAThreadRecently() - { - if ($thread = $this->forumThreads()->first()) { - return $thread->created_at->gte(new Carbon('10 minutes ago')); - } - - return false; - } - - /** - * @return bool - */ - public function isConfirmed() - { - return (bool) $this->confirmed; - } - - /** - * @return bool - */ - public function isBanned() - { - return (bool) $this->is_banned; - } - - /** - * Get the presenter class. - * - * @return string - */ - public function getPresenterClass() - { - return UserPresenter::class; - } -} diff --git a/app/Accounts/UserCreator.php b/app/Accounts/UserCreator.php deleted file mode 100644 index b383311c5..000000000 --- a/app/Accounts/UserCreator.php +++ /dev/null @@ -1,69 +0,0 @@ -users = $users; - $this->confirmation = $confirmation; - } - - public function create(UserCreatorListener $listener, $data, $validator = null) - { - // check the passed in validator - if ($validator && ! $validator->isValid()) { - return $listener->userValidationError($validator->getErrors()); - } - - return $this->createValidUserRecord($listener, $data); - } - - private function createValidUserRecord($listener, $data) - { - $user = $this->users->getNew($data); - - // Set a confirmation code for the user. He'll need to verify his email address - // with this code before he can use certain sections on the website. - $confirmationCode = Str::random(30); - - // We'll generate a new one if we find a user with the same code. - while ($this->users->getByConfirmationCode($confirmationCode) !== null) { - $confirmationCode = Str::random(30); - } - - $user->confirmation_code = $confirmationCode; - - // check the model validation - if (! $this->users->save($user)) { - return $listener->userValidationError($user->getErrors()); - } - - // Send a confirmation email to the user. - $this->confirmation->send($user); - - return $listener->userCreated($user); - } -} diff --git a/app/Accounts/UserCreatorListener.php b/app/Accounts/UserCreatorListener.php deleted file mode 100644 index a139eca82..000000000 --- a/app/Accounts/UserCreatorListener.php +++ /dev/null @@ -1,8 +0,0 @@ -roles; - - if (! $roles->count()) { - return 'none'; - } - - $roleArray = []; - - foreach ($roles as $role) { - $roleArray[] = $role->name; - } - - return implode(', ', $roleArray); - } - - public function profileUrl() - { - return action('UsersController@getProfile', [$this->getWrappedObject()->name]); - } - - public function thumbnail() - { - return '' . $this->getWrappedObject()->name . ''; - } - - public function imageMedium() - { - return ''; - } -} diff --git a/app/Accounts/UserRepository.php b/app/Accounts/UserRepository.php deleted file mode 100644 index ea7695e09..000000000 --- a/app/Accounts/UserRepository.php +++ /dev/null @@ -1,82 +0,0 @@ -model = $model; - } - - public function getByGithubId($id) - { - return $this->model->where('github_id', '=', $id)->first(); - } - - public function requireByName($name) - { - $model = $this->getByName($name); - - if (! $model) { - throw new EntityNotFoundException("User with name {$name} could not be found."); - } - - return $model; - } - - public function getByName($name) - { - return $this->model->where('name', '=', $name)->first(); - } - - /** - * @param mixed $value - * @return \Lio\Accounts\User[] - */ - public function search($value) - { - return $this->model - ->where('name', $value) - ->orWhere('id', $value) - ->orWhere('email', $value) - ->paginate(); - } - - public function getFirstX($count) - { - return $this->model->take($count)->get(); - } - - /** - * Find a user by its confirmation code - * - * @param string $code - * @return \Lio\Accounts\User - */ - public function getByConfirmationCode($code) - { - return $this->model->where('confirmation_code', $code)->first(); - } - - /** - * Determine if an email already exists for a user - * - * @param string $email - * @return bool - */ - public function emailExists($email) - { - return (bool) User::where('email', $email)->count(); - } -} diff --git a/app/Accounts/UserUpdater.php b/app/Accounts/UserUpdater.php deleted file mode 100644 index f41344c88..000000000 --- a/app/Accounts/UserUpdater.php +++ /dev/null @@ -1,86 +0,0 @@ -users = $users; - $this->confirmation = $confirmation; - } - - /** - * @param \Lio\Accounts\UserUpdaterListener $listener - * @param \Lio\Accounts\User $user - * @param array $data - * @param \Illuminate\Validation\Validator $validator - * @return mixed - */ - public function update(UserUpdaterListener $listener, User $user, array $data, Validator $validator = null) - { - // check the passed in validator - if ($validator && ! $validator->isValid()) { - return $listener->userValidationError($validator->getErrors()); - } - - return $this->updateUser($user, $listener, $data); - } - - /** - * @param \Lio\Accounts\User $user - * @param \Lio\Accounts\UserUpdaterListener $listener - * @param array $data - * @return mixed - */ - private function updateUser(User $user, UserUpdaterListener $listener, array $data) - { - $oldEmail = $user->email; - - $user->fill($data); - - // If the email changed, the user will need to re-confirm it. - if ($data['email'] !== $oldEmail) { - $user->confirmed = false; - - // Set a confirmation code for the user. He'll need to verify his email address - // with this code before he can use certain sections on the website. - $confirmationCode = Str::random(30); - - // We'll generate a new one if we find a user with the same code. - while ($this->users->getByConfirmationCode($confirmationCode) !== null) { - $confirmationCode = Str::random(30); - } - - $user->confirmation_code = $confirmationCode; - } - - // check the model validation - if (! $this->users->save($user)) { - return $listener->userValidationError($user->getErrors()); - } - - // Send a confirmation email to the user. - if ($data['email'] !== $oldEmail) { - $this->confirmation->send($user); - } - - return $listener->userUpdated($user, $data['email'] !== $oldEmail); - } -} diff --git a/app/Accounts/UserUpdaterListener.php b/app/Accounts/UserUpdaterListener.php deleted file mode 100644 index f6cdce6f4..000000000 --- a/app/Accounts/UserUpdaterListener.php +++ /dev/null @@ -1,8 +0,0 @@ - 'App\Policies\ModelPolicy', + ]; + + /** + * Register any application authentication / authorization services. + * + * @param \Illuminate\Contracts\Auth\Access\Gate $gate + * @return void + */ + public function boot(GateContract $gate) + { + $this->registerPolicies($gate); + + // + } +} diff --git a/app/Bin/Paste.php b/app/Bin/Paste.php deleted file mode 100755 index b48c74375..000000000 --- a/app/Bin/Paste.php +++ /dev/null @@ -1,62 +0,0 @@ - 'required', - ]; - - public function author() - { - return $this->belongsTo('Lio\Accounts\User', 'author_id'); - } - - public function parent() - { - return $this->belongsTo('Lio\Bin\Paste', 'parent_id'); - } - - public function comments() - { - return $this->morphMany('Lio\Comments\Comment', 'owner'); - } - - public function setAuthorAttribute($user) - { - if ( ! $user) return false; - $this->author()->associate($user); - } - - public function setParentAttribute($paste) - { - if ( ! $paste) return false; - $this->parent()->associate($paste); - } - - public function hasComments() - { - return (bool) $this->comments->count() > 0; - } - - /** - * Get the presenter class. - * - * @return string - */ - public function getPresenterClass() - { - return PastePresenter::class; - } -} diff --git a/app/Bin/PasteCreator.php b/app/Bin/PasteCreator.php deleted file mode 100644 index 8bff76634..000000000 --- a/app/Bin/PasteCreator.php +++ /dev/null @@ -1,42 +0,0 @@ -pastes = $pastes; - $this->hashids = $hashids; - } - - public function create($observer, $code, $user, $validator = null) - { - if ($validator && ! $validator->isValid()) { - return $observer->pasteValidationError($validator->getErrors()); - } - - $paste = $this->createPaste($code, $user); - if ( ! $this->pastes->save($paste)) { - return $observer->pasteValidationError($paste->getErrors()); - } - $this->addHash($paste); - return $observer->pasteCreated($paste); - } - - protected function createPaste($code, $user) - { - return $this->pastes->getNew(['code' => $code, 'author' => $user, 'ip' => Request::getClientIp()]); - } - - protected function addHash($paste) - { - $paste->hash = $this->hashids->encode($paste->id); - $this->pastes->save($paste); - } -} diff --git a/app/Bin/PasteCreatorListener.php b/app/Bin/PasteCreatorListener.php deleted file mode 100644 index d4da0bda2..000000000 --- a/app/Bin/PasteCreatorListener.php +++ /dev/null @@ -1,7 +0,0 @@ -pastes = $pastes; - } - - public function setListener($listener) - { - $this->listener = $listener; - } - - public function setParentPaste($parent) - { - $this->parent = $parent; - } - - public function pasteCreated($paste) - { - $paste->parent = $this->parent; - if ( ! $this->pastes->save($paste)) { - return $this->pasteValidationError($paste->getErrors()); - } - return $this->listener->pasteCreated($paste); - } - - public function pasteValidationError($errors) - { - return $this->listener->pasteValidationError($errors); - } -} diff --git a/app/Bin/PasteForm.php b/app/Bin/PasteForm.php deleted file mode 100644 index f5439ebe0..000000000 --- a/app/Bin/PasteForm.php +++ /dev/null @@ -1,12 +0,0 @@ - 'required', - 'password' => 'size:0', - ]; -} diff --git a/app/Bin/PastePresenter.php b/app/Bin/PastePresenter.php deleted file mode 100644 index 23bfdf2b7..000000000 --- a/app/Bin/PastePresenter.php +++ /dev/null @@ -1,32 +0,0 @@ -getWrappedObject()->code; - } - - public function createUrl() - { - return action('PastesController@getCreate'); - } - - public function showUrl() - { - return action('PastesController@getShow', $this->hash); - } - - public function forkUrl() - { - return action('PastesController@getFork', $this->hash); - } - - public function rawUrl() - { - return action('PastesController@getRaw', $this->hash); - } -} diff --git a/app/Bin/PasteRepository.php b/app/Bin/PasteRepository.php deleted file mode 100755 index 7462d0c42..000000000 --- a/app/Bin/PasteRepository.php +++ /dev/null @@ -1,22 +0,0 @@ -model = $model; - } - - public function getRecentPaginated($perPage = 20) - { - return $this->model->orderBy('created_at', 'desc')->paginate($perPage); - } - - public function getByHash($hash) - { - return $this->model->whereRaw('hash = BINARY ?', [$hash])->first(); - } -} diff --git a/app/Comments/Comment.php b/app/Comments/Comment.php deleted file mode 100644 index a1ea3d337..000000000 --- a/app/Comments/Comment.php +++ /dev/null @@ -1,144 +0,0 @@ - 'required', - 'author_id' => 'required|exists:users,id', - ]; - - protected $laravelVersions = [ - 0 => "Doesn't Matter", - 3 => "Laravel 3.x", - 4 => "Laravel 4.x", - 5 => "Laravel 5.x", - ]; - - const TYPE_FORUM = 0; - const TYPE_PASTE = 1; - - public function owner() - { - return $this->morphTo('owner'); - } - - public function author() - { - return $this->belongsTo('Lio\Accounts\User', 'author_id'); - } - - public function parent() - { - return $this->belongsTo('Lio\Comments\Comment', 'parent_id'); - } - - public function children() - { - return $this->hasMany('Lio\Comments\Comment', 'parent_id'); - } - - public function tags() - { - return $this->belongsToMany('Lio\Tags\Tag', 'comment_tag', 'comment_id', 'tag_id'); - } - - public function mostRecentChild() - { - return $this->belongsTo('Lio\Comments\Comment', 'most_recent_child_id'); - } - - public function setBodyAttribute($content) - { - //$body = \App::make('Lio\Markdown\HtmlMarkdownConvertor')->convertHtmlToMarkdown($content); - $this->attributes['body'] = $content; - } - - public function getLaravelVersions() - { - return $this->laravelVersions; - } - - public function isManageableBy(\Lio\Accounts\User $user) - { - return $user->id == $thread->author_id; - } - - public function setMostRecentChild(Comment $comment) - { - $this->most_recent_child_id = $comment->id; - $this->updateChildCount(); - $this->save(); - } - - public function updateChildCount() - { - if ($this->exists) { - $this->child_count = $this->children()->count(); - $this->save(); - } - } - - public function hasTag($tagId) - { - return $this->tags->contains($tagId); - } - - public function isMainComment() - { - if(! $this->parent_id) return true; - } - - public function getSlugString() - { - if ($this->type == static::TYPE_FORUM && is_null($this->parent_id)) { - return $this->getForumPostSlugString(); - } - } - - // - protected function getForumPostSlugString() - { - if (empty($this->title)) return ''; - - $date = date("m-d-Y", strtotime($this->created_at)); - - return Str::slug("{$date} - {$this->title}"); - } - - // - public function delete() - { - if ($this->exists && $this->isMainComment()) { - $this->children()->delete(); - } - parent::delete(); - } - - public function isNewerThan($timestamp) - { - return strtotime($this->updated_at) > $timestamp; - } - - /** - * Get the presenter class. - * - * @return string - */ - public function getPresenterClass() - { - return CommentPresenter::class; - } -} diff --git a/app/Comments/CommentObserver.php b/app/Comments/CommentObserver.php deleted file mode 100644 index 7b0f508fe..000000000 --- a/app/Comments/CommentObserver.php +++ /dev/null @@ -1,17 +0,0 @@ -updateForumThreadDetails($comment); - } - - private function updateForumThreadDetails($comment) - { - if ($comment->type == Comment::TYPE_FORUM && $comment->parent) { - $comment->parent->setMostRecentChild($comment); - } - } -} diff --git a/app/Comments/CommentPresenter.php b/app/Comments/CommentPresenter.php deleted file mode 100644 index 06cf4ec33..000000000 --- a/app/Comments/CommentPresenter.php +++ /dev/null @@ -1,100 +0,0 @@ -getWrappedObject()->slug; - if ( ! $slug) return ''; - return action('Forum\ForumThreadsController@getShowThread', [$slug->slug]); - } - - public function commentUrl() - { - $pagination = null; - $slug = $this->getWrappedObject()->parent->slug; - if ( ! $slug) return ''; - - $url = action('Forum\ForumRepliesController@getCommentRedirect', [$slug->slug, $this->id]); - return $url; - } - - public function child_count_label() - { - if ($this->getWrappedObject()->child_count == 0) { - return '0 Responses'; - } elseif($this->getWrappedObject()->child_count == 1) { - return '1 Response'; - } - - return $this->getWrappedObject()->child_count . ' Responses'; - } - - public function created_ago() - { - return $this->getWrappedObject()->created_at->diffForHumans(); - } - - public function updated_ago() - { - return $this->getWrappedObject()->updated_at->diffForHumans(); - } - - public function body() - { - $body = $this->getWrappedObject()->body; - $body = $this->convertMarkdown($body); - $body = $this->convertNewlines($body); - $body = $this->formatGists($body); - $body = $this->linkify($body); - return $body; - } - - public function bodySummary() - { - $summary = Str::words($this->getWrappedObject()->body, 50); - - return App::make('Lio\Markdown\HtmlMarkdownConvertor')->convertMarkdownToHtml($summary); - } - - public function laravel_version() - { - if ($this->getWrappedObject()->laravel_version == 3) { - return '[L3]'; - } - - if ($this->getWrappedObject()->laravel_version == 4) { - return '[L4]'; - } - - if ($this->getWrappedObject()->laravel_version == 5) { - return '[L5]'; - } - } - - private function convertMarkdown($content) - { - return App::make('Lio\Markdown\HtmlMarkdownConvertor')->convertMarkdownToHtml($content); - } - - private function convertNewlines($content) - { - return str_replace("\n\n", '
', $content); - } - - private function formatGists($content) - { - return App::make('Lio\Github\GistEmbedFormatter')->format($content); - } - - private function linkify($content) - { - $linkify = new \Misd\Linkify\Linkify(); - return $linkify->process($content); - } -} diff --git a/app/Comments/ReplyForm.php b/app/Comments/ReplyForm.php deleted file mode 100644 index 05cfadf70..000000000 --- a/app/Comments/ReplyForm.php +++ /dev/null @@ -1,11 +0,0 @@ - 'required', - ]; -} diff --git a/app/Core/EloquentRepository.php b/app/Core/EloquentRepository.php deleted file mode 100644 index 34d1321bd..000000000 --- a/app/Core/EloquentRepository.php +++ /dev/null @@ -1,88 +0,0 @@ -model = $model; - } - - public function getModel() - { - return $this->model; - } - - public function setModel($model) - { - $this->model = $model; - } - - public function getAll() - { - return $this->model->all(); - } - - public function getAllPaginated($count) - { - return $this->model->paginate($count); - } - - public function getById($id) - { - return $this->model->find($id); - } - - public function requireById($id) - { - $model = $this->getById($id); - - if ( ! $model) { - throw new EntityNotFoundException; - } - - return $model; - } - - public function getNew($attributes = []) - { - return $this->model->newInstance($attributes); - } - - public function save($data) - { - if ($data instanceOf Model) { - return $this->storeEloquentModel($data); - } elseif (is_array($data)) { - return $this->storeArray($data); - } - } - - public function delete($model) - { - return $model->delete(); - } - - protected function storeEloquentModel($model) - { - if ($model->getDirty()) { - return $model->save(); - } else { - return $model->touch(); - } - } - - protected function storeArray($data) - { - $model = $this->getNew($data); - return $this->storeEloquentModel($model); - } -} diff --git a/app/Core/Entity.php b/app/Core/Entity.php deleted file mode 100644 index 68cef0177..000000000 --- a/app/Core/Entity.php +++ /dev/null @@ -1,63 +0,0 @@ -validationRules)) { - throw new NoValidationRulesFoundException('no validation rule array defined in class ' . get_called_class()); - } - $this->validator = Validator::make($this->getAttributes(), $this->getPreparedRules()); - - return $this->validator->passes(); - } - - public function getErrors() - { - if ( ! $this->validator) { - throw new NoValidatorInstantiatedException; - } - - return $this->validator->errors(); - } - - public function save(array $options = []) - { - if ( ! $this->isValid()) { - return false; - } - return parent::save($options); - } - - protected function getPreparedRules() - { - return $this->replaceIdsIfExists($this->validationRules); - } - - protected function replaceIdsIfExists($rules) - { - $newRules = []; - - foreach ($rules as $key => $rule) { - if (str_contains($rule, '')) { - $replacement = $this->exists ? $this->getAttribute($this->primaryKey) : ''; - - $rule = str_replace('', $replacement, $rule); - } - - array_set($newRules, $key, $rule); - } - - return $newRules; - } - -} diff --git a/app/Core/Exceptions/EntityNotFoundException.php b/app/Core/Exceptions/EntityNotFoundException.php deleted file mode 100644 index aa04beade..000000000 --- a/app/Core/Exceptions/EntityNotFoundException.php +++ /dev/null @@ -1,4 +0,0 @@ -inputData = App::make('request')->all(); - } - - public function getInputData() - { - return $this->inputData; - } - - public function isValid() - { - $this->beforeValidation(); - - if ( ! isset($this->validationRules)) { - throw new NoValidationRulesFoundException('no validation rules found in class ' . get_called_class()); - } - - $this->validator = Validator::make($this->getInputData(), $this->getPreparedRules()); - - return $this->validator->passes(); - } - - public function getErrors() - { - return $this->validator->errors(); - } - - protected function getPreparedRules() - { - return $this->validationRules; - } - - protected function beforeValidation() {} -} diff --git a/app/Providers/EventServiceProvider.php b/app/Events/EventServiceProvider.php similarity index 96% rename from app/Providers/EventServiceProvider.php rename to app/Events/EventServiceProvider.php index 816828cec..8f49ead54 100755 --- a/app/Providers/EventServiceProvider.php +++ b/app/Events/EventServiceProvider.php @@ -1,5 +1,5 @@ getMessage(), $e); + } + return parent::render($request, $e); } } diff --git a/app/Forum/Replies/Reply.php b/app/Forum/Replies/Reply.php deleted file mode 100644 index 2fe7d9011..000000000 --- a/app/Forum/Replies/Reply.php +++ /dev/null @@ -1,58 +0,0 @@ - 'required|min:6', - 'author_id' => 'required|exists:users,id', - ]; - - public function author() - { - return $this->belongsTo('Lio\Accounts\User', 'author_id'); - } - - public function thread() - { - return $this->belongsTo('Lio\Forum\Threads\Thread', 'thread_id'); - } - - public function isManageableBy($user) - { - if ( ! $user) return false; - return $this->isOwnedBy($user) || $user->isForumAdmin(); - } - - public function isOwnedBy($user) - { - if ( ! $user) return false; - return $user->id == $this->author_id; - } - - public function getPrecedingReplyCount() - { - return $this->newQuery()->where('thread_id', $this->thread_id)->where('created_at', '<', $this->created_at)->count(); - } - - /** - * Get the presenter class. - * - * @return string - */ - public function getPresenterClass() - { - return ReplyPresenter::class; - } -} diff --git a/app/Forum/Replies/ReplyCreator.php b/app/Forum/Replies/ReplyCreator.php deleted file mode 100644 index a454de4b8..000000000 --- a/app/Forum/Replies/ReplyCreator.php +++ /dev/null @@ -1,59 +0,0 @@ -replies = $replies; - } - - public function create(ReplyCreatorListener $listener, $data, $threadId, $validator = null) - { - if ($validator && ! $validator->isValid()) { - return $listener->replyCreationError($validator->getErrors()); - } - - $reply = $this->getNew($data, $threadId); - - return $this->validateAndSave($listener, $reply); - } - - private function getNew($data, $threadId) - { - return $this->replies->getNew($data + [ - 'thread_id' => $threadId, - 'author_id' => $data['author']->id, - ]); - } - - private function validateAndSave($listener, $reply) - { - if (! $this->replies->save($reply)) { - return $listener->replyCreationError($reply->getErrors()); - } - - $this->updateThreadCounts($reply->thread); - $this->setThreadMostRecentReply($reply); - - return $listener->replyCreated($reply); - } - - private function updateThreadCounts($thread) - { - $thread->updateReplyCount(); - } - - private function setThreadMostRecentReply($reply) - { - $reply->thread->setMostRecentReply($reply); - } -} diff --git a/app/Forum/Replies/ReplyCreatorListener.php b/app/Forum/Replies/ReplyCreatorListener.php deleted file mode 100644 index ff45e5751..000000000 --- a/app/Forum/Replies/ReplyCreatorListener.php +++ /dev/null @@ -1,8 +0,0 @@ -thread; - $reply->delete(); - - $thread->updateReplyCount(); - - return $observer->replyDeleted($thread); - } -} diff --git a/app/Forum/Replies/ReplyDeleterListener.php b/app/Forum/Replies/ReplyDeleterListener.php deleted file mode 100644 index 07dcf020f..000000000 --- a/app/Forum/Replies/ReplyDeleterListener.php +++ /dev/null @@ -1,7 +0,0 @@ - 'required', - ]; -} diff --git a/app/Forum/Replies/ReplyPresenter.php b/app/Forum/Replies/ReplyPresenter.php deleted file mode 100644 index a4712901f..000000000 --- a/app/Forum/Replies/ReplyPresenter.php +++ /dev/null @@ -1,55 +0,0 @@ -getWrappedObject()->thread->slug; - $threadUrl = action('Forum\ForumThreadsController@getShowThread', $slug); - - return $threadUrl . app(ReplyQueryStringGenerator::class)->generate($this->getWrappedObject()); - } - - public function created_ago() - { - return $this->getWrappedObject()->created_at->diffForHumans(); - } - - public function updated_ago() - { - return $this->getWrappedObject()->updated_at->diffForHumans(); - } - - public function body() - { - $body = $this->getWrappedObject()->body; - $body = $this->convertMarkdown($body); - $body = $this->formatGists($body); - $body = $this->linkify($body); - - return $body; - } - - private function convertMarkdown($content) - { - return app('Lio\Markdown\HtmlMarkdownConvertor')->convertMarkdownToHtml($content); - } - - private function formatGists($content) - { - return app('Lio\Github\GistEmbedFormatter')->format($content); - } - - private function linkify($content) - { - $linkify = new Linkify(); - - return $linkify->process($content); - } -} diff --git a/app/Forum/Replies/ReplyQueryStringGenerator.php b/app/Forum/Replies/ReplyQueryStringGenerator.php deleted file mode 100644 index 2e31c9fc2..000000000 --- a/app/Forum/Replies/ReplyQueryStringGenerator.php +++ /dev/null @@ -1,18 +0,0 @@ -getPrecedingReplyCount(); - $pageNumber = $this->getPageNumber($precedingReplyCount, $perPage); - - return "?page={$pageNumber}#reply-{$reply->id}"; - } - - private function getPageNumber($count, $perPage) - { - return floor($count / $perPage) + 1; - } -} diff --git a/app/Forum/Replies/ReplyRepository.php b/app/Forum/Replies/ReplyRepository.php deleted file mode 100644 index c3b299cc4..000000000 --- a/app/Forum/Replies/ReplyRepository.php +++ /dev/null @@ -1,12 +0,0 @@ -model = $model; - } -} diff --git a/app/Forum/Replies/ReplyUpdater.php b/app/Forum/Replies/ReplyUpdater.php deleted file mode 100644 index 2b158e4e6..000000000 --- a/app/Forum/Replies/ReplyUpdater.php +++ /dev/null @@ -1,39 +0,0 @@ -replies = $replies; - } - - public function update($reply, ReplyUpdaterListener $observer, $data, $validator = null) - { - // check the passed in validator - if ($validator && ! $validator->isValid()) { - return $observer->replyUpdateError($validator->getErrors()); - } - return $this->updateRecord($reply, $observer, $data); - } - - private function updateRecord($reply, $observer, $data) - { - $reply->fill($data); - - // check the model validation - if ( ! $this->replies->save($reply)) { - return $observer->replyUpdateError($reply->getErrors()); - } - - return $observer->replyUpdated($reply); - } -} diff --git a/app/Forum/Replies/ReplyUpdaterListener.php b/app/Forum/Replies/ReplyUpdaterListener.php deleted file mode 100644 index 95cc4c405..000000000 --- a/app/Forum/Replies/ReplyUpdaterListener.php +++ /dev/null @@ -1,8 +0,0 @@ -sections = Config::get('forum.sections'); - } - - public function createSidebar($selectedSection = null) - { - if(! is_array($selectedSection)) { - $selectedSection = explode(',', $selectedSection); - } - - foreach($this->sections as $title => $attributes) { - if($this->isCurrentSection($attributes['tags'], $selectedSection)) { - $this->setCurrentSection($title); - } - } - - return $this->sections; - } - - protected function isCurrentSection($sectionTags, $selectedSection) - { - $sectionTags = explode(',', $sectionTags); - foreach($sectionTags as $sectionTag) { - if(in_array(strtolower($sectionTag), array_map('strtolower', $selectedSection))) { - return true; - } - } - } - - protected function setCurrentSection($section) - { - $this->sections[$section]['active'] = true; - } -} diff --git a/app/Forum/Threads/Thread.php b/app/Forum/Threads/Thread.php deleted file mode 100644 index 36edd9e6d..000000000 --- a/app/Forum/Threads/Thread.php +++ /dev/null @@ -1,178 +0,0 @@ - 'required', - 'author_id' => 'required|exists:users,id', - ]; - - protected $laravelVersions = [ - 5 => 'Laravel 5.x', - 4 => 'Laravel 4.x', - 3 => 'Laravel 3.x', - 0 => 'Doesn\'t Matter', - ]; - - public function author() - { - return $this->belongsTo('Lio\Accounts\User', 'author_id'); - } - - public function replies() - { - return $this->hasMany('Lio\Forum\Replies\Reply', 'thread_id'); - } - - public function acceptedSolution() - { - return $this->belongsTo('Lio\Forum\Replies\Reply', 'solution_reply_id'); - } - - public function tags() - { - return $this->belongsToMany('Lio\Tags\Tag', 'tagged_items', 'thread_id', 'tag_id'); - } - - public function mostRecentReply() - { - return $this->belongsTo('Lio\Forum\Replies\Reply', 'most_recent_reply_id'); - } - - public function setSubjectAttribute($subject) - { - $this->attributes['subject'] = $subject; - $this->attributes['slug'] = $this->generateNewSlug(); - } - - public function scopeSolvedQuestions($q) - { - return $q->where('is_question', '=', 1)->whereNull('solution_reply_id'); - } - - public function scopeUnsolvedQuestions($q) - { - return $q->where('is_question', '=', 1)->whereNotNull('solution_reply_id'); - } - - private function generateNewSlug() - { - $i = 0; - - do { - $slug = $this->generateSlugByIncrementer($i++); - } while ($this->getCountBySlug($slug) > 0); - - return $slug; - } - - private function getCountBySlug($slug) - { - $query = static::where('slug', '=', $slug); - - if ($this->exists) { - $query->where('id', '!=', $this->id); - } - - return $query->count(); - } - - private function generateSlugByIncrementer($i) - { - if ($i == 0) $i = ''; - - if ($this->created_at) { - $date = date('m-d-Y', strtotime($this->created_at)); - } else { - $date = date('m-d-Y'); - } - - return Str::slug("{$date} - {$this->subject}" . $i); - } - - public function getLaravelVersions() - { - return $this->laravelVersions; - } - - public function isQuestion() - { - return $this->is_question; - } - - public function isSolved() - { - return $this->isQuestion() && ! is_null($this->solution_reply_id); - } - - public function isManageableBy($user) - { - if ( ! $user) return false; - return $this->isOwnedBy($user) || $user->isForumAdmin(); - } - - public function isOwnedBy($user) - { - if ( ! $user) return false; - return $user->id == $this->author_id; - } - - public function isReplyTheSolution($reply) - { - return $reply->id == $this->solution_reply_id; - } - - public function setMostRecentReply(Reply $reply) - { - $this->most_recent_reply_id = $reply->id; - $this->updateReplyCount(); - $this->save(); - } - - public function updateReplyCount() - { - if ($this->exists) { - $this->reply_count = $this->replies()->count(); - $this->save(); - } - } - - public function setTags($tagIds) - { - $this->tags()->sync($tagIds); - } - - public function hasTag($tagId) - { - return $this->tags->contains($tagId); - } - - public function getTags() - { - return $this->tags->lists('slug'); - } - - /** - * Get the presenter class. - * - * @return string - */ - public function getPresenterClass() - { - return ThreadPresenter::class; - } -} diff --git a/app/Forum/Threads/ThreadCreator.php b/app/Forum/Threads/ThreadCreator.php deleted file mode 100644 index c7bb8286c..000000000 --- a/app/Forum/Threads/ThreadCreator.php +++ /dev/null @@ -1,124 +0,0 @@ -threads = $threads; - $this->spamDetector = $spamDetector; - $this->logger = $logger; - } - - // an additional validator is optional and will be run first, an example of a usage for - // this is a form validator - public function create(ThreadCreatorListener $listener, $data, $validator = null) - { - if ($validator && ! $validator->isValid()) { - return $listener->threadCreationError($validator->getErrors()); - } - - return $this->createValidRecord($listener, $data); - } - - private function createValidRecord($listener, $data) - { - $thread = $this->getNew($data); - - return $this->validateAndSave($thread, $listener, $data); - } - - private function getNew($data) - { - return $this->threads->getNew($data + [ - 'author_id' => $data['author']->id, - ]); - } - - private function validateAndSave($thread, $listener, $data) - { - if ($this->spamDetector->detectsSpam($thread->subject)) { - $this->logSpam($thread->subject, $thread->author); - - $this->increaseUserSpamCount($thread->author); - - return $listener->threadCreationError( - new MessageBag(['subject' => 'Title contains spam. Your account has been flagged.']) - ); - } - - if ($this->spamDetector->detectsSpam($thread->body)) { - $this->logSpam($thread->body, $thread->author); - - $this->increaseUserSpamCount($thread->author); - - return $listener->threadCreationError( - new MessageBag(['body' => 'Body contains spam. Your account has been flagged.']) - ); - } - - // check the model validation - if (! $this->threads->save($thread)) { - return $listener->threadCreationError($thread->getErrors()); - } - - // attach any tags that were passed through - if (isset($data['tags'])) { - $thread->setTags($data['tags']); - } - - return $listener->threadCreated($thread); - } - - /** - * Increases a user's spam count - * - * @param \Lio\Accounts\User $user - */ - private function increaseUserSpamCount(User $user) - { - $user->spam_count = $user->spam_count + 1; - - // If the user reaches a spam threshold of 3 or more, automatically ban him - if ($user->spam_count >= 3) { - $user->is_banned = true; - } - - $user->save(); - } - - /** - * @param string $spam - * @param \Lio\Accounts\User $author - */ - private function logSpam($spam, User $author) - { - $this->logger->warning("Warning: attempted spam posted by [#{$author->id}] {$author->name}:"); - $this->logger->warning($spam); - } -} diff --git a/app/Forum/Threads/ThreadCreatorListener.php b/app/Forum/Threads/ThreadCreatorListener.php deleted file mode 100644 index e2cf27954..000000000 --- a/app/Forum/Threads/ThreadCreatorListener.php +++ /dev/null @@ -1,8 +0,0 @@ -threads = $threads; - } - - public function delete(ThreadDeleterListener $observer, $thread) - { - $this->deleteReplies($thread); - - $this->threads->delete($thread); - return $observer->threadDeleted(); - } - - private function deleteReplies(Thread $thread) - { - $thread->replies()->delete(); - } -} diff --git a/app/Forum/Threads/ThreadDeleterListener.php b/app/Forum/Threads/ThreadDeleterListener.php deleted file mode 100644 index 800826ef1..000000000 --- a/app/Forum/Threads/ThreadDeleterListener.php +++ /dev/null @@ -1,7 +0,0 @@ - 'required|min:10', - 'body' => 'required', - 'tags' => 'required|max_tags:3', - 'is_question' => 'in:0,1', - 'laravel_version' => 'required|in:0,3,4,5', - ]; - - protected function beforeValidation() - { - Validator::extend('max_tags', function ($attribute, $tagIds, $params) { - $maxCount = $params[0]; - - $tagRepo = App::make('Lio\Tags\TagRepository'); - $tags = $tagRepo->getTagsByIds($tagIds); - - if ($tags->count() > $maxCount) { - return false; - } - - return true; - }); - } -} diff --git a/app/Forum/Threads/ThreadPresenter.php b/app/Forum/Threads/ThreadPresenter.php deleted file mode 100644 index dd42fe563..000000000 --- a/app/Forum/Threads/ThreadPresenter.php +++ /dev/null @@ -1,120 +0,0 @@ -slug) { - return ''; - } - return action('Forum\ForumThreadsController@getShowThread', [$this->slug]); - } - - public function created_ago() - { - return $this->created_at->diffForHumans(); - } - - public function updated_ago() - { - return $this->updated_at->diffForHumans(); - } - - public function body() - { - $body = $this->getWrappedObject()->body; - $body = $this->convertMarkdown($body); - $body = $this->formatGists($body); - $body = $this->linkify($body); - return $body; - } - - public function versionSubjectPrefix() - { - if ($this->laravel_version == 3) { - return '[L3] '; - } - } - - public function subject() - { - $prefix = $this->versionSubjectPrefix(); - $subject = Str::limit($this->getWrappedObject()->subject, 80); - - return $prefix ? $prefix .' '. $subject : $subject; - } - - public function mostRecentReplier() - { - return $this->replies->last()->author; - } - - public function latestReplyUrl() - { - if (! count($this->replies)) { - return $this->url; - } - - return $this->url . App::make('Lio\Forum\Replies\ReplyQueryStringGenerator')->generate($this->replies->last()); - } - - public function lastReplyDiff() - { - if (count($this->replies)) { - return $this->replies->last()->created_at->diffForHumans(); - } - - return $this->updated_ago(); - } - - public function acceptedSolutionUrl() - { - if ( ! $this->acceptedSolution) { - return null; - } - - return action('Forum\ForumRepliesController@getReplyRedirect', [$this->getWrappedObject()->slug, $this->acceptedSolution->id]); - } - - public function editUrl() - { - return action('Forum\ForumThreadsController@getEditThread', [$this->id]); - } - - public function deleteUrl() - { - return action('Forum\ForumThreadsController@getDelete', [$this->id]); - } - - public function markAsSolutionUrl($replyId) - { - return action('Forum\ForumThreadsController@getMarkQuestionSolved', [$this->getWrappedObject()->id, $replyId]); - } - - public function markAsUnsolvedUrl() - { - return action('Forum\ForumThreadsController@getMarkQuestionUnsolved', $this->getWrappedObject()->id); - } - - private function convertMarkdown($content) - { - return App::make('Lio\Markdown\HtmlMarkdownConvertor')->convertMarkdownToHtml($content); - } - - private function formatGists($content) - { - return App::make('Lio\Github\GistEmbedFormatter')->format($content); - } - - private function linkify($content) - { - $linkify = new Linkify(); - return $linkify->process($content); - } -} diff --git a/app/Forum/Threads/ThreadRepository.php b/app/Forum/Threads/ThreadRepository.php deleted file mode 100644 index a430655e2..000000000 --- a/app/Forum/Threads/ThreadRepository.php +++ /dev/null @@ -1,84 +0,0 @@ -model = $model; - } - - public function getByTagsPaginated(Collection $tags, $perPage = 20) - { - $query = $this->model->with(['mostRecentReply', 'mostRecentReply.author', 'tags']); - - if ($tags->count() > 0) { - $query->join('tagged_items', 'forum_threads.id', '=', 'tagged_items.thread_id') - ->whereIn('tagged_items.tag_id', $tags->lists('id')); - } - - $query->groupBy('forum_threads.id') - ->orderBy('pinned', 'desc') - ->orderBy('updated_at', 'desc'); - - return $query->paginate($perPage, ['forum_threads.*']); - } - - public function getByTagsAndStatusPaginated(Collection $tags, $status, $perPage = 20) - { - $query = $this->model->with(['author', 'mostRecentReply', 'acceptedSolution']); - - if ($tags->count() > 0) { - $query->join('tagged_items', 'forum_threads.id', '=', 'tagged_items.thread_id') - ->whereIn('tagged_items.tag_id', $tags->lists('id')); - $query->groupBy('forum_threads.id'); - } - - if ($status) { - if ($status == 'solved') { - $query->where('solution_reply_id', '>', 0); - } - if ($status == 'open') { - $query->whereNull('solution_reply_id'); - } - } - - $query->orderBy('pinned', 'desc'); - $query->orderBy('updated_at', 'desc'); - - return $query->paginate($perPage, ['forum_threads.*']); - } - - public function getThreadRepliesPaginated(Thread $thread, $perPage = 20) - { - return $thread->replies()->paginate($perPage); - } - - public function requireBySlug($slug) - { - $model = $this->getBySlug($slug); - - if ( ! $model) { - throw new EntityNotFoundException; - } - - return $model; - } - - public function getBySlug($slug) - { - return $this->model->with('author')->where('slug', '=', $slug)->first(); - } - - /** - * @param int $userId - * @return mixed - */ - public function deleteByAuthorId($userId) - { - return $this->model->where('author_id', $userId)->delete(); - } -} diff --git a/app/Forum/Threads/ThreadSearch.php b/app/Forum/Threads/ThreadSearch.php deleted file mode 100644 index 627f5f460..000000000 --- a/app/Forum/Threads/ThreadSearch.php +++ /dev/null @@ -1,27 +0,0 @@ -model = $model; - } - - // this stuff is just a placeholder until we implement - // a real search system - public function searchPaginated($query, $perPage) - { - return $this->model->with(['mostRecentReply', 'tags']) - ->where(function($q) use ($query) { - $q->where('subject', 'like', '%' . $query . '%') - ->orWhere('body', 'like', '%' . $query . '%'); - }) - ->orderBy('updated_at', 'desc') - ->paginate($perPage, ['forum_threads.*']); - } -} diff --git a/app/Forum/Threads/ThreadUpdater.php b/app/Forum/Threads/ThreadUpdater.php deleted file mode 100644 index 7f3ac3e31..000000000 --- a/app/Forum/Threads/ThreadUpdater.php +++ /dev/null @@ -1,48 +0,0 @@ -threads = $threads; - } - - public function update(ThreadUpdaterListener $observer, $thread, $data, $validator = null) - { - // check the passed in validator - if ($validator && ! $validator->isValid()) { - return $observer->threadUpdateError($validator->getErrors()); - } - return $this->updateRecord($thread, $observer, $data); - } - - private function updateRecord($thread, $observer, $data) - { - $thread->fill($data); - - // check the model validation - if ( ! $this->threads->save($thread)) { - return $observer->threadUpdateError($thread->getErrors()); - } - - if (isset($data['tags'])) { - $this->attachTags($thread, $data['tags']); - } - - return $observer->threadUpdated($thread); - } - - private function attachTags($thread, $tags) - { - $thread->tags()->sync($tags); - } -} diff --git a/app/Forum/Threads/ThreadUpdaterListener.php b/app/Forum/Threads/ThreadUpdaterListener.php deleted file mode 100644 index 952b74b52..000000000 --- a/app/Forum/Threads/ThreadUpdaterListener.php +++ /dev/null @@ -1,8 +0,0 @@ - 'required|exists:users,id', - 'thread_id' => 'required|exists:forum_threads,id', - 'visited_at' => 'required', - ]; -} diff --git a/app/Forum/Threads/ThreadVisitationUpdater.php b/app/Forum/Threads/ThreadVisitationUpdater.php deleted file mode 100644 index afd4e4ccb..000000000 --- a/app/Forum/Threads/ThreadVisitationUpdater.php +++ /dev/null @@ -1,19 +0,0 @@ -getVisitation($thread, $user); - - if ( ! $visitation) { - return $this->createVisitation($thread, $user); - } - - $visitation->visited_at = strtotime('now'); - $visitation->save(); - } -} diff --git a/app/Github/GistEmbedFormatter.php b/app/Github/GistEmbedFormatter.php deleted file mode 100644 index 60dbdb18b..000000000 --- a/app/Github/GistEmbedFormatter.php +++ /dev/null @@ -1,12 +0,0 @@ -pattern, '', $html); - } -} diff --git a/app/Github/GithubAuthenticator.php b/app/Github/GithubAuthenticator.php deleted file mode 100644 index 15e1c57e1..000000000 --- a/app/Github/GithubAuthenticator.php +++ /dev/null @@ -1,80 +0,0 @@ -socialite = $socialite; - $this->users = $users; - } - - /** - * @param \Lio\Github\GithubAuthenticatorListener $listener - * @return \Illuminate\Http\RedirectResponse - */ - public function authBySocialite(GithubAuthenticatorListener $listener) - { - try { - $githubUser = $this->socialite->user(); - } catch (Exception $e) { - return $listener->invalidLogin(); - } - - if ($user = $this->users->getByGithubId($githubUser->getId())) { - return $this->loginUser($listener, $user); - } - - return $listener->userNotFound($this->githubUserToArray($githubUser)); - } - - /** - * @param \Lio\Github\GithubAuthenticatorListener $listener - * @param \Lio\Accounts\User $user - * @return \Illuminate\Http\RedirectResponse - */ - private function loginUser(GithubAuthenticatorListener $listener, User $user) - { - if ($user->isBanned()) { - return $listener->userIsBanned($user); - } - - return $listener->userFound($user); - } - - /** - * @param \Laravel\Socialite\Contracts\User $user - * @return array - */ - private function githubUserToArray(GithubUser $user) - { - return [ - 'id' => $user->getId(), - 'name' => $user->getNickname(), - 'email' => $user->getEmail(), - 'github_id' => $user->getId(), - 'github_url' => 'https://github.com/' . $user->getNickname(), - 'image_url' => $user->getAvatar(), - ]; - } -} diff --git a/app/Github/GithubAuthenticatorListener.php b/app/Github/GithubAuthenticatorListener.php deleted file mode 100644 index bfa3d86e7..000000000 --- a/app/Github/GithubAuthenticatorListener.php +++ /dev/null @@ -1,29 +0,0 @@ -readFromGithub($code); - - return $this->formatData($data); - } - - private function readFromGithub($code) - { - $github = OAuth::consumer('GitHub'); - $github->requestAccessToken($code); - - $githubData = json_decode($github->request('user'), true); - $githubData['email'] = last(json_decode($github->request('user/emails'), true)); - - return $githubData; - } - - private function formatData($data) - { - return [ - 'id' => $data['id'], - 'name' => $data['login'], - 'email' => $data['email'], - 'github_id' => $data['id'], - 'github_url' => $data['html_url'], - 'image_url' => $data['avatar_url'], - ]; - } -} diff --git a/app/Http/Controllers/Admin/OverviewController.php b/app/Http/Controllers/Admin/OverviewController.php deleted file mode 100644 index a688b69e1..000000000 --- a/app/Http/Controllers/Admin/OverviewController.php +++ /dev/null @@ -1,15 +0,0 @@ -route('admin.users'); - } -} diff --git a/app/Http/Controllers/Admin/UsersController.php b/app/Http/Controllers/Admin/UsersController.php deleted file mode 100644 index 2ba888334..000000000 --- a/app/Http/Controllers/Admin/UsersController.php +++ /dev/null @@ -1,90 +0,0 @@ -users = $users; - $this->roles = $roles; - $this->threads = $threads; - } - - public function getIndex() - { - $users = $this->users->getAllPaginated(100); - - return view('admin.users.index', compact('users')); - } - - public function search() - { - $users = $this->users->search(Input::get('q')); - - return view('admin.users.index', compact('users')); - } - - public function getEdit($userId) - { - $user = $this->users->requireById($userId); - $roles = $this->roles->getAll(); - - return view('admin.users.edit', compact('user', 'roles')); - } - - public function postEdit($userId) - { - $user = $this->users->requireById($userId); - - $user->fill(Input::all()); - - if (! Input::has('is_banned')) { - $user->is_banned = 0; - } - - if (! $user->isValid()) { - return $this->redirectBack(['errors' => $user->getErrors()]); - } - - $this->users->save($user); - $user->roles = Input::get('roles'); - - return $this->redirectAction('Admin\UsersController@getIndex', ['success' => 'The user has been saved.']); - } - - public function putBanAndDeleteThreads($userId) - { - // Ban the user - $user = $this->users->requireById($userId); - $user->is_banned = 1; - - $this->users->save($user); - - // Remove all threads by the user - $this->threads->deleteByAuthorId($userId); - - return $this->redirectAction('Admin\UsersController@getIndex', ['success' => 'The user has been banned and its threads have been removed.']); - } -} diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php index 7af2310aa..a9265c66b 100755 --- a/app/Http/Controllers/Auth/AuthController.php +++ b/app/Http/Controllers/Auth/AuthController.php @@ -1,233 +1,62 @@ github = $github; - $this->users = $users; - $this->userCreator = $userCreator; - $this->confirmation = $confirmation; - - $this->middleware('guest', ['except' => ['logout', 'confirmEmail', 'resendEmailConfirmation']]); - $this->middleware('auth', ['only' => ['logout', 'resendEmailConfirmation']]); - } + use AuthenticatesAndRegistersUsers, ThrottlesLogins; /** - * Redirect the user to the GitHub authentication page. - * - * @return \Illuminate\Http\RedirectResponse + * Create a new authentication controller instance. */ - public function login() + public function __construct() { - return Socialite::driver('github')->redirect(); + $this->middleware('guest', ['except' => 'getLogout']); } /** - * Obtain the user information from GitHub. + * Get a validator for an incoming registration request. * - * @return \Illuminate\Http\RedirectResponse + * @param array $data + * @return \Illuminate\Contracts\Validation\Validator */ - public function authByGithub() + protected function validator(array $data) { - return $this->github->authBySocialite($this); - } - - /** - * @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View - */ - public function signup() - { - if (! Session::has('githubData')) { - return redirect()->route('login'); - } - - return view('auth.signup', ['githubData' => Session::get('githubData')]); - } - - /** - * @return \Illuminate\Http\RedirectResponse - */ - public function register() - { - if (! Session::has('githubData')) { - return redirect()->route('login'); - } - - /** @var \Illuminate\Validation\Validator $validator */ - $validator = Validator::make(Input::only('g-recaptcha-response'), [ - 'g-recaptcha-response' => 'required|captcha' + return Validator::make($data, [ + 'name' => 'required|max:255', + 'email' => 'required|email|max:255|unique:users', + 'password' => 'required|confirmed|min:6', ]); - - if ($validator->fails()) { - return redirect()->route('signup') - ->exceptInput('g-recaptcha-response') - ->withErrors($validator->errors()); - } - - $data = Session::get('githubData'); - $data['ip'] = Request::ip(); - $data['name'] = Input::get('name'); - $data['email'] = Input::get('email'); - - return $this->userCreator->create($this, $data); - } - - /** - * @return \Illuminate\Http\RedirectResponse - */ - public function logout() - { - Auth::logout(); - - return redirect()->home(); - } - - /** - * Confirms a user's email address - * - * @param string $code - * @return \Illuminate\Http\RedirectResponse - */ - public function confirmEmail($code) - { - if (! $user = $this->users->getByConfirmationCode($code)) { - abort(404); - } - - $user->confirmed = 1; - $user->confirmation_code = null; - $user->save(); - - Auth::login($user, true); - - session(['success' => 'Your email was successfully confirmed.']); - - return redirect()->home(); } /** - * Re-sends the confirmation email + * Create a new user instance after a valid registration. * - * @return \Illuminate\Http\RedirectResponse - */ - public function resendEmailConfirmation() - { - $this->confirmation->send(Auth::user()); - - session(['success' => 'A new email confirmation was sent to ' . Auth::user()->email]); - - return redirect()->home(); - } - - /** - * @return \Illuminate\Http\RedirectResponse + * @param array $data + * @return User */ - public function invalidLogin() + protected function create(array $data) { - Session::put('error', 'Invalid login'); - - return redirect()->home(); - } - - /** - * @param \Lio\Accounts\User $user - * @return \Illuminate\Http\RedirectResponse - */ - public function userFound(User $user) - { - Auth::login($user, true); - - return $this->redirectIntended(route('home')); - } - - /** - * @return \Illuminate\Http\RedirectResponse - */ - public function userIsBanned() - { - Session::put('error', 'Your account has been banned. If you\'d like to appeal, please contact us through the support widget below.'); - - return redirect()->home(); - } - - /** - * @param array $githubData - * @return \Illuminate\Http\RedirectResponse - */ - public function userNotFound($githubData) - { - Session::put('githubData', $githubData); - - return redirect()->route('signup'); - } - - /** - * @param $errors - * @return \Illuminate\Http\RedirectResponse - */ - public function userValidationError($errors) - { - return $this->redirectBack(['errors' => $errors]); - } - - /** - * @param \Lio\Accounts\User $user - * @return \Illuminate\Http\RedirectResponse - */ - public function userCreated($user) - { - Session::forget('githubData'); - Session::put('success', 'Account created. An email confirmation was sent to ' . $user->email); - - Auth::login($user, true); - - return $this->redirectIntended(route('home')); + return User::create([ + 'name' => $data['name'], + 'email' => $data['email'], + 'password' => bcrypt($data['password']), + ]); } } diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.php index d76386f93..f4a222226 100755 --- a/app/Http/Controllers/Auth/PasswordController.php +++ b/app/Http/Controllers/Auth/PasswordController.php @@ -1,8 +1,8 @@ withInput($input)->with($data); - } - - protected function redirectIntended($default = null) - { - if ($intended = Session::get('auth.intended_redirect_url')) { - return $this->redirectTo($intended); - } - - return Redirect::to($default); - } + use AuthorizesRequests, ValidatesRequests; } diff --git a/app/Http/Controllers/Forum/ForumRepliesController.php b/app/Http/Controllers/Forum/ForumRepliesController.php deleted file mode 100644 index 7e11694c6..000000000 --- a/app/Http/Controllers/Forum/ForumRepliesController.php +++ /dev/null @@ -1,146 +0,0 @@ -threads = $threads; - $this->replies = $replies; - $this->tags = $tags; - - $this->prepareViewData(); - } - - // bounces the user to the correct page of a thread for the indicated comment - public function getReplyRedirect($threadSlug, $replyId) - { - $reply = $this->replies->requireById($replyId); - - if (! $reply->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - $generator = app('Lio\Forum\Replies\ReplyQueryStringGenerator'); - $queryString = $generator->generate($reply, $this->repliesPerPage); - - return redirect(action('Forum\ForumThreadsController@getShowThread', $threadSlug) . $queryString); - } - - // reply to a thread - public function postCreateReply($threadSlug) - { - $thread = $this->threads->requireBySlug($threadSlug); - - return app('Lio\Forum\Replies\ReplyCreator')->create($this, [ - 'body' => Input::get('body'), - 'author' => Auth::user(), - 'ip' => Request::ip(), - ], $thread->id, new ReplyForm); - } - - public function replyCreationError($errors) - { - return $this->redirectBack(['errors' => $errors]); - } - - public function replyCreated($reply) - { - $replyPresenter = new ReplyPresenter($reply); - - return $this->redirectTo($replyPresenter->url); - } - - // edit a reply - public function getEditReply($replyId) - { - $reply = $this->replies->requireById($replyId); - - if (! $reply->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - return view('forum.replies.edit', compact('reply')); - } - - public function postEditReply($replyId) - { - $reply = $this->replies->requireById($replyId); - - if (! $reply->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - return app('Lio\Forum\Replies\ReplyUpdater')->update($reply, $this, [ - 'body' => Input::get('body'), - ], new ReplyForm); - } - - // observer methods - public function replyUpdateError($errors) - { - return $this->redirectBack(['errors' => $errors]); - } - - public function replyUpdated($reply) - { - $replyPresenter = new ReplyPresenter($reply); - - return $this->redirectTo($replyPresenter->url); - } - - // reply deletion - public function getDelete($replyId) - { - $reply = $this->replies->requireById($replyId); - - if (! $reply->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - return view('forum.replies.delete', compact('reply')); - } - - public function postDelete($replyId) - { - $reply = $this->replies->requireById($replyId); - - if (! $reply->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - return app('Lio\Forum\Replies\ReplyDeleter')->delete($this, $reply); - } - - // observer methods - public function replyDeleted($thread) - { - return redirect()->action('Forum\ForumThreadsController@getShowThread', $thread->slug); - } - - private function prepareViewData() - { - $forumSections = Config::get('forum.sections'); - - View::share(compact('forumSections')); - } -} diff --git a/app/Http/Controllers/Forum/ForumThreadsController.php b/app/Http/Controllers/Forum/ForumThreadsController.php deleted file mode 100644 index 9a33e8926..000000000 --- a/app/Http/Controllers/Forum/ForumThreadsController.php +++ /dev/null @@ -1,255 +0,0 @@ -threads = $threads; - $this->tags = $tags; - $this->threadCreator = $threadCreator; - $this->replies = $replies; - } - - // show thread list - clean this method - public function getIndex($status = '') - { - // query tags and retrieve the appropriate threads - $tags = $this->tags->getAllTagsBySlug(Input::get('tags')); - $threads = $this->threads->getByTagsAndStatusPaginated($tags, $status, $this->threadsPerPage); - - // add the tag string to each pagination link - $tagAppends = ['tags' => Input::get('tags')]; - $queryString = ! empty($tagAppends['tags']) ? '?tags=' . implode(',', (array) $tagAppends['tags']) : ''; - $threads->appends($tagAppends); - $this->createSections(Input::get('tags')); - - return view('forum.threads.index', compact('threads', 'tags', 'queryString')); - } - - // show a thread - public function getShowThread($threadSlug) - { - $thread = $this->threads->getBySlug($threadSlug); - - if (! $thread) { - return $this->redirectAction('Forum\ForumThreadsController@getIndex'); - } - - $replies = $this->threads->getThreadRepliesPaginated($thread, $this->repliesPerPage); - - $this->createSections($thread->getTags()); - - return view('forum.threads.show', compact('thread', 'replies')); - } - - // create a thread - public function getCreateThread() - { - $this->createSections(Input::get('tags')); - - if (App::environment('production') && Auth::user()->hasCreatedAThreadRecently()) { - return view('forum.threads.throttle'); - } - - $tags = $this->tags->getAllForForum(); - $versions = $this->threads->getNew()->getLaravelVersions(); - - return view('forum.threads.create', compact('tags', 'versions')); - } - - public function postCreateThread() - { - if (App::environment('production') && Auth::user()->hasCreatedAThreadRecently()) { - return redirect()->action('Forum\ForumThreadsController@getCreateThread'); - } - - /** @var \Illuminate\Validation\Validator $validator */ - $validator = Validator::make(Input::only('g-recaptcha-response'), [ - 'g-recaptcha-response' => 'required|captcha' - ]); - - if ($validator->fails()) { - return redirect()->action('Forum\ForumThreadsController@getCreateThread') - ->exceptInput('g-recaptcha-response') - ->withErrors($validator->errors()); - } - - return $this->threadCreator->create($this, [ - 'subject' => Input::get('subject'), - 'body' => Input::get('body'), - 'author' => Auth::user(), - 'laravel_version' => Input::get('laravel_version'), - 'is_question' => Input::get('is_question'), - 'tags' => $this->tags->getTagsByIds(Input::get('tags')), - 'ip' => Request::ip(), - ], new ThreadForm); - } - - public function threadCreationError($errors) - { - return $this->redirectBack(['errors' => $errors]); - } - - public function threadCreated($thread) - { - return $this->redirectAction('Forum\ForumThreadsController@getShowThread', [$thread->slug]); - } - - // edit a thread - public function getEditThread($threadId) - { - $thread = $this->threads->requireById($threadId); - - if (! $thread->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - $tags = $this->tags->getAllForForum(); - $versions = $thread->getLaravelVersions(); - - $this->createSections(Input::get('tags')); - - return view('forum.threads.edit', compact('thread', 'tags', 'versions')); - } - - public function postEditThread($threadId) - { - $thread = $this->threads->requireById($threadId); - - if ( ! $thread->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - return app('Lio\Forum\Threads\ThreadUpdater')->update($this, $thread, [ - 'subject' => Input::get('subject'), - 'body' => Input::get('body'), - 'is_question' => Input::get('is_question', 0), - 'laravel_version' => Input::get('laravel_version'), - 'tags' => $this->tags->getTagsByIds(Input::get('tags')), - ], new ThreadForm); - } - - public function getMarkQuestionSolved($threadId, $solvedByReplyId) - { - $thread = $this->threads->requireById($threadId); - - if ( ! $thread->isQuestion() || ! $thread->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - $reply = $this->replies->requireById($solvedByReplyId); - - if ( ! $reply || $reply->thread_id != $thread->id) { - return redirect()->home(); - } - - return app('Lio\Forum\Threads\ThreadUpdater')->update($this, $thread, [ - 'solution_reply_id' => $reply->id, - ]); - } - - public function getMarkQuestionUnsolved($threadId) - { - $thread = $this->threads->requireById($threadId); - - if ( ! $thread->isQuestion() || ! $thread->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - return app('Lio\Forum\Threads\ThreadUpdater')->update($this, $thread, [ - 'solution_reply_id' => null, - ]); - } - - // observer methods - public function threadUpdateError($errors) - { - return $this->redirectBack(['errors' => $errors]); - } - - public function threadUpdated($thread) - { - return $this->redirectAction('Forum\ForumThreadsController@getShowThread', [$thread->slug]); - } - - // thread deletion - public function getDelete($threadId) - { - $thread = $this->threads->requireById($threadId); - - if ( ! $thread->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - $this->createSections(Input::get('tags')); - - return view('forum.threads.delete', compact('thread')); - } - - public function postDelete($threadId) - { - $thread = $this->threads->requireById($threadId); - - if ( ! $thread->isManageableBy(Auth::user())) { - return redirect()->home(); - } - - return app('Lio\Forum\Threads\ThreadDeleter')->delete($this, $thread); - } - - // observer methods - public function threadDeleted() - { - return redirect()->action('Forum\ForumThreadsController@getIndex'); - } - - // forum thread search - public function getSearch() - { - $query = Input::get('query'); - $results = app('Lio\Forum\Threads\ThreadSearch')->searchPaginated($query, $this->threadsPerPage); - $results->appends(['query' => $query]); - - $this->createSections(Input::get('tags')); - - return view('forum.search', compact('query', 'results')); - } - - // ------------------------- // - private function createSections($currentSection = null) - { - $forumSections = app('Lio\Forum\SectionSidebarCreator')->createSidebar($currentSection); - - View::share(compact('forumSections')); - } -} diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index f20acb17b..22e9e4b8b 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -6,9 +6,9 @@ class HomeController extends Controller /** * @return \Illuminate\Http\RedirectResponse */ - public function index() + public function home() { - return redirect()->action('Forum\ForumThreadsController@getIndex'); + return 'Where it starts'; } /** diff --git a/app/Http/Controllers/PastesController.php b/app/Http/Controllers/PastesController.php deleted file mode 100644 index 21da11883..000000000 --- a/app/Http/Controllers/PastesController.php +++ /dev/null @@ -1,82 +0,0 @@ -pastes = $pastes; - $this->creator = $creator; - $this->fork = $fork; - } - - public function getShow($hash) - { - $paste = $this->pastes->getByHash($hash); - - if (! $paste) { - return $this->redirectAction('PastesController@getCreate'); - } - - return view('bin.show', compact('paste')); - } - - public function getCreate() - { - return view('bin.create'); - } - - public function postCreate() - { - return $this->creator->create($this, Input::get('code'), Auth::user(), new PasteForm); - } - - public function getFork($hash) - { - $paste = $this->pastes->getByHash($hash); - - return view('bin.fork', compact('paste')); - } - - public function postFork($hash) - { - $paste = $this->pastes->getByHash($hash); - $this->fork->setListener($this); - $this->fork->setParentPaste($paste); - - return $this->creator->create($this->fork, Input::get('code'), Auth::user(), new PasteForm); - } - - public function getRaw($hash) - { - $paste = $this->pastes->getByHash($hash); - - if (! $paste) { - return $this->redirectAction('PastesController@getCreate'); - } - - return view('bin.raw', compact('paste')); - } - - public function pasteCreated($paste) - { - return $this->redirectAction('PastesController@getShow', $paste->hash); - } - - public function pasteValidationError($errors) - { - return $this->redirectBack()->withErrors($errors); - } -} diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php deleted file mode 100644 index 6b3c4d8d5..000000000 --- a/app/Http/Controllers/UsersController.php +++ /dev/null @@ -1,100 +0,0 @@ -users = $users; - $this->updater = $updater; - } - - public function getProfile($userName) - { - $user = $this->users->requireByName($userName); - - $threads = $user->getLatestThreadsPaginated(5); - $replies = $user->getLatestRepliesPaginated(5); - - return view('users.profile', compact('user', 'threads', 'replies')); - } - - public function getSettings($userName) - { - $user = $this->users->requireByName($userName); - - // Make sure that the user which is updated is the one who is currently logged in. - if (Auth::user()->id !== $user->id) { - abort(403); - } - - return view('users.settings', compact('user')); - } - - public function putSettings($userName) - { - $user = $this->users->requireByName($userName); - - // Make sure that the user which is updated is the one who is currently logged in. - if (Auth::user()->id !== $user->id) { - abort(403); - } - - return $this->updater->update($this, $user, Input::only('name', 'email')); - } - - public function getThreads($userName) - { - $user = $this->users->requireByName($userName); - - $threads = $user->getLatestThreadsPaginated(10); - - return view('users.threads', compact('user', 'threads')); - } - - public function getReplies($userName) - { - $user = $this->users->requireByName($userName); - - $replies = $user->getLatestRepliesPaginated(10); - - return view('users.replies', compact('user', 'replies')); - } - - public function userValidationError($errors) - { - return $this->redirectBack(['errors' => $errors]); - } - - public function userUpdated($user, $emailChanged = false) - { - if ($emailChanged) { - Session::put('success', 'Settings updated. An email confirmation was sent to ' . $user->email); - } else { - Session::put('success', 'Settings updated'); - } - - return redirect()->route('user.settings', $user->name); - } -} diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index bd8a22be0..8d471c7dc 100755 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -40,15 +40,6 @@ public function handle($request, Closure $next) } } - if ($this->auth->user()->is_banned) { - // Don't allow people who are banned to log in. - session()->put('error', 'Your account has been banned. If you\'d like to appeal, please contact us through the support widget below.'); - - $this->auth->logout(); - - return redirect()->home(); - } - return $next($request); } } diff --git a/app/Http/Middleware/EmailConfirmed.php b/app/Http/Middleware/EmailConfirmed.php deleted file mode 100644 index bde7aab83..000000000 --- a/app/Http/Middleware/EmailConfirmed.php +++ /dev/null @@ -1,52 +0,0 @@ -auth = $auth; - $this->session = $session; - } - - /** - * Handle an incoming request. - * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @return mixed - */ - public function handle($request, Closure $next) - { - if (! $this->auth->user()->isConfirmed()) { - // Don't let people who haven't confirmed their email use the authed sections on the website. - $this->session->put('error', 'Please confirm your email address (' . $this->auth->user()->email . ') before you try to use this section. - Re-send confirmation email. - Change e-mail address.'); - - return redirect()->home(); - } - - return $next($request); - } -} diff --git a/app/Providers/RouteServiceProvider.php b/app/Http/RouteServiceProvider.php similarity index 73% rename from app/Providers/RouteServiceProvider.php rename to app/Http/RouteServiceProvider.php index 285d42aa9..4d449e720 100755 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Http/RouteServiceProvider.php @@ -1,10 +1,8 @@ guest() || (auth()->check() && ! auth()->user()->hasRoles($allowedRoles))) { - abort(403); - } - }); + // parent::boot($router); } @@ -44,7 +36,7 @@ public function boot(Router $router) */ public function map(Router $router) { - $router->group(['namespace' => $this->namespace], function ($router) { + $router->group(['namespace' => $this->namespace], function () { require app_path('Http/routes.php'); }); } diff --git a/app/Http/routes.php b/app/Http/routes.php index fcb8fb8da..efb20e7f0 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -1,92 +1,38 @@ 'wiki.laravel.io'], function() { - Route::get('{wildcard}', 'HomeController@redirectToMainWebsite'); + get('{wildcard}', 'HomeController@redirectToMainWebsite'); }); Route::group(['domain' => 'forum.laravel.io'], function() { - Route::get('{wildcard}', 'HomeController@redirectToMainWebsite'); + get('{wildcard}', 'HomeController@redirectToMainWebsite'); }); Route::group(['domain' => 'forums.laravel.io'], function() { - Route::get('{wildcard}', 'HomeController@redirectToMainWebsite'); + get('{wildcard}', 'HomeController@redirectToMainWebsite'); }); -Route::get('/', ['as' => 'home', 'uses' => 'HomeController@index']); -Route::get('rss', 'HomeController@rss'); +// Home +get('/', ['as' => 'home', 'uses' => 'HomeController@home']); +get('rss', 'HomeController@rss'); // Auth Route::group(['namespace' => 'Auth'], function () { - Route::get('login', ['as' => 'login', 'uses' => 'AuthController@login']); - Route::get('auth/github', 'AuthController@authByGithub'); - Route::get('signup', ['as' => 'signup', 'uses' => 'AuthController@signup']); - Route::post('signup', 'AuthController@register'); - Route::get('logout', ['as' => 'logout', 'uses' => 'AuthController@logout']); - - Route::get('confirm-email/{confirmation_code}', ['as' => 'auth.confirm', 'uses' => 'AuthController@confirmEmail']); - Route::get('resend-email-confirmation', ['as' => 'auth.reconfirm', 'uses' => 'AuthController@resendEmailConfirmation']); + get('login', ['as' => 'login', 'uses' => 'AuthController@login']); + get('auth/github', 'AuthController@authByGithub'); + get('signup', ['as' => 'signup', 'uses' => 'AuthController@signup']); + get('logout', ['as' => 'logout', 'uses' => 'AuthController@logout']); }); // Users -Route::get('user/{username}', ['as' => 'user', 'uses' => 'UsersController@getProfile']); -Route::get('user/{username}/threads', 'UsersController@getThreads'); -Route::get('user/{username}/replies', 'UsersController@getReplies'); - -Route::group(['middleware' => 'auth'], function () { - Route::get('user/{username}/settings', ['as' => 'user.settings', 'uses' => 'UsersController@getSettings']); - Route::put('user/{username}/settings', ['as' => 'user.settings.update', 'uses' => 'UsersController@putSettings']); -}); - -// Chat -Route::get('chat', 'ChatController@getIndex'); +get('user/{username}', ['as' => 'user', 'uses' => 'UsersController@profile']); // Paste Bin -Route::get('bin', 'PastesController@getCreate'); -Route::get('bin/fork/{hash}', 'PastesController@getFork'); -Route::get('bin/{hash}/raw', 'PastesController@getRaw'); -Route::get('bin/{hash}', 'PastesController@getShow'); - -Route::group(['middleware' => ['auth', 'confirmed']], function() { - Route::post('bin', 'PastesController@postCreate'); - Route::post('bin/fork/{hash}', 'PastesController@postFork'); -}); +get('bin', 'PasteBinController@create'); +get('bin/{hash}/raw', 'PasteBinController@raw'); +get('bin/{hash}', 'PasteBinController@show'); // Forum Route::group(['namespace' => 'Forum'], function() { - Route::group(['middleware' => ['auth', 'confirmed']], function() { - Route::get('forum/create-thread', 'ForumThreadsController@getCreateThread'); - Route::post('forum/create-thread', 'ForumThreadsController@postCreateThread'); - - Route::get('forum/mark-as-solved/{thread}/{reply}', 'ForumThreadsController@getMarkQuestionSolved'); - Route::get('forum/mark-as-unsolved/{thread}', 'ForumThreadsController@getMarkQuestionUnsolved'); - - Route::get('forum/edit-thread/{thread}', 'ForumThreadsController@getEditThread'); - Route::post('forum/edit-thread/{thread}', 'ForumThreadsController@postEditThread'); - Route::get('forum/edit-reply/{reply}', 'ForumRepliesController@getEditReply'); - Route::post('forum/edit-reply/{reply}', 'ForumRepliesController@postEditReply'); - - Route::get('forum/delete/reply/{reply}', 'ForumRepliesController@getDelete'); - Route::post('forum/delete/reply/{reply}', 'ForumRepliesController@postDelete'); - Route::get('forum/delete/thread/{thread}', 'ForumThreadsController@getDelete'); - Route::post('forum/delete/thread/{thread}', 'ForumThreadsController@postDelete'); - - Route::post('forum/{slug}', 'ForumRepliesController@postCreateReply'); - }); - - Route::get('forum/{status?}', 'ForumThreadsController@getIndex') - ->where(['status' => '(open|solved)']); - - Route::get('forum/search', 'ForumThreadsController@getSearch'); - Route::get('forum/{slug}/reply/{reply}', 'ForumRepliesController@getReplyRedirect'); - Route::get('forum/{slug}', 'ForumThreadsController@getShowThread'); -}); - -// Admin -Route::group(['middleware' => ['auth', 'confirmed'], 'before' => 'has_role:manage_users', 'prefix' => 'admin', 'namespace' => 'Admin'], function() { - Route::get('/', 'OverviewController@overview'); - - Route::get('users', ['as' => 'admin.users', 'uses' => 'UsersController@getIndex']); - Route::get('users/search', ['as' => 'admin.users.search', 'uses' => 'UsersController@search']); - Route::get('edit/{user}', 'UsersController@getEdit'); - Route::post('edit/{user}', 'UsersController@postEdit'); - Route::put('ban-and-delete-threads/{user}', 'UsersController@putBanAndDeleteThreads'); + get('forum/{slug}', 'ThreadsController@show'); }); diff --git a/app/Jobs/Job.php b/app/Jobs/Job.php index dc48f1412..0e8a1c09d 100755 --- a/app/Jobs/Job.php +++ b/app/Jobs/Job.php @@ -12,7 +12,7 @@ abstract class Job | | This job base class provides a central location to place any logic that | is shared across all of your jobs. The trait included with the class - | provides access to the "queueOn" and "delay" queue helper methods. + | provides access to the "onQueue" and "delay" queue helper methods. | */ diff --git a/app/Markdown/HtmlMarkdownConvertor.php b/app/Markdown/HtmlMarkdownConvertor.php deleted file mode 100644 index b31093ea1..000000000 --- a/app/Markdown/HtmlMarkdownConvertor.php +++ /dev/null @@ -1,32 +0,0 @@ -htmlParser = new HTML_To_markdown; - $this->htmlParser->set_option('header_style', 'atx'); - - $this->markdownParser = new MarkdownExtra; - $this->markdownParser->no_markup = true; - } - - public function convertHtmlToMarkdown($html) - { - return $this->htmlParser->convert($html); - } - - public function convertMarkdownToHtml($markdown) - { - $html = $this->markdownParser->transform($markdown); - return Purifier::clean($html, 'markdown'); - } -} diff --git a/app/Policies/.gitkeep b/app/Policies/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/app/Providers/CommentServiceProvider.php b/app/Providers/CommentServiceProvider.php deleted file mode 100644 index 53c7c378b..000000000 --- a/app/Providers/CommentServiceProvider.php +++ /dev/null @@ -1,19 +0,0 @@ -registerGistEmbedFormatter(); - $this->registerGithubAuthenticator(); - } - - private function registerGistEmbedFormatter() - { - $this->app->singleton(GistEmbedFormatter::class, function () { - return new GistEmbedFormatter; - }); - } - - private function registerGithubAuthenticator() - { - $this->app->singleton(GithubAuthenticator::class, function ($app) { - return new GithubAuthenticator($app[Factory::class]->driver('github'), $app[UserRepository::class]); - }); - } - - public function provides() - { - return [ - GistEmbedFormatter::class, - GithubAuthenticator::class, - ]; - } -} diff --git a/app/Providers/HashidsServiceProvider.php b/app/Providers/HashidsServiceProvider.php deleted file mode 100644 index a99dc40d4..000000000 --- a/app/Providers/HashidsServiceProvider.php +++ /dev/null @@ -1,17 +0,0 @@ -app->bind([Hashids::class => 'hashids'], function($app) { - $key = $app['config']->get('app.key'); - - return new Hashids($key, 2); - }); - } -} diff --git a/app/Content/ForeignLanguageSpamDetector.php b/app/Spam/ForeignLanguageSpamDetector.php similarity index 94% rename from app/Content/ForeignLanguageSpamDetector.php rename to app/Spam/ForeignLanguageSpamDetector.php index 59d79a16f..eb80b047c 100644 --- a/app/Content/ForeignLanguageSpamDetector.php +++ b/app/Spam/ForeignLanguageSpamDetector.php @@ -1,5 +1,5 @@ 'required', - 'slug' => 'required', - ]; - - public function newCollection(array $models = []) - { - return new TagCollection($models); - } -} diff --git a/app/Tags/TagCollection.php b/app/Tags/TagCollection.php deleted file mode 100644 index e44390f08..000000000 --- a/app/Tags/TagCollection.php +++ /dev/null @@ -1,16 +0,0 @@ -items as $item) { - $tagLinks[] = '' . $item->name . ''; - } - - return implode(', ', $tagLinks); - } -} diff --git a/app/Tags/TagRepository.php b/app/Tags/TagRepository.php deleted file mode 100644 index 908b84886..000000000 --- a/app/Tags/TagRepository.php +++ /dev/null @@ -1,44 +0,0 @@ -model = $model; - } - - public function getAllTagsBySlug($slugString) - { - if (is_null($slugString)) { - return new Collection; - } - - if (stristr($slugString, ',')) { - $slugSlugs = explode(',', $slugString); - } else { - $slugSlugs = (array) $slugString; - } - - return $this->model->whereIn('slug', (array) $slugSlugs)->get(); - } - - public function getTagIdList() - { - return $this->model->lists('id'); - } - - public function getTagsByIds($ids) - { - if ( ! $ids) return null; - return $this->model->whereIn('id', $ids)->get(); - } - - public function getAllForForum() - { - return $this->model->where('forum', '=', 1)->get(); - } -} diff --git a/app/Users/User.php b/app/Users/User.php new file mode 100644 index 000000000..c6a7858a2 --- /dev/null +++ b/app/Users/User.php @@ -0,0 +1,38 @@ +=5.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Anhskohbo\\NoCaptcha\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "anhskohbo", - "email": "anhskohbo@gmail.com" - } - ], - "description": "No CAPTCHA reCAPTCHA For Laravel.", - "keywords": [ - "captcha", - "laravel", - "laravel4", - "laravel5", - "no-captcha", - "recaptcha" - ], - "time": "2015-06-10 05:09:18" - }, { "name": "bugsnag/bugsnag", "version": "v2.5.5", @@ -356,50 +312,6 @@ ], "time": "2014-12-20 21:24:13" }, - { - "name": "ezyang/htmlpurifier", - "version": "v4.6.0", - "source": { - "type": "git", - "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "6f389f0f25b90d0b495308efcfa073981177f0fd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/6f389f0f25b90d0b495308efcfa073981177f0fd", - "reference": "6f389f0f25b90d0b495308efcfa073981177f0fd", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "HTMLPurifier": "library/" - }, - "files": [ - "library/HTMLPurifier.composer.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL" - ], - "authors": [ - { - "name": "Edward Z. Yang", - "email": "admin@htmlpurifier.org", - "homepage": "http://ezyang.com" - } - ], - "description": "Standards compliant HTML filter written in PHP", - "homepage": "http://htmlpurifier.org/", - "keywords": [ - "html" - ], - "time": "2013-11-30 08:25:19" - }, { "name": "guzzle/guzzle", "version": "v3.9.3", @@ -666,63 +578,6 @@ ], "time": "2015-06-24 19:55:15" }, - { - "name": "hashids/hashids", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/ivanakimov/hashids.php.git", - "reference": "991a88b01b01b053fbd39a56780a66e572f1dc1a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ivanakimov/hashids.php/zipball/991a88b01b01b053fbd39a56780a66e572f1dc1a", - "reference": "991a88b01b01b053fbd39a56780a66e572f1dc1a", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Hashids": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ivan Akimov", - "email": "ivan@barreleye.com", - "homepage": "https://twitter.com/IvanAkimov" - } - ], - "description": "Generate hashids like YouTube or Bitly from numbers to obfuscate your database primary ids, or navigate to the right shard.", - "homepage": "http://hashids.org/php", - "keywords": [ - "bitly", - "decrypt", - "encrypt", - "hash", - "hashid", - "hashids", - "ids", - "obfuscate", - "youtube" - ], - "time": "2015-01-21 00:49:41" - }, { "name": "jakub-onderka/php-console-color", "version": "0.1", @@ -870,16 +725,16 @@ }, { "name": "laravel/framework", - "version": "v5.1.7", + "version": "v5.1.17", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "5e942882319845f71c681ce6e85831129bf66426" + "reference": "415b5d824e15ee7cd18b8b23f96ae32b0b51d6a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/5e942882319845f71c681ce6e85831129bf66426", - "reference": "5e942882319845f71c681ce6e85831129bf66426", + "url": "https://api.github.com/repos/laravel/framework/zipball/415b5d824e15ee7cd18b8b23f96ae32b0b51d6a0", + "reference": "415b5d824e15ee7cd18b8b23f96ae32b0b51d6a0", "shasum": "" }, "require": { @@ -994,7 +849,7 @@ "framework", "laravel" ], - "time": "2015-07-12 02:27:36" + "time": "2015-09-16 16:57:12" }, { "name": "laravel/socialite", @@ -1244,226 +1099,6 @@ ], "time": "2015-05-18 00:04:43" }, - { - "name": "mccool/laravel-auto-presenter", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/laravel-auto-presenter/laravel-auto-presenter.git", - "reference": "0f77299f7e4e5e017da175583c85bf24fa85c118" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel-auto-presenter/laravel-auto-presenter/zipball/0f77299f7e4e5e017da175583c85bf24fa85c118", - "reference": "0f77299f7e4e5e017da175583c85bf24fa85c118", - "shasum": "" - }, - "require": { - "illuminate/container": "~5.0", - "illuminate/contracts": "~5.0", - "illuminate/events": "~5.0", - "illuminate/pagination": "~5.0", - "illuminate/support": "~5.0", - "illuminate/view": "~5.0", - "php": ">=5.5.0" - }, - "require-dev": { - "graham-campbell/testbench": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "McCool\\LaravelAutoPresenter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Shawn McCool", - "email": "shawn@heybigname.com" - }, - { - "name": "Graham Campbell", - "email": "graham@alt-three.com" - } - ], - "description": "A system for auto-decorating models with presenter objects.", - "keywords": [ - "eloquent", - "laravel", - "lpm", - "presenter" - ], - "time": "2015-06-26 09:15:40" - }, - { - "name": "mews/purifier", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/mewebstudio/Purifier.git", - "reference": "34b7d15002ce5f6fa28c6012e69f88181bab86b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mewebstudio/Purifier/zipball/34b7d15002ce5f6fa28c6012e69f88181bab86b0", - "reference": "34b7d15002ce5f6fa28c6012e69f88181bab86b0", - "shasum": "" - }, - "require": { - "ezyang/htmlpurifier": "4.6.*", - "illuminate/config": "~5.0", - "illuminate/filesystem": "~5.0", - "php": ">=5.4" - }, - "require-dev": { - "mockery/mockery": "dev-master", - "phpunit/phpunit": "~4.0" - }, - "type": "package", - "autoload": { - "psr-4": { - "Mews\\Purifier\\": "src/" - }, - "files": [ - "src/helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Muharrem ERİN", - "email": "me@mewebstudio.com", - "homepage": "https://github.com/mewebstudio", - "role": "Developer" - } - ], - "description": "Laravel 5 HtmlPurifier Package", - "homepage": "https://github.com/mewebstudio/purifier", - "keywords": [ - "Purifier", - "htmlpurifier", - "laravel5 HtmlPurifier", - "laravel5 Purifier", - "laravel5 Security", - "security", - "xss" - ], - "time": "2015-04-11 13:35:46" - }, - { - "name": "michelf/php-markdown", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/michelf/php-markdown.git", - "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", - "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-lib": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Michelf": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Michel Fortin", - "email": "michel.fortin@michelf.ca", - "homepage": "http://michelf.ca/", - "role": "Developer" - }, - { - "name": "John Gruber", - "homepage": "http://daringfireball.net/" - } - ], - "description": "PHP Markdown", - "homepage": "http://michelf.ca/projects/php-markdown/", - "keywords": [ - "markdown" - ], - "time": "2014-05-05 02:43:50" - }, - { - "name": "misd/linkify", - "version": "v1.1.2", - "source": { - "type": "git", - "url": "https://github.com/misd-service-development/php-linkify.git", - "reference": "4dbe3e9f966e446a257d0f60a91f39e0b7f4f4d6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/misd-service-development/php-linkify/zipball/4dbe3e9f966e446a257d0f60a91f39e0b7f4f4d6", - "reference": "4dbe3e9f966e446a257d0f60a91f39e0b7f4f4d6", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "Misd\\Linkify\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Wilkinson", - "email": "chris.wilkinson@admin.cam.ac.uk" - } - ], - "description": "Converts URLs and email addresses in text into HTML links", - "homepage": "https://github.com/misd-service-development/php-linkify", - "keywords": [ - "convert", - "email address", - "link", - "url" - ], - "time": "2014-05-12 11:52:18" - }, { "name": "monolog/monolog", "version": "1.15.0", @@ -1631,52 +1266,6 @@ ], "time": "2015-06-25 04:19:39" }, - { - "name": "nickcernis/html-to-markdown", - "version": "2.1.2", - "source": { - "type": "git", - "url": "https://github.com/nickcernis/html-to-markdown.git", - "reference": "c27833198b2777da43455829439cb24287597218" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nickcernis/html-to-markdown/zipball/c27833198b2777da43455829439cb24287597218", - "reference": "c27833198b2777da43455829439cb24287597218", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "require-dev": { - "php": ">=5.3.3", - "phpunit/phpunit": "4.*" - }, - "type": "library", - "autoload": { - "classmap": [ - "HTML_To_Markdown.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nick Cernis", - "email": "nick@cern.is", - "homepage": "http://modernnerd.net" - } - ], - "description": "An HTML-to-markdown conversion helper for PHP", - "homepage": "https://github.com/nickcernis/html-to-markdown", - "keywords": [ - "html", - "markdown" - ], - "time": "2015-01-04 20:10:30" - }, { "name": "nikic/php-parser", "version": "v1.3.0", @@ -1939,12 +1528,12 @@ "version": "v2.7.2", "source": { "type": "git", - "url": "https://github.com/symfony/Console.git", + "url": "https://github.com/symfony/console.git", "reference": "8cf484449130cabfd98dcb4694ca9945802a21ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/8cf484449130cabfd98dcb4694ca9945802a21ed", + "url": "https://api.github.com/repos/symfony/console/zipball/8cf484449130cabfd98dcb4694ca9945802a21ed", "reference": "8cf484449130cabfd98dcb4694ca9945802a21ed", "shasum": "" }, @@ -1996,12 +1585,12 @@ "version": "v2.7.2", "source": { "type": "git", - "url": "https://github.com/symfony/CssSelector.git", + "url": "https://github.com/symfony/css-selector.git", "reference": "0b5c07b516226b7dd32afbbc82fe547a469c5092" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/0b5c07b516226b7dd32afbbc82fe547a469c5092", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/0b5c07b516226b7dd32afbbc82fe547a469c5092", "reference": "0b5c07b516226b7dd32afbbc82fe547a469c5092", "shasum": "" }, @@ -2049,12 +1638,12 @@ "version": "v2.7.2", "source": { "type": "git", - "url": "https://github.com/symfony/Debug.git", + "url": "https://github.com/symfony/debug.git", "reference": "9daa1bf9f7e615fa2fba30357e479a90141222e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/9daa1bf9f7e615fa2fba30357e479a90141222e3", + "url": "https://api.github.com/repos/symfony/debug/zipball/9daa1bf9f7e615fa2fba30357e479a90141222e3", "reference": "9daa1bf9f7e615fa2fba30357e479a90141222e3", "shasum": "" }, @@ -2109,12 +1698,12 @@ "version": "v2.7.2", "source": { "type": "git", - "url": "https://github.com/symfony/DomCrawler.git", + "url": "https://github.com/symfony/dom-crawler.git", "reference": "9dabece63182e95c42b06967a0d929a5df78bc35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/9dabece63182e95c42b06967a0d929a5df78bc35", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/9dabece63182e95c42b06967a0d929a5df78bc35", "reference": "9dabece63182e95c42b06967a0d929a5df78bc35", "shasum": "" }, @@ -2162,12 +1751,12 @@ "version": "v2.7.2", "source": { "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", + "url": "https://github.com/symfony/event-dispatcher.git", "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/9310b5f9a87ec2ea75d20fec0b0017c77c66dac3", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9310b5f9a87ec2ea75d20fec0b0017c77c66dac3", "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3", "shasum": "" }, @@ -2269,12 +1858,12 @@ "version": "v2.7.2", "source": { "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", + "url": "https://github.com/symfony/http-foundation.git", "reference": "88903c0531b90d4ecd90282b18f08c0c77bde0b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/88903c0531b90d4ecd90282b18f08c0c77bde0b2", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/88903c0531b90d4ecd90282b18f08c0c77bde0b2", "reference": "88903c0531b90d4ecd90282b18f08c0c77bde0b2", "shasum": "" }, @@ -2322,12 +1911,12 @@ "version": "v2.7.2", "source": { "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", + "url": "https://github.com/symfony/http-kernel.git", "reference": "4a8a6f2a847475b3a38da50363a07f69b5cbf37e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/4a8a6f2a847475b3a38da50363a07f69b5cbf37e", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4a8a6f2a847475b3a38da50363a07f69b5cbf37e", "reference": "4a8a6f2a847475b3a38da50363a07f69b5cbf37e", "shasum": "" }, @@ -3198,6 +2787,50 @@ ], "time": "2014-09-09 13:34:57" }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.6.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "6f389f0f25b90d0b495308efcfa073981177f0fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/6f389f0f25b90d0b495308efcfa073981177f0fd", + "reference": "6f389f0f25b90d0b495308efcfa073981177f0fd", + "shasum": "" + }, + "require": { + "php": ">=5.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "HTMLPurifier": "library/" + }, + "files": [ + "library/HTMLPurifier.composer.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "time": "2013-11-30 08:25:19" + }, { "name": "fzaninotto/faker", "version": "v1.5.0", @@ -3445,16 +3078,16 @@ }, { "name": "phpspec/phpspec", - "version": "2.2.1", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/phpspec/phpspec.git", - "reference": "e9a40577323e67f1de2e214abf32976a0352d8f8" + "reference": "36635a903bdeb54899d7407bc95610501fd98559" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/phpspec/zipball/e9a40577323e67f1de2e214abf32976a0352d8f8", - "reference": "e9a40577323e67f1de2e214abf32976a0352d8f8", + "url": "https://api.github.com/repos/phpspec/phpspec/zipball/36635a903bdeb54899d7407bc95610501fd98559", + "reference": "36635a903bdeb54899d7407bc95610501fd98559", "shasum": "" }, "require": { @@ -3466,15 +3099,14 @@ "symfony/console": "~2.3", "symfony/event-dispatcher": "~2.1", "symfony/finder": "~2.1", - "symfony/process": "~2.1", + "symfony/process": "^2.6", "symfony/yaml": "~2.1" }, "require-dev": { "behat/behat": "^3.0.11", "bossa/phpspec2-expect": "~1.0", "phpunit/phpunit": "~4.4", - "symfony/filesystem": "~2.1", - "symfony/process": "~2.1" + "symfony/filesystem": "~2.1" }, "suggest": { "phpspec/nyan-formatters": "~1.0 – Adds Nyan formatters" @@ -3519,7 +3151,7 @@ "testing", "tests" ], - "time": "2015-05-30 15:21:40" + "time": "2015-09-07 07:07:37" }, { "name": "phpspec/prophecy", @@ -4392,12 +4024,12 @@ "version": "v2.7.2", "source": { "type": "git", - "url": "https://github.com/symfony/Config.git", + "url": "https://github.com/symfony/config.git", "reference": "6c905bbed1e728226de656e4c07d620dfe9e80d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/6c905bbed1e728226de656e4c07d620dfe9e80d9", + "url": "https://api.github.com/repos/symfony/config/zipball/6c905bbed1e728226de656e4c07d620dfe9e80d9", "reference": "6c905bbed1e728226de656e4c07d620dfe9e80d9", "shasum": "" }, @@ -4442,12 +4074,12 @@ "version": "v2.7.2", "source": { "type": "git", - "url": "https://github.com/symfony/Filesystem.git", + "url": "https://github.com/symfony/filesystem.git", "reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/2d7b2ddaf3f548f4292df49a99d19c853d43f0b8", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/2d7b2ddaf3f548f4292df49a99d19c853d43f0b8", "reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8", "shasum": "" }, diff --git a/config/app.php b/config/app.php index 9442e7160..0b68b1c05 100644 --- a/config/app.php +++ b/config/app.php @@ -142,21 +142,16 @@ */ Laravel\Socialite\SocialiteServiceProvider::class, Collective\Html\HtmlServiceProvider::class, - McCool\LaravelAutoPresenter\LaravelAutoPresenterServiceProvider::class, - Mews\Purifier\PurifierServiceProvider::class, Bugsnag\BugsnagLaravel\BugsnagLaravelServiceProvider::class, - Anhskohbo\NoCaptcha\NoCaptchaServiceProvider::class, /* * Application Service Providers... */ - Lio\Providers\AppServiceProvider::class, - Lio\Providers\EventServiceProvider::class, - Lio\Providers\RouteServiceProvider::class, - Lio\Providers\GithubServiceProvider::class, - Lio\Providers\CommentServiceProvider::class, - Lio\Providers\ContentServiceProvider::class, - Lio\Providers\HashidsServiceProvider::class, + Lio\AppServiceProvider::class, + Lio\Auth\AuthServiceProvider::class, + Lio\Events\EventServiceProvider::class, + Lio\Http\RouteServiceProvider::class, + Lio\Spam\SpamServiceProvider::class, ], @@ -186,6 +181,7 @@ 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 'Event' => Illuminate\Support\Facades\Event::class, 'File' => Illuminate\Support\Facades\File::class, + 'Gate' => Illuminate\Support\Facades\Gate::class, 'Hash' => Illuminate\Support\Facades\Hash::class, 'Input' => Illuminate\Support\Facades\Input::class, 'Inspiring' => Illuminate\Foundation\Inspiring::class, @@ -207,8 +203,6 @@ 'View' => Illuminate\Support\Facades\View::class, 'Socialite' => Laravel\Socialite\Facades\Socialite::class, - 'GitHub' => Lio\GitHub\GitHubFacade::class, - 'Purifier' => Mews\Purifier\Facades\Purifier::class, 'Bugsnag' => Bugsnag\BugsnagLaravel\BugsnagFacade::class, 'Form' => Collective\Html\FormFacade::class, diff --git a/config/auth.php b/config/auth.php index 0ffeedc75..8aa668989 100644 --- a/config/auth.php +++ b/config/auth.php @@ -28,7 +28,7 @@ | */ - 'model' => Lio\Accounts\User::class, + 'model' => Lio\Users\User::class, /* |-------------------------------------------------------------------------- diff --git a/config/forum.php b/config/forum.php deleted file mode 100644 index b66ccdb25..000000000 --- a/config/forum.php +++ /dev/null @@ -1,39 +0,0 @@ - [ - 'All Threads' => [ - 'tags' => '', - ], - 'Installation / Configuration' => [ - 'tags' => 'installation,configuration' - ], - 'Authentication / Security' => [ - 'tags' => 'authentication,security' - ], - 'Requests / Input / Responses' => [ - 'tags' => 'requests,input' - ], - 'Session / Cache' => [ - 'tags' => 'session,cache' - ], - 'Database / Eloquent' => [ - 'tags' => 'database,eloquent' - ], - 'Packages / IoC ' => [ - 'tags' => 'packages,ioc' - ], - 'Views / Blade / Forms' => [ - 'tags' => 'views,blade,forms' - ], - 'Mail / Queues' => [ - 'tags' => 'mail,queues' - ], - 'Local Community Meetups' => [ - 'tags' => 'meetups' - ], - 'Laravel.io Site and Community' => [ - 'tags' => 'laravelio', - ] - ], -]; \ No newline at end of file diff --git a/config/purifier.php b/config/purifier.php deleted file mode 100644 index f1ee8527d..000000000 --- a/config/purifier.php +++ /dev/null @@ -1,32 +0,0 @@ - 'UTF-8', - 'finalize' => true, - 'preload' => false, - 'cachePath' => storage_path('purifier'), - 'settings' => [ - 'default' => [ - 'HTML.Doctype' => 'XHTML 1.0 Strict', - 'HTML.Allowed' => 'div,b,strong,i,em,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src]', - 'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align', - 'AutoFormat.AutoParagraph' => true, - 'AutoFormat.RemoveEmpty' => true, - ], - 'markdown' => [ - 'HTML.Doctype' => 'XHTML 1.0 Strict', - 'HTML.Allowed' => 'div,b,strong,i,em,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src],*[style|class],pre,code,h1,h2,h3,h4,h5,h6,blockquote', - 'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align', - 'AutoFormat.AutoParagraph' => true, - 'AutoFormat.RemoveEmpty' => true, - ], - 'test' => [ - 'Attr.EnableID' => true - ], - "youtube" => [ - "HTML.SafeIframe" => 'true', - "URI.SafeIframeRegexp" => "%^(http://|https://|//)(www.youtube.com/embed/|player.vimeo.com/video/)%", - ], - ], -]; diff --git a/config/services.php b/config/services.php index dea45639f..6c1bef0af 100644 --- a/config/services.php +++ b/config/services.php @@ -15,8 +15,8 @@ */ 'mailgun' => [ - 'domain' => '', - 'secret' => '', + 'domain' => env('MAILGUN_DOMAIN'), + 'secret' => env('MAILGUN_SECRET'), ], 'mandrill' => [ @@ -24,15 +24,15 @@ ], 'ses' => [ - 'key' => '', - 'secret' => '', + 'key' => env('SES_KEY'), + 'secret' => env('SES_SECRET'), 'region' => 'us-east-1', ], 'stripe' => [ - 'model' => Lio\Accounts\User::class, - 'key' => '', - 'secret' => '', + 'model' => Lio\Users\User::class, + 'key' => env('STRIPE_KEY'), + 'secret' => env('STRIPE_SECRET'), ], 'github' => [ diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index b51b42433..352c020c4 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -11,11 +11,12 @@ | */ -$factory->define(Lio\Accounts\User::class, function (Faker\Generator $faker) { +$factory->define(Lio\Users\User::class, function (Faker\Generator $faker) { return [ 'name' => $faker->name, 'email' => $faker->email, - 'password' => str_random(10), + 'password' => bcrypt(str_random(10)), 'remember_token' => str_random(10), + 'confirmed' => true, ]; }); diff --git a/database/seeds/UserSeeder.php b/database/seeds/UserSeeder.php index 596e4f9f5..2cb40537c 100644 --- a/database/seeds/UserSeeder.php +++ b/database/seeds/UserSeeder.php @@ -1,7 +1,7 @@ (bIv$jr=y}!+ z$FDoS;pF_Li|bo%Z@cfn*Kb zvfi+4`D2eiVY1@Ml}|nWjH%hP&pkAM!NdBGEL`;HVgth^M#f7ev$XHKf3|dv?18yD z^K>87)4FZ)?Ng@Sapzsrrr&+fjG6bssL?mvIA-ik5Zsp>l1{aF65+=)- zQ2gZz3%q=s?L%k|N6K|N0tE#Hn39r$?3=#kJz((%EiEn4%E}6hi;J%*KZ}cKXJ?1h z|B8wVw6?a!_V#ws+d$*0N?80ve}8|TFFZUPSx!>69AlMG}_zKKI!iH(g#mV>anyPNah(9nRYMAcXmrs`cGR$g9?#G$Ul z#l<1ZE9xF=j8or;LtPo+AKv4ikdT0Rd3pTwQ5;B5Pe)HrPxSTm#gdYe0b`-2^KW5c zf!^NU96xBQ(f5x}3zal1oZf-8>=;(0YtDJ}J?NKI^Av+t$ zA%$8@elIUCw6(QW@J~0oy1JN?lcR(aASORMgCI%&Vq|25Nl8ilVeVc`es*p_CnqN* z9z#PzWP5QXoB%QTX`PvwnJKJy$_d)q+FV{#)c`U1*%<_-QYn{DD92IG2n`KIeSLj} z+$3y=ru?+u@bU5CToPwQL+89= z!~PFoOG}IJk&><{zmmft0wesxJO9VT#9&%l8nQD#vVTdKn3yQ4(B6wU)D`v*0%?u^ SmqHvPW%!K1zrO+gx9SSQk8KP9 diff --git a/public/images/jquery.fs.naver-icon.png b/public/images/jquery.fs.naver-icon.png deleted file mode 100644 index 16efd9cb32d23af2aa183b950408bae29c880bcc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^B0$W~!3HFs%y=IPq*#ibJVQ8upoSx*1IXtr@Q5sC zVBi)4Va7{$>;3=*MN3>GN}P*Q6H7Al^Atidb5j|N^^J`64UG>xSh5JHKnA2BI6tkV zJh3R1!7(L2DOJHOvnaJZzbLy{!8zFM#hy()Ky_N4E{-72@!_4sL1JCkROJ;+d%HZkh=d#Wzp$Py@x12mvusv2095FxYm7Lv~}>wmW3Ti1CvQBN=xWHsRhowu=lDM7I>l z5GaM55q}w^A&7yA}6t^*qsi?!Djn&U4=PobR0XdA==C zk;`11yqqW$iiUi`gydY`Y+)O&{ zNeGd~qyJS@yd;Vy#5D+w!w3w3SpYx_3St0@IYB{yKaI@-*i07r1_c0%K~50JUP62N z(8+8XMG6=Vg+0wh?s#-1L8w6{Gb<~Lkrl|mHK|O1%jMcQ*z5o@B0!ss5prDsrkyvz z03ljfqf!$p9HZG7<;i#^!K0Iv{&fUY{frjVK5Y}(Fs4qfW&#YB?MM@W63PFEqUf_| zEfJ0UUGIMqYh$z32s0Yd;+Yzl99+sgTPigu)F5&K*Tmv@`a~C_lsJKFmAINFj0vLo zO60H#vpM{pAS4n{jA;ou1|wpKM<+QLDwP6ci})fz&=Nie3WESZ6v*YW`CJx<6$o%x zfFO)JfrW556Gbp$0;~8NE0`2(69cLyGed|*wFXgyX>gSG+r?<$H=%OkN9j zQY@1!hG`q^KSn*_BK2c4p9z=TJd-|xk$TsV!aj6&c{7D#KVJ;-V|D$Ow~wSz`P7Q{ z>c=-UBs1suQ|)h@?H_tH_1NWtB=54w^u=~fJ#h&I>U!#&40rpceiWUb3d_B@#}j1w z-EJknxn$4V)^*BaK{c($+*j6pb;V+_oHF9q)&{Q4`nXF$pXFRA8e3TO)c&yX=m(OFEhUA5Sz;$S4?SgSu`eX@fl&KpK+M_?Yf>|Mx$&N7*BQfd`>Sq znj~dSn97~LKLlItZt6d{TUxfsG;M#H-?;?{vAgIOYD=T#^BU`c$|A>;E~5vBmFJ+g zRrx23F*~z7_PP4sULl^nx-2h-CsJguy7hqCfp{bi)~&aHsU~>JwlzhauV1qBi#*;? z^>ws~Y4k0e`$Bi0@ba`qq0X!P2F2y&yVLz=%8oa0$h_m!{}C)J+;GvS`>5R&tRT0v zWo6UVw$#z$FK37fKJM=At6Jt;S*)l2xM%24s25tf#X#5Y@_-^_?+bV{MmhTUOU2cz zXUWR-Wl?jJV!aIm%34z~)1Yj0J}L1K(9fPZRJj@bw8g`Lxg*W{fO~akhKb$dmb??N zyZFIMXbD{pN*tv_5vy!M1O*x?ArX+VjS|J2>TZjT6z`pB&s`Y@Qi z{#-Y#b@<(*?+Bfl;0L@@-c;t6uq)C@5dLQ1xTpBQ#SjNAT<8{kqF0(yd?F5CoF*M` zc(bI;+56WAh;XpLxjII_%EvHxElk%Cy2G_EZ!Gk^RBQEM>FoNp?@jK4!O}ZkKM~du zsQ#_>1MY%quYDjPrQURs$87^%l|mI2wVlE`+4WXK(f+%8++Ms8LiF-q;Q1t3ON!4V zQghSmx`r6pg#z=Y_m}@Zr9J<|j&glEmga8 zS{lCq4f5^qbnh)b#fvUK<}Wn9(f7Ei%JtPvpXR8DflCgf?mE-;Ka{U@-V2Qse|I!v z^HN27`7gI-{9CQ0aA(=yS@s5_BV)XI!NW%`_3?~X&~jGmHB zHKx~03yawM@>k@qPf*OP*ME;%bE6Y#d>ltOBkYmp8{?T~q4_!Uz4pCRzC3-J+hMJ_ z{h2A%G_U`wK+`hQmCcE6yOh=ro>^v29D00Kc=-8m%usV~pWQWR->Bz(_xA2Mv*?}D zmYKu(+cxxcSck*AT^p`GpNB{f%yI37^C)@35=T!_oA*6`EGaKz`u)}+hp~kw%3JEt U-p2a}b8NS$SQH602$DAb37u;iZvX%Q diff --git a/public/images/laravel-io-logo-dark-v3.png b/public/images/laravel-io-logo-dark-v3.png deleted file mode 100644 index 8a1f8f3edbe4389025585bf61e6635a43da2c906..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1970 zcmaJ?4_Fgr7#~W62mvusv2095FxYk*o9<#5+YMPVV*E*lk&N5HCfwcF4jCwjZYh%S zuM~7f{L7#eK@3bRXGj96kd`8v&LX2414>g2wVR67^JMqj-S>X)^ZtJC`@Qe)dA@DY zQ7hbBd|W6Likl=wzi2kAP|((_*?uZ6X`S)GIVhfWfjKX(~`E{r^xDeH^VL zVvxV<{ZC?DT#g1|#vnR8OAC{OOI=`3r2$1+L_y%%I2_NI>SDACCvcq#*U&_Sl7pdED?wp6SHuwobGcAB1OQ?VpU)2Cv$!k{z-0l# zaQ+k)!r?3w!H6lW@^38fiCDWBPz{+GLbU32h%#J@qqGNy2G##j3tJo}7V?&gp2+tI zt9)`T!B508$zquH(f(u9Q!Y|JcJr}t$<1TwBN(Z7Eh+4h_B#O-isM2F6c(o+w7z~U zof<~1daH4AQ&S3aULe)++S$R8d(*$TSeWcv5tR|_(9##5Sg2{F&dc<4Y#Bt+g=w(D zmwzHrZrJNl_Pblof|8z7Rx7G)H|4#s;nPc2tM!x#zp|dQKKs2MC4G)-k$7Tp@egap zwA)XAoolUE=Wg(Hucw`HXurtV-zBkB+^?F};KrU#r`gb;g+f2FoHTR*C^9jY#N{>p9q z@Tlq>)Ul@Eq$zfHw$}moz@Ju0=B};Cj}?fOIcu)pp>`o&Ny7~r9iOXPHmzh`ares? z90Ht(&rLxD4)sKx!jR9Ui!%_ap8Nt{R1^C{Hse1)E_<`ITGrFR&O)Xb$h&^Ncr1B!K`tv zA>l%4?bCXEn5xZUCjuvXRKO*8_|q58+E!on;NtWh(4wr1K1*%q4L8-rsgaa-w&6 z)I#qrV{bgy3+tTz@ESNqXC?*!Z&bEacqHzLauG(n%9-?*96BH3q=Sn*VovtUQcF+9 z?DI6}p z;qx2v+i!a@x$lf)my)qWMR?q1Fd7!(0O5P zca4|JHE!M3=KY{iu>+pzyUnk3$;JC&i%lyB?zhyqzqsXtTs1Lt!D-x6Z@&7c>V@uG zp;3~rk7sUOuI#M*_4=%TtCbY)9LF0gRx-LWCtDZYz2`O=7ae}@NZ&*!=6rBMFP#16 zBy`T?E!|RQe#yMJn0=sNRl&wY`I$3sw~shY aEH+bK(}ean-#(mczeOeDD5y!8y!kHz;2IPF diff --git a/public/images/laravel-io-logo-dark.png b/public/images/laravel-io-logo-dark.png deleted file mode 100644 index d9f55ac7d444a37ae42b26a8d5a3c36748be565b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1709 zcmaJ?Yfuwc6b@huq6kQI#F4NrC{RM4B#@98ArFWWM95%@4kjdPNMW-}vXFp}qJko} z@`!_WC`HskD;9B3s3V~GC|G#cFM-V7o!U{=n|+?!EWS`M&d=$IkAF zkBfG5UF=FA5Zt6Oq6B=^;*X!p$M}0sA#o?Zcw=G(mWXV^OezCJh}0md5FmwBS||Zh zX>u~JK|BJ%$zLZ|Uhyf@`S}YVpwsZd zbu1Z8h6%U91SQ~0r1RRoB)O}6<~%l^hU0k4^HrM@x9$l1%U|{ zES(R&6Qz*F146_A0W1nLL`|d90XCaL4`s30bTYu8(HT@4ezQa9pp3yBgB}a$5iGJz0q%qK?E7q z1|5p&5ItaLRHY(W7$3xyzDof{r)l-Z$ui*uqncGHl}@4AQ<`#=$^PFJhNr!aSOWB3 z?~KGoc@7Fu6Cfj!Wl-ad+vH~tg>r=kNQEH=If7(NRWUvd!4P8_f&#)sHV`ONsdak0 zA!q_2lX0bbBc{@;A*qND;v5v6PQzu0BgIkdFa}E`5z*;lCWpg_o^^^&pANzKCaPhONC%&CvTmW(w&UTh3!<;CJsw{4xtDW7^GEf=-`@GP zuqFfGt+z3MEI1bOa;)J<<<{s*@4L*7{I_H#xdC|GtNg7#r>!R}yIq*fk(3mMOQQ7i z+B#-+4!b@cx(Hfp#164OUKhJ+N5{ae$paO<#zXwZs-SbeZsM;O`6QhUJrNbHB?W|C zntSqK-WCJVM^a53?)J-O1T@soCE z_76gjfR#em`3zh6AD^|ml1oZ~Gyci>@ORvW+JaQHE6vp16drn%m8Qszt(@CQj9TyZ zX@QlLRL`fNXT%m_=i`steR7uznfvnrv0u8axqGS0jjn;1lp4T^oXRsk;*MQ zwYM$dtU0xog`1Uw!N*YY=*5QIj1xRzDcGE}&wKHl;d}gDp(KY?@cN3B!OB8)$}ftt zapeJx&Z1_+L2qwfd+Od-lM?Z|{_xfNHLsdmt4|djWk7p}C~c>Ewzb;ED+0cvy%x-J z{+pR4K*wX@SGSw2PP>YZ*aGEC7DQLu0++w`t?Dglec)R?eqsCbJVCzp!1kuyD+ujt zH5EnbxTXj{;vjc~G_uFT^P!`_@j@}WVYE;9Bq*?N0fiuNsB-MHyeZDS!&~xb>Hghk zPul`U9O}x}f4{2kkirzY^oj4ryi?n$BX3ssGy6-6m~(l~4+*V~DYIHRtMB)8znF8m i*SY^eL)of-Je7osl)vIry{`?~e;`tEoTx5Jx#M3fr<3yl diff --git a/public/images/laravel-io-logo-small.png b/public/images/laravel-io-logo-small.png deleted file mode 100644 index c5f9629385694e503c98f77cb0e80f9f70dd7b7b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1700 zcmeAS@N?(olHy`uVBq!ia0vp^-azcf!3HEVnqNl(DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49qH-ArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKWfE$}v3=Jk=fazBx7U&!58GyV5Q|Rl9UukYGTy=3tP%6T`SPd=?sVqp< z4@xc0FD*(2MqHXQ$f^P>=c3falKi5O{QMkPC z!8&|>tvvIJOA_;vQ$1a5m4IgGWoD*WnK_x7yScc!xmlRI85+78Il7q`ySX~Lm>HOw znp!wo!t}c2Czs}?=9R$oroi>O8Q|0lN({LLK$~4si!#enQ{0O3a}~gzw#vlq78ji6 zLG`BKbc?GiPQCg-$LNEi7AdM>LcsI`V!{(HkONQpsd>QkUIa|oA0;l#0Ol7lPZ!6K zid%2y?9UcXlsNwRn%CSb8XmhtIyf44UA?%`(R}xk9o#P$Y(BeUhso^jj-SF@yEwgq zSlHht9B{Q-F*7FQQD<|+^v}N^6j$u|rk5}D{?p^Xb|0ReeLC;7?awd2_toB?p6x5q z#@ZHrMvyU4Pz-_u1;W$}-%q&Q>{ofod?m>$)4^$sYeko~ljBV88?hl-+x-q?H zr}^q72{R^hbtj9lR~%B(0U|cI8OcToi5sJM|GQmOtmnSP`Mr8L0n3`E^>-(nmOb?Ae4=h- z+smNX`*Tdsm@F_kWMO`F!!EG~$7Ry@EVXCFujSofqZRd8_kDt>?Dy4K8})8{<| zr`(niqX);@01ukG|=gKlAjr>oZ^B z>DDpQLg08YbALE>Q@$Mj zr4lc9po(vS--4U%(~MRy3YLz*)Oy??|YN1EB4Q3))%|xD!bhg z)}fJXcK_GCQ;vN-x!m*fyYv`;t8T-?R$O}F=R)t-pLE9;mhJMN$J`R{V}X<~bLY8&%!4B22)8Bn(i>lON3>O8iNAo zOe6sI?5QSl|PEJl54jj%Fwy+h)@+AzZEnjRl z&p?61ED=X2;RyJkhLOP(L`g^}IMPpB;0eFb^2MKz2|h54lp(}m(RP|G%^T8a|KF6y z`(iDY(4nvK{!e0YK&%kL&>^uPO2mQ_7iy+)B_z6uAcjOB3J?gm^QX8gTp$sM!v#Xn z&7S~T(HJZaU!&MGhoI4jUVO2H!Dm5U6cP&NKyx^3B4In;kxHT3Q@1!$u~>H;nd)Fq zbth8@c6dB~3)yKNOA)Z5co1JQk7a+wIxL9Q6a!BPd!|4lPBg@(iUd4xZqr20!m(f% z9UbGY-1%nc&rB1pMTGb>Qa6qO|ipUY%__4wW{ZSwE22 z)6;_h?%#J`0vI3wZLRRLYgNi;hGCnKFHf5oj=V5lq%t4aJiAw|SDTPGS<@U_kW#Y3 zT&b3xk&!#4D!n8p1aL|M=x85t{Y2mj0tg)-9smu1ui}w?2=*G=JggJ)WsZL*&-XR~ zirkD{lHGQRJm}<7Y>H1__cri&l&RT`@SE?~_P^p2MT9mM)xbq!#;*>4T)i!0)|>ea znAOl+yErzD$FeW{VdkixW9zfHAmz^FI`J02T2~OCYH^sfk16lDw)n&)@MLkPv;OIn z59=FK<-Ju`Q{uz8Yh=R&RajH{cw^uAcQzRtv^R}En%ds67FoPWEC)kJ?NwSLFK_Dl z{Ew`XuZ#+X-qFzFYMqMF31p@V#8 zgs3WXz$`HFCb8^p-IBs5EvF1it4BRASmtaHbw!`=u%7KJ<(coU&BZ^t#?(=dRgG9H zGgFF8xT~zP*owq5kDtr`Dvf0DpSaPLByGQ|oKY*T>Clf*ylApE_{NF;(yEfFE5BK# zwOCK86$Kugwosb)(WyGI*Xit|Hp9yH?LJPNAJco& zjx=ihU1_V`l^MFP%cLTr+Q-ddC9Q&vfJa3mnVbEb3*QFy)E+ydF(+jptF@TU^L z&fb6T7!=0X_-fDYP3K)cmbW22`g!0eV^3~K;LZTIb7ffLf!Ua)r1xVP(-9^d>vYDA zn};lQFWAyT9#nW3MHijOv7WABzBOpLWm=Fr$iK^ocOaSIw}Y?3q$Sx7_a3*hRxUZ2 z(iR%^TD?EArrqRSWxVTS#PHqU=_3`@Mr)LvR)#3!toG5wtJZ`GsbboW0@i<v4 zWqkRc^?*h6`{ERBPDDlKQ(7DPHuOVNAoAPqjTMWA>Gfl{>4;O@pt|ePa)Q41piAZW zc!fB>E$-3uz`xc{CVgPUHBZqC$F>Z~tAILbhW>xI;ap44w;^}gR*SYy&-*)K6DI4M z^O1EAvy&eAM3Vm+xMGmmWS)0ym5bBkHcLayu3u~Iir0{D)$0xJOik$P>*Xaj?Qfy0 z#Jf$u_Y66oM1I}C*NLCFf|_h>?l%DC+RNp4uV{Q9CM4v?nZl~I;_16&`P+*y_{rpQS-y%KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0000VNkl lastLineIndex) ? defaults.$lines.slice(lastLineIndex, lineIndex + 1) : defaults.$lines.slice(lineIndex, lastLineIndex - 1); - $range.toggleClass(defaults.selectedClass); - manage($range); - } else { - $line.toggleClass(defaults.selectedClass); - manage($line); - } - $lastLineToggled = $line; - }); - - $(document).mousedown(function (e) { - if (e.shiftKey) e.preventDefault(); - }); - } - - /* expand #1-7,12,20 into [1,2,3,4,5,6,7,12,20] */ - function expandLines(lines) { - if(lines == '') return []; - lines = lines.replace(/#/g, '').split(','); - var linesExpanded = []; - for(var i in lines) { - if(lines.hasOwnProperty(i)) { - linesExpanded = linesExpanded.concat(expand(lines[i])); - } - } - - return sanitize(linesExpanded) - } - - function expand(item) { - return (item.indexOf('-') > 0) ? generateRange(item.split('-')) : [parseInt(item, 10)]; - } - - function generateRange(values) { - var range = []; - for (var i = parseInt(values[0], 10); i <= parseInt(values[1], 10); i++) { - range.push(i); - } - return range; - } - - /* sort linesnumbers array and remove duplicate numbers */ - function sanitize(lines) { - lines = lines.sort(function(a, b) { return a-b; }); - uniqueLines = []; - for(var i = 0; i < lines.length; i++) { - if(uniqueLines.indexOf(lines[i]) === -1) uniqueLines.push(lines[i]); - } - return uniqueLines; - } - - /* collapse [1,2,3,4,5,6,7,12,20] into #1-7,12,20 */ - function collapser() { - lines = sanitize(_lines); - var ranges = [], rstart, rend; - for (var i = 0; i < lines.length; i++) { - rstart = lines[i]; - rend = rstart; - while (lines[i + 1] - lines[i] == 1) { - rend = lines[i + 1]; - i++; - } - ranges.push(rstart == rend ? rstart+'' : rstart + '-' + rend); - } - return '#' + ranges.join(','); - } - - /* update lines array */ - function manage(items) { - items.each(function() { - var indexOfLine = $(this).index() + 1, - indexInLinesArray = _lines.indexOf(indexOfLine); - - if(indexInLinesArray < 0) { - _lines.push(indexOfLine); - } else { - _lines.splice(indexInLinesArray, 1); - } - }); - window.location.hash = collapser(); - } - - prettyPrint(function() { - $.handleLines({ - $list: $('ol.linenums'), - selectClass: 'selected', - preventTextSelectionClass: 'prevent-user-select' - }); - }); - }; - - /** - * Temporarily disabled drag and drop - * - * @todo Delete the code or bring it back - * @private - */ - var _bindDragAndDrop = function() { - return; - - // drag and drop file api stuff - function handleFileSelect(e) { - e.stopPropagation(); - e.preventDefault(); - - var files = e.dataTransfer.files; - - $.each(files, function() { - var file = this; - - // if ( ! file.type.match('text.*')) { - // continue; - // } - - var reader = new FileReader(); - - reader.onload = (function() { - return function(e) { - addFile(file.name, e.target.result); - }; - })(file); - - reader.readAsText(file); - }); - } - - function handleDragOver(e) { - e.stopPropagation(); - e.preventDefault(); - e.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy. - } - - function bindDragAndDrop() { - var dropZone = document.getElementById('drop_zone'); - dropZone.addEventListener('dragover', handleDragOver, false); - dropZone.addEventListener('drop', handleFileSelect, false); - } - - function addFile(name, contents) { - var template = $('._file_template').html(); - - template = template.replace(/\|filename\|/g, name); - template = template.replace(/\|contents\|/g, contents); - - $('._files').append(template); - } - - // go - $(function() { - bindDragAndDrop(); - }); - }; - - return { - init: init - }; -})(jQuery); - -$(function() { - PasteBin.init(); -}); diff --git a/public/javascripts/forum.js b/public/javascripts/forum.js deleted file mode 100644 index f79c2515c..000000000 --- a/public/javascripts/forum.js +++ /dev/null @@ -1,142 +0,0 @@ -var tagsDisabled = false; -var maxTags = 3; - -function checkForMaximumTags() { - if ($('._tag_list ._tag.active').length >= maxTags) { - tagsDisabled = true; - - $('._tag_list ._tag').not('.active').addClass('disabled'); - } else { - tagsDisabled = false; - $('._tag_list ._tag.disabled').removeClass('disabled'); - } -} - -function showTagDescriptions() { - var checkedTags = $('._tag input:checked'); - var descriptionArea = $('._tag_descriptions'); - var descriptions = []; - - checkedTags.each(function() { - var tagDescription = $(this).parent().find('._description').text(); - descriptions.push(tagDescription); - }); - - if (descriptions.length == 0) { - $('._tag_description_container').hide(); - return; - } - - $('._tag_description_container').show(); - $('._tag_descriptions').text(''); - - for (var i in descriptions) { - $('._tag_descriptions').append("
  • " + descriptions[i] + "
  • "); - } -} - -function updateTagDisplay() { - $('._tag_list ._tag').removeClass('active'); - var tagInputs = $('._tags').find('input'); - - tagInputs.each(function() { - var tag = $(this).attr('title'); - if ($(this).prop('checked')) { - $('a._tag[title=' + tag + ']').addClass('active'); - } - }); - - checkForMaximumTags(); - showTagDescriptions(); -} - -function toggleTag(tagText) { - var checkbox = $('._tags ._tag[title=' + tagText + '] input'); - - if (checkbox.prop('checked')) { - checkbox.prop('checked', false); - } else { - checkbox.prop('checked', true); - } - - updateTagDisplay(); -} - -function bindTagChooser() { - // each click of a tag link togs the tag - $('a._tag').click(function(e) { - e.preventDefault(); - if ( ! $(this).hasClass('disabled')) { - toggleTag($(this).text()); - } - }); - - // set up initial state - updateTagDisplay(); -} - -function questionSelectToTag() { - var tags = $('._question_tags').find('input'); - - tags.each(function() { - if ($(this).prop('checked')) { - $(this).closest('label').addClass('selected'); - } - }); - - $('._question_tags input').change(function() { - $('._question_tags .selected').removeClass('selected'); - $(this).closest('label').addClass('selected'); - }) -} - -function versionSelectToTag() { - var versionTags = $('._version_tags').find('input'); - - versionTags.each(function() { - if ($(this).prop('checked')) { - $(this).closest('label').addClass('selected'); - } - }); - - $('._version_tags input').change(function() { - $('._version_tags .selected').removeClass('selected'); - $(this).closest('label').addClass('selected'); - }) -} - -function formatForumQuote(author, quote) -{ - // add author name - quote = "**" + author + "** said:\n\n" + quote; - - // add markdown quote tags - quote = quote.replace(/^/g, ">"); - quote = quote.replace(/\n/g, "\n>"); - - return quote; -} - -function bindQuoteLinks() -{ - $('._quote_forum_post').click(function(e) { - e.preventDefault(); - - var replyForm = $('._reply_form'); - var quoteBody = $(this).closest('._post').data('quote-body'); - var authorName = $(this).closest('._post').data('author-name'); - - var quoteText = formatForumQuote($.parseJSON(authorName), $.parseJSON(quoteBody)); - - replyForm.val(replyForm.val() + quoteText); - - location.href="#reply_form"; - }); -} - -$(function() { - bindTagChooser(); - versionSelectToTag(); - questionSelectToTag(); - bindQuoteLinks(); -}); diff --git a/public/javascripts/foundation/foundation.abide.js b/public/javascripts/foundation/foundation.abide.js deleted file mode 100644 index baf896100..000000000 --- a/public/javascripts/foundation/foundation.abide.js +++ /dev/null @@ -1,194 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.abide = { - name : 'abide', - - version : '4.3.0', - - settings : { - live_validate : true, - focus_on_invalid : true, - timeout : 1000, - patterns : { - alpha: /[a-zA-Z]+/, - alpha_numeric : /[a-zA-Z0-9]+/, - integer: /-?\d+/, - number: /-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?/, - - // generic password: upper-case, lower-case, number/special character, and min 8 characters - password : /(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, - - // amex, visa, diners - card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/, - cvv : /^([0-9]){3,4}$/, - - // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address - email : /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, - - url: /(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?/, - // abc.de - domain: /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$/, - - datetime: /([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))/, - // YYYY-MM-DD - date: /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))/, - // HH:MM:SS - time : /(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}/, - dateISO: /\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/, - // MM/DD/YYYY - month_day_year : /(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d/, - - // #FFF or #FFFFFF - color: /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/ - } - }, - - timer : null, - - init : function (scope, method, options) { - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - if (!this.settings.init) { this.events(); } - - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this, - forms = $('form[data-abide]', this.scope).attr('novalidate', 'novalidate'); - - forms - .on('submit validate', function (e) { - return self.validate($(this).find('input, textarea, select').get(), e); - }); - - this.settings.init = true; - - if (!this.settings.live_validate) return; - - forms - .find('input, textarea, select') - .on('blur change', function (e) { - self.validate([this], e); - }) - .on('keydown', function (e) { - clearTimeout(self.timer); - self.timer = setTimeout(function () { - self.validate([this], e); - }.bind(this), self.settings.timeout); - }); - }, - - validate : function (els, e) { - var validations = this.parse_patterns(els), - validation_count = validations.length, - form = $(els[0]).closest('form'); - - while (validation_count--) { - if (!validations[validation_count] && /submit/.test(e.type)) { - if (this.settings.focus_on_invalid) els[validation_count].focus(); - form.trigger('invalid'); - $(els[validation_count]).closest('form').attr('data-invalid', ''); - return false; - } - } - - if (/submit/.test(e.type)) { - form.trigger('valid'); - } - - form.removeAttr('data-invalid'); - - return true; - }, - - parse_patterns : function (els) { - var count = els.length, - el_patterns = []; - - for (var i = count - 1; i >= 0; i--) { - el_patterns.push(this.pattern(els[i])); - } - - return this.check_validation_and_apply_styles(el_patterns); - }, - - pattern : function (el) { - var type = el.getAttribute('type'), - required = typeof el.getAttribute('required') === 'string'; - - if (this.settings.patterns.hasOwnProperty(type)) { - return [el, this.settings.patterns[type], required]; - } - - var pattern = el.getAttribute('pattern') || ''; - - if (this.settings.patterns.hasOwnProperty(pattern) && pattern.length > 0) { - return [el, this.settings.patterns[pattern], required]; - } else if (pattern.length > 0) { - return [el, new RegExp(pattern), required]; - } - - pattern = /.*/; - - return [el, pattern, required]; - }, - - check_validation_and_apply_styles : function (el_patterns) { - var count = el_patterns.length, - validations = []; - - for (var i = count - 1; i >= 0; i--) { - var el = el_patterns[i][0], - required = el_patterns[i][2], - value = el.value, - is_radio = el.type === "radio", - valid_length = (required) ? (el.value.length > 0) : true; - - if (is_radio && required) { - validations.push(this.valid_radio(el, required)); - } else { - if (el_patterns[i][1].test(value) && valid_length || - !required && el.value.length < 1) { - $(el).removeAttr('data-invalid').parent().removeClass('error'); - validations.push(true); - } else { - $(el).attr('data-invalid', '').parent().addClass('error'); - validations.push(false); - } - } - } - - return validations; - }, - - valid_radio : function (el, required) { - var name = el.getAttribute('name'), - group = document.getElementsByName(name), - count = group.length, - valid = false; - - for (var i=0; i < count; i++) { - if (group[i].checked) valid = true; - } - - for (var i=0; i < count; i++) { - if (valid) { - $(group[i]).removeAttr('data-invalid').parent().removeClass('error'); - } else { - $(group[i]).attr('data-invalid', '').parent().addClass('error'); - } - } - - return valid; - } - }; -}(Foundation.zj, this, this.document)); \ No newline at end of file diff --git a/public/javascripts/foundation/foundation.alerts.js b/public/javascripts/foundation/foundation.alerts.js deleted file mode 100644 index 8e4522de2..000000000 --- a/public/javascripts/foundation/foundation.alerts.js +++ /dev/null @@ -1,52 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.alerts = { - name : 'alerts', - - version : '4.2.2', - - settings : { - speed: 300, // fade out speed - callback: function (){} - }, - - init : function (scope, method, options) { - this.scope = scope || this.scope; - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - if (!this.settings.init) { this.events(); } - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - - $(this.scope).on('click.fndtn.alerts', '[data-alert] a.close', function (e) { - e.preventDefault(); - $(this).closest("[data-alert]").fadeOut(self.speed, function () { - $(this).remove(); - self.settings.callback(); - }); - }); - - this.settings.init = true; - }, - - off : function () { - $(this.scope).off('.fndtn.alerts'); - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); \ No newline at end of file diff --git a/public/javascripts/foundation/foundation.clearing.js b/public/javascripts/foundation/foundation.clearing.js deleted file mode 100644 index 32547ea68..000000000 --- a/public/javascripts/foundation/foundation.clearing.js +++ /dev/null @@ -1,516 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.clearing = { - name : 'clearing', - - version: '4.3.1', - - settings : { - templates : { - viewing : '×' + - '' - }, - - // comma delimited list of selectors that, on click, will close clearing, - // add 'div.clearing-blackout, div.visible-img' to close on background click - close_selectors : '.clearing-close', - - // event initializers and locks - init : false, - locked : false - }, - - init : function (scope, method, options) { - var self = this; - Foundation.inherit(this, 'set_data get_data remove_data throttle data_options'); - - if (typeof method === 'object') { - options = $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - $(this.scope).find('ul[data-clearing]').each(function () { - var $el = $(this), - options = options || {}, - lis = $el.find('li'), - settings = self.get_data($el); - - if (!settings && lis.length > 0) { - options.$parent = $el.parent(); - - self.set_data($el, $.extend({}, self.settings, options, self.data_options($el))); - - self.assemble($el.find('li')); - - if (!self.settings.init) { - self.events().swipe_events(); - } - } - }); - - return this.settings.init; - } else { - // fire method - return this[method].call(this, options); - } - }, - - // event binding and initial setup - - events : function () { - var self = this; - - $(this.scope) - .on('click.fndtn.clearing', 'ul[data-clearing] li', - function (e, current, target) { - var current = current || $(this), - target = target || current, - next = current.next('li'), - settings = self.get_data(current.parent()), - image = $(e.target); - - e.preventDefault(); - if (!settings) self.init(); - - // if clearing is open and the current image is - // clicked, go to the next image in sequence - if (target.hasClass('visible') && - current[0] === target[0] && - next.length > 0 && self.is_open(current)) { - target = next; - image = target.find('img'); - } - - // set current and target to the clicked li if not otherwise defined. - self.open(image, current, target); - self.update_paddles(target); - }) - - .on('click.fndtn.clearing', '.clearing-main-next', - function (e) { this.nav(e, 'next') }.bind(this)) - .on('click.fndtn.clearing', '.clearing-main-prev', - function (e) { this.nav(e, 'prev') }.bind(this)) - .on('click.fndtn.clearing', this.settings.close_selectors, - function (e) { Foundation.libs.clearing.close(e, this) }) - .on('keydown.fndtn.clearing', - function (e) { this.keydown(e) }.bind(this)); - - $(window).on('resize.fndtn.clearing', - function () { this.resize() }.bind(this)); - - this.settings.init = true; - return this; - }, - - swipe_events : function () { - var self = this; - - $(this.scope) - .on('touchstart.fndtn.clearing', '.visible-img', function(e) { - if (!e.touches) { e = e.originalEvent; } - var data = { - start_page_x: e.touches[0].pageX, - start_page_y: e.touches[0].pageY, - start_time: (new Date()).getTime(), - delta_x: 0, - is_scrolling: undefined - }; - - $(this).data('swipe-transition', data); - e.stopPropagation(); - }) - .on('touchmove.fndtn.clearing', '.visible-img', function(e) { - if (!e.touches) { e = e.originalEvent; } - // Ignore pinch/zoom events - if(e.touches.length > 1 || e.scale && e.scale !== 1) return; - - var data = $(this).data('swipe-transition'); - - if (typeof data === 'undefined') { - data = {}; - } - - data.delta_x = e.touches[0].pageX - data.start_page_x; - - if ( typeof data.is_scrolling === 'undefined') { - data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) ); - } - - if (!data.is_scrolling && !data.active) { - e.preventDefault(); - var direction = (data.delta_x < 0) ? 'next' : 'prev'; - data.active = true; - self.nav(e, direction); - } - }) - .on('touchend.fndtn.clearing', '.visible-img', function(e) { - $(this).data('swipe-transition', {}); - e.stopPropagation(); - }); - }, - - assemble : function ($li) { - var $el = $li.parent(); - $el.after('
    '); - - var holder = $('#foundationClearingHolder'), - settings = this.get_data($el), - grid = $el.detach(), - data = { - grid: '', - viewing: settings.templates.viewing - }, - wrapper = '
    ' + data.viewing + - data.grid + '
    '; - - return holder.after(wrapper).remove(); - }, - - // event callbacks - - open : function ($image, current, target) { - var root = target.closest('.clearing-assembled'), - container = root.find('div').first(), - visible_image = container.find('.visible-img'), - image = visible_image.find('img').not($image); - - if (!this.locked()) { - // set the image to the selected thumbnail - image - .attr('src', this.load($image)) - .css('visibility', 'hidden'); - - this.loaded(image, function () { - image.css('visibility', 'visible'); - // toggle the gallery - root.addClass('clearing-blackout'); - container.addClass('clearing-container'); - visible_image.show(); - this.fix_height(target) - .caption(visible_image.find('.clearing-caption'), $image) - .center(image) - .shift(current, target, function () { - target.siblings().removeClass('visible'); - target.addClass('visible'); - }); - }.bind(this)); - } - }, - - close : function (e, el) { - e.preventDefault(); - - var root = (function (target) { - if (/blackout/.test(target.selector)) { - return target; - } else { - return target.closest('.clearing-blackout'); - } - }($(el))), container, visible_image; - - if (el === e.target && root) { - container = root.find('div').first(); - visible_image = container.find('.visible-img'); - this.settings.prev_index = 0; - root.find('ul[data-clearing]') - .attr('style', '').closest('.clearing-blackout') - .removeClass('clearing-blackout'); - container.removeClass('clearing-container'); - visible_image.hide(); - } - - return false; - }, - - is_open : function (current) { - return current.parent().attr('style').length > 0; - }, - - keydown : function (e) { - var clearing = $('.clearing-blackout').find('ul[data-clearing]'); - - if (e.which === 39) this.go(clearing, 'next'); - if (e.which === 37) this.go(clearing, 'prev'); - if (e.which === 27) $('a.clearing-close').trigger('click'); - }, - - nav : function (e, direction) { - var clearing = $('.clearing-blackout').find('ul[data-clearing]'); - - e.preventDefault(); - this.go(clearing, direction); - }, - - resize : function () { - var image = $('.clearing-blackout .visible-img').find('img'); - - if (image.length) { - this.center(image); - } - }, - - // visual adjustments - fix_height : function (target) { - var lis = target.parent().children(), - self = this; - - lis.each(function () { - var li = $(this), - image = li.find('img'); - - if (li.height() > self.outerHeight(image)) { - li.addClass('fix-height'); - } - }) - .closest('ul') - .width(lis.length * 100 + '%'); - - return this; - }, - - update_paddles : function (target) { - var visible_image = target - .closest('.carousel') - .siblings('.visible-img'); - - if (target.next().length > 0) { - visible_image - .find('.clearing-main-next') - .removeClass('disabled'); - } else { - visible_image - .find('.clearing-main-next') - .addClass('disabled'); - } - - if (target.prev().length > 0) { - visible_image - .find('.clearing-main-prev') - .removeClass('disabled'); - } else { - visible_image - .find('.clearing-main-prev') - .addClass('disabled'); - } - }, - - center : function (target) { - if (!this.rtl) { - target.css({ - marginLeft : -(this.outerWidth(target) / 2), - marginTop : -(this.outerHeight(target) / 2) - }); - } else { - target.css({ - marginRight : -(this.outerWidth(target) / 2), - marginTop : -(this.outerHeight(target) / 2) - }); - } - return this; - }, - - // image loading and preloading - - load : function ($image) { - if ($image[0].nodeName === "A") { - var href = $image.attr('href'); - } else { - var href = $image.parent().attr('href'); - } - - this.preload($image); - - if (href) return href; - return $image.attr('src'); - }, - - preload : function ($image) { - this - .img($image.closest('li').next()) - .img($image.closest('li').prev()); - }, - - loaded : function (image, callback) { - // based on jquery.imageready.js - // @weblinc, @jsantell, (c) 2012 - - function loaded () { - callback(); - } - - function bindLoad () { - this.one('load', loaded); - - if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { - var src = this.attr( 'src' ), - param = src.match( /\?/ ) ? '&' : '?'; - - param += 'random=' + (new Date()).getTime(); - this.attr('src', src + param); - } - } - - if (!image.attr('src')) { - loaded(); - return; - } - - if (image[0].complete || image[0].readyState === 4) { - loaded(); - } else { - bindLoad.call(image); - } - }, - - img : function (img) { - if (img.length) { - var new_img = new Image(), - new_a = img.find('a'); - - if (new_a.length) { - new_img.src = new_a.attr('href'); - } else { - new_img.src = img.find('img').attr('src'); - } - } - return this; - }, - - // image caption - - caption : function (container, $image) { - var caption = $image.data('caption'); - - if (caption) { - container - .html(caption) - .show(); - } else { - container - .text('') - .hide(); - } - return this; - }, - - // directional methods - - go : function ($ul, direction) { - var current = $ul.find('.visible'), - target = current[direction](); - - if (target.length) { - target - .find('img') - .trigger('click', [current, target]); - } - }, - - shift : function (current, target, callback) { - var clearing = target.parent(), - old_index = this.settings.prev_index || target.index(), - direction = this.direction(clearing, current, target), - left = parseInt(clearing.css('left'), 10), - width = this.outerWidth(target), - skip_shift; - - // we use jQuery animate instead of CSS transitions because we - // need a callback to unlock the next animation - if (target.index() !== old_index && !/skip/.test(direction)){ - if (/left/.test(direction)) { - this.lock(); - clearing.animate({left : left + width}, 300, this.unlock()); - } else if (/right/.test(direction)) { - this.lock(); - clearing.animate({left : left - width}, 300, this.unlock()); - } - } else if (/skip/.test(direction)) { - // the target image is not adjacent to the current image, so - // do we scroll right or not - skip_shift = target.index() - this.settings.up_count; - this.lock(); - - if (skip_shift > 0) { - clearing.animate({left : -(skip_shift * width)}, 300, this.unlock()); - } else { - clearing.animate({left : 0}, 300, this.unlock()); - } - } - - callback(); - }, - - direction : function ($el, current, target) { - var lis = $el.find('li'), - li_width = this.outerWidth(lis) + (this.outerWidth(lis) / 4), - up_count = Math.floor(this.outerWidth($('.clearing-container')) / li_width) - 1, - target_index = lis.index(target), - response; - - this.settings.up_count = up_count; - - if (this.adjacent(this.settings.prev_index, target_index)) { - if ((target_index > up_count) - && target_index > this.settings.prev_index) { - response = 'right'; - } else if ((target_index > up_count - 1) - && target_index <= this.settings.prev_index) { - response = 'left'; - } else { - response = false; - } - } else { - response = 'skip'; - } - - this.settings.prev_index = target_index; - - return response; - }, - - adjacent : function (current_index, target_index) { - for (var i = target_index + 1; i >= target_index - 1; i--) { - if (i === current_index) return true; - } - return false; - }, - - // lock management - - lock : function () { - this.settings.locked = true; - }, - - unlock : function () { - this.settings.locked = false; - }, - - locked : function () { - return this.settings.locked; - }, - - // plugin management/browser quirks - - outerHTML : function (el) { - // support FireFox < 11 - return el.outerHTML || new XMLSerializer().serializeToString(el); - }, - - off : function () { - $(this.scope).off('.fndtn.clearing'); - $(window).off('.fndtn.clearing'); - this.remove_data(); // empty settings cache - this.settings.init = false; - }, - - reflow : function () { - this.init(); - } - }; - -}(Foundation.zj, this, this.document)); diff --git a/public/javascripts/foundation/foundation.cookie.js b/public/javascripts/foundation/foundation.cookie.js deleted file mode 100644 index b196e764a..000000000 --- a/public/javascripts/foundation/foundation.cookie.js +++ /dev/null @@ -1,74 +0,0 @@ -/*! - * jQuery Cookie Plugin v1.3 - * https://github.com/carhartl/jquery-cookie - * - * Copyright 2011, Klaus Hartl - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://www.opensource.org/licenses/mit-license.php - * http://www.opensource.org/licenses/GPL-2.0 - * - * Modified to work with Zepto.js by ZURB - */ -(function ($, document, undefined) { - - var pluses = /\+/g; - - function raw(s) { - return s; - } - - function decoded(s) { - return decodeURIComponent(s.replace(pluses, ' ')); - } - - var config = $.cookie = function (key, value, options) { - - // write - if (value !== undefined) { - options = $.extend({}, config.defaults, options); - - if (value === null) { - options.expires = -1; - } - - if (typeof options.expires === 'number') { - var days = options.expires, t = options.expires = new Date(); - t.setDate(t.getDate() + days); - } - - value = config.json ? JSON.stringify(value) : String(value); - - return (document.cookie = [ - encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), - options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE - options.path ? '; path=' + options.path : '', - options.domain ? '; domain=' + options.domain : '', - options.secure ? '; secure' : '' - ].join('')); - } - - // read - var decode = config.raw ? raw : decoded; - var cookies = document.cookie.split('; '); - for (var i = 0, l = cookies.length; i < l; i++) { - var parts = cookies[i].split('='); - if (decode(parts.shift()) === key) { - var cookie = decode(parts.join('=')); - return config.json ? JSON.parse(cookie) : cookie; - } - } - - return null; - }; - - config.defaults = {}; - - $.removeCookie = function (key, options) { - if ($.cookie(key) !== null) { - $.cookie(key, null, options); - return true; - } - return false; - }; - -})(Foundation.zj, document); \ No newline at end of file diff --git a/public/javascripts/foundation/foundation.dropdown.js b/public/javascripts/foundation/foundation.dropdown.js deleted file mode 100644 index 22b55243b..000000000 --- a/public/javascripts/foundation/foundation.dropdown.js +++ /dev/null @@ -1,177 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.dropdown = { - name : 'dropdown', - - version : '4.3.0', - - settings : { - activeClass: 'open', - is_hover: false, - opened: function(){}, - closed: function(){} - }, - - init : function (scope, method, options) { - this.scope = scope || this.scope; - Foundation.inherit(this, 'throttle scrollLeft data_options'); - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - - if (!this.settings.init) { - this.events(); - } - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - - $(this.scope) - .on('click.fndtn.dropdown', '[data-dropdown]', function (e) { - var settings = $.extend({}, self.settings, self.data_options($(this))); - e.preventDefault(); - - if (!settings.is_hover) self.toggle($(this)); - }) - .on('mouseenter', '[data-dropdown]', function (e) { - var settings = $.extend({}, self.settings, self.data_options($(this))); - if (settings.is_hover) self.toggle($(this)); - }) - .on('mouseleave', '[data-dropdown-content]', function (e) { - var target = $('[data-dropdown="' + $(this).attr('id') + '"]'), - settings = $.extend({}, self.settings, self.data_options(target)); - if (settings.is_hover) self.close.call(self, $(this)); - }) - .on('opened.fndtn.dropdown', '[data-dropdown-content]', this.settings.opened) - .on('closed.fndtn.dropdown', '[data-dropdown-content]', this.settings.closed); - - $(document).on('click.fndtn.dropdown', function (e) { - var parent = $(e.target).closest('[data-dropdown-content]'); - - if ($(e.target).data('dropdown')) { - return; - } - if (parent.length > 0 && ($(e.target).is('[data-dropdown-content]') || $.contains(parent.first()[0], e.target))) { - e.stopPropagation(); - return; - } - - self.close.call(self, $('[data-dropdown-content]')); - }); - - $(window).on('resize.fndtn.dropdown', self.throttle(function () { - self.resize.call(self); - }, 50)).trigger('resize'); - - this.settings.init = true; - }, - - close: function (dropdown) { - var self = this; - dropdown.each(function () { - if ($(this).hasClass(self.settings.activeClass)) { - $(this) - .css(Foundation.rtl ? 'right':'left', '-99999px') - .removeClass(self.settings.activeClass); - $(this).trigger('closed'); - } - }); - }, - - open: function (dropdown, target) { - this - .css(dropdown - .addClass(this.settings.activeClass), target); - dropdown.trigger('opened'); - }, - - toggle : function (target) { - var dropdown = $('#' + target.data('dropdown')); - - this.close.call(this, $('[data-dropdown-content]').not(dropdown)); - - if (dropdown.hasClass(this.settings.activeClass)) { - this.close.call(this, dropdown); - } else { - this.close.call(this, $('[data-dropdown-content]')) - this.open.call(this, dropdown, target); - } - }, - - resize : function () { - var dropdown = $('[data-dropdown-content].open'), - target = $("[data-dropdown='" + dropdown.attr('id') + "']"); - - if (dropdown.length && target.length) { - this.css(dropdown, target); - } - }, - - css : function (dropdown, target) { - var offset_parent = dropdown.offsetParent(); - // if (offset_parent.length > 0 && /body/i.test(dropdown.offsetParent()[0].nodeName)) { - var position = target.offset(); - position.top -= offset_parent.offset().top; - position.left -= offset_parent.offset().left; - // } else { - // var position = target.position(); - // } - - if (this.small()) { - dropdown.css({ - position : 'absolute', - width: '95%', - left: '2.5%', - 'max-width': 'none', - top: position.top + this.outerHeight(target) - }); - } else { - if (!Foundation.rtl && $(window).width() > this.outerWidth(dropdown) + target.offset().left) { - var left = position.left; - if (dropdown.hasClass('right')) { - dropdown.removeClass('right'); - } - } else { - if (!dropdown.hasClass('right')) { - dropdown.addClass('right'); - } - var left = position.left - (this.outerWidth(dropdown) - this.outerWidth(target)); - } - - dropdown.attr('style', '').css({ - position : 'absolute', - top: position.top + this.outerHeight(target), - left: left - }); - } - - return dropdown; - }, - - small : function () { - return $(window).width() < 768 || $('html').hasClass('lt-ie9'); - }, - - off: function () { - $(this.scope).off('.fndtn.dropdown'); - $('html, body').off('.fndtn.dropdown'); - $(window).off('.fndtn.dropdown'); - $('[data-dropdown-content]').off('.fndtn.dropdown'); - this.settings.init = false; - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); diff --git a/public/javascripts/foundation/foundation.forms.js b/public/javascripts/foundation/foundation.forms.js deleted file mode 100644 index 6f852f4d9..000000000 --- a/public/javascripts/foundation/foundation.forms.js +++ /dev/null @@ -1,533 +0,0 @@ -(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.forms = { - name : 'forms', - - version: '4.3.1', - - cache: {}, - - settings: { - disable_class: 'no-custom', - last_combo : null - }, - - init: function (scope, method, options) { - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - if (!this.settings.init) { - this.events(); - } - - this.assemble(); - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - assemble: function () { - $('form.custom input[type="radio"]', $(this.scope)) - .not('[data-customforms="disabled"]') - .not('.' + this.settings.disable_class) - .each(this.append_custom_markup); - $('form.custom input[type="checkbox"]', $(this.scope)) - .not('[data-customforms="disabled"]') - .not('.' + this.settings.disable_class) - .each(this.append_custom_markup); - $('form.custom select', $(this.scope)) - .not('[data-customforms="disabled"]') - .not('.' + this.settings.disable_class) - .not('[multiple=multiple]') - .each(this.append_custom_select); - }, - - events: function () { - var self = this; - - $(this.scope) - .on('click.fndtn.forms', 'form.custom span.custom.checkbox', function (e) { - e.preventDefault(); - e.stopPropagation(); - self.toggle_checkbox($(this)); - }) - .on('click.fndtn.forms', 'form.custom span.custom.radio', function (e) { - e.preventDefault(); - e.stopPropagation(); - self.toggle_radio($(this)); - }) - .on('change.fndtn.forms', 'form.custom select', function (e, force_refresh) { - if ($(this).is('[data-customforms="disabled"]')) return; - self.refresh_custom_select($(this), force_refresh); - }) - .on('click.fndtn.forms', 'form.custom label', function (e) { - if ($(e.target).is('label')) { - var $associatedElement = $('#' + self.escape($(this).attr('for'))).not('[data-customforms="disabled"]'), - $customCheckbox, - $customRadio; - - if ($associatedElement.length !== 0) { - if ($associatedElement.attr('type') === 'checkbox') { - e.preventDefault(); - $customCheckbox = $(this).find('span.custom.checkbox'); - //the checkbox might be outside after the label or inside of another element - if ($customCheckbox.length === 0) { - $customCheckbox = $associatedElement.add(this).siblings('span.custom.checkbox').first(); - } - self.toggle_checkbox($customCheckbox); - } else if ($associatedElement.attr('type') === 'radio') { - e.preventDefault(); - $customRadio = $(this).find('span.custom.radio'); - //the radio might be outside after the label or inside of another element - if ($customRadio.length === 0) { - $customRadio = $associatedElement.add(this).siblings('span.custom.radio').first(); - } - self.toggle_radio($customRadio); - } - } - } - }) - .on('mousedown.fndtn.forms', 'form.custom div.custom.dropdown', function () { - return false; - }) - .on('click.fndtn.forms', 'form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector', function (e) { - var $this = $(this), - $dropdown = $this.closest('div.custom.dropdown'), - $select = getFirstPrevSibling($dropdown, 'select'); - - // make sure other dropdowns close - if (!$dropdown.hasClass('open')) $(self.scope).trigger('click'); - - e.preventDefault(); - if (false === $select.is(':disabled')) { - $dropdown.toggleClass('open'); - - if ($dropdown.hasClass('open')) { - $(self.scope).on('click.fndtn.forms.customdropdown', function () { - $dropdown.removeClass('open'); - $(self.scope).off('.fndtn.forms.customdropdown'); - }); - } else { - $(self.scope).on('.fndtn.forms.customdropdown'); - } - return false; - } - }) - .on('click.fndtn.forms touchend.fndtn.forms', 'form.custom div.custom.dropdown li', function (e) { - var $this = $(this), - $customDropdown = $this.closest('div.custom.dropdown'), - $select = getFirstPrevSibling($customDropdown, 'select'), - selectedIndex = 0; - - e.preventDefault(); - e.stopPropagation(); - - if (!$(this).hasClass('disabled')) { - $('div.dropdown').not($customDropdown).removeClass('open'); - - var $oldThis = $this.closest('ul') - .find('li.selected'); - $oldThis.removeClass('selected'); - - $this.addClass('selected'); - - $customDropdown.removeClass('open') - .find('a.current') - .text($this.text()); - - $this.closest('ul').find('li').each(function (index) { - if ($this[0] === this) { - selectedIndex = index; - } - }); - $select[0].selectedIndex = selectedIndex; - - //store the old value in data - $select.data('prevalue', $oldThis.html()); - - // Kick off full DOM change event - if (typeof (document.createEvent) != 'undefined') { - var event = document.createEvent('HTMLEvents'); - event.initEvent('change', true, true); - $select[0].dispatchEvent(event); - } else { - $select[0].fireEvent('onchange'); // for IE - } - } - }); - - $(window).on('keydown', function (e) { - var focus = document.activeElement, - self = Foundation.libs.forms, - dropdown = $('.custom.dropdown.open'); - - if (dropdown.length > 0) { - e.preventDefault(); - - if (e.which === 13) { - dropdown.find('li.selected').trigger('click'); - } - - if (e.which === 27) { - dropdown.removeClass('open'); - } - - if (e.which >= 65 && e.which <= 90) { - var next = self.go_to(dropdown, e.which), - current = dropdown.find('li.selected'); - - if (next) { - current.removeClass('selected'); - self.scrollTo(next.addClass('selected'), 300); - } - } - - if (e.which === 38) { - var current = dropdown.find('li.selected'), - prev = current.prev(':not(.disabled)'); - - if (prev.length > 0) { - prev.parent()[0].scrollTop = prev.parent().scrollTop() - self.outerHeight(prev); - current.removeClass('selected'); - prev.addClass('selected'); - } - } else if (e.which === 40) { - var current = dropdown.find('li.selected'), - next = current.next(':not(.disabled)'); - - if (next.length > 0) { - next.parent()[0].scrollTop = next.parent().scrollTop() + self.outerHeight(next); - current.removeClass('selected'); - next.addClass('selected'); - } - } - } - }); - - this.settings.init = true; - }, - - go_to: function (dropdown, character) { - var lis = dropdown.find('li'), - count = lis.length; - - if (count > 0) { - for (var i = 0; i < count; i++) { - var first_letter = lis.eq(i).text().charAt(0).toLowerCase(); - if (first_letter === String.fromCharCode(character).toLowerCase()) return lis.eq(i); - } - } - }, - - scrollTo: function (el, duration) { - if (duration < 0) return; - var parent = el.parent(); - var li_height = this.outerHeight(el); - var difference = (li_height * (el.index())) - parent.scrollTop(); - var perTick = difference / duration * 10; - - this.scrollToTimerCache = setTimeout(function () { - if (!isNaN(parseInt(perTick, 10))) { - parent[0].scrollTop = parent.scrollTop() + perTick; - this.scrollTo(el, duration - 10); - } - }.bind(this), 10); - }, - - append_custom_markup: function (idx, sel) { - var $this = $(sel), - type = $this.attr('type'), - $span = $this.next('span.custom.' + type); - - if (!$this.parent().hasClass('switch')) { - $this.addClass('hidden-field'); - } - - if ($span.length === 0) { - $span = $('').insertAfter($this); - } - - $span.toggleClass('checked', $this.is(':checked')); - $span.toggleClass('disabled', $this.is(':disabled')); - }, - - append_custom_select: function (idx, sel) { - var self = Foundation.libs.forms, - $this = $(sel), - $customSelect = $this.next('div.custom.dropdown'), - $customList = $customSelect.find('ul'), - $selectCurrent = $customSelect.find(".current"), - $selector = $customSelect.find(".selector"), - $options = $this.find('option'), - $selectedOption = $options.filter(':selected'), - copyClasses = $this.attr('class') ? $this.attr('class').split(' ') : [], - maxWidth = 0, - liHtml = '', - $listItems, - $currentSelect = false; - - if ($customSelect.length === 0) { - var customSelectSize = $this.hasClass('small') ? 'small' : $this.hasClass('medium') ? 'medium' : $this.hasClass('large') ? 'large' : $this.hasClass('expand') ? 'expand' : ''; - - $customSelect = $('
      '); - - $selector = $customSelect.find(".selector"); - $customList = $customSelect.find("ul"); - - liHtml = $options.map(function () { - var copyClasses = $(this).attr('class') ? $(this).attr('class') : ''; - return "
    • " + $(this).html() + "
    • "; - }).get().join(''); - - $customList.append(liHtml); - - $currentSelect = $customSelect - .prepend('' + $selectedOption.html() + '') - .find(".current"); - - $this.after($customSelect) - .addClass('hidden-field'); - } else { - liHtml = $options.map(function () { - return "
    • " + $(this).html() + "
    • "; - }) - .get().join(''); - - $customList.html('') - .append(liHtml); - - } // endif $customSelect.length === 0 - - self.assign_id($this, $customSelect); - $customSelect.toggleClass('disabled', $this.is(':disabled')); - $listItems = $customList.find('li'); - - // cache list length - self.cache[$customSelect.data('id')] = $listItems.length; - - $options.each(function (index) { - if (this.selected) { - $listItems.eq(index).addClass('selected'); - - if ($currentSelect) { - $currentSelect.html($(this).html()); - } - } - if ($(this).is(':disabled')) { - $listItems.eq(index).addClass('disabled'); - } - }); - - // - // If we're not specifying a predetermined form size. - // - if (!$customSelect.is('.small, .medium, .large, .expand')) { - - // ------------------------------------------------------------------------------------ - // This is a work-around for when elements are contained within hidden parents. - // For example, when custom-form elements are inside of a hidden reveal modal. - // - // We need to display the current custom list element as well as hidden parent elements - // in order to properly calculate the list item element's width property. - // ------------------------------------------------------------------------------------- - - $customSelect.addClass('open'); - // - // Quickly, display all parent elements. - // This should help us calcualate the width of the list item's within the drop down. - // - var self = Foundation.libs.forms; - self.hidden_fix.adjust($customList); - - maxWidth = (self.outerWidth($listItems) > maxWidth) ? self.outerWidth($listItems) : maxWidth; - - Foundation.libs.forms.hidden_fix.reset(); - - $customSelect.removeClass('open'); - - } // endif - - }, - - assign_id: function ($select, $customSelect) { - var id = [+new Date(), Foundation.random_str(5)].join('-'); - $select.attr('data-id', id); - $customSelect.attr('data-id', id); - }, - - refresh_custom_select: function ($select, force_refresh) { - var self = this; - var maxWidth = 0, - $customSelect = $select.next(), - $options = $select.find('option'), - $listItems = $customSelect.find('li'); - - if ($listItems.length !== this.cache[$customSelect.data('id')] || force_refresh) { - $customSelect.find('ul').html(''); - - $options.each(function () { - var $li = $('
    • ' + $(this).html() + '
    • '); - $customSelect.find('ul').append($li); - }); - - // re-populate - $options.each(function (index) { - if (this.selected) { - $customSelect.find('li').eq(index).addClass('selected'); - $customSelect.find('.current').html($(this).html()); - } - if ($(this).is(':disabled')) { - $customSelect.find('li').eq(index).addClass('disabled'); - } - }); - - // fix width - $customSelect.removeAttr('style') - .find('ul').removeAttr('style'); - $customSelect.find('li').each(function () { - $customSelect.addClass('open'); - if (self.outerWidth($(this)) > maxWidth) { - maxWidth = self.outerWidth($(this)); - } - $customSelect.removeClass('open'); - }); - - $listItems = $customSelect.find('li'); - // cache list length - this.cache[$customSelect.data('id')] = $listItems.length; - } - }, - - toggle_checkbox: function ($element) { - var $input = $element.prev(), - input = $input[0]; - - if (false === $input.is(':disabled')) { - input.checked = ((input.checked) ? false : true); - $element.toggleClass('checked'); - - $input.trigger('change'); - } - }, - - toggle_radio: function ($element) { - var $input = $element.prev(), - $form = $input.closest('form.custom'), - input = $input[0]; - - if (false === $input.is(':disabled')) { - $form.find('input[type="radio"][name="' + this.escape($input.attr('name')) + '"]') - .next().not($element).removeClass('checked'); - - if (!$element.hasClass('checked')) { - $element.toggleClass('checked'); - } - - input.checked = $element.hasClass('checked'); - - $input.trigger('change'); - } - }, - - escape: function (text) { - if (!text) return ''; - return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - }, - - hidden_fix: { - /** - * Sets all hidden parent elements and self to visibile. - * - * @method adjust - * @param {jQuery Object} $child - */ - - // We'll use this to temporarily store style properties. - tmp: [], - - // We'll use this to set hidden parent elements. - hidden: null, - - adjust: function ($child) { - // Internal reference. - var _self = this; - - // Set all hidden parent elements, including this element. - _self.hidden = $child.parents(); - _self.hidden = _self.hidden.add($child).filter(":hidden"); - - // Loop through all hidden elements. - _self.hidden.each(function () { - - // Cache the element. - var $elem = $(this); - - // Store the style attribute. - // Undefined if element doesn't have a style attribute. - _self.tmp.push($elem.attr('style')); - - // Set the element's display property to block, - // but ensure it's visibility is hidden. - $elem.css({ - 'visibility': 'hidden', - 'display': 'block' - }); - }); - - }, // end adjust - - /** - * Resets the elements previous state. - * - * @method reset - */ - reset: function () { - // Internal reference. - var _self = this; - // Loop through our hidden element collection. - _self.hidden.each(function (i) { - // Cache this element. - var $elem = $(this), - _tmp = _self.tmp[i]; // Get the stored 'style' value for this element. - - // If the stored value is undefined. - if (_tmp === undefined) - // Remove the style attribute. - $elem.removeAttr('style'); - else - // Otherwise, reset the element style attribute. - $elem.attr('style', _tmp); - }); - // Reset the tmp array. - _self.tmp = []; - // Reset the hidden elements variable. - _self.hidden = null; - - } // end reset - }, - - off: function () { - $(this.scope).off('.fndtn.forms'); - }, - - reflow : function () {} - }; - - var getFirstPrevSibling = function($el, selector) { - var $el = $el.prev(); - while ($el.length) { - if ($el.is(selector)) return $el; - $el = $el.prev(); - } - return $(); - }; -}(Foundation.zj, this, this.document)); \ No newline at end of file diff --git a/public/javascripts/foundation/foundation.interchange.js b/public/javascripts/foundation/foundation.interchange.js deleted file mode 100644 index 4c9067ceb..000000000 --- a/public/javascripts/foundation/foundation.interchange.js +++ /dev/null @@ -1,280 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.interchange = { - name : 'interchange', - - version : '4.2.4', - - cache : {}, - - images_loaded : false, - - settings : { - load_attr : 'interchange', - - named_queries : { - 'default' : 'only screen and (min-width: 1px)', - small : 'only screen and (min-width: 768px)', - medium : 'only screen and (min-width: 1280px)', - large : 'only screen and (min-width: 1440px)', - landscape : 'only screen and (orientation: landscape)', - portrait : 'only screen and (orientation: portrait)', - retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' + - 'only screen and (min--moz-device-pixel-ratio: 2),' + - 'only screen and (-o-min-device-pixel-ratio: 2/1),' + - 'only screen and (min-device-pixel-ratio: 2),' + - 'only screen and (min-resolution: 192dpi),' + - 'only screen and (min-resolution: 2dppx)' - }, - - directives : { - replace: function (el, path) { - if (/IMG/.test(el[0].nodeName)) { - var orig_path = el[0].src; - - if (new RegExp(path, 'i').test(orig_path)) return; - - el[0].src = path; - - return el.trigger('replace', [el[0].src, orig_path]); - } - } - } - }, - - init : function (scope, method, options) { - Foundation.inherit(this, 'throttle'); - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - this.events(); - this.images(); - - if (typeof method !== 'string') { - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - - $(window).on('resize.fndtn.interchange', self.throttle(function () { - self.resize.call(self); - }, 50)); - }, - - resize : function () { - var cache = this.cache; - - if(!this.images_loaded) { - setTimeout($.proxy(this.resize, this), 50); - return; - } - - for (var uuid in cache) { - if (cache.hasOwnProperty(uuid)) { - var passed = this.results(uuid, cache[uuid]); - - if (passed) { - this.settings.directives[passed - .scenario[1]](passed.el, passed.scenario[0]); - } - } - } - - }, - - results : function (uuid, scenarios) { - var count = scenarios.length; - - if (count > 0) { - var el = $('[data-uuid="' + uuid + '"]'); - - for (var i = count - 1; i >= 0; i--) { - var mq, rule = scenarios[i][2]; - if (this.settings.named_queries.hasOwnProperty(rule)) { - mq = matchMedia(this.settings.named_queries[rule]); - } else { - mq = matchMedia(rule); - } - if (mq.matches) { - return {el: el, scenario: scenarios[i]}; - } - } - } - - return false; - }, - - images : function (force_update) { - if (typeof this.cached_images === 'undefined' || force_update) { - return this.update_images(); - } - - return this.cached_images; - }, - - update_images : function () { - var images = document.getElementsByTagName('img'), - count = images.length, - loaded_count = 0, - data_attr = 'data-' + this.settings.load_attr; - - this.cached_images = []; - this.images_loaded = false; - - for (var i = count - 1; i >= 0; i--) { - this.loaded($(images[i]), function (image) { - loaded_count++; - if (image) { - var str = image.getAttribute(data_attr) || ''; - - if (str.length > 0) { - this.cached_images.push(image); - } - } - - if(loaded_count === count) { - this.images_loaded = true; - this.enhance(); - } - }.bind(this)); - } - - return 'deferred'; - }, - - // based on jquery.imageready.js - // @weblinc, @jsantell, (c) 2012 - - loaded : function (image, callback) { - function loaded () { - callback(image[0]); - } - - function bindLoad () { - this.one('load', loaded); - - if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { - var src = this.attr( 'src' ), - param = src.match( /\?/ ) ? '&' : '?'; - - param += 'random=' + (new Date()).getTime(); - this.attr('src', src + param); - } - } - - if (!image.attr('src')) { - loaded(); - return; - } - - if (image[0].complete || image[0].readyState === 4) { - loaded(); - } else { - bindLoad.call(image); - } - }, - - enhance : function () { - var count = this.images().length; - - for (var i = count - 1; i >= 0; i--) { - this._object($(this.images()[i])); - } - - return $(window).trigger('resize'); - }, - - parse_params : function (path, directive, mq) { - return [this.trim(path), this.convert_directive(directive), this.trim(mq)]; - }, - - convert_directive : function (directive) { - var trimmed = this.trim(directive); - - if (trimmed.length > 0) { - return trimmed; - } - - return 'replace'; - }, - - _object : function(el) { - var raw_arr = this.parse_data_attr(el), - scenarios = [], count = raw_arr.length; - - if (count > 0) { - for (var i = count - 1; i >= 0; i--) { - var split = raw_arr[i].split(/\((.*?)(\))$/); - - if (split.length > 1) { - var cached_split = split[0].split(','), - params = this.parse_params(cached_split[0], - cached_split[1], split[1]); - - scenarios.push(params); - } - } - } - - return this.store(el, scenarios); - }, - - uuid : function (separator) { - var delim = separator || "-"; - - function S4() { - return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); - } - - return (S4() + S4() + delim + S4() + delim + S4() - + delim + S4() + delim + S4() + S4() + S4()); - }, - - store : function (el, scenarios) { - var uuid = this.uuid(), - current_uuid = el.data('uuid'); - - if (current_uuid) return this.cache[current_uuid]; - - el.attr('data-uuid', uuid); - - return this.cache[uuid] = scenarios; - }, - - trim : function(str) { - if (typeof str === 'string') { - return $.trim(str); - } - - return str; - }, - - parse_data_attr : function (el) { - var raw = el.data(this.settings.load_attr).split(/\[(.*?)\]/), - count = raw.length, output = []; - - for (var i = count - 1; i >= 0; i--) { - if (raw[i].replace(/[\W\d]+/, '').length > 4) { - output.push(raw[i]); - } - } - - return output; - }, - - reflow : function () { - this.images(true); - } - - }; - -}(Foundation.zj, this, this.document)); \ No newline at end of file diff --git a/public/javascripts/foundation/foundation.joyride.js b/public/javascripts/foundation/foundation.joyride.js deleted file mode 100644 index 7b99105ff..000000000 --- a/public/javascripts/foundation/foundation.joyride.js +++ /dev/null @@ -1,850 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.joyride = { - name : 'joyride', - - version : '4.2.2', - - defaults : { - expose : false, // turn on or off the expose feature - modal : false, // Whether to cover page with modal during the tour - tipLocation : 'bottom', // 'top' or 'bottom' in relation to parent - nubPosition : 'auto', // override on a per tooltip bases - scrollSpeed : 300, // Page scrolling speed in milliseconds, 0 = no scroll animation - timer : 0, // 0 = no timer , all other numbers = timer in milliseconds - startTimerOnClick : true, // true or false - true requires clicking the first button start the timer - startOffset : 0, // the index of the tooltip you want to start on (index of the li) - nextButton : true, // true or false to control whether a next button is used - tipAnimation : 'fade', // 'pop' or 'fade' in each tip - pauseAfter : [], // array of indexes where to pause the tour after - exposed : [], // array of expose elements - tipAnimationFadeSpeed: 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition - cookieMonster : false, // true or false to control whether cookies are used - cookieName : 'joyride', // Name the cookie you'll use - cookieDomain : false, // Will this cookie be attached to a domain, ie. '.notableapp.com' - cookieExpires : 365, // set when you would like the cookie to expire. - tipContainer : 'body', // Where will the tip be attached - postRideCallback : function (){}, // A method to call once the tour closes (canceled or complete) - postStepCallback : function (){}, // A method to call after each step - preStepCallback : function (){}, // A method to call before each step - preRideCallback : function (){}, // A method to call before the tour starts (passed index, tip, and cloned exposed element) - postExposeCallback : function (){}, // A method to call after an element has been exposed - template : { // HTML segments for tip layout - link : '×', - timer : '
      ', - tip : '
      ', - wrapper : '
      ', - button : '', - modal : '
      ', - expose : '
      ', - exposeCover: '
      ' - }, - exposeAddClass : '' // One or more space-separated class names to be added to exposed element - }, - - settings : {}, - - init : function (scope, method, options) { - this.scope = scope || this.scope; - Foundation.inherit(this, 'throttle data_options scrollTo scrollLeft delay'); - - if (typeof method === 'object') { - $.extend(true, this.settings, this.defaults, method); - } else { - $.extend(true, this.settings, this.defaults, options); - } - - if (typeof method !== 'string') { - if (!this.settings.init) this.events(); - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - - $(this.scope) - .on('click.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) { - e.preventDefault(); - - if (this.settings.$li.next().length < 1) { - this.end(); - } else if (this.settings.timer > 0) { - clearTimeout(this.settings.automate); - this.hide(); - this.show(); - this.startTimer(); - } else { - this.hide(); - this.show(); - } - - }.bind(this)) - - .on('click.joyride', '.joyride-close-tip', function (e) { - e.preventDefault(); - this.end(); - }.bind(this)); - - $(window).on('resize.fndtn.joyride', self.throttle(function () { - if ($('[data-joyride]').length > 0 && self.settings.$next_tip) { - if (self.settings.exposed.length > 0) { - var $els = $(self.settings.exposed); - - $els.each(function () { - var $this = $(this); - self.un_expose($this); - self.expose($this); - }); - } - - if (self.is_phone()) { - self.pos_phone(); - } else { - self.pos_default(false, true); - } - } - }, 100)); - - this.settings.init = true; - }, - - start : function () { - var self = this, - $this = $(this.scope).find('[data-joyride]'), - integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'], - int_settings_count = integer_settings.length; - - if (!this.settings.init) this.init(); - - // non configureable settings - this.settings.$content_el = $this; - this.settings.$body = $(this.settings.tipContainer); - this.settings.body_offset = $(this.settings.tipContainer).position(); - this.settings.$tip_content = this.settings.$content_el.find('> li'); - this.settings.paused = false; - this.settings.attempts = 0; - - this.settings.tipLocationPatterns = { - top: ['bottom'], - bottom: [], // bottom should not need to be repositioned - left: ['right', 'top', 'bottom'], - right: ['left', 'top', 'bottom'] - }; - - // can we create cookies? - if (typeof $.cookie !== 'function') { - this.settings.cookieMonster = false; - } - - // generate the tips and insert into dom. - if (!this.settings.cookieMonster || this.settings.cookieMonster && $.cookie(this.settings.cookieName) === null) { - this.settings.$tip_content.each(function (index) { - var $this = $(this); - $.extend(true, self.settings, self.data_options($this)); - // Make sure that settings parsed from data_options are integers where necessary - for (var i = int_settings_count - 1; i >= 0; i--) { - self.settings[integer_settings[i]] = parseInt(self.settings[integer_settings[i]], 10); - } - self.create({$li : $this, index : index}); - }); - - // show first tip - if (!this.settings.startTimerOnClick && this.settings.timer > 0) { - this.show('init'); - this.startTimer(); - } else { - this.show('init'); - } - - } - }, - - resume : function () { - this.set_li(); - this.show(); - }, - - tip_template : function (opts) { - var $blank, content; - - opts.tip_class = opts.tip_class || ''; - - $blank = $(this.settings.template.tip).addClass(opts.tip_class); - content = $.trim($(opts.li).html()) + - this.button_text(opts.button_text) + - this.settings.template.link + - this.timer_instance(opts.index); - - $blank.append($(this.settings.template.wrapper)); - $blank.first().attr('data-index', opts.index); - $('.joyride-content-wrapper', $blank).append(content); - - return $blank[0]; - }, - - timer_instance : function (index) { - var txt; - - if ((index === 0 && this.settings.startTimerOnClick && this.settings.timer > 0) || this.settings.timer === 0) { - txt = ''; - } else { - txt = this.outerHTML($(this.settings.template.timer)[0]); - } - return txt; - }, - - button_text : function (txt) { - if (this.settings.nextButton) { - txt = $.trim(txt) || 'Next'; - txt = this.outerHTML($(this.settings.template.button).append(txt)[0]); - } else { - txt = ''; - } - return txt; - }, - - create : function (opts) { - var buttonText = opts.$li.attr('data-button') || opts.$li.attr('data-text'), - tipClass = opts.$li.attr('class'), - $tip_content = $(this.tip_template({ - tip_class : tipClass, - index : opts.index, - button_text : buttonText, - li : opts.$li - })); - - $(this.settings.tipContainer).append($tip_content); - }, - - show : function (init) { - var $timer = null; - - // are we paused? - if (this.settings.$li === undefined - || ($.inArray(this.settings.$li.index(), this.settings.pauseAfter) === -1)) { - - // don't go to the next li if the tour was paused - if (this.settings.paused) { - this.settings.paused = false; - } else { - this.set_li(init); - } - - this.settings.attempts = 0; - - if (this.settings.$li.length && this.settings.$target.length > 0) { - if (init) { //run when we first start - this.settings.preRideCallback(this.settings.$li.index(), this.settings.$next_tip); - if (this.settings.modal) { - this.show_modal(); - } - } - - this.settings.preStepCallback(this.settings.$li.index(), this.settings.$next_tip); - - if (this.settings.modal && this.settings.expose) { - this.expose(); - } - - this.settings.tipSettings = $.extend(this.settings, this.data_options(this.settings.$li)); - - this.settings.timer = parseInt(this.settings.timer, 10); - - this.settings.tipSettings.tipLocationPattern = this.settings.tipLocationPatterns[this.settings.tipSettings.tipLocation]; - - // scroll if not modal - if (!/body/i.test(this.settings.$target.selector)) { - this.scroll_to(); - } - - if (this.is_phone()) { - this.pos_phone(true); - } else { - this.pos_default(true); - } - - $timer = this.settings.$next_tip.find('.joyride-timer-indicator'); - - if (/pop/i.test(this.settings.tipAnimation)) { - - $timer.width(0); - - if (this.settings.timer > 0) { - - this.settings.$next_tip.show(); - - this.delay(function () { - $timer.animate({ - width: $timer.parent().width() - }, this.settings.timer, 'linear'); - }.bind(this), this.settings.tipAnimationFadeSpeed); - - } else { - this.settings.$next_tip.show(); - - } - - - } else if (/fade/i.test(this.settings.tipAnimation)) { - - $timer.width(0); - - if (this.settings.timer > 0) { - - this.settings.$next_tip - .fadeIn(this.settings.tipAnimationFadeSpeed) - .show(); - - this.delay(function () { - $timer.animate({ - width: $timer.parent().width() - }, this.settings.timer, 'linear'); - }.bind(this), this.settings.tipAnimationFadeSpeed); - - } else { - this.settings.$next_tip.fadeIn(this.settings.tipAnimationFadeSpeed); - - } - } - - this.settings.$current_tip = this.settings.$next_tip; - - // skip non-existant targets - } else if (this.settings.$li && this.settings.$target.length < 1) { - - this.show(); - - } else { - - this.end(); - - } - } else { - - this.settings.paused = true; - - } - - }, - - is_phone : function () { - if (Modernizr) { - return Modernizr.mq('only screen and (max-width: 767px)') || $('.lt-ie9').length > 0; - } - - return (this.settings.$window.width() < 767); - }, - - hide : function () { - if (this.settings.modal && this.settings.expose) { - this.un_expose(); - } - - if (!this.settings.modal) { - $('.joyride-modal-bg').hide(); - } - - // Prevent scroll bouncing...wait to remove from layout - this.settings.$current_tip.css('visibility', 'hidden'); - setTimeout($.proxy(function() { - this.hide(); - this.css('visibility', 'visible'); - }, this.settings.$current_tip), 0); - this.settings.postStepCallback(this.settings.$li.index(), - this.settings.$current_tip); - }, - - set_li : function (init) { - if (init) { - this.settings.$li = this.settings.$tip_content.eq(this.settings.startOffset); - this.set_next_tip(); - this.settings.$current_tip = this.settings.$next_tip; - } else { - this.settings.$li = this.settings.$li.next(); - this.set_next_tip(); - } - - this.set_target(); - }, - - set_next_tip : function () { - this.settings.$next_tip = $(".joyride-tip-guide[data-index='" + this.settings.$li.index() + "']"); - this.settings.$next_tip.data('closed', ''); - }, - - set_target : function () { - var cl = this.settings.$li.attr('data-class'), - id = this.settings.$li.attr('data-id'), - $sel = function () { - if (id) { - return $(document.getElementById(id)); - } else if (cl) { - return $('.' + cl).first(); - } else { - return $('body'); - } - }; - - this.settings.$target = $sel(); - }, - - scroll_to : function () { - var window_half, tipOffset; - - window_half = $(window).height() / 2; - tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.outerHeight(this.settings.$next_tip)); - if (tipOffset > 0) { - this.scrollTo($('html, body'), tipOffset, this.settings.scrollSpeed); - } - }, - - paused : function () { - return ($.inArray((this.settings.$li.index() + 1), this.settings.pauseAfter) === -1); - }, - - restart : function () { - this.hide(); - this.settings.$li = undefined; - this.show('init'); - }, - - pos_default : function (init, resizing) { - var half_fold = Math.ceil($(window).height() / 2), - tip_position = this.settings.$next_tip.offset(), - $nub = this.settings.$next_tip.find('.joyride-nub'), - nub_width = Math.ceil(this.outerWidth($nub) / 2), - nub_height = Math.ceil(this.outerHeight($nub) / 2), - toggle = init || false; - - // tip must not be "display: none" to calculate position - if (toggle) { - this.settings.$next_tip.css('visibility', 'hidden'); - this.settings.$next_tip.show(); - } - - if (typeof resizing === 'undefined') { - resizing = false; - } - - if (!/body/i.test(this.settings.$target.selector)) { - - if (this.bottom()) { - var leftOffset = this.settings.$target.offset().left; - if (Foundation.rtl) { - leftOffset = this.settings.$target.offset().width - this.settings.$next_tip.width() + leftOffset; - } - this.settings.$next_tip.css({ - top: (this.settings.$target.offset().top + nub_height + this.outerHeight(this.settings.$target)), - left: leftOffset}); - - this.nub_position($nub, this.settings.tipSettings.nubPosition, 'top'); - - } else if (this.top()) { - var leftOffset = this.settings.$target.offset().left; - if (Foundation.rtl) { - leftOffset = this.settings.$target.offset().width - this.settings.$next_tip.width() + leftOffset; - } - this.settings.$next_tip.css({ - top: (this.settings.$target.offset().top - this.outerHeight(this.settings.$next_tip) - nub_height), - left: leftOffset}); - - this.nub_position($nub, this.settings.tipSettings.nubPosition, 'bottom'); - - } else if (this.right()) { - - this.settings.$next_tip.css({ - top: this.settings.$target.offset().top, - left: (this.outerWidth(this.settings.$target) + this.settings.$target.offset().left + nub_width)}); - - this.nub_position($nub, this.settings.tipSettings.nubPosition, 'left'); - - } else if (this.left()) { - - this.settings.$next_tip.css({ - top: this.settings.$target.offset().top, - left: (this.settings.$target.offset().left - this.outerWidth(this.settings.$next_tip) - nub_width)}); - - this.nub_position($nub, this.settings.tipSettings.nubPosition, 'right'); - - } - - if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tipSettings.tipLocationPattern.length) { - - $nub.removeClass('bottom') - .removeClass('top') - .removeClass('right') - .removeClass('left'); - - this.settings.tipSettings.tipLocation = this.settings.tipSettings.tipLocationPattern[this.settings.attempts]; - - this.settings.attempts++; - - this.pos_default(); - - } - - } else if (this.settings.$li.length) { - - this.pos_modal($nub); - - } - - if (toggle) { - this.settings.$next_tip.hide(); - this.settings.$next_tip.css('visibility', 'visible'); - } - - }, - - pos_phone : function (init) { - var tip_height = this.outerHeight(this.settings.$next_tip), - tip_offset = this.settings.$next_tip.offset(), - target_height = this.outerHeight(this.settings.$target), - $nub = $('.joyride-nub', this.settings.$next_tip), - nub_height = Math.ceil(this.outerHeight($nub) / 2), - toggle = init || false; - - $nub.removeClass('bottom') - .removeClass('top') - .removeClass('right') - .removeClass('left'); - - if (toggle) { - this.settings.$next_tip.css('visibility', 'hidden'); - this.settings.$next_tip.show(); - } - - if (!/body/i.test(this.settings.$target.selector)) { - - if (this.top()) { - - this.settings.$next_tip.offset({top: this.settings.$target.offset().top - tip_height - nub_height}); - $nub.addClass('bottom'); - - } else { - - this.settings.$next_tip.offset({top: this.settings.$target.offset().top + target_height + nub_height}); - $nub.addClass('top'); - - } - - } else if (this.settings.$li.length) { - this.pos_modal($nub); - } - - if (toggle) { - this.settings.$next_tip.hide(); - this.settings.$next_tip.css('visibility', 'visible'); - } - }, - - pos_modal : function ($nub) { - this.center(); - $nub.hide(); - - this.show_modal(); - }, - - show_modal : function () { - if (!this.settings.$next_tip.data('closed')) { - var joyridemodalbg = $('.joyride-modal-bg'); - if (joyridemodalbg.length < 1) { - $('body').append(this.settings.template.modal).show(); - } - - if (/pop/i.test(this.settings.tipAnimation)) { - joyridemodalbg.show(); - } else { - joyridemodalbg.fadeIn(this.settings.tipAnimationFadeSpeed); - } - } - }, - - expose : function () { - var expose, - exposeCover, - el, - origCSS, - origClasses, - randId = 'expose-'+Math.floor(Math.random()*10000); - - if (arguments.length > 0 && arguments[0] instanceof $) { - el = arguments[0]; - } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){ - el = this.settings.$target; - } else { - return false; - } - - if(el.length < 1){ - if(window.console){ - console.error('element not valid', el); - } - return false; - } - - expose = $(this.settings.template.expose); - this.settings.$body.append(expose); - expose.css({ - top: el.offset().top, - left: el.offset().left, - width: this.outerWidth(el, true), - height: this.outerHeight(el, true) - }); - - exposeCover = $(this.settings.template.exposeCover); - - origCSS = { - zIndex: el.css('z-index'), - position: el.css('position') - }; - - origClasses = el.attr('class') == null ? '' : el.attr('class'); - - el.css('z-index',parseInt(expose.css('z-index'))+1); - - if (origCSS.position == 'static') { - el.css('position','relative'); - } - - el.data('expose-css',origCSS); - el.data('orig-class', origClasses); - el.attr('class', origClasses + ' ' + this.settings.exposeAddClass); - - exposeCover.css({ - top: el.offset().top, - left: el.offset().left, - width: this.outerWidth(el, true), - height: this.outerHeight(el, true) - }); - - this.settings.$body.append(exposeCover); - expose.addClass(randId); - exposeCover.addClass(randId); - el.data('expose', randId); - this.settings.postExposeCallback(this.settings.$li.index(), this.settings.$next_tip, el); - this.add_exposed(el); - }, - - un_expose : function () { - var exposeId, - el, - expose , - origCSS, - origClasses, - clearAll = false; - - if (arguments.length > 0 && arguments[0] instanceof $) { - el = arguments[0]; - } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){ - el = this.settings.$target; - } else { - return false; - } - - if(el.length < 1){ - if (window.console) { - console.error('element not valid', el); - } - return false; - } - - exposeId = el.data('expose'); - expose = $('.' + exposeId); - - if (arguments.length > 1) { - clearAll = arguments[1]; - } - - if (clearAll === true) { - $('.joyride-expose-wrapper,.joyride-expose-cover').remove(); - } else { - expose.remove(); - } - - origCSS = el.data('expose-css'); - - if (origCSS.zIndex == 'auto') { - el.css('z-index', ''); - } else { - el.css('z-index', origCSS.zIndex); - } - - if (origCSS.position != el.css('position')) { - if(origCSS.position == 'static') {// this is default, no need to set it. - el.css('position', ''); - } else { - el.css('position', origCSS.position); - } - } - - origClasses = el.data('orig-class'); - el.attr('class', origClasses); - el.removeData('orig-classes'); - - el.removeData('expose'); - el.removeData('expose-z-index'); - this.remove_exposed(el); - }, - - add_exposed: function(el){ - this.settings.exposed = this.settings.exposed || []; - if (el instanceof $ || typeof el === 'object') { - this.settings.exposed.push(el[0]); - } else if (typeof el == 'string') { - this.settings.exposed.push(el); - } - }, - - remove_exposed: function(el){ - var search, count; - if (el instanceof $) { - search = el[0] - } else if (typeof el == 'string'){ - search = el; - } - - this.settings.exposed = this.settings.exposed || []; - count = this.settings.exposed.length; - - for (var i=0; i < count; i++) { - if (this.settings.exposed[i] == search) { - this.settings.exposed.splice(i, 1); - return; - } - } - }, - - center : function () { - var $w = $(window); - - this.settings.$next_tip.css({ - top : ((($w.height() - this.outerHeight(this.settings.$next_tip)) / 2) + $w.scrollTop()), - left : ((($w.width() - this.outerWidth(this.settings.$next_tip)) / 2) + this.scrollLeft($w)) - }); - - return true; - }, - - bottom : function () { - return /bottom/i.test(this.settings.tipSettings.tipLocation); - }, - - top : function () { - return /top/i.test(this.settings.tipSettings.tipLocation); - }, - - right : function () { - return /right/i.test(this.settings.tipSettings.tipLocation); - }, - - left : function () { - return /left/i.test(this.settings.tipSettings.tipLocation); - }, - - corners : function (el) { - var w = $(window), - window_half = w.height() / 2, - //using this to calculate since scroll may not have finished yet. - tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()), - right = w.width() + this.scrollLeft(w), - offsetBottom = w.height() + tipOffset, - bottom = w.height() + w.scrollTop(), - top = w.scrollTop(); - - if (tipOffset < top) { - if (tipOffset < 0) { - top = 0; - } else { - top = tipOffset; - } - } - - if (offsetBottom > bottom) { - bottom = offsetBottom; - } - - return [ - el.offset().top < top, - right < el.offset().left + el.outerWidth(), - bottom < el.offset().top + el.outerHeight(), - this.scrollLeft(w) > el.offset().left - ]; - }, - - visible : function (hidden_corners) { - var i = hidden_corners.length; - - while (i--) { - if (hidden_corners[i]) return false; - } - - return true; - }, - - nub_position : function (nub, pos, def) { - if (pos === 'auto') { - nub.addClass(def); - } else { - nub.addClass(pos); - } - }, - - startTimer : function () { - if (this.settings.$li.length) { - this.settings.automate = setTimeout(function () { - this.hide(); - this.show(); - this.startTimer(); - }.bind(this), this.settings.timer); - } else { - clearTimeout(this.settings.automate); - } - }, - - end : function () { - if (this.settings.cookieMonster) { - $.cookie(this.settings.cookieName, 'ridden', { expires: this.settings.cookieExpires, domain: this.settings.cookieDomain }); - } - - if (this.settings.timer > 0) { - clearTimeout(this.settings.automate); - } - - if (this.settings.modal && this.settings.expose) { - this.un_expose(); - } - - this.settings.$next_tip.data('closed', true); - - $('.joyride-modal-bg').hide(); - this.settings.$current_tip.hide(); - this.settings.postStepCallback(this.settings.$li.index(), this.settings.$current_tip); - this.settings.postRideCallback(this.settings.$li.index(), this.settings.$current_tip); - $('.joyride-tip-guide').remove(); - }, - - outerHTML : function (el) { - // support FireFox < 11 - return el.outerHTML || new XMLSerializer().serializeToString(el); - }, - - off : function () { - $(this.scope).off('.joyride'); - $(window).off('.joyride'); - $('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride'); - $('.joyride-tip-guide, .joyride-modal-bg').remove(); - clearTimeout(this.settings.automate); - this.settings = {}; - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); diff --git a/public/javascripts/foundation/foundation.js b/public/javascripts/foundation/foundation.js deleted file mode 100644 index f1ac1422f..000000000 --- a/public/javascripts/foundation/foundation.js +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Foundation Responsive Library - * http://foundation.zurb.com - * Copyright 2013, ZURB - * Free to use under the MIT license. - * http://www.opensource.org/licenses/mit-license.php -*/ - -/*jslint unparam: true, browser: true, indent: 2 */ - -// Accommodate running jQuery or Zepto in noConflict() mode by -// using an anonymous function to redefine the $ shorthand name. -// See http://docs.jquery.com/Using_jQuery_with_Other_Libraries -// and http://zeptojs.com/ -var libFuncName = null; - -if (typeof jQuery === "undefined" && - typeof Zepto === "undefined" && - typeof $ === "function") { - libFuncName = $; -} else if (typeof jQuery === "function") { - libFuncName = jQuery; -} else if (typeof Zepto === "function") { - libFuncName = Zepto; -} else { - throw new TypeError(); -} - -(function ($, window, document, undefined) { - 'use strict'; - - /* - matchMedia() polyfill - Test a CSS media - type/query in JS. Authors & copyright (c) 2012: - Scott Jehl, Paul Irish, Nicholas Zakas. - Dual MIT/BSD license - - https://github.com/paulirish/matchMedia.js - */ - - window.matchMedia = window.matchMedia || (function( doc, undefined ) { - - "use strict"; - - var bool, - docElem = doc.documentElement, - refNode = docElem.firstElementChild || docElem.firstChild, - // fakeBody required for - fakeBody = doc.createElement( "body" ), - div = doc.createElement( "div" ); - - div.id = "mq-test-1"; - div.style.cssText = "position:absolute;top:-100em"; - fakeBody.style.background = "none"; - fakeBody.appendChild(div); - - return function(q){ - - div.innerHTML = "­"; - - docElem.insertBefore( fakeBody, refNode ); - bool = div.offsetWidth === 42; - docElem.removeChild( fakeBody ); - - return { - matches: bool, - media: q - }; - - }; - - }( document )); - - // add dusty browser stuff - if (!Array.prototype.filter) { - Array.prototype.filter = function(fun /*, thisp */) { - "use strict"; - - if (this == null) { - throw new TypeError(); - } - - var t = Object(this), - len = t.length >>> 0; - if (typeof fun !== "function") { - return; - } - - var res = [], - thisp = arguments[1]; - for (var i = 0; i < len; i++) { - if (i in t) { - var val = t[i]; // in case fun mutates this - if (fun && fun.call(thisp, val, i, t)) { - res.push(val); - } - } - } - - return res; - } - } - - if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== "function") { - // closest thing possible to the ECMAScript 5 internal IsCallable function - throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); - } - - var aArgs = Array.prototype.slice.call(arguments, 1), - fToBind = this, - fNOP = function () {}, - fBound = function () { - return fToBind.apply(this instanceof fNOP && oThis - ? this - : oThis, - aArgs.concat(Array.prototype.slice.call(arguments))); - }; - - fNOP.prototype = this.prototype; - fBound.prototype = new fNOP(); - - return fBound; - }; - } - - if (!Array.prototype.indexOf) { - Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { - "use strict"; - if (this == null) { - throw new TypeError(); - } - var t = Object(this); - var len = t.length >>> 0; - if (len === 0) { - return -1; - } - var n = 0; - if (arguments.length > 1) { - n = Number(arguments[1]); - if (n != n) { // shortcut for verifying if it's NaN - n = 0; - } else if (n != 0 && n != Infinity && n != -Infinity) { - n = (n > 0 || -1) * Math.floor(Math.abs(n)); - } - } - if (n >= len) { - return -1; - } - var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0); - for (; k < len; k++) { - if (k in t && t[k] === searchElement) { - return k; - } - } - return -1; - } - } - - // fake stop() for zepto. - $.fn.stop = $.fn.stop || function() { - return this; - }; - - window.Foundation = { - name : 'Foundation', - - version : '4.3.1', - - cache : {}, - - init : function (scope, libraries, method, options, response, /* internal */ nc) { - var library_arr, - args = [scope, method, options, response], - responses = [], - nc = nc || false; - - // disable library error catching, - // used for development only - if (nc) this.nc = nc; - - // check RTL - this.rtl = /rtl/i.test($('html').attr('dir')); - - // set foundation global scope - this.scope = scope || this.scope; - - if (libraries && typeof libraries === 'string' && !/reflow/i.test(libraries)) { - if (/off/i.test(libraries)) return this.off(); - - library_arr = libraries.split(' '); - - if (library_arr.length > 0) { - for (var i = library_arr.length - 1; i >= 0; i--) { - responses.push(this.init_lib(library_arr[i], args)); - } - } - } else { - if (/reflow/i.test(libraries)) args[1] = 'reflow'; - - for (var lib in this.libs) { - responses.push(this.init_lib(lib, args)); - } - } - - // if first argument is callback, add to args - if (typeof libraries === 'function') { - args.unshift(libraries); - } - - return this.response_obj(responses, args); - }, - - response_obj : function (response_arr, args) { - for (var i = 0, len = args.length; i < len; i++) { - if (typeof args[i] === 'function') { - return args[i]({ - errors: response_arr.filter(function (s) { - if (typeof s === 'string') return s; - }) - }); - } - } - - return response_arr; - }, - - init_lib : function (lib, args) { - return this.trap(function () { - if (this.libs.hasOwnProperty(lib)) { - this.patch(this.libs[lib]); - return this.libs[lib].init.apply(this.libs[lib], args); - } else { - return function () {}; - } - }.bind(this), lib); - }, - - trap : function (fun, lib) { - if (!this.nc) { - try { - return fun(); - } catch (e) { - return this.error({name: lib, message: 'could not be initialized', more: e.name + ' ' + e.message}); - } - } - - return fun(); - }, - - patch : function (lib) { - this.fix_outer(lib); - lib.scope = this.scope; - lib.rtl = this.rtl; - }, - - inherit : function (scope, methods) { - var methods_arr = methods.split(' '); - - for (var i = methods_arr.length - 1; i >= 0; i--) { - if (this.lib_methods.hasOwnProperty(methods_arr[i])) { - this.libs[scope.name][methods_arr[i]] = this.lib_methods[methods_arr[i]]; - } - } - }, - - random_str : function (length) { - var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split(''); - - if (!length) { - length = Math.floor(Math.random() * chars.length); - } - - var str = ''; - for (var i = 0; i < length; i++) { - str += chars[Math.floor(Math.random() * chars.length)]; - } - return str; - }, - - libs : {}, - - // methods that can be inherited in libraries - lib_methods : { - set_data : function (node, data) { - // this.name references the name of the library calling this method - var id = [this.name,+new Date(),Foundation.random_str(5)].join('-'); - - Foundation.cache[id] = data; - node.attr('data-' + this.name + '-id', id); - return data; - }, - - get_data : function (node) { - return Foundation.cache[node.attr('data-' + this.name + '-id')]; - }, - - remove_data : function (node) { - if (node) { - delete Foundation.cache[node.attr('data-' + this.name + '-id')]; - node.attr('data-' + this.name + '-id', ''); - } else { - $('[data-' + this.name + '-id]').each(function () { - delete Foundation.cache[$(this).attr('data-' + this.name + '-id')]; - $(this).attr('data-' + this.name + '-id', ''); - }); - } - }, - - throttle : function(fun, delay) { - var timer = null; - return function () { - var context = this, args = arguments; - clearTimeout(timer); - timer = setTimeout(function () { - fun.apply(context, args); - }, delay); - }; - }, - - // parses data-options attribute on nodes and turns - // them into an object - data_options : function (el) { - var opts = {}, ii, p, - opts_arr = (el.attr('data-options') || ':').split(';'), - opts_len = opts_arr.length; - - function isNumber (o) { - return ! isNaN (o-0) && o !== null && o !== "" && o !== false && o !== true; - } - - function trim(str) { - if (typeof str === 'string') return $.trim(str); - return str; - } - - // parse options - for (ii = opts_len - 1; ii >= 0; ii--) { - p = opts_arr[ii].split(':'); - - if (/true/i.test(p[1])) p[1] = true; - if (/false/i.test(p[1])) p[1] = false; - if (isNumber(p[1])) p[1] = parseInt(p[1], 10); - - if (p.length === 2 && p[0].length > 0) { - opts[trim(p[0])] = trim(p[1]); - } - } - - return opts; - }, - - delay : function (fun, delay) { - return setTimeout(fun, delay); - }, - - // animated scrolling - scrollTo : function (el, to, duration) { - if (duration < 0) return; - var difference = to - $(window).scrollTop(); - var perTick = difference / duration * 10; - - this.scrollToTimerCache = setTimeout(function() { - if (!isNaN(parseInt(perTick, 10))) { - window.scrollTo(0, $(window).scrollTop() + perTick); - this.scrollTo(el, to, duration - 10); - } - }.bind(this), 10); - }, - - // not supported in core Zepto - scrollLeft : function (el) { - if (!el.length) return; - return ('scrollLeft' in el[0]) ? el[0].scrollLeft : el[0].pageXOffset; - }, - - // test for empty object or array - empty : function (obj) { - if (obj.length && obj.length > 0) return false; - if (obj.length && obj.length === 0) return true; - - for (var key in obj) { - if (hasOwnProperty.call(obj, key)) return false; - } - - return true; - } - }, - - fix_outer : function (lib) { - lib.outerHeight = function (el, bool) { - if (typeof Zepto === 'function') { - return el.height(); - } - - if (typeof bool !== 'undefined') { - return el.outerHeight(bool); - } - - return el.outerHeight(); - }; - - lib.outerWidth = function (el, bool) { - if (typeof Zepto === 'function') { - return el.width(); - } - - if (typeof bool !== 'undefined') { - return el.outerWidth(bool); - } - - return el.outerWidth(); - }; - }, - - error : function (error) { - return error.name + ' ' + error.message + '; ' + error.more; - }, - - // remove all foundation events. - off: function () { - $(this.scope).off('.fndtn'); - $(window).off('.fndtn'); - return true; - }, - - zj : $ - }; - - $.fn.foundation = function () { - var args = Array.prototype.slice.call(arguments, 0); - - return this.each(function () { - Foundation.init.apply(Foundation, [this].concat(args)); - return this; - }); - }; - -}(libFuncName, this, this.document)); diff --git a/public/javascripts/foundation/foundation.magellan.js b/public/javascripts/foundation/foundation.magellan.js deleted file mode 100644 index 26eb614c2..000000000 --- a/public/javascripts/foundation/foundation.magellan.js +++ /dev/null @@ -1,135 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.magellan = { - name : 'magellan', - - version : '4.2.2', - - settings : { - activeClass: 'active', - threshold: 0 - }, - - init : function (scope, method, options) { - this.scope = scope || this.scope; - Foundation.inherit(this, 'data_options'); - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - if (!this.settings.init) { - this.fixed_magellan = $("[data-magellan-expedition]"); - this.set_threshold(); - this.last_destination = $('[data-magellan-destination]').last(); - this.events(); - } - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - $(this.scope).on('arrival.fndtn.magellan', '[data-magellan-arrival]', function (e) { - var $destination = $(this), - $expedition = $destination.closest('[data-magellan-expedition]'), - activeClass = $expedition.attr('data-magellan-active-class') - || self.settings.activeClass; - - $destination - .closest('[data-magellan-expedition]') - .find('[data-magellan-arrival]') - .not($destination) - .removeClass(activeClass); - $destination.addClass(activeClass); - }); - - this.fixed_magellan - .on('update-position.fndtn.magellan', function(){ - var $el = $(this); - // $el.data("magellan-fixed-position",""); - // $el.data("magellan-top-offset", ""); - }) - .trigger('update-position'); - - $(window) - .on('resize.fndtn.magellan', function() { - this.fixed_magellan.trigger('update-position'); - }.bind(this)) - - .on('scroll.fndtn.magellan', function() { - var windowScrollTop = $(window).scrollTop(); - self.fixed_magellan.each(function() { - var $expedition = $(this); - if (typeof $expedition.data('magellan-top-offset') === 'undefined') { - $expedition.data('magellan-top-offset', $expedition.offset().top); - } - if (typeof $expedition.data('magellan-fixed-position') === 'undefined') { - $expedition.data('magellan-fixed-position', false) - } - var fixed_position = (windowScrollTop + self.settings.threshold) > $expedition.data("magellan-top-offset"); - var attr = $expedition.attr('data-magellan-top-offset'); - - if ($expedition.data("magellan-fixed-position") != fixed_position) { - $expedition.data("magellan-fixed-position", fixed_position); - if (fixed_position) { - $expedition.addClass('fixed'); - $expedition.css({position:"fixed", top:0}); - } else { - $expedition.removeClass('fixed'); - $expedition.css({position:"", top:""}); - } - if (fixed_position && typeof attr != 'undefined' && attr != false) { - $expedition.css({position:"fixed", top:attr + "px"}); - } - } - }); - }); - - - if (this.last_destination.length > 0) { - $(window).on('scroll.fndtn.magellan', function (e) { - var windowScrollTop = $(window).scrollTop(), - scrolltopPlusHeight = windowScrollTop + $(window).height(), - lastDestinationTop = Math.ceil(self.last_destination.offset().top); - - $('[data-magellan-destination]').each(function () { - var $destination = $(this), - destination_name = $destination.attr('data-magellan-destination'), - topOffset = $destination.offset().top - windowScrollTop; - - if (topOffset <= self.settings.threshold) { - $("[data-magellan-arrival='" + destination_name + "']").trigger('arrival'); - } - // In large screens we may hit the bottom of the page and dont reach the top of the last magellan-destination, so lets force it - if (scrolltopPlusHeight >= $(self.scope).height() && lastDestinationTop > windowScrollTop && lastDestinationTop < scrolltopPlusHeight) { - $('[data-magellan-arrival]').last().trigger('arrival'); - } - }); - }); - } - - this.settings.init = true; - }, - - set_threshold : function () { - if (!this.settings.threshold) { - this.settings.threshold = (this.fixed_magellan.length > 0) ? - this.outerHeight(this.fixed_magellan, true) : 0; - } - }, - - off : function () { - $(this.scope).off('.fndtn.magellan'); - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); diff --git a/public/javascripts/foundation/foundation.orbit.js b/public/javascripts/foundation/foundation.orbit.js deleted file mode 100644 index ce5183b52..000000000 --- a/public/javascripts/foundation/foundation.orbit.js +++ /dev/null @@ -1,412 +0,0 @@ -;(function ($, window, document, undefined) { - 'use strict'; - - var noop = function() {}; - - var Orbit = function(el, settings) { - // Don't reinitialize plugin - if (el.hasClass(settings.slides_container_class)) { - return this; - } - - var self = this, - container, - slides_container = el, - number_container, - bullets_container, - timer_container, - idx = 0, - animate, - timer, - locked = false, - adjust_height_after = false; - - slides_container.children().first().addClass(settings.active_slide_class); - - self.update_slide_number = function(index) { - if (settings.slide_number) { - number_container.find('span:first').text(parseInt(index)+1); - number_container.find('span:last').text(slides_container.children().length); - } - if (settings.bullets) { - bullets_container.children().removeClass(settings.bullets_active_class); - $(bullets_container.children().get(index)).addClass(settings.bullets_active_class); - } - }; - - self.build_markup = function() { - slides_container.wrap('
      '); - container = slides_container.parent(); - slides_container.addClass(settings.slides_container_class); - - if (settings.navigation_arrows) { - container.append($('').addClass(settings.prev_class).append('')); - container.append($('').addClass(settings.next_class).append('')); - } - - if (settings.timer) { - timer_container = $('
      ').addClass(settings.timer_container_class); - timer_container.append(''); - timer_container.append($('
      ').addClass(settings.timer_progress_class)); - timer_container.addClass(settings.timer_paused_class); - container.append(timer_container); - } - - if (settings.slide_number) { - number_container = $('
      ').addClass(settings.slide_number_class); - number_container.append(' of '); - container.append(number_container); - } - - if (settings.bullets) { - bullets_container = $('
        ').addClass(settings.bullets_container_class); - container.append(bullets_container); - slides_container.children().each(function(idx, el) { - var bullet = $('
      1. ').attr('data-orbit-slide', idx); - bullets_container.append(bullet); - }); - } - - if (settings.stack_on_small) { - container.addClass(settings.stack_on_small_class); - } - - self.update_slide_number(0); - }; - - self._goto = function(next_idx, start_timer) { - // if (locked) {return false;} - if (next_idx === idx) {return false;} - if (typeof timer === 'object') {timer.restart();} - var slides = slides_container.children(); - - var dir = 'next'; - locked = true; - if (next_idx < idx) {dir = 'prev';} - if (next_idx >= slides.length) {next_idx = 0;} - else if (next_idx < 0) {next_idx = slides.length - 1;} - - var current = $(slides.get(idx)); - var next = $(slides.get(next_idx)); - - current.css('zIndex', 2); - next.css('zIndex', 4).addClass('active'); - - slides_container.trigger('orbit:before-slide-change'); - settings.before_slide_change(); - - var callback = function() { - var unlock = function() { - idx = next_idx; - locked = false; - if (start_timer === true) {timer = self.create_timer(); timer.start();} - self.update_slide_number(idx); - slides_container.trigger('orbit:after-slide-change',[{slide_number: idx, total_slides: slides.length}]); - settings.after_slide_change(idx, slides.length); - }; - if (slides_container.height() != next.height()) { - slides_container.animate({'height': next.height()}, 250, 'linear', unlock); - } else { - unlock(); - } - }; - - if (slides.length === 1) {callback(); return false;} - - var start_animation = function() { - if (dir === 'next') {animate.next(current, next, callback);} - if (dir === 'prev') {animate.prev(current, next, callback);} - }; - - if (next.height() > slides_container.height()) { - slides_container.animate({'height': next.height()}, 250, 'linear', start_animation); - } else { - start_animation(); - } - }; - - self.next = function(e) { - e.stopImmediatePropagation(); - e.preventDefault(); - self._goto(idx + 1); - }; - - self.prev = function(e) { - e.stopImmediatePropagation(); - e.preventDefault(); - self._goto(idx - 1); - }; - - self.link_custom = function(e) { - e.preventDefault(); - var link = $(this).attr('data-orbit-link'); - if ((typeof link === 'string') && (link = $.trim(link)) != "") { - var slide = container.find('[data-orbit-slide='+link+']'); - if (slide.index() != -1) {self._goto(slide.index());} - } - }; - - self.link_bullet = function(e) { - var index = $(this).attr('data-orbit-slide'); - if ((typeof index === 'string') && (index = $.trim(index)) != "") { - self._goto(index); - } - } - - self.timer_callback = function() { - self._goto(idx + 1, true); - } - - self.compute_dimensions = function() { - var current = $(slides_container.children().get(idx)); - var h = current.height(); - if (!settings.variable_height) { - slides_container.children().each(function(){ - if ($(this).height() > h) { h = $(this).height(); } - }); - } - slides_container.height(h); - }; - - self.create_timer = function() { - var t = new Timer( - container.find('.'+settings.timer_container_class), - settings, - self.timer_callback - ); - return t; - }; - - self.stop_timer = function() { - if (typeof timer === 'object') timer.stop(); - }; - - self.toggle_timer = function() { - var t = container.find('.'+settings.timer_container_class); - if (t.hasClass(settings.timer_paused_class)) { - if (typeof timer === 'undefined') {timer = self.create_timer();} - timer.start(); - } - else { - if (typeof timer === 'object') {timer.stop();} - } - }; - - self.init = function() { - self.build_markup(); - if (settings.timer) {timer = self.create_timer(); timer.start();} - animate = new FadeAnimation(slides_container); - if (settings.animation === 'slide') - animate = new SlideAnimation(slides_container); - container.on('click', '.'+settings.next_class, self.next); - container.on('click', '.'+settings.prev_class, self.prev); - container.on('click', '[data-orbit-slide]', self.link_bullet); - container.on('click', self.toggle_timer); - container.on('touchstart.fndtn.orbit', function(e) { - if (!e.touches) {e = e.originalEvent;} - var data = { - start_page_x: e.touches[0].pageX, - start_page_y: e.touches[0].pageY, - start_time: (new Date()).getTime(), - delta_x: 0, - is_scrolling: undefined - }; - container.data('swipe-transition', data); - e.stopPropagation(); - }) - .on('touchmove.fndtn.orbit', function(e) { - if (!e.touches) { e = e.originalEvent; } - // Ignore pinch/zoom events - if(e.touches.length > 1 || e.scale && e.scale !== 1) return; - - var data = container.data('swipe-transition'); - if (typeof data === 'undefined') {data = {};} - - data.delta_x = e.touches[0].pageX - data.start_page_x; - - if ( typeof data.is_scrolling === 'undefined') { - data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) ); - } - - if (!data.is_scrolling && !data.active) { - e.preventDefault(); - var direction = (data.delta_x < 0) ? (idx+1) : (idx-1); - data.active = true; - self._goto(direction); - } - }) - .on('touchend.fndtn.orbit', function(e) { - container.data('swipe-transition', {}); - e.stopPropagation(); - }) - .on('mouseenter.fndtn.orbit', function(e) { - if (settings.timer && settings.pause_on_hover) { - self.stop_timer(); - } - }) - .on('mouseleave.fndtn.orbit', function(e) { - if (settings.timer && settings.resume_on_mouseout) { - timer.start(); - } - }); - - $(document).on('click', '[data-orbit-link]', self.link_custom); - $(window).on('resize', self.compute_dimensions); - $(window).on('load', self.compute_dimensions); - slides_container.trigger('orbit:ready'); - }; - - self.init(); - }; - - var Timer = function(el, settings, callback) { - var self = this, - duration = settings.timer_speed, - progress = el.find('.'+settings.timer_progress_class), - start, - timeout, - left = -1; - - this.update_progress = function(w) { - var new_progress = progress.clone(); - new_progress.attr('style', ''); - new_progress.css('width', w+'%'); - progress.replaceWith(new_progress); - progress = new_progress; - }; - - this.restart = function() { - clearTimeout(timeout); - el.addClass(settings.timer_paused_class); - left = -1; - self.update_progress(0); - }; - - this.start = function() { - if (!el.hasClass(settings.timer_paused_class)) {return true;} - left = (left === -1) ? duration : left; - el.removeClass(settings.timer_paused_class); - start = new Date().getTime(); - progress.animate({'width': '100%'}, left, 'linear'); - timeout = setTimeout(function() { - self.restart(); - callback(); - }, left); - el.trigger('orbit:timer-started') - }; - - this.stop = function() { - if (el.hasClass(settings.timer_paused_class)) {return true;} - clearTimeout(timeout); - el.addClass(settings.timer_paused_class); - var end = new Date().getTime(); - left = left - (end - start); - var w = 100 - ((left / duration) * 100); - self.update_progress(w); - el.trigger('orbit:timer-stopped'); - }; - }; - - var SlideAnimation = function(container) { - var duration = 400; - var is_rtl = ($('html[dir=rtl]').length === 1); - var margin = is_rtl ? 'marginRight' : 'marginLeft'; - - this.next = function(current, next, callback) { - next.animate({margin: '0%'}, duration, 'linear', function() { - current.css(margin, '100%'); - callback(); - }); - }; - - this.prev = function(current, prev, callback) { - prev.css(margin, '-100%'); - prev.animate({margin:'0%'}, duration, 'linear', function() { - current.css(margin, '100%'); - callback(); - }); - }; - }; - - var FadeAnimation = function(container) { - var duration = 250; - - this.next = function(current, next, callback) { - next.css({'marginLeft':'0%', 'opacity':'0.01'}); - next.animate({'opacity':'1'}, duration, 'linear', function() { - current.css('marginLeft', '100%'); - callback(); - }); - }; - - this.prev = function(current, prev, callback) { - prev.css({'marginLeft':'0%', 'opacity':'0.01'}); - prev.animate({'opacity':'1'}, duration, 'linear', function() { - current.css('marginLeft', '100%'); - callback(); - }); - }; - }; - - - Foundation.libs = Foundation.libs || {}; - - Foundation.libs.orbit = { - name: 'orbit', - - version: '4.3.1', - - settings: { - animation: 'slide', - timer_speed: 10000, - pause_on_hover: true, - resume_on_mouseout: false, - animation_speed: 500, - stack_on_small: false, - navigation_arrows: true, - slide_number: true, - container_class: 'orbit-container', - stack_on_small_class: 'orbit-stack-on-small', - next_class: 'orbit-next', - prev_class: 'orbit-prev', - timer_container_class: 'orbit-timer', - timer_paused_class: 'paused', - timer_progress_class: 'orbit-progress', - slides_container_class: 'orbit-slides-container', - bullets_container_class: 'orbit-bullets', - bullets_active_class: 'active', - slide_number_class: 'orbit-slide-number', - caption_class: 'orbit-caption', - active_slide_class: 'active', - orbit_transition_class: 'orbit-transitioning', - bullets: true, - timer: true, - variable_height: false, - before_slide_change: noop, - after_slide_change: noop - }, - - init: function (scope, method, options) { - var self = this; - Foundation.inherit(self, 'data_options'); - - if (typeof method === 'object') { - $.extend(true, self.settings, method); - } - - if ($(scope).is('[data-orbit]')) { - var $el = $(scope); - var opts = self.data_options($el); - new Orbit($el, $.extend({},self.settings, opts)); - } - - $('[data-orbit]', scope).each(function(idx, el) { - var $el = $(el); - var opts = self.data_options($el); - new Orbit($el, $.extend({},self.settings, opts)); - }); - } - }; - - -}(Foundation.zj, this, this.document)); diff --git a/public/javascripts/foundation/foundation.placeholder.js b/public/javascripts/foundation/foundation.placeholder.js deleted file mode 100644 index e503b4ceb..000000000 --- a/public/javascripts/foundation/foundation.placeholder.js +++ /dev/null @@ -1,179 +0,0 @@ -/*! http://mths.be/placeholder v2.0.7 by @mathias - Modified to work with Zepto.js by ZURB -*/ -;(function(window, document, $) { - - var isInputSupported = 'placeholder' in document.createElement('input'), - isTextareaSupported = 'placeholder' in document.createElement('textarea'), - prototype = $.fn, - valHooks = $.valHooks, - hooks, - placeholder; - - if (isInputSupported && isTextareaSupported) { - - placeholder = prototype.placeholder = function() { - return this; - }; - - placeholder.input = placeholder.textarea = true; - - } else { - - placeholder = prototype.placeholder = function() { - var $this = this; - $this - .filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]') - .not('.placeholder') - .bind({ - 'focus.placeholder': clearPlaceholder, - 'blur.placeholder': setPlaceholder - }) - .data('placeholder-enabled', true) - .trigger('blur.placeholder'); - return $this; - }; - - placeholder.input = isInputSupported; - placeholder.textarea = isTextareaSupported; - - hooks = { - 'get': function(element) { - var $element = $(element); - return $element.data('placeholder-enabled') && $element.hasClass('placeholder') ? '' : element.value; - }, - 'set': function(element, value) { - var $element = $(element); - if (!$element.data('placeholder-enabled')) { - return element.value = value; - } - if (value == '') { - element.value = value; - // Issue #56: Setting the placeholder causes problems if the element continues to have focus. - if (element != document.activeElement) { - // We can't use `triggerHandler` here because of dummy text/password inputs :( - setPlaceholder.call(element); - } - } else if ($element.hasClass('placeholder')) { - clearPlaceholder.call(element, true, value) || (element.value = value); - } else { - element.value = value; - } - // `set` can not return `undefined`; see http://jsapi.info/jquery/1.7.1/val#L2363 - return $element; - } - }; - - isInputSupported || (valHooks.input = hooks); - isTextareaSupported || (valHooks.textarea = hooks); - - $(function() { - // Look for forms - $(document).delegate('form', 'submit.placeholder', function() { - // Clear the placeholder values so they don't get submitted - var $inputs = $('.placeholder', this).each(clearPlaceholder); - setTimeout(function() { - $inputs.each(setPlaceholder); - }, 10); - }); - }); - - // Clear placeholder values upon page reload - $(window).bind('beforeunload.placeholder', function() { - $('.placeholder').each(function() { - this.value = ''; - }); - }); - - } - - function args(elem) { - // Return an object of element attributes - var newAttrs = {}, - rinlinejQuery = /^jQuery\d+$/; - $.each(elem.attributes, function(i, attr) { - if (attr.specified && !rinlinejQuery.test(attr.name)) { - newAttrs[attr.name] = attr.value; - } - }); - return newAttrs; - } - - function clearPlaceholder(event, value) { - var input = this, - $input = $(input); - if (input.value == $input.attr('placeholder') && $input.hasClass('placeholder')) { - if ($input.data('placeholder-password')) { - $input = $input.hide().next().show().attr('id', $input.removeAttr('id').data('placeholder-id')); - // If `clearPlaceholder` was called from `$.valHooks.input.set` - if (event === true) { - return $input[0].value = value; - } - $input.focus(); - } else { - input.value = ''; - $input.removeClass('placeholder'); - input == document.activeElement && input.select(); - } - } - } - - function setPlaceholder() { - var $replacement, - input = this, - $input = $(input), - $origInput = $input, - id = this.id; - if (input.value == '') { - if (input.type == 'password') { - if (!$input.data('placeholder-textinput')) { - try { - $replacement = $input.clone().attr({ 'type': 'text' }); - } catch(e) { - $replacement = $('').attr($.extend(args(this), { 'type': 'text' })); - } - $replacement - .removeAttr('name') - .data({ - 'placeholder-password': true, - 'placeholder-id': id - }) - .bind('focus.placeholder', clearPlaceholder); - $input - .data({ - 'placeholder-textinput': $replacement, - 'placeholder-id': id - }) - .before($replacement); - } - $input = $input.removeAttr('id').hide().prev().attr('id', id).show(); - // Note: `$input[0] != input` now! - } - $input.addClass('placeholder'); - $input[0].value = $input.attr('placeholder'); - } else { - $input.removeClass('placeholder'); - } - } - -}(this, document, Foundation.zj)); - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.placeholder = { - name : 'placeholder', - - version : '4.2.2', - - init : function (scope, method, options) { - this.scope = scope || this.scope; - - if (typeof method !== 'string') { - window.onload = function () { - $('input, textarea').placeholder(); - } - } - } - }; -}(Foundation.zj, this, this.document)); \ No newline at end of file diff --git a/public/javascripts/foundation/foundation.reveal.js b/public/javascripts/foundation/foundation.reveal.js deleted file mode 100644 index 7663b0375..000000000 --- a/public/javascripts/foundation/foundation.reveal.js +++ /dev/null @@ -1,330 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.reveal = { - name : 'reveal', - - version : '4.2.2', - - locked : false, - - settings : { - animation: 'fadeAndPop', - animationSpeed: 250, - closeOnBackgroundClick: true, - closeOnEsc: true, - dismissModalClass: 'close-reveal-modal', - bgClass: 'reveal-modal-bg', - open: function(){}, - opened: function(){}, - close: function(){}, - closed: function(){}, - bg : $('.reveal-modal-bg'), - css : { - open : { - 'opacity': 0, - 'visibility': 'visible', - 'display' : 'block' - }, - close : { - 'opacity': 1, - 'visibility': 'hidden', - 'display': 'none' - } - } - }, - - init : function (scope, method, options) { - Foundation.inherit(this, 'data_options delay'); - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } else if (typeof options !== 'undefined') { - $.extend(true, this.settings, options); - } - - if (typeof method !== 'string') { - this.events(); - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - - $(this.scope) - .off('.fndtn.reveal') - .on('click.fndtn.reveal', '[data-reveal-id]', function (e) { - e.preventDefault(); - - if (!self.locked) { - var element = $(this), - ajax = element.data('reveal-ajax'); - - self.locked = true; - - if (typeof ajax === 'undefined') { - self.open.call(self, element); - } else { - var url = ajax === true ? element.attr('href') : ajax; - - self.open.call(self, element, {url: url}); - } - } - }) - .on('click.fndtn.reveal', this.close_targets(), function (e) { - e.preventDefault(); - if (!self.locked) { - var settings = $.extend({}, self.settings, self.data_options($('.reveal-modal.open'))); - if ($(e.target)[0] === $('.' + settings.bgClass)[0] && !settings.closeOnBackgroundClick) { - return; - } - - self.locked = true; - self.close.call(self, $(this).closest('.reveal-modal')); - } - }) - .on('open.fndtn.reveal', '.reveal-modal', this.settings.open) - .on('opened.fndtn.reveal', '.reveal-modal', this.settings.opened) - .on('opened.fndtn.reveal', '.reveal-modal', this.open_video) - .on('close.fndtn.reveal', '.reveal-modal', this.settings.close) - .on('closed.fndtn.reveal', '.reveal-modal', this.settings.closed) - .on('closed.fndtn.reveal', '.reveal-modal', this.close_video); - - $( 'body' ).bind( 'keyup.reveal', function ( event ) { - var open_modal = $('.reveal-modal.open'), - settings = $.extend({}, self.settings, self.data_options(open_modal)); - if ( event.which === 27 && settings.closeOnEsc) { // 27 is the keycode for the Escape key - open_modal.foundation('reveal', 'close'); - } - }); - - return true; - }, - - open : function (target, ajax_settings) { - if (target) { - if (typeof target.selector !== 'undefined') { - var modal = $('#' + target.data('reveal-id')); - } else { - var modal = $(this.scope); - - ajax_settings = target; - } - } else { - var modal = $(this.scope); - } - - if (!modal.hasClass('open')) { - var open_modal = $('.reveal-modal.open'); - - if (typeof modal.data('css-top') === 'undefined') { - modal.data('css-top', parseInt(modal.css('top'), 10)) - .data('offset', this.cache_offset(modal)); - } - - modal.trigger('open'); - - if (open_modal.length < 1) { - this.toggle_bg(modal); - } - - if (typeof ajax_settings === 'undefined' || !ajax_settings.url) { - this.hide(open_modal, this.settings.css.close); - this.show(modal, this.settings.css.open); - } else { - var self = this, - old_success = typeof ajax_settings.success !== 'undefined' ? ajax_settings.success : null; - - $.extend(ajax_settings, { - success: function (data, textStatus, jqXHR) { - if ( $.isFunction(old_success) ) { - old_success(data, textStatus, jqXHR); - } - - modal.html(data); - $(modal).foundation('section', 'reflow'); - - self.hide(open_modal, self.settings.css.close); - self.show(modal, self.settings.css.open); - } - }); - - $.ajax(ajax_settings); - } - } - }, - - close : function (modal) { - - var modal = modal && modal.length ? modal : $(this.scope), - open_modals = $('.reveal-modal.open'); - - if (open_modals.length > 0) { - this.locked = true; - modal.trigger('close'); - this.toggle_bg(modal); - this.hide(open_modals, this.settings.css.close); - } - }, - - close_targets : function () { - var base = '.' + this.settings.dismissModalClass; - - if (this.settings.closeOnBackgroundClick) { - return base + ', .' + this.settings.bgClass; - } - - return base; - }, - - toggle_bg : function (modal) { - if ($('.reveal-modal-bg').length === 0) { - this.settings.bg = $('
        ', {'class': this.settings.bgClass}) - .appendTo('body'); - } - - if (this.settings.bg.filter(':visible').length > 0) { - this.hide(this.settings.bg); - } else { - this.show(this.settings.bg); - } - }, - - show : function (el, css) { - // is modal - if (css) { - if (/pop/i.test(this.settings.animation)) { - css.top = $(window).scrollTop() - el.data('offset') + 'px'; - var end_css = { - top: $(window).scrollTop() + el.data('css-top') + 'px', - opacity: 1 - }; - - return this.delay(function () { - return el - .css(css) - .animate(end_css, this.settings.animationSpeed, 'linear', function () { - this.locked = false; - el.trigger('opened'); - }.bind(this)) - .addClass('open'); - }.bind(this), this.settings.animationSpeed / 2); - } - - if (/fade/i.test(this.settings.animation)) { - var end_css = {opacity: 1}; - - return this.delay(function () { - return el - .css(css) - .animate(end_css, this.settings.animationSpeed, 'linear', function () { - this.locked = false; - el.trigger('opened'); - }.bind(this)) - .addClass('open'); - }.bind(this), this.settings.animationSpeed / 2); - } - - return el.css(css).show().css({opacity: 1}).addClass('open').trigger('opened'); - } - - // should we animate the background? - if (/fade/i.test(this.settings.animation)) { - return el.fadeIn(this.settings.animationSpeed / 2); - } - - return el.show(); - }, - - hide : function (el, css) { - // is modal - if (css) { - if (/pop/i.test(this.settings.animation)) { - var end_css = { - top: - $(window).scrollTop() - el.data('offset') + 'px', - opacity: 0 - }; - - return this.delay(function () { - return el - .animate(end_css, this.settings.animationSpeed, 'linear', function () { - this.locked = false; - el.css(css).trigger('closed'); - }.bind(this)) - .removeClass('open'); - }.bind(this), this.settings.animationSpeed / 2); - } - - if (/fade/i.test(this.settings.animation)) { - var end_css = {opacity: 0}; - - return this.delay(function () { - return el - .animate(end_css, this.settings.animationSpeed, 'linear', function () { - this.locked = false; - el.css(css).trigger('closed'); - }.bind(this)) - .removeClass('open'); - }.bind(this), this.settings.animationSpeed / 2); - } - - return el.hide().css(css).removeClass('open').trigger('closed'); - } - - // should we animate the background? - if (/fade/i.test(this.settings.animation)) { - return el.fadeOut(this.settings.animationSpeed / 2); - } - - return el.hide(); - }, - - close_video : function (e) { - var video = $(this).find('.flex-video'), - iframe = video.find('iframe'); - - if (iframe.length > 0) { - iframe.attr('data-src', iframe[0].src); - iframe.attr('src', 'about:blank'); - video.hide(); - } - }, - - open_video : function (e) { - var video = $(this).find('.flex-video'), - iframe = video.find('iframe'); - - if (iframe.length > 0) { - var data_src = iframe.attr('data-src'); - if (typeof data_src === 'string') { - iframe[0].src = iframe.attr('data-src'); - } else { - var src = iframe[0].src; - iframe[0].src = undefined; - iframe[0].src = src; - } - video.show(); - } - }, - - cache_offset : function (modal) { - var offset = modal.show().height() + parseInt(modal.css('top'), 10); - - modal.hide(); - - return offset; - }, - - off : function () { - $(this.scope).off('.fndtn.reveal'); - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); \ No newline at end of file diff --git a/public/javascripts/foundation/foundation.section.js b/public/javascripts/foundation/foundation.section.js deleted file mode 100644 index 95fb64732..000000000 --- a/public/javascripts/foundation/foundation.section.js +++ /dev/null @@ -1,400 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -; -(function($, window, document) { - 'use strict'; - - Foundation.libs.section = { - name : 'section', - - version : '4.3.1', - - settings: { - deep_linking: false, - small_breakpoint: 768, - one_up: true, - section_selector: '[data-section]', - region_selector: 'section, .section, [data-section-region]', - title_selector: '.title, [data-section-title]', - //marker: container is resized - resized_data_attr: 'data-section-resized', - //marker: container should apply accordion style - small_style_data_attr: 'data-section-small-style', - content_selector: '.content, [data-section-content]', - nav_selector: '[data-section="vertical-nav"], [data-section="horizontal-nav"]', - active_class: 'active', - callback: function() {} - }, - - init: function(scope, method, options) { - var self = this; - Foundation.inherit(this, 'throttle data_options position_right offset_right'); - - if (typeof method === 'object') { - $.extend(true, self.settings, method); - } - - if (typeof method !== 'string') { - this.events(); - return true; - } else { - return this[method].call(this, options); - } - }, - - events: function() { - var self = this; - - //combine titles selector from settings for click event binding - var click_title_selectors = [], - section_selector = self.settings.section_selector, - region_selectors = self.settings.region_selector.split(","), - title_selectors = self.settings.title_selector.split(","); - - for (var i = 0, len = region_selectors.length; i < len; i++) { - var region_selector = region_selectors[i]; - - for (var j = 0, len1 = title_selectors.length; j < len1; j++) { - var title_selector = section_selector + ">" + region_selector + ">" + title_selectors[j]; - - click_title_selectors.push(title_selector + " a"); //or we can not do preventDefault for click event of - click_title_selectors.push(title_selector); - } - } - - $(self.scope) - .on('click.fndtn.section', click_title_selectors.join(","), function(e) { - var title = $(this).closest(self.settings.title_selector); - - self.close_navs(title); - if (title.siblings(self.settings.content_selector).length > 0) { - self.toggle_active.call(title[0], e); - } - }); - - $(window) - .on('resize.fndtn.section', self.throttle(function() { self.resize(); }, 30)) - .on('hashchange.fndtn.section', self.set_active_from_hash); - - $(document).on('click.fndtn.section', function (e) { - if (e.isPropagationStopped && e.isPropagationStopped()) return; - if (e.target === document) return; - self.close_navs($(e.target).closest(self.settings.title_selector)); - }); - - $(window).triggerHandler('resize.fndtn.section'); - $(window).triggerHandler('hashchange.fndtn.section'); - }, - - //close nav !one_up on click elsewhere - close_navs: function(except_nav_with_title) { - var self = Foundation.libs.section, - navsToClose = $(self.settings.nav_selector) - .filter(function() { return !$.extend({}, - self.settings, self.data_options($(this))).one_up; }); - - if (except_nav_with_title.length > 0) { - var section = except_nav_with_title.parent().parent(); - - if (self.is_horizontal_nav(section) || self.is_vertical_nav(section)) { - //exclude current nav from list - navsToClose = navsToClose.filter(function() { return this !== section[0]; }); - } - } - //close navs on click on title - navsToClose.children(self.settings.region_selector).removeClass(self.settings.active_class); - }, - - toggle_active: function(e) { - var $this = $(this), - self = Foundation.libs.section, - region = $this.parent(), - content = $this.siblings(self.settings.content_selector), - section = region.parent(), - settings = $.extend({}, self.settings, self.data_options(section)), - prev_active_region = section.children(self.settings.region_selector).filter("." + self.settings.active_class); - - //for anchors inside [data-section-title] - if (!settings.deep_linking && content.length > 0) { - e.preventDefault(); - } - - e.stopPropagation(); //do not catch same click again on parent - - if (!region.hasClass(self.settings.active_class)) { - prev_active_region.removeClass(self.settings.active_class); - region.addClass(self.settings.active_class); - //force resize for better performance (do not wait timer) - self.resize(region.find(self.settings.section_selector).not("[" + self.settings.resized_data_attr + "]"), true); - } else if (!settings.one_up && (self.small(section) || self.is_vertical_nav(section) || self.is_horizontal_nav(section) || self.is_accordion(section))) { - region.removeClass(self.settings.active_class); - } - settings.callback(section); - }, - - check_resize_timer: null, - - //main function that sets title and content positions; runs for :not(.resized) and :visible once when window width is medium up - //sections: - // selected sections to resize, are defined on resize forced by visibility changes - //ensure_has_active_region: - // is true when we force resize for no resized sections that were hidden and became visible, - // these sections can have no selected region, because all regions were hidden along with section on executing set_active_from_hash - resize: function(sections, ensure_has_active_region) { - - var self = Foundation.libs.section, - is_small_window = self.small($(document)), - //filter for section resize - should_be_resized = function (section, now_is_hidden) { - return !self.is_accordion(section) && - !section.is("[" + self.settings.resized_data_attr + "]") && - (!is_small_window || self.is_horizontal_tabs(section)) && - now_is_hidden === (section.css('display') === 'none' || - !section.parent().is(':visible')); - }; - - sections = sections || $(self.settings.section_selector); - - clearTimeout(self.check_resize_timer); - - if (!is_small_window) { - sections.removeAttr(self.settings.small_style_data_attr); - } - - //resize - sections.filter(function() { return should_be_resized($(this), false); }) - .each(function() { - var section = $(this), - regions = section.children(self.settings.region_selector), - titles = regions.children(self.settings.title_selector), - content = regions.children(self.settings.content_selector), - titles_max_height = 0; - - if (ensure_has_active_region && - section.children(self.settings.region_selector).filter("." + self.settings.active_class).length == 0) { - var settings = $.extend({}, self.settings, self.data_options(section)); - - if (!settings.deep_linking && (settings.one_up || !self.is_horizontal_nav(section) && - !self.is_vertical_nav(section) && !self.is_accordion(section))) { - regions.filter(":visible").first().addClass(self.settings.active_class); - } - } - - if (self.is_horizontal_tabs(section) || self.is_auto(section)) { - // region: position relative - // title: position absolute - // content: position static - var titles_sum_width = 0; - - titles.each(function() { - var title = $(this); - - if (title.is(":visible")) { - title.css(!self.rtl ? 'left' : 'right', titles_sum_width); - var title_h_border_width = parseInt(title.css("border-" + (self.rtl ? 'left' : 'right') + "-width"), 10); - - if (title_h_border_width.toString() === 'Nan') { - title_h_border_width = 0; - } - - titles_sum_width += self.outerWidth(title) - title_h_border_width; - titles_max_height = Math.max(titles_max_height, self.outerHeight(title)); - } - }); - titles.css('height', titles_max_height); - regions.each(function() { - var region = $(this), - region_content = region.children(self.settings.content_selector), - content_top_border_width = parseInt(region_content.css("border-top-width"), 10); - - if (content_top_border_width.toString() === 'Nan') { - content_top_border_width = 0; - } - - region.css('padding-top', titles_max_height - content_top_border_width); - }); - - section.css("min-height", titles_max_height); - } else if (self.is_horizontal_nav(section)) { - var first = true; - // region: positon relative, float left - // title: position static - // content: position absolute - titles.each(function() { - titles_max_height = Math.max(titles_max_height, self.outerHeight($(this))); - }); - - regions.each(function() { - var region = $(this); - - region.css("margin-left", "-" + (first ? section : region.children(self.settings.title_selector)).css("border-left-width")); - first = false; - }); - - regions.css("margin-top", "-" + section.css("border-top-width")); - titles.css('height', titles_max_height); - content.css('top', titles_max_height); - section.css("min-height", titles_max_height); - } else if (self.is_vertical_tabs(section)) { - var titles_sum_height = 0; - // region: position relative, for .active: fixed padding==title.width - // title: fixed width, position absolute - // content: position static - titles.each(function() { - var title = $(this); - - if (title.is(":visible")) { - title.css('top', titles_sum_height); - var title_top_border_width = parseInt(title.css("border-top-width"), 10); - - if (title_top_border_width.toString() === 'Nan') { - title_top_border_width = 0; - } - - titles_sum_height += self.outerHeight(title) - title_top_border_width; - } - }); - - content.css('min-height', titles_sum_height + 1); - } else if (self.is_vertical_nav(section)) { - var titles_max_width = 0, - first1 = true; - // region: positon relative - // title: position static - // content: position absolute - titles.each(function() { - titles_max_width = Math.max(titles_max_width, self.outerWidth($(this))); - }); - - regions.each(function () { - var region = $(this); - - region.css("margin-top", "-" + (first1 ? section : region.children(self.settings.title_selector)).css("border-top-width")); - first1 = false; - }); - - titles.css('width', titles_max_width); - content.css(!self.rtl ? 'left' : 'right', titles_max_width); - section.css('width', titles_max_width); - } - - section.attr(self.settings.resized_data_attr, true); - }); - - //wait elements to become visible then resize - if ($(self.settings.section_selector).filter(function() { return should_be_resized($(this), true); }).length > 0) - self.check_resize_timer = setTimeout(function() { - self.resize(sections.filter(function() { return should_be_resized($(this), false); }), true); - }, 700); - - if (is_small_window) { - sections.attr(self.settings.small_style_data_attr, true); - } - }, - - is_vertical_nav: function(el) { - return /vertical-nav/i.test(el.data('section')); - }, - - is_horizontal_nav: function(el) { - return /horizontal-nav/i.test(el.data('section')); - }, - - is_accordion: function(el) { - return /accordion/i.test(el.data('section')); - }, - - is_horizontal_tabs: function(el) { - return /^tabs$/i.test(el.data('section')); - }, - - is_vertical_tabs: function(el) { - return /vertical-tabs/i.test(el.data('section')); - }, - - is_auto: function (el) { - var data_section = el.data('section'); - return data_section === '' || /auto/i.test(data_section); - }, - - set_active_from_hash: function() { - var self = Foundation.libs.section, - hash = window.location.hash.substring(1), - sections = $(self.settings.section_selector); - - sections.each(function() { - var section = $(this), - settings = $.extend({}, self.settings, self.data_options(section)), - regions = section.children(self.settings.region_selector), - set_active_from_hash = settings.deep_linking && hash.length > 0, - selected = false; - - regions.each(function() { - var region = $(this); - - if (selected) { - region.removeClass(self.settings.active_class); - } else if (set_active_from_hash) { - var data_slug = region.children(self.settings.content_selector).data('slug'); - - if (data_slug && new RegExp(data_slug, 'i').test(hash)) { - if (!region.hasClass(self.settings.active_class)) - region.addClass(self.settings.active_class); - selected = true; - } else { - region.removeClass(self.settings.active_class); - } - } else if (region.hasClass(self.settings.active_class)) { - selected = true; - } - }); - - if (!selected && !settings.deep_linking && (settings.one_up || !self.is_horizontal_nav(section) && - !self.is_vertical_nav(section) && !self.is_accordion(section))) - regions.filter(":visible").first().addClass(self.settings.active_class); - }); - }, - - reflow: function() { - var self = Foundation.libs.section; - - $(self.settings.section_selector).removeAttr(self.settings.resized_data_attr); - self.throttle(function() { self.resize(); }, 30)(); - }, - - small: function(el) { - var settings = $.extend({}, this.settings, this.data_options(el)); - - if (this.is_horizontal_tabs(el)) { - return false; - } - if (el && this.is_accordion(el)) { - return true; - } - if ($('html').hasClass('lt-ie9')) { - return true; - } - if ($('html').hasClass('ie8compat')) { - return true; - } - return $(this.scope).width() < settings.small_breakpoint; - }, - - off: function() { - $(this.scope).off('.fndtn.section'); - $(window).off('.fndtn.section'); - $(document).off('.fndtn.section'); - } - }; - - //resize selected sections - $.fn.reflow_section = function(ensure_has_active_region) { - var section = this, - self = Foundation.libs.section; - - section.removeAttr(self.settings.resized_data_attr); - self.throttle(function() { self.resize(section, ensure_has_active_region); }, 30)(); - return this; - }; - -}(Foundation.zj, window, document)); diff --git a/public/javascripts/foundation/foundation.tooltips.js b/public/javascripts/foundation/foundation.tooltips.js deleted file mode 100644 index 75fb37cef..000000000 --- a/public/javascripts/foundation/foundation.tooltips.js +++ /dev/null @@ -1,208 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.tooltips = { - name : 'tooltips', - - version : '4.2.2', - - settings : { - selector : '.has-tip', - additionalInheritableClasses : [], - tooltipClass : '.tooltip', - appendTo: 'body', - 'disable-for-touch': false, - tipTemplate : function (selector, content) { - return '' + content + ''; - } - }, - - cache : {}, - - init : function (scope, method, options) { - Foundation.inherit(this, 'data_options'); - var self = this; - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } else if (typeof options !== 'undefined') { - $.extend(true, this.settings, options); - } - - if (typeof method !== 'string') { - if (Modernizr.touch) { - $(this.scope) - .on('click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip', - '[data-tooltip]', function (e) { - var settings = $.extend({}, self.settings, self.data_options($(this))); - if (!settings['disable-for-touch']) { - e.preventDefault(); - $(settings.tooltipClass).hide(); - self.showOrCreateTip($(this)); - } - }) - .on('click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip', - this.settings.tooltipClass, function (e) { - e.preventDefault(); - $(this).fadeOut(150); - }); - } else { - $(this.scope) - .on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip', - '[data-tooltip]', function (e) { - var $this = $(this); - - if (/enter|over/i.test(e.type)) { - self.showOrCreateTip($this); - } else if (e.type === 'mouseout' || e.type === 'mouseleave') { - self.hide($this); - } - }); - } - - // $(this.scope).data('fndtn-tooltips', true); - } else { - return this[method].call(this, options); - } - - }, - - showOrCreateTip : function ($target) { - var $tip = this.getTip($target); - - if ($tip && $tip.length > 0) { - return this.show($target); - } - - return this.create($target); - }, - - getTip : function ($target) { - var selector = this.selector($target), - tip = null; - - if (selector) { - tip = $('span[data-selector="' + selector + '"]' + this.settings.tooltipClass); - } - - return (typeof tip === 'object') ? tip : false; - }, - - selector : function ($target) { - var id = $target.attr('id'), - dataSelector = $target.attr('data-tooltip') || $target.attr('data-selector'); - - if ((id && id.length < 1 || !id) && typeof dataSelector != 'string') { - dataSelector = 'tooltip' + Math.random().toString(36).substring(7); - $target.attr('data-selector', dataSelector); - } - - return (id && id.length > 0) ? id : dataSelector; - }, - - create : function ($target) { - var $tip = $(this.settings.tipTemplate(this.selector($target), $('
        ').html($target.attr('title')).html())), - classes = this.inheritable_classes($target); - - $tip.addClass(classes).appendTo(this.settings.appendTo); - if (Modernizr.touch) { - $tip.append('tap to close '); - } - $target.removeAttr('title').attr('title',''); - this.show($target); - }, - - reposition : function (target, tip, classes) { - var width, nub, nubHeight, nubWidth, column, objPos; - - tip.css('visibility', 'hidden').show(); - - width = target.data('width'); - nub = tip.children('.nub'); - nubHeight = this.outerHeight(nub); - nubWidth = this.outerHeight(nub); - - objPos = function (obj, top, right, bottom, left, width) { - return obj.css({ - 'top' : (top) ? top : 'auto', - 'bottom' : (bottom) ? bottom : 'auto', - 'left' : (left) ? left : 'auto', - 'right' : (right) ? right : 'auto', - 'width' : (width) ? width : 'auto' - }).end(); - }; - - objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', target.offset().left, width); - - if ($(window).width() < 767) { - objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', 12.5, $(this.scope).width()); - tip.addClass('tip-override'); - objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left); - } else { - var left = target.offset().left; - if (Foundation.rtl) { - left = target.offset().left + target.offset().width - this.outerWidth(tip); - } - objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', left, width); - tip.removeClass('tip-override'); - if (classes && classes.indexOf('tip-top') > -1) { - objPos(tip, (target.offset().top - this.outerHeight(tip)), 'auto', 'auto', left, width) - .removeClass('tip-override'); - } else if (classes && classes.indexOf('tip-left') > -1) { - objPos(tip, (target.offset().top + (this.outerHeight(target) / 2) - nubHeight*2.5), 'auto', 'auto', (target.offset().left - this.outerWidth(tip) - nubHeight), width) - .removeClass('tip-override'); - } else if (classes && classes.indexOf('tip-right') > -1) { - objPos(tip, (target.offset().top + (this.outerHeight(target) / 2) - nubHeight*2.5), 'auto', 'auto', (target.offset().left + this.outerWidth(target) + nubHeight), width) - .removeClass('tip-override'); - } - } - - tip.css('visibility', 'visible').hide(); - }, - - inheritable_classes : function (target) { - var inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'noradius'].concat(this.settings.additionalInheritableClasses), - classes = target.attr('class'), - filtered = classes ? $.map(classes.split(' '), function (el, i) { - if ($.inArray(el, inheritables) !== -1) { - return el; - } - }).join(' ') : ''; - - return $.trim(filtered); - }, - - show : function ($target) { - var $tip = this.getTip($target); - - this.reposition($target, $tip, $target.attr('class')); - $tip.fadeIn(150); - }, - - hide : function ($target) { - var $tip = this.getTip($target); - - $tip.fadeOut(150); - }, - - // deprecate reload - reload : function () { - var $self = $(this); - - return ($self.data('fndtn-tooltips')) ? $self.foundationTooltips('destroy').foundationTooltips('init') : $self.foundationTooltips('init'); - }, - - off : function () { - $(this.scope).off('.fndtn.tooltip'); - $(this.settings.tooltipClass).each(function (i) { - $('[data-tooltip]').get(i).attr('title', $(this).text()); - }).remove(); - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); \ No newline at end of file diff --git a/public/javascripts/foundation/foundation.topbar.js b/public/javascripts/foundation/foundation.topbar.js deleted file mode 100644 index e9c172e46..000000000 --- a/public/javascripts/foundation/foundation.topbar.js +++ /dev/null @@ -1,300 +0,0 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.topbar = { - name : 'topbar', - - version: '4.3.1', - - settings : { - index : 0, - stickyClass : 'sticky', - custom_back_text: true, - back_text: 'Back', - is_hover: true, - mobile_show_parent_link: true, - scrolltop : true, // jump to top when sticky nav menu toggle is clicked - init : false - }, - - init : function (section, method, options) { - Foundation.inherit(this, 'data_options'); - var self = this; - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } else if (typeof options !== 'undefined') { - $.extend(true, this.settings, options); - } - - if (typeof method !== 'string') { - - $('.top-bar, [data-topbar]').each(function () { - $.extend(true, self.settings, self.data_options($(this))); - self.settings.$w = $(window); - self.settings.$topbar = $(this); - self.settings.$section = self.settings.$topbar.find('section'); - self.settings.$titlebar = self.settings.$topbar.children('ul').first(); - self.settings.$topbar.data('index', 0); - - var breakpoint = $("
        ").insertAfter(self.settings.$topbar); - self.settings.breakPoint = breakpoint.width(); - breakpoint.remove(); - - self.assemble(); - - if (self.settings.is_hover) { - self.settings.$topbar.find('.has-dropdown').addClass('not-click'); - } - - if (self.settings.$topbar.parent().hasClass('fixed')) { - $('body').css('padding-top', self.outerHeight(self.settings.$topbar)); - } - }); - - if (!self.settings.init) { - this.events(); - } - - return this.settings.init; - } else { - // fire method - return this[method].call(this, options); - } - }, - - timer : null, - - events : function () { - var self = this; - var offst = this.outerHeight($('.top-bar, [data-topbar]')); - $(this.scope) - .off('.fndtn.topbar') - .on('click.fndtn.topbar', '.top-bar .toggle-topbar, [data-topbar] .toggle-topbar', function (e) { - var topbar = $(this).closest('.top-bar, [data-topbar]'), - section = topbar.find('section, .section'), - titlebar = topbar.children('ul').first(); - - e.preventDefault(); - - if (self.breakpoint()) { - if (!self.rtl) { - section.css({left: '0%'}); - section.find('>.name').css({left: '100%'}); - } else { - section.css({right: '0%'}); - section.find('>.name').css({right: '100%'}); - } - - section.find('li.moved').removeClass('moved'); - topbar.data('index', 0); - - topbar - .toggleClass('expanded') - .css('height', ''); - } - - if (!topbar.hasClass('expanded')) { - if (topbar.hasClass('fixed')) { - topbar.parent().addClass('fixed'); - topbar.removeClass('fixed'); - $('body').css('padding-top',offst); - } - } else if (topbar.parent().hasClass('fixed')) { - topbar.parent().removeClass('fixed'); - topbar.addClass('fixed'); - $('body').css('padding-top','0'); - - if (self.settings.scrolltop) { - window.scrollTo(0,0); - } - } - }) - - .on('click.fndtn.topbar', '.top-bar li.has-dropdown', function (e) { - if (self.breakpoint()) return; - - var li = $(this), - target = $(e.target), - topbar = li.closest('[data-topbar], .top-bar'), - is_hover = topbar.data('topbar'); - - if (self.settings.is_hover && !Modernizr.touch) return; - - e.stopImmediatePropagation(); - - if (target[0].nodeName === 'A' && target.parent().hasClass('has-dropdown')) { - e.preventDefault(); - } - - if (li.hasClass('hover')) { - li - .removeClass('hover') - .find('li') - .removeClass('hover'); - } else { - li.addClass('hover'); - } - }) - - .on('click.fndtn.topbar', '.top-bar .has-dropdown>a, [data-topbar] .has-dropdown>a', function (e) { - if (self.breakpoint()) { - e.preventDefault(); - - var $this = $(this), - topbar = $this.closest('.top-bar, [data-topbar]'), - section = topbar.find('section, .section'), - titlebar = topbar.children('ul').first(), - dropdownHeight = $this.next('.dropdown').outerHeight(), - $selectedLi = $this.closest('li'); - - topbar.data('index', topbar.data('index') + 1); - $selectedLi.addClass('moved'); - - if (!self.rtl) { - section.css({left: -(100 * topbar.data('index')) + '%'}); - section.find('>.name').css({left: 100 * topbar.data('index') + '%'}); - } else { - section.css({right: -(100 * topbar.data('index')) + '%'}); - section.find('>.name').css({right: 100 * topbar.data('index') + '%'}); - } - - topbar.css('height', self.outerHeight($this.siblings('ul'), true) + self.height(titlebar)); - } - }); - - $(window).on('resize.fndtn.topbar', function () { - if (!self.breakpoint()) { - $('.top-bar, [data-topbar]') - .css('height', '') - .removeClass('expanded') - .find('li') - .removeClass('hover'); - } - }.bind(this)); - - $('body').on('click.fndtn.topbar', function (e) { - var parent = $(e.target).closest('[data-topbar], .top-bar'); - - if (parent.length > 0) { - return; - } - - $('.top-bar li, [data-topbar] li').removeClass('hover'); - }); - - // Go up a level on Click - $(this.scope).on('click.fndtn', '.top-bar .has-dropdown .back, [data-topbar] .has-dropdown .back', function (e) { - e.preventDefault(); - - var $this = $(this), - topbar = $this.closest('.top-bar, [data-topbar]'), - titlebar = topbar.children('ul').first(), - section = topbar.find('section, .section'), - $movedLi = $this.closest('li.moved'), - $previousLevelUl = $movedLi.parent(); - - topbar.data('index', topbar.data('index') - 1); - - if (!self.rtl) { - section.css({left: -(100 * topbar.data('index')) + '%'}); - section.find('>.name').css({left: 100 * topbar.data('index') + '%'}); - } else { - section.css({right: -(100 * topbar.data('index')) + '%'}); - section.find('>.name').css({right: 100 * topbar.data('index') + '%'}); - } - - if (topbar.data('index') === 0) { - topbar.css('height', ''); - } else { - topbar.css('height', self.outerHeight($previousLevelUl, true) + self.height(titlebar)); - } - - setTimeout(function () { - $movedLi.removeClass('moved'); - }, 300); - }); - }, - - breakpoint : function () { - return $(document).width() <= this.settings.breakPoint || $('html').hasClass('lt-ie9'); - }, - - assemble : function () { - var self = this; - // Pull element out of the DOM for manipulation - this.settings.$section.detach(); - - this.settings.$section.find('.has-dropdown>a').each(function () { - var $link = $(this), - $dropdown = $link.siblings('.dropdown'), - url = $link.attr('href'); - - if (self.settings.mobile_show_parent_link && url && url.length > 1) { - var $titleLi = $('
      2. ' + $link.text() +'
      3. '); - } else { - var $titleLi = $('
      4. '); - } - - // Copy link to subnav - if (self.settings.custom_back_text == true) { - $titleLi.find('h5>a').html('« ' + self.settings.back_text); - } else { - $titleLi.find('h5>a').html('« ' + $link.html()); - } - $dropdown.prepend($titleLi); - }); - - // Put element back in the DOM - this.settings.$section.appendTo(this.settings.$topbar); - - // check for sticky - this.sticky(); - }, - - height : function (ul) { - var total = 0, - self = this; - - ul.find('> li').each(function () { total += self.outerHeight($(this), true); }); - - return total; - }, - - sticky : function () { - var klass = '.' + this.settings.stickyClass; - if ($(klass).length > 0) { - var distance = $(klass).length ? $(klass).offset().top: 0, - $window = $(window), - offst = this.outerHeight($('.top-bar')), - t_top; - - //Whe resize elements of the page on windows resize. Must recalculate distance - $(window).resize(function() { - clearTimeout(t_top); - t_top = setTimeout (function() { - distance = $(klass).offset().top; - },105); - }); - $window.scroll(function() { - if ($window.scrollTop() > (distance)) { - $(klass).addClass("fixed"); - $('body').css('padding-top',offst); - } else if ($window.scrollTop() <= distance) { - $(klass).removeClass("fixed"); - $('body').css('padding-top','0'); - } - }); - } - }, - - off : function () { - $(this.scope).off('.fndtn.topbar'); - $(window).off('.fndtn.topbar'); - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); diff --git a/public/javascripts/markdown_editor.js b/public/javascripts/markdown_editor.js deleted file mode 100644 index 6d5935562..000000000 --- a/public/javascripts/markdown_editor.js +++ /dev/null @@ -1,44 +0,0 @@ -// Redactor -function bindRedactor() { - var buttons = ['code', '|', 'bold', 'italic', '|', 'link', '|', 'unorderedlist', 'orderedlist', 'horizontalrule', '|', 'fullscreen']; - - $('._redactor').redactor({ - placeholder: '', - buttons: buttons, - buttonsCustom: { - code: { - title: 'Code', - callback: function(buttonName, buttonDOM, buttonObject) { - var selectedText = this.getSelectionText(); - var html = "" + selectedText + ""; - this.execCommand('inserthtml', html); - } - } - }, - formattingTags: [], - air: false, - airButtons: ['code', '|', 'bold', 'italic', '|', 'link', '|', 'unorderedlist', 'orderedlist', 'horizontalrule'], - wym: false, - cleanup: true, - phpTags: true, - // tabFocus: true, - // removeEmptyTags: true, - pastePlainText: true, - tabSpaces: 4, - formattingTags: ['h1', 'h2'], - changeCallback: function(html) { - $('input._source').val(html); - }, - }); - - $('._source').each(function() { - var editor = $('textarea._redactor'); - var html = $(this).val(); - - editor.redactor('set', html); - }); -} - -$(function() { - bindRedactor(); -}); \ No newline at end of file diff --git a/public/javascripts/vendor/ZeroClipboard.swf b/public/javascripts/vendor/ZeroClipboard.swf deleted file mode 100644 index 13bf8e396202964e0048333d878f4b949a2f5e6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1071 zcmV+~1kn3KS5pay1^@tfoPAa6Qrkup-d$aeB-A-xFjKf1te)pFM-&Q&_dOT zp~-XxqP4X~YJ}vGWC;KAD1C=MKwiO_PG6^Vbs@z~r#qgr-}!Xr?4IxJ9P1kT4dpSa zmlT9hja*+}e;Cbih*6`(JT|+I(1(#NIVSiTL~Dq=|Lb=d5tOYL`L;_#dyQQ%FAAmI zcth~a_gzLk@xphk!Y?fFYp&C2`ZTZ#X}INt9hY9ojZWZ1Om23g$oC2%i(XLAs&#|V z5ArS7X}yhomj%SJGT~|rnZj|zM|I&j59e1QKqGxQN5!(ijWrx1S)ZN!RwWBwC`$uYc z!)028S7F4?l?H2dd39HKImh$+mv#S~I-YjmQ;P-rUfUM~-;Xr+ldpAXK+hS!b|@Ro zUs)@fv!kf9RjpFXZ?d(Pe_q{bY*sgP{Ykaib==7Da_N!X$Z^AwK5e&BZ5R56j>T=;_5DD$nR8}GiWShym;5A&x*eM;)Us-}<67Eb+@9n>sdlhm z`(coON!$a6H-ML=9U8}t-8aV1yD!xY9v@|7-FWq*lEUMka&b=Hq$X{>72}4eNl_P+ zccPJWGtXb!r#GbVPIO$}sN%oME%Yf<`b@|2f6G5y#$}-l zAR|D=L6`ti0Wt|N4P*v{Ss-&j?gE(yvY_TMkQE@SK-Pd%f#~WwXExMLZXW@84CD#m zFMxar!IU~i}ZGSTvX;GX_!`A@yKkIbSu*e=l_b9m*BF@hOB8SS;p?XkU4 z+#Y{FagI+_hF#pQ*y^c#B7H9*TQ=n-IvJZOQ*KYMV&e{u!2((~XOiIAy*Zr0yBr$x zqA6D~T{u}ZWn+;Cn@jC`refSD34E}PZ{YGaxq%P2g&VlCEyl30qM2Z<#-M2CQxMno zG_4J8H7mc8(VenQzJ;=@j=BiTh*RubMeS$61ORcM^S6!u6l;=?s|@ py1A~K8@jovn~!u;;=k8uI$3rc`gC{*rT-s&a~N%N=5J58nk1s|4c7nw diff --git a/public/javascripts/vendor/custom.modernizr.js b/public/javascripts/vendor/custom.modernizr.js deleted file mode 100755 index 4eb3d0655..000000000 --- a/public/javascripts/vendor/custom.modernizr.js +++ /dev/null @@ -1,4 +0,0 @@ -/* Modernizr 2.6.2 (Custom Build) | MIT & BSD - * Build: http://modernizr.com/download/#-inlinesvg-svg-svgclippaths-touch-shiv-mq-cssclasses-teststyles-prefixes-ie8compat-load - */ -;window.Modernizr=function(a,b,c){function y(a){j.cssText=a}function z(a,b){return y(m.join(a+";")+(b||""))}function A(a,b){return typeof a===b}function B(a,b){return!!~(""+a).indexOf(b)}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:A(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={svg:"http://www.w3.org/2000/svg"},o={},p={},q={},r=[],s=r.slice,t,u=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},v=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return u("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},w={}.hasOwnProperty,x;!A(w,"undefined")&&!A(w.call,"undefined")?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=s.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(s.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(s.call(arguments)))};return e}),o.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:u(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},o.svg=function(){return!!b.createElementNS&&!!b.createElementNS(n.svg,"svg").createSVGRect},o.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==n.svg},o.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(l.call(b.createElementNS(n.svg,"clipPath")))};for(var D in o)x(o,D)&&(t=D.toLowerCase(),e[t]=o[D](),r.push((e[t]?"":"no-")+t));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)x(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},y(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e.mq=v,e.testStyles=u,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+r.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f -// -// Redistributable under a BSD-style open source license. -// See license.txt for more information. -// -// The full source distribution is at: -// -// A A L -// T C A -// T K B -// -// -// - -// -// Wherever possible, Showdown is a straight, line-by-line port -// of the Perl version of Markdown. -// -// This is not a normal parser design; it's basically just a -// series of string substitutions. It's hard to read and -// maintain this way, but keeping Showdown close to the original -// design makes it easier to port new features. -// -// More importantly, Showdown behaves like markdown.pl in most -// edge cases. So web applications can do client-side preview -// in Javascript, and then build identical HTML on the server. -// -// This port needs the new RegExp functionality of ECMA 262, -// 3rd Edition (i.e. Javascript 1.5). Most modern web browsers -// should do fine. Even with the new regular expression features, -// We do a lot of work to emulate Perl's regex functionality. -// The tricky changes in this file mostly have the "attacklab:" -// label. Major or self-explanatory changes don't. -// -// Smart diff tools like Araxis Merge will be able to match up -// this file with markdown.pl in a useful way. A little tweaking -// helps: in a copy of markdown.pl, replace "#" with "//" and -// replace "$text" with "text". Be sure to ignore whitespace -// and line endings. -// - - -// -// Showdown usage: -// -// var text = "Markdown *rocks*."; -// -// var converter = new Showdown.converter(); -// var html = converter.makeHtml(text); -// -// alert(html); -// -// Note: move the sample code to the bottom of this -// file before uncommenting it. -// - - -// ************************************************** -// GitHub Flavored Markdown modifications by Tekkub -// http://github.github.com/github-flavored-markdown/ -// -// Modifications are tagged with "GFM" -// ************************************************** - -// ************************************************** -// Node.JS port by Isaac Z. Schlueter -// -// Modifications are tagged with "isaacs" -// ************************************************** - -// -// Showdown namespace -// -var Showdown = {}; - -// -// isaacs: export the Showdown object -// -if (typeof exports === "object") { - Showdown = exports; - // isaacs: expose top-level parse() method, like other to-html parsers. - Showdown.parse = function (md, gh) { - var converter = new Showdown.converter(); - return converter.makeHtml(md, gh); - }; -} - -// -// isaacs: Declare "GitHub" object in here, since Node modules -// execute in a closure or separate context, rather than right -// in the global scope. If in the browser, this does nothing. -// -var GitHub; - -// -// converter -// -// Wraps all "globals" so that the only thing -// exposed is makeHtml(). -// -Showdown.converter = function() { - -// -// Globals: -// - -// Global hashes, used by various utility routines -var g_urls; -var g_titles; -var g_html_blocks; - -// Used to track when we're inside an ordered or unordered list -// (see _ProcessListItems() for details): -var g_list_level = 0; - -// isaacs - Allow passing in the GitHub object as an argument. -this.makeHtml = function(text, gh) { - if (typeof gh !== "undefined") { - if (typeof gh === "string") gh = {nameWithOwner:gh}; - GitHub = gh; - } - -// -// Main function. The order in which other subs are called here is -// essential. Link and image substitutions need to happen before -// _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the -// and tags get encoded. -// - - // Clear the global hashes. If we don't clear these, you get conflicts - // from other articles when generating a page which contains more than - // one article (e.g. an index page that shows the N most recent - // articles): - g_urls = new Array(); - g_titles = new Array(); - g_html_blocks = new Array(); - - // attacklab: Replace ~ with ~T - // This lets us use tilde as an escape char to avoid md5 hashes - // The choice of character is arbitray; anything that isn't - // magic in Markdown will work. - text = text.replace(/~/g,"~T"); - - // attacklab: Replace $ with ~D - // RegExp interprets $ as a special character - // when it's in a replacement string - text = text.replace(/\$/g,"~D"); - - // Standardize line endings - text = text.replace(/\r\n/g,"\n"); // DOS to Unix - text = text.replace(/\r/g,"\n"); // Mac to Unix - - // Make sure text begins and ends with a couple of newlines: - text = "\n\n" + text + "\n\n"; - - // Convert all tabs to spaces. - text = _Detab(text); - - // Strip any lines consisting only of spaces and tabs. - // This makes subsequent regexen easier to write, because we can - // match consecutive blank lines with /\n+/ instead of something - // contorted like /[ \t]*\n+/ . - text = text.replace(/^[ \t]+$/mg,""); - - // Turn block-level HTML blocks into hash entries - text = _HashHTMLBlocks(text); - - // Strip link definitions, store in hashes. - text = _StripLinkDefinitions(text); - - text = _RunBlockGamut(text); - - text = _UnescapeSpecialChars(text); - - // attacklab: Restore dollar signs - text = text.replace(/~D/g,"$$"); - - // attacklab: Restore tildes - text = text.replace(/~T/g,"~"); - - // ** GFM ** Auto-link URLs and emails - text = text.replace(/https?\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!]/g, function(wholeMatch,matchIndex){ - var left = text.slice(0, matchIndex), right = text.slice(matchIndex) - if (left.match(/<[^>]+$/) && right.match(/^[^>]*>/)) {return wholeMatch} - return "" + wholeMatch + ""; - }); - text = text.replace(/[a-z0-9_\-+=.]+@[a-z0-9\-]+(\.[a-z0-9-]+)+/ig, function(wholeMatch){return "" + wholeMatch + "";}); - - // ** GFM ** Auto-link sha1 if GitHub.nameWithOwner is defined - text = text.replace(/[a-f0-9]{40}/ig, function(wholeMatch,matchIndex){ - if (typeof(GitHub) == "undefined" || typeof(GitHub.nameWithOwner) == "undefined") {return wholeMatch;} - var left = text.slice(0, matchIndex), right = text.slice(matchIndex) - if (left.match(/@$/) || (left.match(/<[^>]+$/) && right.match(/^[^>]*>/))) {return wholeMatch;} - return "" + wholeMatch.substring(0,7) + ""; - }); - - // ** GFM ** Auto-link user@sha1 if GitHub.nameWithOwner is defined - text = text.replace(/([a-z0-9_\-+=.]+)@([a-f0-9]{40})/ig, function(wholeMatch,username,sha,matchIndex){ - if (typeof(GitHub) == "undefined" || typeof(GitHub.nameWithOwner) == "undefined") {return wholeMatch;} - GitHub.repoName = GitHub.repoName || _GetRepoName() - var left = text.slice(0, matchIndex), right = text.slice(matchIndex) - if (left.match(/\/$/) || (left.match(/<[^>]+$/) && right.match(/^[^>]*>/))) {return wholeMatch;} - return "" + username + "@" + sha.substring(0,7) + ""; - }); - - // ** GFM ** Auto-link user/repo@sha1 - text = text.replace(/([a-z0-9_\-+=.]+\/[a-z0-9_\-+=.]+)@([a-f0-9]{40})/ig, function(wholeMatch,repo,sha){ - return "" + repo + "@" + sha.substring(0,7) + ""; - }); - - // ** GFM ** Auto-link #issue if GitHub.nameWithOwner is defined - text = text.replace(/#([0-9]+)/ig, function(wholeMatch,issue,matchIndex){ - if (typeof(GitHub) == "undefined" || typeof(GitHub.nameWithOwner) == "undefined") {return wholeMatch;} - var left = text.slice(0, matchIndex), right = text.slice(matchIndex) - if (left == "" || left.match(/[a-z0-9_\-+=.]$/) || (left.match(/<[^>]+$/) && right.match(/^[^>]*>/))) {return wholeMatch;} - return "" + wholeMatch + ""; - }); - - // ** GFM ** Auto-link user#issue if GitHub.nameWithOwner is defined - text = text.replace(/([a-z0-9_\-+=.]+)#([0-9]+)/ig, function(wholeMatch,username,issue,matchIndex){ - if (typeof(GitHub) == "undefined" || typeof(GitHub.nameWithOwner) == "undefined") {return wholeMatch;} - GitHub.repoName = GitHub.repoName || _GetRepoName() - var left = text.slice(0, matchIndex), right = text.slice(matchIndex) - if (left.match(/\/$/) || (left.match(/<[^>]+$/) && right.match(/^[^>]*>/))) {return wholeMatch;} - return "" + wholeMatch + ""; - }); - - // ** GFM ** Auto-link user/repo#issue - text = text.replace(/([a-z0-9_\-+=.]+\/[a-z0-9_\-+=.]+)#([0-9]+)/ig, function(wholeMatch,repo,issue){ - return "" + wholeMatch + ""; - }); - - return text; -} - - -var _GetRepoName = function() { - return GitHub.nameWithOwner.match(/^.+\/(.+)$/)[1] -} - -var _StripLinkDefinitions = function(text) { -// -// Strips link definitions from text, stores the URLs and titles in -// hash references. -// - - // Link defs are in the form: ^[id]: url "optional title" - - /* - var text = text.replace(/ - ^[ ]{0,3}\[(.+)\]: // id = $1 attacklab: g_tab_width - 1 - [ \t]* - \n? // maybe *one* newline - [ \t]* - ? // url = $2 - [ \t]* - \n? // maybe one newline - [ \t]* - (?: - (\n*) // any lines skipped = $3 attacklab: lookbehind removed - ["(] - (.+?) // title = $4 - [")] - [ \t]* - )? // title is optional - (?:\n+|$) - /gm, - function(){...}); - */ - var text = text.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm, - function (wholeMatch,m1,m2,m3,m4) { - m1 = m1.toLowerCase(); - g_urls[m1] = _EncodeAmpsAndAngles(m2); // Link IDs are case-insensitive - if (m3) { - // Oops, found blank lines, so it's not a title. - // Put back the parenthetical statement we stole. - return m3+m4; - } else if (m4) { - g_titles[m1] = m4.replace(/"/g,"""); - } - - // Completely remove the definition from the text - return ""; - } - ); - - return text; -} - - -var _HashHTMLBlocks = function(text) { - // attacklab: Double up blank lines to reduce lookaround - text = text.replace(/\n/g,"\n\n"); - - // Hashify HTML blocks: - // We only want to do this for block-level HTML tags, such as headers, - // lists, and tables. That's because we still want to wrap

        s around - // "paragraphs" that are wrapped in non-block-level tags, such as anchors, - // phrase emphasis, and spans. The list of tags we're looking for is - // hard-coded: - var block_tags_a = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del" - var block_tags_b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math" - - // First, look for nested blocks, e.g.: - //

        - //
        - // tags for inner block must be indented. - //
        - //
        - // - // The outermost tags must start at the left margin for this to match, and - // the inner nested divs must be indented. - // We need to do this before the next, more liberal match, because the next - // match will start at the first `
        ` and stop at the first `
        `. - - // attacklab: This regex can be expensive when it fails. - /* - var text = text.replace(/ - ( // save in $1 - ^ // start of line (with /m) - <($block_tags_a) // start tag = $2 - \b // word break - // attacklab: hack around khtml/pcre bug... - [^\r]*?\n // any number of lines, minimally matching - // the matching end tag - [ \t]* // trailing spaces/tabs - (?=\n+) // followed by a newline - ) // attacklab: there are sentinel newlines at end of document - /gm,function(){...}}; - */ - text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,hashElement); - - // - // Now match more liberally, simply from `\n` to `\n` - // - - /* - var text = text.replace(/ - ( // save in $1 - ^ // start of line (with /m) - <($block_tags_b) // start tag = $2 - \b // word break - // attacklab: hack around khtml/pcre bug... - [^\r]*? // any number of lines, minimally matching - .* // the matching end tag - [ \t]* // trailing spaces/tabs - (?=\n+) // followed by a newline - ) // attacklab: there are sentinel newlines at end of document - /gm,function(){...}}; - */ - text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,hashElement); - - // Special case just for
        . It was easier to make a special case than - // to make the other regex more complicated. - - /* - text = text.replace(/ - ( // save in $1 - \n\n // Starting after a blank line - [ ]{0,3} - (<(hr) // start tag = $2 - \b // word break - ([^<>])*? // - \/?>) // the matching end tag - [ \t]* - (?=\n{2,}) // followed by a blank line - ) - /g,hashElement); - */ - text = text.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,hashElement); - - // Special case for standalone HTML comments: - - /* - text = text.replace(/ - ( // save in $1 - \n\n // Starting after a blank line - [ ]{0,3} // attacklab: g_tab_width - 1 - - [ \t]* - (?=\n{2,}) // followed by a blank line - ) - /g,hashElement); - */ - text = text.replace(/(\n\n[ ]{0,3}[ \t]*(?=\n{2,}))/g,hashElement); - - // PHP and ASP-style processor instructions ( and <%...%>) - - /* - text = text.replace(/ - (?: - \n\n // Starting after a blank line - ) - ( // save in $1 - [ ]{0,3} // attacklab: g_tab_width - 1 - (?: - <([?%]) // $2 - [^\r]*? - \2> - ) - [ \t]* - (?=\n{2,}) // followed by a blank line - ) - /g,hashElement); - */ - text = text.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,hashElement); - - // attacklab: Undo double lines (see comment at top of this function) - text = text.replace(/\n\n/g,"\n"); - return text; -} - -var hashElement = function(wholeMatch,m1) { - var blockText = m1; - - // Undo double lines - blockText = blockText.replace(/\n\n/g,"\n"); - blockText = blockText.replace(/^\n/,""); - - // strip trailing blank lines - blockText = blockText.replace(/\n+$/g,""); - - // Replace the element text with a marker ("~KxK" where x is its key) - blockText = "\n\n~K" + (g_html_blocks.push(blockText)-1) + "K\n\n"; - - return blockText; -}; - -var _RunBlockGamut = function(text) { -// -// These are all the transformations that form block-level -// tags like paragraphs, headers, and list items. -// - text = _DoHeaders(text); - - // Do Horizontal Rules: - var key = hashBlock("
        "); - text = text.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,key); - text = text.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,key); - text = text.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,key); - - text = _DoLists(text); - text = _DoCodeFencing(text); - text = _DoCodeBlocks(text); - text = _DoBlockQuotes(text); - - // We already ran _HashHTMLBlocks() before, in Markdown(), but that - // was to escape raw HTML in the original Markdown source. This time, - // we're escaping the markup we've just created, so that we don't wrap - //

        tags around block-level tags. - text = _HashHTMLBlocks(text); - text = _FormParagraphs(text); - - return text; -} - - -var _RunSpanGamut = function(text) { -// -// These are all the transformations that occur *within* block-level -// tags like paragraphs, headers, and list items. -// - - text = _DoCodeSpans(text); - text = _EscapeSpecialCharsWithinTagAttributes(text); - text = _EncodeBackslashEscapes(text); - - // Process anchor and image tags. Images must come first, - // because ![foo][f] looks like an anchor. - text = _DoImages(text); - text = _DoAnchors(text); - - // Make links out of things like `` - // Must come after _DoAnchors(), because you can use < and > - // delimiters in inline links like [this](). - text = _DoAutoLinks(text); - text = _EncodeAmpsAndAngles(text); - text = _DoItalicsAndBold(text); - - // Do hard breaks: - text = text.replace(/ +\n/g,"
        \n"); - - return text; -} - -var _EscapeSpecialCharsWithinTagAttributes = function(text) { -// -// Within tags -- meaning between < and > -- encode [\ ` * _] so they -// don't conflict with their use in Markdown for code, italics and strong. -// - - // Build a regex to find HTML tags and comments. See Friedl's - // "Mastering Regular Expressions", 2nd Ed., pp. 200-201. - var regex = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi; - - text = text.replace(regex, function(wholeMatch) { - var tag = wholeMatch.replace(/(.)<\/?code>(?=.)/g,"$1`"); - tag = escapeCharacters(tag,"\\`*_"); - return tag; - }); - - return text; -} - -var _DoAnchors = function(text) { -// -// Turn Markdown link shortcuts into XHTML tags. -// - // - // First, handle reference-style links: [link text] [id] - // - - /* - text = text.replace(/ - ( // wrap whole match in $1 - \[ - ( - (?: - \[[^\]]*\] // allow brackets nested one level - | - [^\[] // or anything else - )* - ) - \] - - [ ]? // one optional space - (?:\n[ ]*)? // one optional newline followed by spaces - - \[ - (.*?) // id = $3 - \] - )()()()() // pad remaining backreferences - /g,_DoAnchors_callback); - */ - text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,writeAnchorTag); - - // - // Next, inline-style links: [link text](url "optional title") - // - - /* - text = text.replace(/ - ( // wrap whole match in $1 - \[ - ( - (?: - \[[^\]]*\] // allow brackets nested one level - | - [^\[\]] // or anything else - ) - ) - \] - \( // literal paren - [ \t]* - () // no id, so leave $3 empty - ? // href = $4 - [ \t]* - ( // $5 - (['"]) // quote char = $6 - (.*?) // Title = $7 - \6 // matching quote - [ \t]* // ignore any spaces/tabs between closing quote and ) - )? // title is optional - \) - ) - /g,writeAnchorTag); - */ - text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeAnchorTag); - - // - // Last, handle reference-style shortcuts: [link text] - // These must come last in case you've also got [link test][1] - // or [link test](/foo) - // - - /* - text = text.replace(/ - ( // wrap whole match in $1 - \[ - ([^\[\]]+) // link text = $2; can't contain '[' or ']' - \] - )()()()()() // pad rest of backreferences - /g, writeAnchorTag); - */ - text = text.replace(/(\[([^\[\]]+)\])()()()()()/g, writeAnchorTag); - - return text; -} - -var writeAnchorTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) { - if (m7 == undefined) m7 = ""; - var whole_match = m1; - var link_text = m2; - var link_id = m3.toLowerCase(); - var url = m4; - var title = m7; - - if (url == "") { - if (link_id == "") { - // lower-case and turn embedded newlines into spaces - link_id = link_text.toLowerCase().replace(/ ?\n/g," "); - } - url = "#"+link_id; - - if (g_urls[link_id] != undefined) { - url = g_urls[link_id]; - if (g_titles[link_id] != undefined) { - title = g_titles[link_id]; - } - } - else { - if (whole_match.search(/\(\s*\)$/m)>-1) { - // Special case for explicit empty url - url = ""; - } else { - return whole_match; - } - } - } - - url = escapeCharacters(url,"*_"); - var result = ""; - - return result; -} - - -var _DoImages = function(text) { -// -// Turn Markdown image shortcuts into tags. -// - - // - // First, handle reference-style labeled images: ![alt text][id] - // - - /* - text = text.replace(/ - ( // wrap whole match in $1 - !\[ - (.*?) // alt text = $2 - \] - - [ ]? // one optional space - (?:\n[ ]*)? // one optional newline followed by spaces - - \[ - (.*?) // id = $3 - \] - )()()()() // pad rest of backreferences - /g,writeImageTag); - */ - text = text.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,writeImageTag); - - // - // Next, handle inline images: ![alt text](url "optional title") - // Don't forget: encode * and _ - - /* - text = text.replace(/ - ( // wrap whole match in $1 - !\[ - (.*?) // alt text = $2 - \] - \s? // One optional whitespace character - \( // literal paren - [ \t]* - () // no id, so leave $3 empty - ? // src url = $4 - [ \t]* - ( // $5 - (['"]) // quote char = $6 - (.*?) // title = $7 - \6 // matching quote - [ \t]* - )? // title is optional - \) - ) - /g,writeImageTag); - */ - text = text.replace(/(!\[(.*?)\]\s?\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeImageTag); - - return text; -} - -var writeImageTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) { - var whole_match = m1; - var alt_text = m2; - var link_id = m3.toLowerCase(); - var url = m4; - var title = m7; - - if (!title) title = ""; - - if (url == "") { - if (link_id == "") { - // lower-case and turn embedded newlines into spaces - link_id = alt_text.toLowerCase().replace(/ ?\n/g," "); - } - url = "#"+link_id; - - if (g_urls[link_id] != undefined) { - url = g_urls[link_id]; - if (g_titles[link_id] != undefined) { - title = g_titles[link_id]; - } - } - else { - return whole_match; - } - } - - alt_text = alt_text.replace(/"/g,"""); - url = escapeCharacters(url,"*_"); - var result = "\""" + _RunSpanGamut(m1) + "");}); - - text = text.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm, - function(matchFound,m1){return hashBlock("

        " + _RunSpanGamut(m1) + "

        ");}); - - // atx-style headers: - // # Header 1 - // ## Header 2 - // ## Header 2 with closing hashes ## - // ... - // ###### Header 6 - // - - /* - text = text.replace(/ - ^(\#{1,6}) // $1 = string of #'s - [ \t]* - (.+?) // $2 = Header text - [ \t]* - \#* // optional closing #'s (not counted) - \n+ - /gm, function() {...}); - */ - - text = text.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm, - function(wholeMatch,m1,m2) { - var h_level = m1.length; - return hashBlock("" + _RunSpanGamut(m2) + ""); - }); - - return text; -} - -// This declaration keeps Dojo compressor from outputting garbage: -var _ProcessListItems; - -var _DoLists = function(text) { -// -// Form HTML ordered (numbered) and unordered (bulleted) lists. -// - - // attacklab: add sentinel to hack around khtml/safari bug: - // http://bugs.webkit.org/show_bug.cgi?id=11231 - text += "~0"; - - // Re-usable pattern to match any entirel ul or ol list: - - /* - var whole_list = / - ( // $1 = whole list - ( // $2 - [ ]{0,3} // attacklab: g_tab_width - 1 - ([*+-]|\d+[.]) // $3 = first list item marker - [ \t]+ - ) - [^\r]+? - ( // $4 - ~0 // sentinel for workaround; should be $ - | - \n{2,} - (?=\S) - (?! // Negative lookahead for another list item marker - [ \t]* - (?:[*+-]|\d+[.])[ \t]+ - ) - ) - )/g - */ - var whole_list = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm; - - if (g_list_level) { - text = text.replace(whole_list,function(wholeMatch,m1,m2) { - var list = m1; - var list_type = (m2.search(/[*+-]/g)>-1) ? "ul" : "ol"; - - // Turn double returns into triple returns, so that we can make a - // paragraph for the last item in a list, if necessary: - list = list.replace(/\n{2,}/g,"\n\n\n");; - var result = _ProcessListItems(list); - - // Trim any trailing whitespace, to put the closing `` - // up on the preceding line, to get it past the current stupid - // HTML block parser. This is a hack to work around the terrible - // hack that is the HTML block parser. - result = result.replace(/\s+$/,""); - result = "<"+list_type+">" + result + "\n"; - return result; - }); - } else { - whole_list = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g; - text = text.replace(whole_list,function(wholeMatch,m1,m2,m3) { - var runup = m1; - var list = m2; - - var list_type = (m3.search(/[*+-]/g)>-1) ? "ul" : "ol"; - // Turn double returns into triple returns, so that we can make a - // paragraph for the last item in a list, if necessary: - var list = list.replace(/\n{2,}/g,"\n\n\n");; - var result = _ProcessListItems(list); - result = runup + "<"+list_type+">\n" + result + "\n"; - return result; - }); - } - - // attacklab: strip sentinel - text = text.replace(/~0/,""); - - return text; -} - -_ProcessListItems = function(list_str) { -// -// Process the contents of a single ordered or unordered list, splitting it -// into individual list items. -// - // The $g_list_level global keeps track of when we're inside a list. - // Each time we enter a list, we increment it; when we leave a list, - // we decrement. If it's zero, we're not in a list anymore. - // - // We do this because when we're not inside a list, we want to treat - // something like this: - // - // I recommend upgrading to version - // 8. Oops, now this line is treated - // as a sub-list. - // - // As a single paragraph, despite the fact that the second line starts - // with a digit-period-space sequence. - // - // Whereas when we're inside a list (or sub-list), that line will be - // treated as the start of a sub-list. What a kludge, huh? This is - // an aspect of Markdown's syntax that's hard to parse perfectly - // without resorting to mind-reading. Perhaps the solution is to - // change the syntax rules such that sub-lists must start with a - // starting cardinal number; e.g. "1." or "a.". - - g_list_level++; - - // trim trailing blank lines: - list_str = list_str.replace(/\n{2,}$/,"\n"); - - // attacklab: add sentinel to emulate \z - list_str += "~0"; - - /* - list_str = list_str.replace(/ - (\n)? // leading line = $1 - (^[ \t]*) // leading whitespace = $2 - ([*+-]|\d+[.]) [ \t]+ // list marker = $3 - ([^\r]+? // list item text = $4 - (\n{1,2})) - (?= \n* (~0 | \2 ([*+-]|\d+[.]) [ \t]+)) - /gm, function(){...}); - */ - list_str = list_str.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm, - function(wholeMatch,m1,m2,m3,m4){ - var item = m4; - var leading_line = m1; - var leading_space = m2; - - if (leading_line || (item.search(/\n{2,}/)>-1)) { - item = _RunBlockGamut(_Outdent(item)); - } - else { - // Recursion for sub-lists: - item = _DoLists(_Outdent(item)); - item = item.replace(/\n$/,""); // chomp(item) - item = _RunSpanGamut(item); - } - - return "
      5. " + item + "
      6. \n"; - } - ); - - // attacklab: strip sentinel - list_str = list_str.replace(/~0/g,""); - - g_list_level--; - return list_str; -} - - -var _DoCodeBlocks = function(text) { -// -// Process Markdown `
        ` blocks.
        -//
        -
        -  /*
        -    text = text.replace(text,
        -      /(?:\n\n|^)
        -      (               // $1 = the code block -- one or more lines, starting with a space/tab
        -        (?:
        -          (?:[ ]{4}|\t)     // Lines must start with a tab or a tab-width of spaces - attacklab: g_tab_width
        -          .*\n+
        -        )+
        -      )
        -      (\n*[ ]{0,3}[^ \t\n]|(?=~0))  // attacklab: g_tab_width
        -    /g,function(){...});
        -  */
        -
        -  // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
        -  text += "~0";
        -
        -  text = text.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,
        -    function(wholeMatch,m1,m2) {
        -      var codeblock = m1;
        -      var nextChar = m2;
        -
        -      codeblock = _EncodeCode( _Outdent(codeblock));
        -      codeblock = _Detab(codeblock);
        -      codeblock = codeblock.replace(/^\n+/g,""); // trim leading newlines
        -      codeblock = codeblock.replace(/\n+$/g,""); // trim trailing whitespace
        -
        -      codeblock = "
        " + codeblock + "\n
        "; - - return hashBlock(codeblock) + nextChar; - } - ); - - // attacklab: strip sentinel - text = text.replace(/~0/,""); - - return text; -} - -// -// Code Fencing is a GitHub flavored MD concept. Basically you can wrap -// your code like this: -// -// ```{language} -// {code} -// ``` -// -// Where {language} is the language of the code (useful for coloring code) -// and {code} is your code -// -var _DoCodeFencing = function(text) { - text = text.replace(/`{3}(?:(.*$)\n)?([\s\S]*?)`{3}/gm, - function(wholeMatch,m1,m2){ - //HTML for this is copied from GitHub directly for compatibility, except the lang="" attribute - var codeblock = '
        '+m2+'
        '; - return codeblock; - } - ) - return text; -} - -var hashBlock = function(text) { - text = text.replace(/(^\n+|\n+$)/g,""); - return "\n\n~K" + (g_html_blocks.push(text)-1) + "K\n\n"; -} - - -var _DoCodeSpans = function(text) { -// -// * Backtick quotes are used for spans. -// -// * You can use multiple backticks as the delimiters if you want to -// include literal backticks in the code span. So, this input: -// -// Just type ``foo `bar` baz`` at the prompt. -// -// Will translate to: -// -//

        Just type foo `bar` baz at the prompt.

        -// -// There's no arbitrary limit to the number of backticks you -// can use as delimters. If you need three consecutive backticks -// in your code, use four for delimiters, etc. -// -// * You can use spaces to get literal backticks at the edges: -// -// ... type `` `bar` `` ... -// -// Turns to: -// -// ... type `bar` ... -// - - /* - text = text.replace(/ - (^|[^\\]) // Character before opening ` can't be a backslash - (`+) // $2 = Opening run of ` - ( // $3 = The code block - [^\r]*? - [^`] // attacklab: work around lack of lookbehind - ) - \2 // Matching closer - (?!`) - /gm, function(){...}); - */ - - text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, - function(wholeMatch,m1,m2,m3,m4) { - var c = m3; - c = c.replace(/^([ \t]*)/g,""); // leading whitespace - c = c.replace(/[ \t]*$/g,""); // trailing whitespace - c = _EncodeCode(c); - return m1+""+c+""; - }); - - return text; -} - - -var _EncodeCode = function(text) { -// -// Encode/escape certain characters inside Markdown code runs. -// The point is that in code, these characters are literals, -// and lose their special Markdown meanings. -// - // Encode all ampersands; HTML entities are not - // entities within a Markdown code span. - text = text.replace(/&/g,"&"); - - // Do the angle bracket song and dance: - text = text.replace(//g,">"); - - // Now, escape characters that are magic in Markdown: - text = escapeCharacters(text,"\*_{}[]\\",false); - -// jj the line above breaks this: -//--- - -//* Item - -// 1. Subitem - -// special char: * -//--- - - return text; -} - - -var _DoItalicsAndBold = function(text) { - - // must go first: - text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, - "$2"); - - text = text.replace(/(\w)_(\w)/g, "$1~E95E$2") // ** GFM ** "~E95E" == escaped "_" - text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, - "$2"); - - return text; -} - - -var _DoBlockQuotes = function(text) { - - /* - text = text.replace(/ - ( // Wrap whole match in $1 - ( - ^[ \t]*>[ \t]? // '>' at the start of a line - .+\n // rest of the first line - (.+\n)* // subsequent consecutive lines - \n* // blanks - )+ - ) - /gm, function(){...}); - */ - - text = text.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm, - function(wholeMatch,m1) { - var bq = m1; - - // attacklab: hack around Konqueror 3.5.4 bug: - // "----------bug".replace(/^-/g,"") == "bug" - - bq = bq.replace(/^[ \t]*>[ \t]?/gm,"~0"); // trim one level of quoting - - // attacklab: clean up hack - bq = bq.replace(/~0/g,""); - - bq = bq.replace(/^[ \t]+$/gm,""); // trim whitespace-only lines - bq = _RunBlockGamut(bq); // recurse - - bq = bq.replace(/(^|\n)/g,"$1 "); - // These leading spaces screw with
         content, so we need to fix that:
        -      bq = bq.replace(
        -          /(\s*
        [^\r]+?<\/pre>)/gm,
        -        function(wholeMatch,m1) {
        -          var pre = m1;
        -          // attacklab: hack around Konqueror 3.5.4 bug:
        -          pre = pre.replace(/^  /mg,"~0");
        -          pre = pre.replace(/~0/g,"");
        -          return pre;
        -        });
        -
        -      return hashBlock("
        \n" + bq + "\n
        "); - }); - return text; -} - - -var _FormParagraphs = function(text) { -// -// Params: -// $text - string to process with html

        tags -// - - // Strip leading and trailing lines: - text = text.replace(/^\n+/g,""); - text = text.replace(/\n+$/g,""); - - var grafs = text.split(/\n{2,}/g); - var grafsOut = new Array(); - - // - // Wrap

        tags. - // - var end = grafs.length; - for (var i=0; i= 0) { - grafsOut.push(str); - } - else if (str.search(/\S/) >= 0) { - str = _RunSpanGamut(str); - str = str.replace(/\n/g,"
        "); // ** GFM ** - str = str.replace(/^([ \t]*)/g,"

        "); - str += "

        " - grafsOut.push(str); - } - - } - - // - // Unhashify HTML blocks - // - end = grafsOut.length; - for (var i=0; i= 0) { - var blockText = g_html_blocks[RegExp.$1]; - blockText = blockText.replace(/\$/g,"$$$$"); // Escape any dollar signs - grafsOut[i] = grafsOut[i].replace(/~K\d+K/,blockText); - } - } - - return grafsOut.join("\n\n"); -} - - -var _EncodeAmpsAndAngles = function(text) { -// Smart processing for ampersands and angle brackets that need to be encoded. - - // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin: - // http://bumppo.net/projects/amputator/ - text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"); - - // Encode naked <'s - text = text.replace(/<(?![a-z\/?\$!])/gi,"<"); - - return text; -} - - -var _EncodeBackslashEscapes = function(text) { -// -// Parameter: String. -// Returns: The string, with after processing the following backslash -// escape sequences. -// - - // attacklab: The polite way to do this is with the new - // escapeCharacters() function: - // - // text = escapeCharacters(text,"\\",true); - // text = escapeCharacters(text,"`*_{}[]()>#+-.!",true); - // - // ...but we're sidestepping its use of the (slow) RegExp constructor - // as an optimization for Firefox. This function gets called a LOT. - - text = text.replace(/\\(\\)/g,escapeCharacters_callback); - text = text.replace(/\\([`*_{}\[\]()>#+-.!])/g,escapeCharacters_callback); - return text; -} - - -var _DoAutoLinks = function(text) { - - text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"
        $1"); - - // Email addresses: - - /* - text = text.replace(/ - < - (?:mailto:)? - ( - [-.\w]+ - \@ - [-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+ - ) - > - /gi, _DoAutoLinks_callback()); - */ - text = text.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi, - function(wholeMatch,m1) { - return _EncodeEmailAddress( _UnescapeSpecialChars(m1) ); - } - ); - - return text; -} - - -var _EncodeEmailAddress = function(addr) { -// -// Input: an email address, e.g. "foo@example.com" -// -// Output: the email address as a mailto link, with each character -// of the address encoded as either a decimal or hex entity, in -// the hopes of foiling most address harvesting spam bots. E.g.: -// -// foo -// @example.com -// -// Based on a filter by Matthew Wickline, posted to the BBEdit-Talk -// mailing list: -// - - // attacklab: why can't javascript speak hex? - function char2hex(ch) { - var hexDigits = '0123456789ABCDEF'; - var dec = ch.charCodeAt(0); - return(hexDigits.charAt(dec>>4) + hexDigits.charAt(dec&15)); - } - - var encode = [ - function(ch){return "&#"+ch.charCodeAt(0)+";";}, - function(ch){return "&#x"+char2hex(ch)+";";}, - function(ch){return ch;} - ]; - - addr = "mailto:" + addr; - - addr = addr.replace(/./g, function(ch) { - if (ch == "@") { - // this *must* be encoded. I insist. - ch = encode[Math.floor(Math.random()*2)](ch); - } else if (ch !=":") { - // leave ':' alone (to spot mailto: later) - var r = Math.random(); - // roughly 10% raw, 45% hex, 45% dec - ch = ( - r > .9 ? encode[2](ch) : - r > .45 ? encode[1](ch) : - encode[0](ch) - ); - } - return ch; - }); - - addr = "" + addr + ""; - addr = addr.replace(/">.+:/g,"\">"); // strip the mailto: from the visible part - - return addr; -} - - -var _UnescapeSpecialChars = function(text) { -// -// Swap back in all the special characters we've hidden. -// - text = text.replace(/~E(\d+)E/g, - function(wholeMatch,m1) { - var charCodeToReplace = parseInt(m1); - return String.fromCharCode(charCodeToReplace); - } - ); - return text; -} - - -var _Outdent = function(text) { -// -// Remove one level of line-leading tabs or spaces -// - - // attacklab: hack around Konqueror 3.5.4 bug: - // "----------bug".replace(/^-/g,"") == "bug" - - text = text.replace(/^(\t|[ ]{1,4})/gm,"~0"); // attacklab: g_tab_width - - // attacklab: clean up hack - text = text.replace(/~0/g,"") - - return text; -} - -var _Detab = function(text) { -// attacklab: Detab's completely rewritten for speed. -// In perl we could fix it by anchoring the regexp with \G. -// In javascript we're less fortunate. - - // expand first n-1 tabs - text = text.replace(/\t(?=\t)/g," "); // attacklab: g_tab_width - - // replace the nth with two sentinels - text = text.replace(/\t/g,"~A~B"); - - // use the sentinel to anchor our regex so it doesn't explode - text = text.replace(/~B(.+?)~A/g, - function(wholeMatch,m1,m2) { - var leadingText = m1; - var numSpaces = 4 - leadingText.length % 4; // attacklab: g_tab_width - - // there *must* be a better way to do this: - for (var i=0; i= 0; i-- ) { - if ( 'undefined' === typeof Array.indexOf && -1 !== localStorage.key(i).indexOf( 'garlic:' ) ) { - localStorage.removeItem( localStorage.key(i) ); - } - } - - return 'function' === typeof fn ? fn() : true; - } - - , clear: function ( fn ) { - localStorage.clear(); - return 'function' === typeof fn ? fn() : true; - } - } - - /* GARLIC PUBLIC CLASS DEFINITION - * =============================== */ - - var Garlic = function ( element, storage, options ) { - this.init( 'garlic', element, storage, options ); - } - - Garlic.prototype = { - - constructor: Garlic - - /* init data, bind jQuery on() actions */ - , init: function ( type, element, storage, options ) { - this.type = type; - this.$element = $( element ); - this.options = this.getOptions( options ); - this.storage = storage; - this.path = this.options.getPath( this.$element ) || this.getPath(); - this.parentForm = this.$element.closest( 'form' ); - this.$element.addClass('garlic-auto-save'); - this.expiresFlag = !this.options.expires ? false : ( this.$element.data( 'expires' ) ? this.path : this.getPath( this.parentForm ) ) + '_flag' ; - - // bind garlic events - this.$element.on( this.options.events.join( '.' + this.type + ' ') , false, $.proxy( this.persist, this ) ); - - if ( this.options.destroy ) { - $( this.parentForm ).on( 'submit reset' , false, $.proxy( this.destroy, this ) ); - } - - // retrieve garlic persisted data - this.retrieve(); - } - - , getOptions: function ( options ) { - return $.extend( {}, $.fn[this.type].defaults, options, this.$element.data() ); - } - - /* temporary store data / state in localStorage */ - , persist: function () { - - // some binded events are redundant (change & paste for example), persist only once by field val - if ( this.val === this.getVal() ) { - return; - } - - this.val = this.getVal(); - - // if auto-expires is enabled, set the expiration date for future auto-deletion - if ( this.options.expires ) { - this.storage.set( this.expiresFlag , ( new Date().getTime() + this.options.expires * 1000 ).toString() ); - } - - this.storage.set( this.path , this.getVal() ); - } - - , getVal: function () { - return !this.$element.is( 'input[type=checkbox]' ) ? this.$element.val() : ( this.$element.prop( 'checked' ) ? 'checked' : 'unchecked' ); - } - - /* retrieve localStorage data / state and update elem accordingly */ - , retrieve: function () { - if ( this.storage.has( this.path ) ) { - - // if data expired, destroy it! - if ( this.options.expires ) { - var date = new Date().getTime(); - if ( this.storage.get( this.expiresFlag ) < date.toString() ) { - this.storage.destroy( this.path ); - return; - } else { - this.$element.attr( 'expires-in', Math.floor( ( parseInt( this.storage.get( this.expiresFlag ) ) - date ) / 1000 ) ); - } - } - - var storedValue = this.storage.get( this.path ); - - // if conflictManager enabled, manage fields with already provided data, different from the one stored - if ( this.options.conflictManager.enabled && this.detectConflict() ) { - return this.conflictManager(); - } - - // input[type=checkbox] and input[type=radio] have a special checked / unchecked behavior - if ( this.$element.is( 'input[type=radio], input[type=checkbox]' ) ) { - - // for checkboxes and radios - if ( 'checked' === storedValue || this.$element.val() === storedValue ) { - return this.$element.attr( 'checked', true ); - - // only needed for checkboxes - } else if ( 'unchecked' === storedValue ) { - this.$element.attr( 'checked', false ); - } - - return; - } - - // for input[type=text], select and textarea, just set val() - this.$element.val( storedValue ); - - // trigger custom user function when data is retrieved - this.options.onRetrieve( this.$element, storedValue ); - - return; - } - } - - /* there is a conflict when initial data / state differs from persisted data / state */ - , detectConflict: function() { - var self = this; - - // radio buttons and checkboxes are yet not supported - if ( this.$element.is( 'input[type=checkbox], input[type=radio]' ) ) { - return false; - } - - // there is a default not null value and we have a different one stored - if ( this.$element.val() && this.storage.get( this.path ) !== this.$element.val() ) { - - // for select elements, we need to check if there is a default checked value - if ( this.$element.is( 'select' ) ) { - var selectConflictDetected = false; - - // foreach each options except first one, always considered as selected, seeking for a default selected one - this.$element.find( 'option' ).each( function () { - if ( $( this ).index() !== 0 && $( this ).attr( 'selected' ) && $( this ).val() !== self.storage.get( this.path ) ) { - selectConflictDetected = true; - return; - } - }); - - return selectConflictDetected; - } - - return true; - } - - return false; - } - - /* manage here the conflict, show default value depending on options.garlicPriority value */ - , conflictManager: function () { - - // user can define here a custom function that could stop Garlic default behavior, if returns false - if ( 'function' === typeof this.options.conflictManager.onConflictDetected - && !this.options.conflictManager.onConflictDetected( this.$element, this.storage.get( this.path ) ) ) { - return false; - } - - if ( this.options.conflictManager.garlicPriority ) { - this.$element.data( 'swap-data', this.$element.val() ); - this.$element.data( 'swap-state', 'garlic' ); - this.$element.val( this.storage.get( this.path ) ); - } else { - this.$element.data( 'swap-data', this.storage.get( this.path ) ); - this.$element.data( 'swap-state', 'default' ); - } - - this.swapHandler(); - this.$element.addClass( 'garlic-conflict-detected' ); - this.$element.closest( 'input[type=submit]' ).attr( 'disabled', true ); - } - - /* manage swap user interface */ - , swapHandler: function () { - var swapChoiceElem = $( this.options.conflictManager.template ); - this.$element.after( swapChoiceElem.text( this.options.conflictManager.message ) ); - swapChoiceElem.on( 'click', false, $.proxy( this.swap, this ) ); - } - - /* swap data / states for conflicted elements */ - , swap: function () { - var val = this.$element.data( 'swap-data' ); - this.$element.data( 'swap-state', 'garlic' === this.$element.data( 'swap-state' ) ? 'default' : 'garlic' ); - this.$element.data( 'swap-data', this.$element.val()); - $( this.$element ).val( val ); - } - - /* delete localStorage persistance only */ - , destroy: function () { - this.storage.destroy( this.path ); - } - - /* remove data / reset state AND delete localStorage */ - , remove: function () { - this.remove(); - - if ( this.$element.is( 'input[type=radio], input[type=checkbox]' ) ) { - $( this.$element ).prop( 'checked', false ); - return; - } - - this.$element.val( '' ); - } - - /* retuns an unique identifier for form elements, depending on their behaviors: - * radio buttons: domain > pathname > form.[:eq(x)] > input. - no eq(); must be all stored under the same field name inside the same form - - * checkbokes: domain > pathname > form.[:eq(x)] > [fieldset, div, span..] > input.[:eq(y)] - cuz' they have the same name, must detect their exact position in the form. detect the exact hierarchy in DOM elements - - * other inputs: domain > pathname > form.[:eq(x)] > input.[:eq(y)] - we just need the element name / eq() inside a given form - */ - , getPath: function ( elem ) { - - if ( 'undefined' === typeof elem ) { - elem = this.$element; - } - - if ( this.options.getPath( elem ) ) { - return this.options.getPath( elem ); - } - - // Requires one element. - if ( elem.length != 1 ) { - return false; - } - - var path = '' - , fullPath = elem.is( 'input[type=checkbox]' ) - , node = elem; - - while ( node.length ) { - var realNode = node[0] - , name = realNode.nodeName; - - if ( !name ) { - break; - } - - name = name.toLowerCase(); - - var parent = node.parent() - , siblings = parent.children( name ); - - // don't need to pollute path with select, fieldsets, divs and other noisy elements, - // exept for checkboxes that need exact path, cuz have same name and sometimes same eq()! - if ( !$( realNode ).is( 'form, input, select, textarea' ) && !fullPath ) { - node = parent; - continue; - } - - // set input type as name + name attr if exists - name += $( realNode ).attr( 'name' ) ? '.' + $( realNode ).attr( 'name' ) : ''; - - // if has sibilings, get eq(), exept for radio buttons - if ( siblings.length > 1 && !$( realNode ).is( 'input[type=radio]' ) ) { - name += ':eq(' + siblings.index( realNode ) + ')'; - } - - path = name + ( path ? '>' + path : '' ); - - // break once we came up to form:eq(x), no need to go further - if ( 'form' == realNode.nodeName.toLowerCase() ) { - break; - } - - node = parent; - } - - return 'garlic:' + document.domain + ( this.options.domain ? '*' : window.location.pathname ) + '>' + path; - } - - , getStorage: function () { - return this.storage; - } - } - - /* GARLIC PLUGIN DEFINITION - * ========================= */ - - $.fn.garlic = function ( option, fn ) { - var options = $.extend(true, {}, $.fn.garlic.defaults, option, this.data() ) - , storage = new Storage() - , returnValue = false; - - // this plugin heavily rely on local Storage. If there is no localStorage or data-storage=false, no need to go further - if ( !storage.defined ) { - return false; - } - - function bind ( self ) { - var $this = $( self ) - , data = $this.data( 'garlic' ) - , fieldOptions = $.extend( {}, options, $this.data() ); - - // don't bind an elem with data-storage=false - if ( 'undefined' !== typeof fieldOptions.storage && !fieldOptions.storage ) { - return; - } - - // don't bind a password type field - if ( 'password' === $( self ).attr( 'type' ) ) { - return; - } - - // if data never binded, bind it right now! - if ( !data ) { - $this.data( 'garlic', ( data = new Garlic( self, storage, fieldOptions ) ) ); - } - - // here is our garlic public function accessor, currently does not support args - if ( 'string' === typeof option && 'function' === typeof data[option] ) { - return data[option](); - } - } - - // loop through every elemt we want to garlic - this.each(function () { - - // if a form elem is given, bind all its input children - if ( $( this ).is( 'form' ) ) { - $( this ).find( options.inputs ).each( function () { - returnValue = bind( $( this ) ); - }); - - // if it is a Garlic supported single element, bind it too - // add here a return instance, cuz' we could call public methods on single elems with data[option]() above - } else if ( $( this ).is( options.inputs ) ) { - returnValue = bind( $( this ) ); - } - }); - - return 'function' === typeof fn ? fn() : returnValue; - } - - /* GARLIC CONFIGS & OPTIONS - * ========================= */ - $.fn.garlic.Constructor = Garlic; - - $.fn.garlic.defaults = { - destroy: true // Remove or not localstorage on submit & clear - , inputs: 'input, textarea, select' // Default supported inputs. - , events: [ 'DOMAttrModified', 'textInput', 'input', 'change', 'click', 'keypress', 'paste', 'focus' ] // Events list that trigger a localStorage - , domain: false // Store et retrieve forms data accross all domain, not just on - , expires: false // false for no expiration, otherwise (int) in seconds for auto-expiration - , conflictManager: { - enabled: false // Manage default data and persisted data. If false, persisted data will always replace default ones - , garlicPriority: true // If form have default data, garlic persisted data will be shown first - , template: '' // Template used to swap between values if conflict detected - , message: 'This is your saved data. Click here to see default one' // Default message for swapping data / state - , onConflictDetected: function ( $item, storedVal ) { return true; } // This function will be triggered if a conflict is detected on an item. Return true if you want Garlic behavior, return false if you want to override it - } - , getPath: function ( $item ) {} // Set your own key-storing strategy per field - , onRetrieve: function ( $item, storedVal ) {} // This function will be triggered each time Garlic find an retrieve a local stored data for a field - } - - /* GARLIC DATA-API - * =============== */ - $( window ).on( 'load', function () { - $( '[data-persist="garlic"]' ).each( function () { - $(this).garlic(); - }) - }); - -// This plugin works with jQuery or Zepto (with data extension builded for Zepto. See changelog 0.0.6) -}(window.jQuery || window.Zepto); diff --git a/public/javascripts/vendor/google-code-prettify/lang-apollo.js b/public/javascripts/vendor/google-code-prettify/lang-apollo.js deleted file mode 100755 index 99e4a97a5..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-apollo.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, -null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-basic.js b/public/javascripts/vendor/google-code-prettify/lang-basic.js deleted file mode 100755 index 6b784d436..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-basic.js +++ /dev/null @@ -1,3 +0,0 @@ -var a=null; -PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\r"\\]|\\.)*(?:"|$)/,a,'"'],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^REM[^\n\r]*/,a],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,a],["pln",/^[a-z][^\W_]?(?:\$|%)?/i,a],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i,a,"0123456789"],["pun", -/^.[^\s\w"$%.]*/,a]]),["basic","cbm"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-clj.js b/public/javascripts/vendor/google-code-prettify/lang-clj.js deleted file mode 100755 index 1bb539cd4..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-clj.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - Copyright (C) 2011 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -var a=null; -PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a], -["typ",/^:[\dA-Za-z-]+/]]),["clj"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-css.js b/public/javascripts/vendor/google-code-prettify/lang-css.js deleted file mode 100755 index d7a4640c7..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-css.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n\u000c"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]+)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//], -["com",/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}\b/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-dart.js b/public/javascripts/vendor/google-code-prettify/lang-dart.js deleted file mode 100755 index eefccc914..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-dart.js +++ /dev/null @@ -1,3 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["com",/^#!.*/],["kwd",/^\b(?:import|library|part of|part|as|show|hide)\b/i],["com",/^\/\/.*/],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["kwd",/^\b(?:class|interface)\b/i],["kwd",/^\b(?:assert|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|this|throw|try|while)\b/i],["kwd",/^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i], -["typ",/^\b(?:bool|double|dynamic|int|num|object|string|void)\b/i],["kwd",/^\b(?:false|null|true)\b/i],["str",/^r?'''[\S\s]*?[^\\]'''/],["str",/^r?"""[\S\s]*?[^\\]"""/],["str",/^r?'('|[^\n\f\r]*?[^\\]')/],["str",/^r?"("|[^\n\f\r]*?[^\\]")/],["pln",/^[$_a-z]\w*/i],["pun",/^[!%&*+/:<-?^|~-]/],["lit",/^\b0x[\da-f]+/i],["lit",/^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],["lit",/^\b\.\d+(?:e[+-]?\d+)?/i],["pun",/^[(),.;[\]{}]/]]), -["dart"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-erlang.js b/public/javascripts/vendor/google-code-prettify/lang-erlang.js deleted file mode 100755 index 27214a50f..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-erlang.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["lit",/^[a-z]\w*/],["lit",/^'(?:[^\n\f\r'\\]|\\[^&])+'?/,null,"'"],["lit",/^\?[^\t\n ({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/], -["kwd",/^-[_a-z]+/],["typ",/^[A-Z_]\w*/],["pun",/^[,.;]/]]),["erlang","erl"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-go.js b/public/javascripts/vendor/google-code-prettify/lang-go.js deleted file mode 100755 index 1caca2318..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-go.js +++ /dev/null @@ -1 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-hs.js b/public/javascripts/vendor/google-code-prettify/lang-hs.js deleted file mode 100755 index ff3729bbe..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-hs.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, -null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-lisp.js b/public/javascripts/vendor/google-code-prettify/lang-lisp.js deleted file mode 100755 index 9c8cfa576..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-lisp.js +++ /dev/null @@ -1,3 +0,0 @@ -var a=null; -PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a], -["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-llvm.js b/public/javascripts/vendor/google-code-prettify/lang-llvm.js deleted file mode 100755 index 16fade29f..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-llvm.js +++ /dev/null @@ -1 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^!?"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["com",/^;[^\n\r]*/,null,";"]],[["pln",/^[!%@](?:[$\-.A-Z_a-z][\w$\-.]*|\d+)/],["kwd",/^[^\W\d]\w*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[Xx][\dA-Fa-f]+)/],["pun",/^[(-*,:<->[\]{}]|\.\.\.$/]]),["llvm","ll"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-lua.js b/public/javascripts/vendor/google-code-prettify/lang-lua.js deleted file mode 100755 index 7e44cca0a..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-lua.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i], -["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-matlab.js b/public/javascripts/vendor/google-code-prettify/lang-matlab.js deleted file mode 100755 index d0d35164f..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-matlab.js +++ /dev/null @@ -1,6 +0,0 @@ -var a=null,b=window.PR,c=[[b.PR_PLAIN,/^[\t-\r \xa0]+/,a," \t\r\n\u000b\u000c\u00a0"],[b.PR_COMMENT,/^%{[^%]*%+(?:[^%}][^%]*%+)*}/,a],[b.PR_COMMENT,/^%[^\n\r]*/,a,"%"],["syscmd",/^![^\n\r]*/,a,"!"]],d=[["linecont",/^\.\.\.\s*[\n\r]/,a],["err",/^\?\?\? [^\n\r]*/,a],["wrn",/^Warning: [^\n\r]*/,a],["codeoutput",/^>>\s+/,a],["codeoutput",/^octave:\d+>\s+/,a],["lang-matlab-operators",/^((?:[A-Za-z]\w*(?:\.[A-Za-z]\w*)*|[).\]}])')/,a],["lang-matlab-identifiers",/^([A-Za-z]\w*(?:\.[A-Za-z]\w*)*)(?!')/,a], -[b.PR_STRING,/^'(?:[^']|'')*'/,a],[b.PR_LITERAL,/^[+-]?\.?\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?[ij]?/,a],[b.PR_TAG,/^[()[\]{}]/,a],[b.PR_PUNCTUATION,/^[!&*-/:->@\\^|~]/,a]],e=[["lang-matlab-identifiers",/^([A-Za-z]\w*(?:\.[A-Za-z]\w*)*)/,a],[b.PR_TAG,/^[()[\]{}]/,a],[b.PR_PUNCTUATION,/^[!&*-/:->@\\^|~]/,a],["transpose",/^'/,a]]; -b.registerLangHandler(b.createSimpleLexer([],[[b.PR_KEYWORD,/^\b(?:break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while)\b/,a],["const",/^\b(?:true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout)\b/,a],[b.PR_TYPE,/^\b(?:cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse)\b/,a],["fun",/^\b(?:abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan[2dh]?|audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|bessel[h-ky]|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:.(?:close|closeVar|computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers.Map|contour(?:[3cf]|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab.io.MatFile|matlab.mixin.(?:Copyable|Heterogeneous(?:.getDefaultScalarElement)?)|matlabrc|matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta.(?:class(?:.fromName)?|DynamicProperty|EnumeratedValue|event|MetaData|method|package(?:.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|ncwriteschema|ndgrid|ndims|ne|NET(?:.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|NetException|setStaticProperty))?|netcdf.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:.(?:create|getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:.isPlatformSupported)?|VideoWriter(?:.getProfiles)?|view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|ylabel|ylim|zeros|zip|zlabel|zlim|zoom)\b/, -a],["fun_tbx",/^\b(?:addedvarplot|andrewsplot|anova[12n]|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|cholcov|Classification(?:BaggedEnsemble|Discriminant(?:.(?:fit|make|template))?|Ensemble|KNN(?:.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:.fit)?|geo(?:cdf|inv|mean|pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|LinearModel(?:.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:.fit)?|nan(?:cov|max|mean|median|min|std|sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|template))?)|regstats|relieff|ridge|robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztest)\b/, -a],["fun_tbx",/^\b(?:adapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|reflect|regionprops|registration.metric.(?:MattesMutualInformation|MeanSquares)|registration.optimizer.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb)\b/, -a],["fun_tbx",/^\b(?:bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog)\b/,a],["ident",/^[A-Za-z]\w*(?:\.[A-Za-z]\w*)*/,a]]),["matlab-identifiers"]);b.registerLangHandler(b.createSimpleLexer([],e),["matlab-operators"]);b.registerLangHandler(b.createSimpleLexer(c,d),["matlab"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-ml.js b/public/javascripts/vendor/google-code-prettify/lang-ml.js deleted file mode 100755 index 8ed2b0ce5..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-ml.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], -["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-mumps.js b/public/javascripts/vendor/google-code-prettify/lang-mumps.js deleted file mode 100755 index 8a6b3fd69..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-mumps.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"]|\\.)*"/,null,'"']],[["com",/^;[^\n\r]*/,null,";"],["dec",/^\$(?:d|device|ec|ecode|es|estack|et|etrap|h|horolog|i|io|j|job|k|key|p|principal|q|quit|st|stack|s|storage|sy|system|t|test|tl|tlevel|tr|trestart|x|y|z[a-z]*|a|ascii|c|char|d|data|e|extract|f|find|fn|fnumber|g|get|j|justify|l|length|na|name|o|order|p|piece|ql|qlength|qs|qsubscript|q|query|r|random|re|reverse|s|select|st|stack|t|text|tr|translate|nan)\b/i, -null],["kwd",/^(?:[^$]b|break|c|close|d|do|e|else|f|for|g|goto|h|halt|h|hang|i|if|j|job|k|kill|l|lock|m|merge|n|new|o|open|q|quit|r|read|s|set|tc|tcommit|tre|trestart|tro|trollback|ts|tstart|u|use|v|view|w|write|x|xecute)\b/i,null],["lit",/^[+-]?(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?/i],["pln",/^[a-z][^\W_]*/i],["pun",/^[^\w\t\n\r"$%;^\xa0]|_/]]),["mumps"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-n.js b/public/javascripts/vendor/google-code-prettify/lang-n.js deleted file mode 100755 index 27812a585..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-n.js +++ /dev/null @@ -1,4 +0,0 @@ -var a=null; -PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/, -a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, -a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-pascal.js b/public/javascripts/vendor/google-code-prettify/lang-pascal.js deleted file mode 100755 index 8435fad34..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-pascal.js +++ /dev/null @@ -1,3 +0,0 @@ -var a=null; -PR.registerLangHandler(PR.createSimpleLexer([["str",/^'(?:[^\n\r'\\]|\\.)*(?:'|$)/,a,"'"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^\(\*[\S\s]*?(?:\*\)|$)|^{[\S\s]*?(?:}|$)/,a],["kwd",/^(?:absolute|and|array|asm|assembler|begin|case|const|constructor|destructor|div|do|downto|else|end|external|for|forward|function|goto|if|implementation|in|inline|interface|interrupt|label|mod|not|object|of|or|packed|procedure|program|record|repeat|set|shl|shr|then|to|type|unit|until|uses|var|virtual|while|with|xor)\b/i,a], -["lit",/^(?:true|false|self|nil)/i,a],["pln",/^[a-z][^\W_]*/i,a],["lit",/^(?:\$[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)/i,a,"0123456789"],["pun",/^.[^\s\w$'./@]*/,a]]),["pascal"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-proto.js b/public/javascripts/vendor/google-code-prettify/lang-proto.js deleted file mode 100755 index f006ad8cf..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-proto.js +++ /dev/null @@ -1 +0,0 @@ -PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-r.js b/public/javascripts/vendor/google-code-prettify/lang-r.js deleted file mode 100755 index 99af8f859..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-r.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])/],["lit",/^0[Xx][\dA-Fa-f]+([Pp]\d+)?[Li]?/],["lit",/^[+-]?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|\d+))(?![\w.])/], -["pun",/^(?:<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\]{}])/],["pln",/^(?:[A-Za-z]+[\w.]*|\.[^\W\d][\w.]*)(?![\w.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-rd.js b/public/javascripts/vendor/google-code-prettify/lang-rd.js deleted file mode 100755 index 7a7e43fd5..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-rd.js +++ /dev/null @@ -1 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["lit",/^\\(?:cr|l?dots|R|tab)\b/],["kwd",/^\\[@-Za-z]+/],["kwd",/^#(?:ifn?def|endif)/],["pln",/^\\[{}]/],["pun",/^[()[\]{}]+/]]),["Rd","rd"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-scala.js b/public/javascripts/vendor/google-code-prettify/lang-scala.js deleted file mode 100755 index 3f97dba56..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-scala.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/], -["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-sql.js b/public/javascripts/vendor/google-code-prettify/lang-sql.js deleted file mode 100755 index 8ec4280b8..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-sql.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|apply|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|connect|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|following|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|matched|merge|natural|national|nocheck|nonclustered|nocycle|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|partition|percent|pivot|plan|preceding|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rows?|rule|save|schema|select|session_user|set|setuser|shutdown|some|start|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|unbounded|union|unique|unpivot|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|within|writetext|xml)(?=[^\w-]|$)/i, -null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-tcl.js b/public/javascripts/vendor/google-code-prettify/lang-tcl.js deleted file mode 100755 index 490f562c2..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-tcl.js +++ /dev/null @@ -1,3 +0,0 @@ -var a=null; -PR.registerLangHandler(PR.createSimpleLexer([["opn",/^{+/,a,"{"],["clo",/^}+/,a,"}"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/,a],["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit", -/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["tcl"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-tex.js b/public/javascripts/vendor/google-code-prettify/lang-tex.js deleted file mode 100755 index dcfdadd02..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-tex.js +++ /dev/null @@ -1 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-vb.js b/public/javascripts/vendor/google-code-prettify/lang-vb.js deleted file mode 100755 index ddde4643b..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-vb.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"\u201c\u201d'],["com",/^['\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\n\r_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i, -null],["com",/^rem\b.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[!#%&@]+])?|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-vhdl.js b/public/javascripts/vendor/google-code-prettify/lang-vhdl.js deleted file mode 100755 index 51f301703..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-vhdl.js +++ /dev/null @@ -1,3 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, -null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i], -["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-wiki.js b/public/javascripts/vendor/google-code-prettify/lang-wiki.js deleted file mode 100755 index 96c1e34fb..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-wiki.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]); -PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-xq.js b/public/javascripts/vendor/google-code-prettify/lang-xq.js deleted file mode 100755 index e323ae323..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-xq.js +++ /dev/null @@ -1,3 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["var pln",/^\$[\w-]+/,null,"$"]],[["pln",/^[\s=][<>][\s=]/],["lit",/^@[\w-]+/],["tag",/^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["com",/^\(:[\S\s]*?:\)/],["pln",/^[(),/;[\]{}]$/],["str",/^(?:"(?:[^"\\{]|\\[\S\s])*(?:"|$)|'(?:[^'\\{]|\\[\S\s])*(?:'|$))/,null,"\"'"],["kwd",/^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\b/], -["typ",/^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\b/,null],["fun pln",/^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\b/], -["pln",/^[\w:-]+/],["pln",/^[\t\n\r \xa0]+/]]),["xq","xquery"]); diff --git a/public/javascripts/vendor/google-code-prettify/lang-yaml.js b/public/javascripts/vendor/google-code-prettify/lang-yaml.js deleted file mode 100755 index c38729b6c..000000000 --- a/public/javascripts/vendor/google-code-prettify/lang-yaml.js +++ /dev/null @@ -1,2 +0,0 @@ -var a=null; -PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); diff --git a/public/javascripts/vendor/google-code-prettify/prettify.js b/public/javascripts/vendor/google-code-prettify/prettify.js deleted file mode 100755 index 7b990496d..000000000 --- a/public/javascripts/vendor/google-code-prettify/prettify.js +++ /dev/null @@ -1,30 +0,0 @@ -!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; -(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a= -b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;ah[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, -q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com", -/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+ -s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/, -q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d= -c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"], -O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, -V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", -/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/], -["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}), -["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q, -hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]); -p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="
        "+a+"
        ";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1}); -return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i=0;){var M=A[m],T=M.src.match(/^[^#?]*\/run_prettify\.js(\?[^#]*)?(?:#.*)?$/);if(T){z=T[1]||"";M.parentNode.removeChild(M);break}}var S=!0,D= -[],N=[],K=[];z.replace(/[&?]([^&=]+)=([^&]+)/g,function(e,j,w){w=decodeURIComponent(w);j=decodeURIComponent(j);j=="autorun"?S=!/^[0fn]/i.test(w):j=="lang"?D.push(w):j=="skin"?N.push(w):j=="callback"&&K.push(w)});m=0;for(z=D.length;m122||(o<65||k>90||f.push([Math.max(65,k)|32,Math.min(o,90)|32]),o<97||k>122||f.push([Math.max(97,k)&-33,Math.min(o,122)&-33]))}}f.sort(function(f,a){return f[0]- -a[0]||a[1]-f[1]});b=[];g=[];for(a=0;ak[0]&&(k[1]+1>k[0]&&c.push("-"),c.push(h(k[1])));c.push("]");return c.join("")}function e(f){for(var a=f.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],g=0,k=0;g=2&&f==="["?a[g]=b(o):f!=="\\"&&(a[g]=o.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var j=0,F=!1,l=!1,I=0,c=a.length;I=5&&"lang-"===y.substring(0,5))&&!(u&&typeof u[1]==="string"))g=!1,y="src";g||(m[B]=y)}k=c;c+=B.length;if(g){g=u[1];var o=B.indexOf(g),H=o+g.length;u[2]&&(H=B.length-u[2].length,o=H-g.length);y=y.substring(5);n(l+k,B.substring(0,o),h,j);n(l+k+o,g,A(y, -g),j);n(l+k+H,B.substring(H),h,j)}else j.push(l+k,y)}a.g=j}var b={},e;(function(){for(var h=a.concat(d),l=[],i={},c=0,p=h.length;c=0;)b[q.charAt(f)]=m;m=m[1];q=""+m;i.hasOwnProperty(q)||(l.push(m),i[q]=r)}l.push(/[\S\s]/);e=j(l)})();var i=d.length;return h}function t(a){var d=[],h=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/, -r,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,r,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,r,"\"'"]);a.verbatimStrings&&h.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,r]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,r,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/, -r,"#"]),h.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,r])):d.push(["com",/^#[^\n\r]*/,r,"#"]));a.cStyleComments&&(h.push(["com",/^\/\/[^\n\r]*/,r]),h.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,r]));if(b=a.regexLiterals){var e=(b=b>1?"":"\n\r")?".":"[\\S\\s]";h.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+ -("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+e+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+e+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&h.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&h.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),r]);d.push(["pln",/^\s+/,r," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");h.push(["lit",/^@[$_a-z][\w$@]*/i,r],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,r],["pln",/^[$_a-z][\w$@]*/i,r],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i, -r,"0123456789"],["pln",/^\\[\S\s]?/,r],["pun",RegExp(b),r]);return C(d,h)}function z(a,d,h){function b(a){var c=a.nodeType;if(c==1&&!j.test(a.className))if("br"===a.nodeName)e(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&h){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(l.createTextNode(d),a.nextSibling),e(a),c||a.parentNode.removeChild(a)}} -function e(a){function b(a,c){var d=c?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),h=a.nextSibling;f.appendChild(d);for(var e=h;e;e=h)h=e.nextSibling,f.appendChild(e)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var j=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,l=a.ownerDocument,i=l.createElement("li");a.firstChild;)i.appendChild(a.firstChild);for(var c=[i],p=0;p=0;){var b=d[h];U.hasOwnProperty(b)?V.console&&console.warn("cannot override language handler %s",b):U[b]=a}}function A(a,d){if(!a||!U.hasOwnProperty(a))a=/^\s*=o&&(b+=2);h>=H&&(t+=2)}}finally{if(g)g.style.display=k}}catch(v){V.console&&console.log(v&&v.stack||v)}}var V=window,G=["break,continue,do,else,for,if,return,while"],O=[[G,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],J=[O,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],K=[O,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"], -L=[K,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],O=[O,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],M=[G,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -N=[G,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],R=[G,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],G=[G,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Q=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, -S=/\S/,T=t({keywords:[J,L,O,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",M,N,G],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={};i(T,["default-code"]);i(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", -/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);i(C([["pln",/^\s+/,r," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,r,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/], -["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);i(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);i(t({keywords:J,hashComments:!0,cStyleComments:!0,types:Q}),["c","cc","cpp","cxx","cyc","m"]);i(t({keywords:"null,true,false"}),["json"]);i(t({keywords:L,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Q}), -["cs"]);i(t({keywords:K,cStyleComments:!0}),["java"]);i(t({keywords:G,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);i(t({keywords:M,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);i(t({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);i(t({keywords:N, -hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);i(t({keywords:O,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);i(t({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);i(t({keywords:R,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]); -i(C([],[["str",/^[\S\s]+/]]),["regex"]);var X=V.PR={createSimpleLexer:C,registerLangHandler:i,sourceDecorator:t,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:function(a,d,e){var b=document.createElement("div");b.innerHTML="
        "+a+"
        ";b=b.firstChild;e&&z(b,e,!0);D({h:d,j:e,c:b,i:1});return b.innerHTML}, -prettyPrint:e=e=function(a,d){function e(){for(var b=V.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p=0)&&i(t,!a)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
        ",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("
        ").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(t){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=t.pageX,l=t.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.lefti[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var s=e(this).data("ui-draggable"),n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,a))})},stop:function(t,i){var s=e(this).data("ui-draggable"),n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,n))})},drag:function(t,i){var s=e(this).data("ui-draggable"),n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",t),s.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY=0;c--)r=p.snapElements[c].left,h=r+p.snapElements[c].width,l=p.snapElements[c].top,u=l+p.snapElements[c].height,r-m>v||g>h+m||l-m>y||b>u+m||!e.contains(p.snapElements[c].item.ownerDocument,p.snapElements[c].item)?(p.snapElements[c].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(s=m>=Math.abs(l-y),n=m>=Math.abs(u-b),a=m>=Math.abs(r-v),o=m>=Math.abs(h-g),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||a||o,"outer"!==f.snapMode&&(s=m>=Math.abs(l-b),n=m>=Math.abs(u-y),a=m>=Math.abs(r-g),o=m>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[c].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=s||n||a||o||d)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,s=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});s.length&&(t=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="
        ",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("
        ").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-a.width()/2,top:e.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i,!0))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[c[l].cache]=o[c[l].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("

        ")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,o,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,h],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),a=c[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],l=s[a],c=u[n.type]||{};null!==l&&(null===o?h[a]=l:(c.mod&&(l-o>c.mod/2?o+=c.mod:o-l>c.mod/2&&(o-=c.mod)),h[a]=i((l-o)*e+o,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[o]=d,n):l(d)},f(a,function(e,i){l.fn[e]||(l.fn[e]=function(n){var a,o=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=l(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var h=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("

        ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",m=i.test(u),g={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),a=t.effects.createWrapper(h).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,g[p]=v?o:0,m||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?r:o+r),v&&(a.css(p,0),m||a.css(f,r+o)),a.animate(g,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),m=e.duration/f,g=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,m,g)),l&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g).animate(a,m,g),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),l&&(n.css(d,0),n.css(p,a/2)),f[d]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),m||p.hide(),i()}var a,o,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(h=g.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=g.left+o*v,l=o-(d-1)/2,p.clone().appendTo("body").wrap("
        ").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(m?l*v:0),top:h+(m?c*_:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:c*_),opacity:m?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],m=e.duration/2,g={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),g[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(g,m,e.easing).animate(v,m,e.easing,function(){l&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,m=e.scale||"both",g=e.origin||["middle","center"],v=o.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(l),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=t.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,m[d]=(p?"+=":"-=")+2*h,g[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(m,u,e.easing).animate(g,u,e.easing);n.animate(m,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("
        ").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery); \ No newline at end of file diff --git a/public/javascripts/vendor/jquery.fs.naver.js b/public/javascripts/vendor/jquery.fs.naver.js deleted file mode 100644 index 85f3a6795..000000000 --- a/public/javascripts/vendor/jquery.fs.naver.js +++ /dev/null @@ -1,259 +0,0 @@ -;(function ($, window) { - "use strict"; - - /** - * @options - * @param customClass [string] <''> "Class applied to instance" - * @param label [boolean] "Display handle width label" - * @param labels.closed [string] <'Navigation'> "Closed state text" - * @param labels.open [string] <'Close'> "Open state text" - * @param maxWidth [string] <'980px'> "Width at which to auto-disable plugin" - */ - var options = { - customClass: "", - label: true, - labels: { - closed: "Navigation", - open: "Close" - }, - maxWidth: "980px" - }; - - /** - * @events - * @event open.naver "Navigation opened" - * @event close.naver "Navigation closed" - */ - - var pub = { - - /** - * @method - * @name close - * @description Closes instance - * @example $(".target").naver("close"); - */ - close: function(e) { - return $(this).each(function(i, nav) { - var data = $(nav).data("naver"); - - if (data !== null) { - data.$wrapper.css({ - height: 0 - }); - if (data.label) { - data.$handle.html(data.labels.closed); - } - data.$nav.removeClass("open") - .trigger("close.naver"); - } - }); - }, - - /** - * @method - * @name defaults - * @description Sets default plugin options - * @param opts [object] <{}> "Options object" - * @example $.naver("defaults", opts); - */ - defaults: function(opts) { - options = $.extend(true, options, opts || {}); - return $(this); - }, - - /** - * @method - * @name disable - * @description Disables instance - * @example $(".target").naver("disable"); - */ - disable: function() { - return $(this).each(function(i, nav) { - var data = $(nav).data("naver"); - - if (data !== null) { - data.$nav.removeClass("enabled"); - data.$wrapper.css({ height: "" }); - } - }); - }, - - /** - * @method - * @name destroy - * @description Destroys instance - * @example $(".target").naver("destroy"); - */ - destroy: function() { - return $(this).each(function(i, nav) { - var data = $(nav).data("naver"); - - if (data !== null) { - data.$handle.remove(); - data.$container.contents() - .unwrap() - .unwrap(); - - data.$nav.removeClass("enabled disabled naver " + data.customClass) - .off(".naver") - .removeData("naver"); - } - }); - }, - - /** - * @method - * @name enable - * @description Enables instance - * @example $(".target").naver("enable"); - */ - enable: function() { - return $(this).each(function(i, nav) { - var data = $(nav).data("naver"); - - if (data !== null) { - data.$nav.addClass("enabled"); - pub.close.apply(data.$nav); - } - }); - }, - - /** - * @method - * @name open - * @description Opens instance - * @example $(".target").naver("open"); - */ - open: function() { - return $(this).each(function(i, nav) { - var data = $(nav).data("naver"); - - if (data !== null) { - data.$wrapper.css({ - height: data.$container.outerHeight(true) - }); - if (data.label) { - data.$handle.html(data.labels.open); - } - data.$nav.addClass("open") - .trigger("open.naver"); - } - }); - } - }; - - /** - * @method private - * @name _init - * @description Initializes plugin - * @param opts [object] "Initialization options" - */ - function _init(opts) { - // Settings - opts = $.extend(true, {}, options, opts); - - // Apply to each element - var $items = $(this); - for (var i = 0, count = $items.length; i < count; i++) { - _build($items.eq(i), opts); - } - return $items; - } - - /** - * @method private - * @name _build - * @description Builds each instance - * @param $nav [jQuery object] "Target jQuery object" - * @param opts [object] <{}> "Options object" - */ - function _build($nav, opts) { - if (!$nav.data("naver")) { - // Extend Options - opts = $.extend(true, {}, opts, $nav.data("naver-options")); - - var $handle = $nav.find(".naver-handle").length ? $nav.find(".naver-handle").detach() : $(''); - - $nav.addClass("naver " + opts.customClass) - .wrapInner('') - .wrapInner('') - .prepend($handle); - - var data = $.extend(true, { - $nav: $nav, - $container: $nav.find(".naver-container"), - $wrapper: $nav.find(".naver-wrapper"), - $handle: $nav.find(".naver-handle") - }, opts); - - data.$handle.text((opts.label) ? opts.labels.closed : ''); - data.$nav.on("touchstart.naver mousedown.naver", ".naver-handle", data, _onClick) - .data("naver", data); - - // Navtive MQ Support - if (window.matchMedia !== undefined) { - data.mediaQuery = window.matchMedia("(max-width:" + (data.maxWidth === Infinity ? "100000px" : data.maxWidth) + ")"); - // Make sure we stay in context - data.mediaQuery.addListener(function() { - _onRespond.apply(data.$nav); - }); - _onRespond.apply(data.$nav); - } - } - } - - /** - * @method private - * @name _onClick - * @description Handles click nav click - * @param e [object] "Event data" - */ - function _onClick(e) { - e.preventDefault(); - e.stopPropagation(); - - var $target = $(e.currentTarget), - data = e.data; - - // Close other open instances - $(".naver").not(data.$nav) - .naver("close"); - - if (data.$nav.hasClass("open")) { - pub.close.apply(data.$nav); - } else { - pub.open.apply(data.$nav); - } - } - - /** - * @method private - * @name _onRespond - * @description Handles media query match change - */ - function _onRespond() { - var data = $(this).data("naver"); - - if (data.mediaQuery.matches) { - pub.enable.apply(data.$nav); - } else { - pub.disable.apply(data.$nav); - } - } - - $.fn.naver = function(method) { - if (pub[method]) { - return pub[method].apply(this, Array.prototype.slice.call(arguments, 1)); - } else if (typeof method === 'object' || !method) { - return _init.apply(this, arguments); - } - return this; - }; - - $.naver = function(method) { - if (method === "defaults") { - pub.defaults.apply(this, Array.prototype.slice.call(arguments, 1)); - } - }; -})(jQuery, window); \ No newline at end of file diff --git a/public/javascripts/vendor/jquery.js b/public/javascripts/vendor/jquery.js deleted file mode 100755 index 12e0f9a95..000000000 --- a/public/javascripts/vendor/jquery.js +++ /dev/null @@ -1,9789 +0,0 @@ -/*! - * jQuery JavaScript Library v1.10.2 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-07-03T13:48Z - */ -(function( window, undefined ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -//"use strict"; -var - // The deferred used on DOM ready - readyList, - - // A central reference to the root jQuery(document) - rootjQuery, - - // Support: IE<10 - // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` - core_strundefined = typeof undefined, - - // Use the correct document accordingly with window argument (sandbox) - location = window.location, - document = window.document, - docElem = document.documentElement, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // [[Class]] -> type pairs - class2type = {}, - - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], - - core_version = "1.10.2", - - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler - completed = function( event ) { - - // readyState === "complete" is good enough for us to call the dom ready in oldIE - if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { - detach(); - jQuery.ready(); - } - }, - // Clean-up method for dom ready events - detach = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - - } else { - document.detachEvent( "onreadystatechange", completed ); - window.detachEvent( "onload", completed ); - } - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), - - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - /* jshint eqeqeq: false */ - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - if ( obj == null ) { - return String( obj ); - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; - }, - - isPlainObject: function( obj ) { - var key; - - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Support: IE<9 - // Handle iteration over inherited properties before own properties. - if ( jQuery.support.ownLast ) { - for ( key in obj ) { - return core_hasOwn.call( obj, key ); - } - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; - } - context = context || document; - - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; - - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); - } - return jQuery.merge( [], parsed.childNodes ); - }, - - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - if ( data === null ) { - return data; - } - - if ( typeof data === "string" ) { - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - } - } - } - - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations. - // Note: this method belongs to the css module but it's needed here for the support module. - // If support gets modularized, this method should be moved back to the css module. - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", completed ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", completed ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // detach all dom ready events - detach(); - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -/*! - * Sizzle CSS Selector Engine v1.10.2 - * http://sizzlejs.com/ - * - * Copyright 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-07-03 - */ -(function( window, undefined ) { - -var i, - support, - cachedruns, - Expr, - getText, - isXML, - compile, - outermostContext, - sortInput, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - hasDuplicate = false, - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - return 0; - }, - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rsibling = new RegExp( whitespace + "*[+~]" ), - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( documentIsHTML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent.attachEvent && parent !== parent.top ) { - parent.attachEvent( "onbeforeunload", function() { - setDocument(); - }); - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = assert(function( div ) { - div.innerHTML = "
        "; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Support: Opera 10-12/IE8 - // ^= $= *= and empty values - // Should not select anything - // Support: Windows 8 Native Apps - // The type attribute is restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "t", "" ); - - if ( div.querySelectorAll("[t^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); - - if ( compare ) { - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } - - // Not directly comparable, sort on existence of method - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [elem] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val === undefined ? - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null : - val; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] && match[4] !== undefined ) { - match[2] = match[4]; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - } - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) - ); - return results; -} - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome<14 -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - elem[ name ] === true ? name.toLowerCase() : null; - } - }); -} - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // First callback to fire (used internally by add and fireWith) - firingStart, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function( support ) { - - var all, a, input, select, fragment, opt, eventName, isSupported, i, - div = document.createElement("div"); - - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = "
        a"; - - // Finish early in limited (non-browser) environments - all = div.getElementsByTagName("*") || []; - a = div.getElementsByTagName("a")[ 0 ]; - if ( !a || !a.style || !all.length ) { - return support; - } - - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - support.getSetAttribute = div.className !== "t"; - - // IE strips leading whitespace when .innerHTML is used - support.leadingWhitespace = div.firstChild.nodeType === 3; - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - support.tbody = !div.getElementsByTagName("tbody").length; - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - support.htmlSerialize = !!div.getElementsByTagName("link").length; - - // Get the style information from getAttribute - // (IE uses .cssText instead) - support.style = /top/.test( a.getAttribute("style") ); - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - support.hrefNormalized = a.getAttribute("href") === "/a"; - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - support.opacity = /^0.5/.test( a.style.opacity ); - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - support.cssFloat = !!a.style.cssFloat; - - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - support.checkOn = !!input.value; - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - support.optSelected = opt.selected; - - // Tests for enctype support on a form (#6743) - support.enctype = !!document.createElement("form").enctype; - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>"; - - // Will be defined later - support.inlineBlockNeedsLayout = false; - support.shrinkWrapBlocks = false; - support.pixelPosition = false; - support.deleteExpando = true; - support.noCloneEvent = true; - support.reliableMarginRight = true; - support.boxSizingReliable = true; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); - - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); - - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - // Support: IE<9 - // Iteration over object's inherited properties before its own. - for ( i in jQuery( support ) ) { - break; - } - support.ownLast = i !== "0"; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "
        t
        "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior. - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - - // Workaround failing boxSizing test due to offsetWidth returning wrong value - // with some non-1 values of body zoom, ticket #13543 - jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { - support.boxSizing = div.offsetWidth === 4; - }); - - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== core_strundefined ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "
        "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - if ( support.inlineBlockNeedsLayout ) { - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - // Support: IE<8 - body.style.zoom = 1; - } - } - - body.removeChild( container ); - - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - - return support; -})({}); - -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var ret, thisCache, - internalKey = jQuery.expando, - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - // Avoid exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( typeof name === "string" ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - i = name.length; - while ( i-- ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - /* jshint eqeqeq: false */ - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - /* jshint eqeqeq: true */ - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "applet": true, - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - // Do not set data on non-element because it will not be cleared (#8335). - if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { - return false; - } - - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var attrs, name, - data = null, - i = 0, - elem = this[0]; - - // Special expections of .data basically thwart jQuery.access, - // so implement the relevant behavior ourselves - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( name.indexOf("data-") === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return arguments.length > 1 ? - - // Sets one value - this.each(function() { - jQuery.data( this, key, value ); - }) : - - // Gets one value - // Try to fetch any internally stored data first - elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n\f]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); - - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value; - - if ( typeof stateVal === "boolean" && type === "string" ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - classNames = value.match( core_rnotwhite ) || []; - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( type === core_strundefined || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var ret, hooks, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // Use proper attribute retrieval(#6932, #12072) - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - elem.text; - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { - optionSet = true; - } - } - - // force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attr: function( elem, name, value ) { - var hooks, ret, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === core_strundefined ) { - return jQuery.prop( elem, name, value ); - } - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - - } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( jQuery.expr.match.bool.test( name ) ) { - // Set corresponding property to false - if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - elem[ propName ] = false; - // Support: IE<9 - // Also clear defaultChecked/defaultSelected (if appropriate) - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? - ret : - ( elem[ name ] = value ); - - } else { - return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? - ret : - elem[ name ]; - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - return tabindex ? - parseInt( tabindex, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - -1; - } - } - } -}); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } - - return name; - } -}; -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; - - jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? - function( elem, name, isXML ) { - var fn = jQuery.expr.attrHandle[ name ], - ret = isXML ? - undefined : - /* jshint eqeqeq: false */ - (jQuery.expr.attrHandle[ name ] = undefined) != - getter( elem, name, isXML ) ? - - name.toLowerCase() : - null; - jQuery.expr.attrHandle[ name ] = fn; - return ret; - } : - function( elem, name, isXML ) { - return isXML ? - undefined : - elem[ jQuery.camelCase( "default-" + name ) ] ? - name.toLowerCase() : - null; - }; -}); - -// fix oldIE attroperties -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = { - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; - jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = - // Some attributes are constructed with empty-string values when not defined - function( elem, name, isXML ) { - var ret; - return isXML ? - undefined : - (ret = elem.getAttributeNode( name )) && ret.value !== "" ? - ret.value : - null; - }; - jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ret.specified ? - ret.value : - undefined; - }, - set: nodeHook.set - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }; - }); -} - - -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }; -} - -jQuery.each([ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -}); - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }; - if ( !jQuery.support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - // Support: Webkit - // "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - }; - } -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - var tmp, events, t, handleObjIn, - special, eventHandle, handleObj, - handlers, type, namespaces, origType, - elemData = jQuery._data( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - var j, handleObj, tmp, - origCount, t, events, - special, handlers, type, - namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - var handle, ontype, cur, - bubbleType, special, tmp, i, - eventPath = [ elem || document ], - type = core_hasOwn.call( event, "type" ) ? event.type : event, - namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, ret, handleObj, matched, j, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var sel, handleObj, matches, i, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - /* jshint eqeqeq: false */ - for ( ; cur != this; cur = cur.parentNode || this ) { - /* jshint eqeqeq: true */ - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var body, eventDoc, doc, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === core_strundefined ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var type, origFn; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); -var isSimple = /^.[^:#\[\.,]*$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - ret = [], - self = this, - len = self.length; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - cur = ret.push( cur ); - break; - } - } - } - - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( jQuery.unique(all) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - ret = jQuery.unique( ret ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - } - - return this.pushStack( ret ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( isSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
        ", "
        " ], - area: [ 1, "", "" ], - param: [ 1, "", "" ], - thead: [ 1, "", "
        " ], - tr: [ 2, "", "
        " ], - col: [ 2, "", "
        " ], - td: [ 3, "", "
        " ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
        ", "
        " ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var - // Snapshot the DOM in case .domManip sweeps something relevant into its fragment - args = jQuery.map( this, function( elem ) { - return [ elem.nextSibling, elem.parentNode ]; - }), - i = 0; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - var next = args[ i++ ], - parent = args[ i++ ]; - - if ( parent ) { - // Don't use the snapshot next if it has moved (#13810) - if ( next && next.parentNode !== parent ) { - next = this.nextSibling; - } - jQuery( this ).remove(); - parent.insertBefore( elem, next ); - } - // Allow new content to include elements from the context set - }, true ); - - // Force removal if there was no new content (e.g., from empty arguments) - return i ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback, allowIntersection ) { - - // Flatten any nested arrays - args = core_concat.apply( [], args ); - - var first, node, hasScripts, - scripts, doc, fragment, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, self.html() ); - } - self.domManip( args, callback, allowIntersection ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[i], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery._evalUrl( node.src ); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -// Support: IE<8 -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, e, data; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, node, clone, i, srcElements, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var j, elem, contains, - tmp, tag, tbody, wrap, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare or - wrap[1] === "
        " && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var elem, type, id, data, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== core_strundefined ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - core_deletedIds.push( id ); - } - } - } - } - }, - - _evalUrl: function( url ) { - return jQuery.ajax({ - url: url, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } -}); -jQuery.fn.extend({ - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - } -}); -var iframe, getStyles, curCSS, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var display, elem, hidden, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - values[ index ] = jQuery._data( elem, "olddisplay" ); - display = elem.style.display; - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - - if ( !values[ index ] ) { - hidden = isHidden( elem ); - - if ( display && display !== "none" || !hidden ) { - jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); - } - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var len, styles, - map = {}, - i = 0; - - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each(function() { - if ( isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var num, val, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - } -}); - -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; - - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; - - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("'); - html = html.replace(/\[video(.*?)\]([\w\W]*?)\[\/video\]/gi, '$2'); - html = html.replace(/\[audio(.*?)\]([\w\W]*?)\[\/audio\]/gi, '$2'); - html = html.replace(/\[embed(.*?)\]([\w\W]*?)\[\/embed\]/gi, '$2'); - html = html.replace(/\[object(.*?)\]([\w\W]*?)\[\/object\]/gi, '$2'); - html = html.replace(/\[param(.*?)\]/gi, ''); - html = html.replace(/\[img(.*?)\]/gi, ''); - - // convert div to p - if (this.opts.convertDivs) - { - html = html.replace(/([\w\W]*?)<\/div>/gi, '

        $2

        '); - html = html.replace(/<\/div>

        /gi, '

        '); - html = html.replace(/<\/p><\/div>/gi, '

        '); - } - - html = this.cleanParagraphy(html); - - // remove span - html = html.replace(/([\w\W]*?)<\/span>/gi, '$2'); - - // remove empty - html = html.replace(//gi, ''); - html = html.replace(/<[^\/>][^>][^img|param|source]*>(\s*|\t*|\n*| |
        )<\/[^>]+>/gi, ''); - - html = html.replace(/\n{3,}/gi, '\n'); - - // remove dirty p - html = html.replace(/

        /gi, '

        '); - html = html.replace(/<\/p><\/p>/gi, '

        '); - - html = html.replace(/
      7. (\s*|\t*|\n*)

        /gi, '

      8. '); - html = html.replace(/<\/p>(\s*|\t*|\n*)<\/li>/gi, '
      9. '); - - if (this.opts.linebreaks === true) - { - html = html.replace(/([\w\W]*?)<\/p>/gi, '$2
        '); - } - - // remove empty finally - html = html.replace(/<[^\/>][^>][^img|param|source]*>(\s*|\t*|\n*| |
        )<\/[^>]+>/gi, ''); - - // FF fix - if (this.browser('mozilla')) - { - while (/
        $/gi.test(html)) - { - html = html.replace(/
        $/gi, ''); - } - } - - // ie inserts a blank font tags when pasting - while (/([\w\W]*?)<\/font>/gi.test(html)) - { - html = html.replace(/([\w\W]*?)<\/font>/gi, '$1'); - } - - this.pasteInsert(html); - - }, - pastePre: function(s) - { - s = s.replace(/
        |<\/H[1-6]>|<\/p>|<\/div>/gi, '\n'); - - var tmp = this.document.createElement('div'); - tmp.innerHTML = s; - return this.cleanEncodeEntities(tmp.textContent || tmp.innerText); - }, - pasteInsert: function(html) - { - if (this.selectall) - { - if (!this.opts.linebreaks) this.$editor.html(this.opts.emptyHtml); - else this.$editor.html(''); - - this.$editor.focus(); - } - - html = this.callback('pasteAfter', false, html); - - this.insertHtml(html); - - this.selectall = false; - setTimeout(function() { rtePaste = false; }, 100); - - if (this.opts.autoresize) $(this.document.body).scrollTop(this.saveScroll); - else this.$editor.scrollTop(this.saveScroll); - }, - - // BUFFER - bufferSet: function(html) - { - if (html !== undefined) this.opts.buffer.push(html); - else - { - this.selectionSave(); - this.opts.buffer.push(this.$editor.html()); - this.selectionRemoveMarkers(true); - } - }, - bufferUndo: function() - { - if (this.opts.buffer.length === 0) - { - this.$editor.focus(); - return; - } - - // rebuffer - this.selectionSave(); - this.opts.rebuffer.push(this.$editor.html()); - this.selectionRestore(false, true); - - this.$editor.html(this.opts.buffer.pop()); - - this.selectionRestore(); - setTimeout($.proxy(this.observeStart, this), 100); - }, - bufferRedo: function() - { - if (this.opts.rebuffer.length === 0) - { - this.$editor.focus(); - return false; - } - - // buffer - this.selectionSave(); - this.opts.buffer.push(this.$editor.html()); - this.selectionRestore(false, true); - - this.$editor.html(this.opts.rebuffer.pop()); - this.selectionRestore(true); - setTimeout($.proxy(this.observeStart, this), 4); - }, - - - // OBSERVE - observeStart: function() - { - this.observeImages(); - this.observeTables(); - }, - observeTables: function() - { - this.$editor.find('table').on('click', $.proxy(this.tableObserver, this)); - }, - observeImages: function() - { - if (this.opts.observeImages === false) return false; - - this.$editor.find('img').each($.proxy(function(i, elem) - { - if (this.browser('msie')) $(elem).attr('unselectable', 'on'); - this.imageResize(elem); - - }, this)); - }, - - - // SELECTION - getSelection: function() - { - if (!this.opts.rangy) return this.document.getSelection(); - else // rangy - { - if (!this.opts.iframe) return rangy.getSelection(); - else return rangy.getSelection(this.$frame[0]); - } - }, - getRange: function() - { - if (!this.opts.rangy) - { - if (this.document.getSelection) - { - var sel = this.document.getSelection(); - if (sel.getRangeAt && sel.rangeCount) return sel.getRangeAt(0); - } - - return this.document.createRange(); - } - else // rangy - { - if (!this.opts.iframe) return rangy.createRange(); - else return rangy.createRange(this.iframeDoc()); - } - }, - selectionElement: function(node) - { - this.setCaret(node); - }, - selectionStart: function(node) - { - this.selectionSet(node[0] || node, 0, null, 0); - }, - selectionEnd: function(node) - { - this.selectionSet(node[0] || node, 1, null, 1); - }, - selectionSet: function(orgn, orgo, focn, foco) - { - if (focn == null) focn = orgn; - if (foco == null) foco = orgo; - - var sel = this.getSelection(); - if (!sel) return; - - var range = this.getRange(); - range.setStart(orgn, orgo); - range.setEnd(focn, foco ); - - try { - sel.removeAllRanges(); - } catch (e) {} - - sel.addRange(range); - }, - selectionWrap: function(tag) - { - tag = tag.toLowerCase(); - - var block = this.getBlock(); - if (block) - { - var wrapper = this.formatChangeTag(block, tag); - this.sync(); - return wrapper; - } - - var sel = this.getSelection(); - var range = sel.getRangeAt(0); - var wrapper = document.createElement(tag); - wrapper.appendChild(range.extractContents()); - range.insertNode(wrapper); - - this.selectionElement(wrapper); - - return wrapper; - }, - selectionAll: function() - { - var range = this.getRange(); - range.selectNodeContents(this.$editor[0]); - - var sel = this.getSelection(); - sel.removeAllRanges(); - sel.addRange(range); - }, - selectionRemove: function() - { - this.getSelection().removeAllRanges(); - }, - getCaretOffset: function (element) - { - var caretOffset = 0; - - var range = this.getSelection().getRangeAt(0); - var preCaretRange = range.cloneRange(); - preCaretRange.selectNodeContents(element); - preCaretRange.setEnd(range.endContainer, range.endOffset); - caretOffset = $.trim(preCaretRange.toString()).length; - - return caretOffset; - }, - getCaretOffsetRange: function() - { - return new Range(this.getSelection().getRangeAt(0)); - }, - setCaret: function (el, start, end) - { - if (typeof end === 'undefined') end = start; - el = el[0] || el; - - var range = this.getRange(); - range.selectNodeContents(el); - - var textNodes = this.getTextNodesIn(el); - var foundStart = false; - var charCount = 0, endCharCount; - - if (textNodes.length == 1 && start) - { - range.setStart(textNodes[0], start); - range.setEnd(textNodes[0], end); - } - else - { - for (var i = 0, textNode; textNode = textNodes[i++];) - { - endCharCount = charCount + textNode.length; - if (!foundStart && start >= charCount && (start < endCharCount || (start == endCharCount && i < textNodes.length))) - { - range.setStart(textNode, start - charCount); - foundStart = true; - } - - if (foundStart && end <= endCharCount) - { - range.setEnd( textNode, end - charCount ); - break; - } - - charCount = endCharCount; - } - } - - var sel = this.getSelection(); - sel.removeAllRanges(); - sel.addRange( range ); - }, - getTextNodesIn: function (node) - { - var textNodes = []; - - if (node.nodeType == 3) textNodes.push(node); - else - { - var children = node.childNodes; - for (var i = 0, len = children.length; i < len; ++i) - { - textNodes.push.apply(textNodes, this.getTextNodesIn(children[i])); - } - } - - return textNodes; - }, - - // SAVE & RESTORE - selectionSave: function() - { - if (!this.isFocused()) this.$editor.focus(); - - if (!this.opts.rangy) - { - this.selectionCreateMarker(this.getRange()); - } - // rangy - else - { - this.savedSel = rangy.saveSelection(); - } - }, - selectionCreateMarker: function(range, remove) - { - if (!range) return; - - var node1 = $('' + this.opts.invisibleSpace + '', this.document)[0]; - var node2 = $('' + this.opts.invisibleSpace + '', this.document)[0]; - - if (range.collapsed === true) - { - this.selectionSetMarker(range, node1, true); - } - else - { - this.selectionSetMarker(range, node1, true); - this.selectionSetMarker(range, node2, false); - } - - this.savedSel = this.$editor.html(); - - this.selectionRestore(false, false); - }, - selectionSetMarker: function(range, node, type) - { - var boundaryRange = range.cloneRange(); - - boundaryRange.collapse(type); - - boundaryRange.insertNode(node); - boundaryRange.detach(); - }, - selectionRestore: function(replace, remove) - { - if (!this.opts.rangy) - { - if (replace === true && this.savedSel) - { - this.$editor.html(this.savedSel); - } - - var node1 = this.$editor.find('span#selection-marker-1'); - var node2 = this.$editor.find('span#selection-marker-2'); - - if (!this.isFocused()) this.$editor.focus(); - - if (node1.length != 0 && node2.length != 0) - { - this.selectionSet(node1[0], 0, node2[0], 0); - } - else if (node1.length != 0) - { - this.selectionSet(node1[0], 0, null, 0); - } - - if (remove !== false) - { - this.selectionRemoveMarkers(); - this.savedSel = false; - } - } - // rangy - else - { - rangy.restoreSelection(this.savedSel); - } - }, - selectionRemoveMarkers: function() - { - if (!this.opts.rangy) - { - this.$editor.find('span#selection-marker-1').remove(); - this.$editor.find('span#selection-marker-2').remove(); - } - // rangy - else - { - rangy.removeMarkers(this.savedSel); - } - }, - // GET ELEMENTS - getCurrent: function() - { - var el = false; - var sel = this.getSelection(); - - if (sel.rangeCount > 0) el = sel.getRangeAt(0).startContainer; - - return this.isParentRedactor(el); - }, - getParent: function(elem) - { - elem = elem || this.getCurrent(); - if (elem) return this.isParentRedactor( $( elem ).parent()[0] ); - else return false; - }, - getBlock: function(node) - { - if (typeof node === 'undefined') node = this.getCurrent(); - - while (node) - { - if (this.nodeTestBlocks(node)) - { - if ($(node).hasClass('redactor_editor')) return false; - return node; - } - - node = node.parentNode; - } - - return false; - }, - getBlocks: function(nodes) - { - var newnodes = []; - if (typeof nodes == 'undefined') - { - var range = this.getRange(); - if (range && range.collapsed === true) return [this.getBlock()]; - var nodes = this.getNodes(range); - } - - $.each(nodes, $.proxy(function(i,node) - { - if (this.opts.iframe === false && $(node).parents('div.redactor_editor').size() == 0) return false; - if (this.nodeTestBlocks(node)) newnodes.push(node); - - }, this)); - - if (newnodes.length === 0) newnodes = [this.getBlock()]; - - return newnodes; - }, - nodeTestBlocks: function(node) - { - return node.nodeType == 1 && this.rTestBlock.test(node.nodeName); - }, - tagTestBlock: function(tag) - { - return this.rTestBlock.test(tag); - }, - getSelectedNodes: function(range) - { - if (typeof range == 'undefined' || range == false) var range = this.getRange() - if (range && range.collapsed === true) - { - return [this.getCurrent()]; - } - - var sel = this.getSelection(); - try { - var frag = sel.getRangeAt(0).cloneContents(); - } - catch(e) - { - return(false); - } - - var tempspan = this.document.createElement("span"); - tempspan.appendChild(frag); - - window.selnodes = tempspan.childNodes; - - var len = selnodes.length; - var output = []; - for(var i = 0, u = len; i'), - tableId = Math.floor(Math.random() * 99999), - $table = $('
        '), - i, $row, z, $column; - - for (i = 0; i < rows; i++) - { - $row = $(''); - - for (z = 0; z < columns; z++) - { - $column = $('' + this.opts.invisibleSpace + ''); - - // set the focus to the first td - if (i === 0 && z === 0) $column.append('' + this.opts.invisibleSpace + ''); - - $($row).append($column); - } - - $table.append($row); - } - - $table_box.append($table); - var html = $table_box.html(); - - this.modalClose(); - this.selectionRestore(); - - var current = this.getBlock() || this.getCurrent(); - if (current) - { - $(current).after(html) - } - else - { - this.insertHtmlAdvanced(html); - - } - - this.selectionRestore(); - - var table = this.$editor.find('#table' + tableId); - this.tableObserver(table); - this.buttonActiveObserver(); - - table.removeAttr('id'); - - this.sync(); - }, - tableObserver: function(e) - { - this.$table = $(e.target || e).closest('table'); - - this.$tbody = $(e.target).closest('tbody'); - this.$thead = this.$table.find('thead'); - - this.$current_td = $(e.target || this.$table.find('td').first()); - this.$current_tr = $(e.target || this.$table.find('tr').first()).closest('tr'); - }, - tableDeleteTable: function() - { - this.bufferSet(); - - if (!this.$table) return; - - this.$table.remove(); - this.$table = false; - this.sync(); - - }, - tableDeleteRow: function() - { - this.bufferSet(); - - if (!this.$current_tr) return; - - // Set the focus correctly - var $focusTR = this.$current_tr.prev().length ? this.$current_tr.prev() : this.$current_tr.next(); - if ($focusTR.length) - { - var $focusTD = $focusTR.children('td' ).first(); - if ($focusTD.length) - { - $focusTD.prepend('' + this.opts.invisibleSpace + ''); - this.selectionRestore(); - } - } - - this.$current_tr.remove(); - this.sync(); - }, - tableDeleteColumn: function() - { - this.bufferSet(); - var index = this.$current_td.get(0).cellIndex; - - // Set the focus correctly - this.$table.find('tr').each($.proxy(function(i, elem) - { - var focusIndex = index - 1 < 0 ? index + 1 : index - 1; - if (i === 0) - { - $(elem).find('td').eq(focusIndex).prepend('' + this.opts.invisibleSpace + ''); - this.selectionRestore(); - } - - $(elem).find('td').eq(index).remove(); - - }, this)); - - this.sync(); - }, - tableAddHead: function() - { - this.bufferSet(); - - if (this.$table.find('thead').size() !== 0) this.tableDeleteHead(); - else - { - var tr = this.$table.find('tr').first().clone(); - tr.find('td').html( this.opts.invisibleSpace ); - this.$thead = $(''); - this.$thead.append(tr); - this.$table.prepend(this.$thead); - - this.sync(); - } - }, - tableDeleteHead: function() - { - this.bufferSet(); - - $(this.$thead).remove(); - this.$thead = false; - - this.sync(); - }, - tableAddRowAbove: function() - { - this.tableAddRow('before'); - }, - tableAddRowBelow: function() - { - this.tableAddRow('after'); - }, - tableAddColumnLeft: function() - { - this.tableAddColumn('before'); - }, - tableAddColumnRight: function() - { - this.tableAddColumn('after'); - }, - tableAddRow: function(type) - { - this.bufferSet(); - - var new_tr = this.$current_tr.clone(); - new_tr.find('td').html(this.opts.invisibleSpace); - - if (type === 'after') this.$current_tr.after(new_tr); - else this.$current_tr.before(new_tr); - - this.sync(); - }, - tableAddColumn: function (type) - { - this.bufferSet(); - - var index = 0; - - this.$current_tr.find('td').each($.proxy(function(i, elem) - { - if ($(elem)[0] === this.$current_td[0]) index = i; - - }, this)); - - this.$table.find('tr').each($.proxy(function(i, elem) - { - var $current = $(elem).find('td').eq(index); - - var td = $current.clone(); - td.html(this.opts.invisibleSpace); - - type === 'after' ? $current.after(td) : $current.before(td); - - }, this)); - - this.sync(); - }, - - // VIDEO - videoShow: function() - { - this.selectionSave(); - - this.modalInit(this.opts.curLang.video, this.opts.modal_video, 600, $.proxy(function() - { - $('#redactor_insert_video_btn').click($.proxy(this.videoInsert, this)); - - setTimeout(function() - { - $('#redactor_insert_video_area').focus(); - - }, 200); - - }, this)); - }, - videoInsert: function () - { - var data = $('#redactor_insert_video_area').val(); - data = this.cleanStripTags(data); - - this.selectionRestore(); - - var current = this.getBlock() || this.getCurrent(); - if (current) - { - $(current).after(data) - this.sync(); - } - else this.insertHtmlAdvanced(data); - - this.modalClose(); - }, - - // LINK - linkShow: function() - { - this.selectionSave(); - - var callback = $.proxy(function() - { - this.insert_link_node = false; - - var sel = this.getSelection(); - var url = '', text = '', target = ''; - - var elem = this.getParent(); - var par = $(elem).parent().get(0); - if (par && par.tagName === 'A') - { - elem = par; - } - - if (elem && elem.tagName === 'A') - { - url = elem.href; - text = $(elem).text(); - target = elem.target; - - this.insert_link_node = elem; - } - else text = sel.toString(); - - $('.redactor_link_text').val(text); - - var thref = self.location.href.replace(/\/$/i, ''); - var turl = url.replace(thref, ''); - - var tabs = $('#redactor_tabs').find('a'); - - if (this.opts.linkEmail === false) tabs.eq(1).remove(); - if (this.opts.linkAnchor === false) tabs.eq(2).remove(); - if (this.opts.linkEmail === false && this.opts.linkAnchor === false) - { - $('#redactor_tabs').remove(); - $('#redactor_link_url').val(turl); - } - else - { - if (url.search('mailto:') === 0) - { - this.modalSetTab.call(this, 2); - - $('#redactor_tab_selected').val(2); - $('#redactor_link_mailto').val(url.replace('mailto:', '')); - } - else if (turl.search(/^#/gi) === 0) - { - this.modalSetTab.call(this, 3); - - $('#redactor_tab_selected').val(3); - $('#redactor_link_anchor').val(turl.replace(/^#/gi, '' )); - } - else - { - $('#redactor_link_url').val(turl); - } - } - - if (target === '_blank') $('#redactor_link_blank').prop('checked', true); - - $('#redactor_insert_link_btn').click($.proxy(this.linkProcess, this)); - - setTimeout(function() - { - $('#redactor_link_url').focus(); - - }, 200); - - }, this); - - this.modalInit(this.opts.curLang.link, this.opts.modal_link, 460, callback); - - }, - linkProcess: function() - { - var tab_selected = $('#redactor_tab_selected').val(); - var link = '', text = '', target = '', targetBlank = ''; - - // url - if (tab_selected === '1') - { - link = $('#redactor_link_url').val(); - text = $('#redactor_link_url_text').val(); - - if ($('#redactor_link_blank').prop('checked')) - { - target = ' target="_blank"'; - targetBlank = '_blank'; - } - - // test url (add protocol) - var pattern = '((xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}'; - var re = new RegExp('^(http|ftp|https)://' + pattern, 'i'); - var re2 = new RegExp('^' + pattern, 'i'); - - if (link.search(re) == -1 && link.search(re2) == 0 && this.opts.linkProtocol) - { - link = this.opts.linkProtocol + link; - } - } - // mailto - else if (tab_selected === '2') - { - link = 'mailto:' + $('#redactor_link_mailto').val(); - text = $('#redactor_link_mailto_text').val(); - } - // anchor - else if (tab_selected === '3') - { - link = '#' + $('#redactor_link_anchor').val(); - text = $('#redactor_link_anchor_text').val(); - } - - this.linkInsert('' + text + '', $.trim(text), link, targetBlank); - - }, - linkInsert: function (a, text, link, target) - { - this.selectionRestore(); - - if (text !== '') - { - if (this.insert_link_node) - { - this.bufferSet(); - - $(this.insert_link_node).text(text).attr('href', link); - - if (target !== '') $(this.insert_link_node).attr('target', target); - else $(this.insert_link_node).removeAttr('target'); - - this.sync(); - } - else - { - this.exec('inserthtml', a); - } - } - - this.modalClose(); - }, - - // FILE - fileShow: function () - { - - this.selectionSave(); - - var callback = $.proxy(function() - { - var sel = this.getSelection(); - - var text = ''; - if (this.oldIE()) text = sel.text; - else text = sel.toString(); - - $('#redactor_filename').val(text); - - // dragupload - if (!this.isMobile()) - { - this.draguploadInit('#redactor_file', { - url: this.opts.fileUpload, - uploadFields: this.opts.uploadFields, - success: $.proxy(this.fileCallback, this), - error: $.proxy( function(obj, json) - { - this.callback('fileUploadError', json); - - }, this) - }); - } - - this.uploadInit('redactor_file', { - auto: true, - url: this.opts.fileUpload, - success: $.proxy(this.fileCallback, this), - error: $.proxy(function(obj, json) - { - this.callback('fileUploadError', json); - - }, this) - }); - - }, this); - - this.modalInit(this.opts.curLang.file, this.opts.modal_file, 500, callback); - }, - fileCallback: function(json) - { - - this.selectionRestore(); - - if (json !== false) - { - - var text = $('#redactor_filename').val(); - if (text === '') text = json.filename; - - var link = '' + text + ''; - - // chrome fix - if (this.browser('webkit') && !!this.window.chrome) - { - link = link + ' '; - } - - this.execCommand('inserthtml', link, false); - - var linkmarker = $(this.$editor.find('a#filelink-marker')); - if (linkmarker.size() != 0) linkmarker.removeAttr('id'); - else linkmarker = false; - - this.sync(); - - // file upload callback - this.callback('fileUpload', linkmarker, json); - } - - this.modalClose(); - }, - - // IMAGE - imageShow: function() - { - - this.selectionSave(); - - var callback = $.proxy(function() - { - // json - if (this.opts.imageGetJson) - { - $.getJSON(this.opts.imageGetJson, $.proxy(function(data) - { - var folders = {}, count = 0; - - // folders - $.each(data, $.proxy(function(key, val) - { - if (typeof val.folder !== 'undefined') - { - count++; - folders[val.folder] = count; - } - - }, this)); - - var folderclass = false; - $.each(data, $.proxy(function(key, val) - { - // title - var thumbtitle = ''; - if (typeof val.title !== 'undefined') thumbtitle = val.title; - - var folderkey = 0; - if (!$.isEmptyObject(folders) && typeof val.folder !== 'undefined') - { - folderkey = folders[val.folder]; - if (folderclass === false) folderclass = '.redactorfolder' + folderkey; - } - - var img = $(''); - $('#redactor_image_box').append(img); - $(img).click($.proxy(this.imageThumbClick, this)); - - }, this)); - - // folders - if (!$.isEmptyObject(folders)) - { - $('.redactorfolder').hide(); - $(folderclass).show(); - - var onchangeFunc = function(e) - { - $('.redactorfolder').hide(); - $('.redactorfolder' + $(e.target).val()).show(); - }; - - var select = $('' - + '
        ' - + '' - + '
        ' - + '' - + '', - - modal_image_edit: String() - + '
        ' - + '' - + '' - + '' - + '' - + '' - + '' - + '
        ' - + '', - - modal_image: String() - + '
        ' - + '' - + '' - + '
        ' - + '
        ' - + '' - + '
        ' - + '' - + '
        ' - + '' - + '
        ' - + '', - - modal_link: String() - + '
        ' - + '
        ' - + '
        ' - + 'URL' - + 'Email' - + '' + this.opts.curLang.anchor + '' - + '
        ' - + '' - + '
        ' - + '' - + '' - + '' - + '' - + '' - + '
        ' - + '' - + '' - + '
        ' - + '
        ' - + '', - - modal_table: String() - + '
        ' - + '' - + '' - + '' - + '' - + '
        ' - + '', - - modal_video: String() - + '
        ' - + '
        ' - + '' - + '' - + '
        ' - + '
        ' - + '' - - }); - }, - modalInit: function(title, content, width, callback) - { - var $redactorModalOverlay = $('#redactor_modal_overlay'); - - // modal overlay - if (!$redactorModalOverlay.length) - { - this.$overlay = $redactorModalOverlay = $(''); - $('body').prepend(this.$overlay); - } - - if (this.opts.modalOverlay) - { - $redactorModalOverlay.show().on('click', $.proxy(this.modalClose, this)); - } - - var $redactorModal = $('#redactor_modal'); - - if (!$redactorModal.length) - { - this.$modal = $redactorModal = $(''); - $('body').append(this.$modal); - } - - $('#redactor_modal_close').on('click', $.proxy(this.modalClose, this)); - - this.hdlModalClose = $.proxy(function(e) - { - if (e.keyCode === this.keyCode.ESC) - { - this.modalClose(); - return false; - } - - }, this); - - $(document).keyup(this.hdlModalClose); - this.$editor.keyup(this.hdlModalClose); - - // set content - this.modalcontent = false; - if (content.indexOf('#') == 0) - { - this.modalcontent = $(content); - $('#redactor_modal_inner').empty().append(this.modalcontent.html()); - this.modalcontent.html(''); - - } - else - { - $('#redactor_modal_inner').empty().append(content); - } - - $redactorModal.find('#redactor_modal_header').html(title); - - // draggable - if (typeof $.fn.draggable !== 'undefined') - { - $redactorModal.draggable({ handle: '#redactor_modal_header' }); - $redactorModal.find('#redactor_modal_header').css('cursor', 'move'); - } - - var $redactor_tabs = $('#redactor_tabs'); - - // tabs - if ($redactor_tabs.length ) - { - var that = this; - $redactor_tabs.find('a').each(function(i, s) - { - i++; - $(s).on('click', function(e) - { - e.preventDefault(); - - $redactor_tabs.find('a').removeClass('redactor_tabs_act'); - $(this).addClass('redactor_tabs_act'); - $('.redactor_tab').hide(); - $('#redactor_tab' + i ).show(); - $('#redactor_tab_selected').val(i); - - if (that.isMobile() === false) - { - var height = $redactorModal.outerHeight(); - $redactorModal.css('margin-top', '-' + (height + 10) / 2 + 'px'); - } - }); - }); - } - - $redactorModal.find('.redactor_btn_modal_close').on('click', $.proxy(this.modalClose, this)); - - if (this.isMobile() === false) - { - $redactorModal.css({ - position: 'fixed', - top: '-2000px', - left: '50%', - width: width + 'px', - marginLeft: '-' + (width + 60) / 2 + 'px' - }).show(); - - this.modalSaveBodyOveflow = $(document.body).css('overflow'); - $(document.body).css('overflow', 'hidden'); - - } - else - { - $redactorModal.css({ - position: 'fixed', - width: '100%', - height: '100%', - top: '0', - left: '0', - margin: '0', - minHeight: '300px' - }).show(); - } - - // callback - if (typeof callback === 'function') callback(); - - if (this.isMobile() === false) - { - setTimeout(function() - { - var height = $redactorModal.outerHeight(); - $redactorModal.css({ - top: '50%', - height: 'auto', - minHeight: 'auto', - marginTop: '-' + (height + 10) / 2 + 'px' - }); - }, 20 ); - } - - }, - modalClose: function() - { - $('#redactor_modal_close').off('click', this.modalClose ); - $('#redactor_modal').fadeOut('fast', $.proxy(function() - { - var redactorModalInner = $('#redactor_modal_inner'); - - if (this.modalcontent !== false) - { - this.modalcontent.html(redactorModalInner.html()); - this.modalcontent = false; - } - - redactorModalInner.html(''); - - if (this.opts.modalOverlay) - { - $('#redactor_modal_overlay').hide().off('click', this.modalClose); - } - - $(document).unbind('keyup', this.hdlModalClose); - this.$editor.unbind('keyup', this.hdlModalClose); - - this.selectionRestore(); - - }, this)); - - - if (this.isMobile() === false) - { - $(document.body).css('overflow', this.modalSaveBodyOveflow ? this.modalSaveBodyOveflow : 'visible'); - } - - return false; - }, - modalSetTab: function(num) - { - $('.redactor_tab').hide(); - $('#redactor_tabs').find('a').removeClass('redactor_tabs_act').eq(num - 1).addClass('redactor_tabs_act'); - $('#redactor_tab' + num).show(); - }, - - - // S3 - s3handleFileSelect: function(e) - { - var files = e.target.files; - - for (var i = 0, f; f = files[i]; i++) - { - this.s3uploadFile(f); - } - }, - s3uploadFile: function(file) - { - this.s3executeOnSignedUrl(file, $.proxy(function(signedURL) - { - this.s3uploadToS3(file, signedURL); - }, this)); - }, - s3executeOnSignedUrl: function(file, callback) - { - var xhr = new XMLHttpRequest(); - xhr.open('GET', this.opts.s3 + '?name=' + file.name + '&type=' + file.type, true); - - // Hack to pass bytes through unprocessed. - xhr.overrideMimeType('text/plain; charset=x-user-defined'); - - xhr.onreadystatechange = function(e) - { - if (this.readyState == 4 && this.status == 200) - { - $('#redactor-progress').fadeIn(); - callback(decodeURIComponent(this.responseText)); - } - else if(this.readyState == 4 && this.status != 200) - { - //setProgress(0, 'Could not contact signing script. Status = ' + this.status); - } - }; - - xhr.send(); - }, - s3createCORSRequest: function(method, url) - { - var xhr = new XMLHttpRequest(); - if ("withCredentials" in xhr) - { - xhr.open(method, url, true); - } - else if (typeof XDomainRequest != "undefined") - { - xhr = new XDomainRequest(); - xhr.open(method, url); - } - else - { - xhr = null; - } - - return xhr; - }, - s3uploadToS3: function(file, url) - { - var xhr = this.s3createCORSRequest('PUT', url); - if (!xhr) - { - //setProgress(0, 'CORS not supported'); - } - else - { - xhr.onload = $.proxy(function() - { - if (xhr.status == 200) - { - //setProgress(100, 'Upload completed.'); - - $('#redactor-progress').hide(); - - var s3image = url.split('?'); - - if (!s3image[0]) - { - // url parsing is fail - return false; - } - - this.selectionRestore(); - - var html = ''; - html = ''; - if (this.opts.paragraphy) html = '

        ' + html + '

        '; - - this.execCommand('inserthtml', html, false); - - var image = $(this.$editor.find('img#image-marker')); - - if (image.length) image.removeAttr('id'); - else image = false; - - this.sync(); - - // upload image callback - this.callback('imageUpload', image, false); - - this.modalClose(); - this.observeImages(); - - } - else - { - //setProgress(0, 'Upload error: ' + xhr.status); - } - }, this); - - xhr.onerror = function() - { - //setProgress(0, 'XHR error.'); - }; - - xhr.upload.onprogress = function(e) - { - /* - if (e.lengthComputable) - { - var percentLoaded = Math.round((e.loaded / e.total) * 100); - setProgress(percentLoaded, percentLoaded == 100 ? 'Finalizing.' : 'Uploading.'); - } - */ - }; - - xhr.setRequestHeader('Content-Type', file.type); - xhr.setRequestHeader('x-amz-acl', 'public-read'); - - xhr.send(file); - } - }, - - - // UPLOAD - uploadInit: function(el, options) - { - this.uploadOptions = { - url: false, - success: false, - error: false, - start: false, - trigger: false, - auto: false, - input: false - }; - - $.extend(this.uploadOptions, options); - - var $el = $('#' + el); - - // Test input or form - if ($el.length && $el[0].tagName === 'INPUT') - { - this.uploadOptions.input = $el; - this.el = $($el[0].form); - } - else this.el = $el; - - this.element_action = this.el.attr('action'); - - // Auto or trigger - if (this.uploadOptions.auto) - { - $(this.uploadOptions.input).change($.proxy(function(e) - { - this.el.submit(function(e) - { - return false; - }); - - this.uploadSubmit(e); - - }, this)); - - } - else if (this.uploadOptions.trigger) - { - $('#' + this.uploadOptions.trigger).click($.proxy(this.uploadSubmit, this)); - } - }, - uploadSubmit: function(e) - { - $('#redactor-progress').fadeIn(); - this.uploadForm(this.element, this.uploadFrame()); - }, - uploadFrame: function() - { - this.id = 'f' + Math.floor(Math.random() * 99999); - - var d = this.document.createElement('div'); - var iframe = ''; - - d.innerHTML = iframe; - $(d).appendTo("body"); - - // Start - if (this.uploadOptions.start) this.uploadOptions.start(); - - $( '#' + this.id ).load($.proxy(this.uploadLoaded, this)); - - return this.id; - }, - uploadForm: function(f, name) - { - if (this.uploadOptions.input) - { - var formId = 'redactorUploadForm' + this.id, - fileId = 'redactorUploadFile' + this.id; - - this.form = $('
        '); - - // append hidden fields - if (this.opts.uploadFields !== false && typeof this.opts.uploadFields === 'object') - { - $.each(this.opts.uploadFields, $.proxy(function(k, v) - { - if (v.toString().indexOf('#') === 0) v = $(v).val(); - - var hidden = $('', { - 'type': "hidden", - 'name': k, - 'value': v - }); - - $(this.form).append(hidden); - - }, this)); - } - - var oldElement = this.uploadOptions.input; - var newElement = $( oldElement ).clone(); - - $(oldElement).attr('id', fileId).before(newElement).appendTo(this.form); - - $(this.form).css('position', 'absolute') - .css('top', '-2000px') - .css('left', '-2000px') - .appendTo('body'); - - this.form.submit(); - - } - else - { - f.attr('target', name) - .attr('method', 'POST') - .attr('enctype', 'multipart/form-data') - .attr('action', this.uploadOptions.url); - - this.element.submit(); - } - }, - uploadLoaded: function() - { - var i = $( '#' + this.id)[0], d; - - if (i.contentDocument) d = i.contentDocument; - else if (i.contentWindow) d = i.contentWindow.document; - else d = window.frames[this.id].document; - - // Success - if (this.uploadOptions.success) - { - $('#redactor-progress').hide(); - - if (typeof d !== 'undefined') - { - // Remove bizarre
         tag wrappers around our json data:
        -					var rawString = d.body.innerHTML;
        -					var jsonString = rawString.match(/\{(.|\n)*\}/)[0];
        -
        -					jsonString = jsonString.replace(/^\[/, '');
        -					jsonString = jsonString.replace(/\]$/, '');
        -
        -					var json = $.parseJSON(jsonString);
        -
        -					if (typeof json.error == 'undefined') this.uploadOptions.success(json);
        -					else
        -					{
        -						this.uploadOptions.error(this, json);
        -						this.modalClose();
        -					}
        -				}
        -				else
        -				{
        -					this.modalClose();
        -					alert('Upload failed!');
        -				}
        -			}
        -
        -			this.el.attr('action', this.element_action);
        -			this.el.attr('target', '');
        -		},
        -
        -		// DRAGUPLOAD
        -		draguploadInit: function (el, options)
        -		{
        -			this.draguploadOptions = $.extend({
        -				url: false,
        -				success: false,
        -				error: false,
        -				preview: false,
        -				uploadFields: false,
        -				text: this.opts.curLang.drop_file_here,
        -				atext: this.opts.curLang.or_choose
        -			}, options);
        -
        -			if (window.FormData === undefined) return false;
        -
        -			this.droparea = $('
        '); - this.dropareabox = $('
        ' + this.draguploadOptions.text + '
        '); - this.dropalternative = $('
        ' + this.draguploadOptions.atext + '
        '); - - this.droparea.append(this.dropareabox); - - $(el).before(this.droparea); - $(el).before(this.dropalternative); - - // drag over - this.dropareabox.on('dragover', $.proxy(function() - { - return this.draguploadOndrag(); - - }, this)); - - // drag leave - this.dropareabox.on('dragleave', $.proxy(function() - { - return this.draguploadOndragleave(); - - }, this)); - - // drop - this.dropareabox.get(0).ondrop = $.proxy(function(e) - { - e.preventDefault(); - - this.dropareabox.removeClass('hover').addClass('drop'); - - //this.handleFileSelect(e); - this.draguploadUpload(e.dataTransfer.files[0]); - - }, this ); - }, - draguploadUpload: function(file) - { - var xhr = jQuery.ajaxSettings.xhr(); - - if (xhr.upload) - { - xhr.upload.addEventListener('progress', $.proxy(this.uploadProgress, this), false); - } - - var provider = function () { return xhr; }; - - var fd = new FormData(); - - // append hidden fields - if (this.draguploadOptions.uploadFields !== false && typeof this.draguploadOptions.uploadFields === 'object') - { - $.each(this.draguploadOptions.uploadFields, $.proxy(function(k, v) - { - if (v.toString().indexOf('#') === 0) v = $(v).val(); - fd.append(k, v); - - }, this)); - } - - // append file data - fd.append('file', file); - - $.ajax({ - url: this.draguploadOptions.url, - dataType: 'html', - data: fd, - xhr: provider, - cache: false, - contentType: false, - processData: false, - type: 'POST', - success: $.proxy(function(data) - { - data = data.replace(/^\[/, ''); - data = data.replace(/\]$/, ''); - - var json = $.parseJSON(data); - - if (typeof json.error == 'undefined') - { - this.draguploadOptions.success(json); - } - else - { - this.draguploadOptions.error(this, json); - this.draguploadOptions.success(false); - } - - }, this) - }); - - }, - draguploadOndrag: function() - { - this.dropareabox.addClass('hover'); - return false; - }, - draguploadOndragleave: function() - { - this.dropareabox.removeClass('hover'); - return false; - }, - uploadProgress: function(e, text) - { - var percent = e.loaded ? parseInt(e.loaded / e.total * 100, 10) : e; - this.dropareabox.text('Loading ' + percent + '% ' + (text || '')); - }, - - - // UTILS - isMobile: function() - { - return /(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent); - }, - outerHtml: function(el) - { - return $('
        ').append($(el).eq(0).clone()).html(); - }, - isString: function(obj) - { - return Object.prototype.toString.call(obj) == '[object String]'; - }, - isEmpty: function(html) - { - html = html.replace(/​|
        || /gi, ''); - html = html.replace(/\s/g, ''); - html = html.replace(/^

        [^\w\d]*?<\/p>$/i, ''); - - return html == ''; - }, - browser: function(browser) - { - var ua = navigator.userAgent.toLowerCase(); - var match = /(chrome)[ \/]([\w.]+)/.exec(ua) - || /(webkit)[ \/]([\w.]+)/.exec(ua) - || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) - || /(msie) ([\w.]+)/.exec(ua) - || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) - || []; - - if (browser == 'version') return match[2]; - if (browser == 'webkit') return (match[1] == 'chrome' || match[1] == 'webkit'); - - return match[1] == browser; - }, - oldIE: function() - { - if (this.browser('msie') && parseInt(this.browser('version'), 10) < 9) return true; - return false; - }, - getFragmentHtml: function (fragment) - { - var cloned = fragment.cloneNode(true); - var div = this.document.createElement('div'); - - div.appendChild(cloned); - return div.innerHTML; - }, - extractContent: function() - { - var node = this.$editor[0]; - var frag = this.document.createDocumentFragment(); - var child; - - while ((child = node.firstChild)) - { - frag.appendChild(child); - } - - return frag; - }, - isParentRedactor: function(el) - { - if (!el) return false; - if (this.opts.iframe) return el; - - if ($(el).parents('div.redactor_editor').length == 0 || $(el).hasClass('redactor_editor')) return false; - else return el; - }, - currentOrParentIs: function(tagName) - { - var parent = this.getParent(), current = this.getCurrent(); - return parent && parent.tagName === tagName ? parent : current && current.tagName === tagName ? current : false; - }, - isEndOfElement: function() - { - var current = this.getBlock(); - var offset = this.getCaretOffset(current); - - var text = $.trim($(current).text()).replace(/\n\r\n/g, ''); - - var len = text.length; - if (offset == len) return true; - else return false; - }, - isFocused: function() - { - var el, sel = this.getSelection(); - - if (sel.rangeCount && sel.rangeCount > 0) el = sel.getRangeAt(0).startContainer; - if (!el) return false; - if (this.opts.iframe) - { - if (this.getCaretOffsetRange().equals()) return !this.$editor.is(el); - else return true; - } - - return $(el).closest('div.redactor_editor').length != 0; - }, - removeEmptyAttr: function (el, attr) - { - if ($(el).attr(attr) == '') $(el).removeAttr(attr); - }, - removeFromArrayByValue: function(array, value) - { - var index = null; - - while ((index = array.indexOf(value)) !== -1) - { - array.splice(index, 1); - } - - return array; - } - }; - - // constructor - Redactor.prototype.init.prototype = Redactor.prototype; - - // LINKIFY - $.Redactor.fn.formatLinkify = function(protocol) - { - var url1 = /(^|<|\s)(www\..+?\..+?)(\s|>|$)/g, - url2 = /(^|<|\s)(((https?|ftp):\/\/|mailto:).+?)(\s|>|$)/g; - - var childNodes = (this.$editor ? this.$editor.get(0) : this).childNodes, i = childNodes.length; - while (i--) - { - var n = childNodes[i]; - if (n.nodeType === 3) - { - var html = n.nodeValue; - if (html && (html.match(url1) || html.match(url2))) - { - html = html.replace(/&/g, '&') - .replace(//g, '>') - .replace(url1, '$1$2$3') - .replace(url2, '$1$2$5'); - - $(n).after(html).remove(); - } - } - else if (n.nodeType === 1 && !/^(a|button|textarea)$/i.test(n.tagName)) - { - $.Redactor.fn.formatLinkify.call(n, protocol); - } - } - }; - - -})(jQuery); \ No newline at end of file diff --git a/public/javascripts/vendor/redactor/redactor.min.js b/public/javascripts/vendor/redactor/redactor.min.js deleted file mode 100755 index 9ccd0baf4..000000000 --- a/public/javascripts/vendor/redactor/redactor.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - Redactor v9.0.2 - Updated: Jun 25, 2013 - - http://imperavi.com/redactor/ - - Copyright (c) 2009-2013, Imperavi LLC. - License: http://imperavi.com/redactor/license/ - - Usage: $('#content').redactor(); -*/ -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(y(d){B b=0;B a=D;"fz fy";B e=y(f){7[0]=f.fx;7[1]=f.cl;7.47=f;E 7};e.3Z.cZ=y(){E 7[0]===7[1]};d.fn.Q=y(g){B h=[];B f=fA.3Z.fB.3m(fE,1);if(1s g==="fD"){7.15(y(){B j=d.1L(7,"Q");if(1s j!=="1p"&&d.5t(j[g])){B i=j[g].d4(j,f);if(i!==1p&&i!==j){h.1I(i)}}F{E d.2X(\'fC fw 5f "\'+g+\'" 2C 43\')}})}F{7.15(y(){if(!d.1L(7,"Q")){d.1L(7,"Q",c(7,g))}})}if(h.X===0){E 7}F{if(h.X===1){E h[0]}F{E h}}};y c(g,f){E 1N c.3Z.59(g,f)}d.43=c;d.43.fv="9.0.2";d.43.C={fp:D,fo:D,7W:D,8j:D,fm:D,fq:D,fr:D,fu:D,ft:D,fs:D,fF:D,fG:D,fT:D,fS:D,fR:D,2G:D,1h:D,2K:D,11:D,ae:"en",4h:"fU",3u:D,bt:D,a7:L,bb:L,3M:L,1i:D,5C:D,5g:L,5M:D,5W:L,4P:D,6T:60,8a:D,7g:D,7i:D,6S:"dn://",5B:D,4s:D,5x:D,5Y:D,2P:D,4j:L,9F:L,e4:L,1P:D,aL:["4x","|","2V","2T","3T","|","4g","4f","5a","4a","|","3N","3j"],19:L,4n:D,bW:0,6U:D,9T:D,aA:L,5U:\'<1F V="fV">\',aw:{},ax:[],2Z:["T","|","4x","|","2V","2T","3T","|","4g","4f","5a","4a","|","2D","2A","2Q","1e","2m","|","3N","3j","|","6J","|","5F"],80:["#fX","#fW","#fQ","#fP","#fJ","#fI","#fH","#fK","#fL","#fO","#fN","#fM","#a0","#fl","#fk","#eV","#eU","#eT","#eW","#eX","#f0","#eZ","#eY","#eS","#eR","#eL","#eK","#eJ","#eM","#eN","#c6","#eQ","#eP","#eO","#f1","#f2","#ff","#fe","#fd","#fg","#fh","#c6","#fj","#fi","#fc","#fb","#f5","#f4","#f3","#f6","#f7","#fa","#f9","#f8","#fY","#a0","#fZ","#gR","#gQ","#gP","#gS","#gT","#gW","#gV","#gU","#gO"],6o:["3T","2T","2V","5h","4g","4f","6s","6i","6n","4W","1e"],8P:{b:"2V",3C:"2V",i:"2T",em:"2T",6P:"3T",6W:"3T",1T:"4g",23:"4f",u:"5h",2y:"1e",1t:"1e",1e:"1e"},6a:D,aJ:["p","2r","1U","h1","h2","h3","h4"],1z:D,4w:L,8O:L,bk:L,bf:D,5P:D,4O:D,5T:["T","6b","2m","2a","7Z","2c","Z","gN"],85:"3C",8f:"em",4c:[],5o:[],4k:D,3H:"

        >

        ",22:">",9P:/^(P|H[1-6]|2N|dR|cH|cr|co|cQ|cN)$/i,6I:["aF","aG","bP","cw","dr","do","P","c9","6e","3Q"],7Q:["bR","2a","6b","hr","i?1X","2m","7Z","gH","Z","2c","1e","4B","2H","84"],83:["1F","dt","dt","h[1-6]","3c","2c"],am:["2r","K","dl","bM","1o","gG","bQ","23","p","1U","5p","1t","81","2y","1T"],7T:["P","aF","aG","bP","cw","dr","do","gF","gI","gJ","6e","2N","3Q","gM","da","4b","dR","cH","cr","co","cQ","cN"],af:{en:{T:"dk",2A:"4l dh",2D:"4l ce",1e:"7O",2m:"ct",7q:"4l 2m",ba:"gL 2m",5O:"gK",4x:"gX",ah:"gY 1c",ai:"hh",4X:"dZ",aT:"6w 1",bN:"6w 2",b3:"6w 3",bK:"6w 4",2V:"hg",2T:"hf",3N:"hi aZ",3j:"hj aZ",4g:"hl bp",4f:"hk bp",5a:"he",4a:"hd",4L:"eI",5H:"4l",9g:"h0",d5:"5l",8n:"4l 7O",8w:"5n 7I gZ",7M:"5n 7I h8",7B:"5n 7C cn",7E:"5n 7C cq",7h:"5l 7C",7t:"5l 7I",7x:"5l 7O",dP:"h9",dQ:"hc",7f:"5n dc",7D:"5l dc",M:"hb",dg:"ha",1K:"gE",1C:"cn",3X:"cq",cd:"ce gD ct",1c:"gc",5A:"8U",gb:"96",dM:"dh ga dZ",2Q:"4l gd",4y:"bo",ge:"gh",9h:"gg",bn:"gf 9h",bm:"g9 2Q g8",7G:"dC 1c dG dH 1C",7d:"g2 1c",7s:"dC 1c dG dH 3X",8c:"g1 1c",5F:"4l g0 g3",3T:"g4",8S:"g7",cB:"g6 2m in 1N g5",5h:"gj",6J:"gk",9e:"gy (gx)"}}};c.fn=d.43.3Z={2k:{8l:8,bH:46,9o:40,6r:13,92:27,aU:9,gw:17,gz:91,gA:37,bV:91},59:y(g,f){7.$3s=7.$1d=d(g);7.9R=b++;7.C=d.41({},d.43.C,7.$3s.1L(),f);7.5d=L;7.gC=[];7.9w=7.$1d.11("1G");7.gB=7.$1d.11("2u");if(7.C.2K){7.C.1h=L}if(7.C.1z){7.C.4w=D}if(7.C.4w){7.C.1z=D}if(7.C.6U){7.C.4n=L}7.N=N;7.31=31;7.3L=D;7.aV=1N 2B("^<(/?"+7.C.7Q.4I("|/?")+"|"+7.C.83.4I("|")+")[ >]");7.aY=1N 2B("^<(br|/?"+7.C.7Q.4I("|/?")+"|/"+7.C.83.4I("|/")+")[ >]");7.86=1N 2B("^]");7.7r=1N 2B("^("+7.C.7T.4I("|")+")$","i");if(7.C.1z===D){if(7.C.4O!==D&&d.4Z("p",7.C.4O)==="-1"){7.C.4O.1I("p")}if(7.C.5T!==D){B h=d.4Z("p",7.C.5T);if(h!=="-1"){7.C.5T.6v(h,h)}}}if(7.1B("30")||7.1B("6c")){7.C.2Z=7.cb(7.C.2Z,"5F")}7.C.16=7.C.af[7.C.ae];7.dq()},dw:y(f){E{T:{M:f.T,18:"9A"},4x:{M:f.4x,18:"1w",2I:{p:{M:f.ah,18:"3R"},2r:{M:f.ai,18:"aI",3g:"gv"},1U:{M:f.4X,18:"3R",3g:"gu"},h1:{M:f.aT,18:"3R",3g:"gn"},h2:{M:f.bN,18:"3R",3g:"gm"},h3:{M:f.b3,18:"3R",3g:"gl"},h4:{M:f.bK,18:"3R",3g:"go"}}},2V:{M:f.2V,1J:"2V"},2T:{M:f.2T,1J:"2T"},3T:{M:f.3T,1J:"gp"},5h:{M:f.5h,1J:"5h"},4g:{M:"&gs; "+f.4g,1J:"5S"},4f:{M:"1. "+f.4f,1J:"6B"},5a:{M:"< "+f.5a,18:"8p"},4a:{M:"> "+f.4a,18:"8o"},2D:{M:f.2D,18:"ag"},2A:{M:f.2A,18:"a9"},2Q:{M:f.2Q,18:"bc"},1e:{M:f.1e,18:"1w",2I:{8n:{M:f.8n,18:"cO"},gr:{2b:"70"},8w:{M:f.8w,18:"dD"},7M:{M:f.7M,18:"dz"},7B:{M:f.7B,18:"ca"},7E:{M:f.7E,18:"aC"},gq:{2b:"70"},7f:{M:f.7f,18:"dO"},7D:{M:f.7D,18:"8Q"},hm:{2b:"70"},7h:{M:f.7h,18:"di"},7t:{M:f.7t,18:"cE"},7x:{M:f.7x,18:"ci"}}},2m:{M:f.2m,18:"1w",2I:{2m:{M:f.7q,18:"bG"},5O:{M:f.5O,1J:"5O"}}},3N:{M:f.3N,18:"1w"},3j:{M:f.3j,18:"1w"},6J:{M:f.6J,18:"1w",2I:{6s:{M:f.7G,18:"87"},6i:{M:f.7d,18:"8i"},6n:{M:f.7s,18:"8d"},4W:{M:f.8c,18:"8h"}}},6s:{M:f.7G,18:"87"},6i:{M:f.7d,18:"8i"},6n:{M:f.7s,18:"8d"},4W:{M:f.8c,18:"8h"},5F:{1J:"c0",M:f.5F}}},1k:y(f,g,h){B i=7.C[f+"eh"];if(d.5t(i)){if(g===D){E i.3m(7,h)}F{E i.3m(7,g,h)}}F{E h}},ej:y(){dj(7.6T);d(31).36(".Q");7.$3s.36(".Q").eH("Q");B g=7.1H();if(7.C.4k){7.$1R.2d(7.$1d);7.$1R.1n();7.$1d.1b(g).1w()}F{B f=7.$I;if(7.C.1h){f=7.$3s}7.$1R.2d(f);7.$1R.1n();f.21("2O").21("bl").2z("3A").T(g).1w()}},eE:y(){E d.41({},7)},ez:y(){E 7.$I},ev:y(){E 7.$1R},ex:y(){E(7.C.1h)?7.$1X:D},ew:y(){E 7.$19},1H:y(){E 7.$1d.1b()},b1:y(){7.$I.2z("3A").2z("4e");B f=7.4V(7.$1X.1y().63());7.$I.1a({3A:L,4e:7.C.4h});E f},6Z:y(f,g){f=f.3k();if(7.C.2K){7.cm(f)}F{7.cA(f,g)}},cA:y(f,g){if(g!==D){f=7.8g(f);f=7.5J(f);f=7.8J(f);f=7.6G(f);if(7.C.1z===D){f=7.8M(f)}F{f=f.G(/([\\w\\W]*?)<\\/p>/gi,"$2
        ")}}f=7.8K(f);7.$I.T(f);7.12()},cm:y(f){B g=7.7n();7.$1X[0].4r="ef:eF";f=7.8J(f);f=7.6G(f);f=7.5Q(f);g.6E();g.cy(f);g.db();if(7.C.2K){7.$I=7.$1X.1y().U("2a").1a({3A:L,4e:7.C.4h})}7.12()},9L:y(f){f=7.8g(f,L);f=7.8M(f);f=7.8K(f);7.$I.T(f);7.12()},12:y(){B f="";7.a4();if(7.C.2K){f=7.b1()}F{f=7.$I.T()}f=7.7u(f);f=7.5Q(f);f=7.7Y(f);f=f.G(/<\\/1F><(1T|23)>([\\w\\W]*?)<\\/(1T|23)>/gi,"<$1>$2");if(d.2s(f)==="
        "){f=""}if(f!==""){f=7.aQ(f)}f=7.1k("eD",D,f);7.$1d.1b(f);if(1s eb!="1p"){d("#"+7.$3s[0].id+"eB").T(eb(f))}7.1k("ei",D,f);if(7.5d===D){7.1k("6t",D,f)}},7u:y(f){if(!7.C.2K){f=7.5J(f)}f=d.2s(f);f=7.aO(f);f=f.G(/>/gi,"");f=f.G(/&#bv;/gi,"");f=f.G(/&1Z;/gi," ");f=f.G("","?>");f=f.G(/([\\w\\W]*?)<\\/O>/gi,\'<2v$er-Q="3P"$2>$3\');f=f.G(/([\\w\\W]*?)<\\/O>/gi,"$2");f=f.G(/<2v(.*?)1L-Q="3P"(.*?)>([\\w\\W]*?)<\\/2v>/gi,"$3");f=f.G(/\\n?<\\/(.*?)>/gi,"");f=f.G(/([\\w\\W]*?)<\\/O>/gi,"$3");f=f.G(/([\\w\\W]*?)<\\/O>/gi,"$1");f=f.G(/([\\w\\W]*?)<\\/O>/gi,"");f=7.c3(f);E f},dq:y(){7.3x="";7.$1R=d(\'\');if(7.$1d[0].R==="eu"){7.C.4k=L}if(7.C.a7===D&&7.3w()){7.ac()}F{7.bD();if(7.C.1h){7.C.5g=D;7.az()}F{if(7.C.4k){7.c4()}F{7.c5()}}if(!7.C.1h){7.9C();7.9D()}}},ac:y(){if(!7.C.4k){7.$I=7.$1d;7.$I.1Y();7.$1d=7.6K(7.$I);7.$1d.1b(7.3x)}7.$1R.5Z(7.$1d).Y(7.$1d)},bD:y(){if(7.C.4k){7.3x=d.2s(7.$1d.1b())}F{7.3x=d.2s(7.$1d.T())}},c4:y(){7.$I=d("");7.$1R.5Z(7.$1d).Y(7.$I).Y(7.$1d);7.c1(7.$I);7.9n()},c5:y(){7.$I=7.$1d;7.$1d=7.6K(7.$I);7.$1R.5Z(7.$I).Y(7.$I).Y(7.$1d);7.9n()},6K:y(f){E d("<4K />").1a("2b",f.1a("id")).11("1G",7.9w)},c1:y(f){d.15(7.$1d.1H(0).3g.6F(/\\s+/),y(g,h){f.1Q("ey"+h)})},9n:y(){7.$I.1Q("2O").1a({3A:L,4e:7.C.4h});7.$1d.1a("4e",7.C.4h).1Y();7.6Z(7.3x)},9C:y(){B f=7.$I;if(7.C.1h){f=7.$1X}if(7.C.5C){f.1a("5C",7.C.5C)}if(7.C.5M){f.11("eo-1G",7.C.5M+"2L")}if(7.C.bt){7.$I.1Q("bl")}if(!7.C.5g){f.11("1G",7.9w)}},9D:y(){7.5d=D;if(7.C.19){7.C.19=7.dw(7.C.16);7.an()}7.cL();7.ab();7.9M();if(7.C.4P){7.4P()}2e(d.J(7.5b,7),4);if(7.1B("5s")){7j{7.N.1A("ek",D,D);7.N.1A("ee",D,D)}7e(f){}}if(7.C.1i){2e(d.J(7.1i,7),2l)}if(!7.C.3M){2e(d.J(y(){7.C.3M=L;7.9A(D)},7),3W)}7.1k("59")},9M:y(){B g=D;if(7.1B("3Y")&&94.95.39("eg")===-1){B f=7.1B("6f").6F(".");if(f[0]"+7.C.22+"

        ");d(s).2f(r);7.3y(r)}},7),1)}F{if(k===D){7.1u();B i=d("

        "+7.C.22+"

        ");7.3d(i[0]);7.3y(i);E D}}}if(7.C.1z){if(k&&7.C.9P.3r(k.R)){7.1u();2e(d.J(y(){B r=7.25();if((r.R==="6e"||r.R==="P")&&!d(r).33("2O")){7.e0(r)}},7),1)}F{7.1u();7.67();m.1V();E}}if(k.R=="3Q"||k.R=="da"){7.1u();7.67();m.1V();E}}}F{if(q===7.2k.6r&&(m.9Y||m.3J)){7.1u();m.1V();7.67()}}if(q===7.2k.aU&&7.C.5W){if(!7.C.e4){E L}if(7.8Z(7.1H())){E L}m.1V();if(j===L&&!m.3J){7.1u();7.3d(N.7U("\\t"));7.12();E D}F{if(!m.3J){7.8o()}F{7.8p()}}E D}if(q===7.2k.8l){if(1s n.5r!=="1p"&&n.5r!==2h){B o=d.2s(n.5r.G(/[^\\h7-~]/g,""));if(n.1n&&n.3h===3&&n.5r.il(0)==bv&&o==""){n.1n()}}}},7));7.$I.1x("3B.Q",d.J(y(m){if(a){E D}B h=m.8I;B j=7.3f();B l=7.2p();if(!7.C.1z&&l.3h==3&&(j==D||j.R=="dm")){B k=d("

        ").Y(d(l).4m());d(l).2f(k);B i=d(k).5D();if(i[0].R=="e1"){i.1n()}7.5u(k)}if(7.C.bk&&h===7.2k.6r){7.7w(7.C.6S)}if(7.C.1z===D&&(h===7.2k.bH||h===7.2k.8l)){E 7.aE(m)}7.1k("3B",m);7.12()},7));if(d.5t(7.C.7W)){7.$I.1x("1i.Q",d.J(7.C.7W,7))}if(d.5t(7.C.8j)){7.$I.1x("jS.Q",d.J(7.C.8j,7))}},ab:y(){if(!7.C.8a){E}d.15(7.C.8a,d.J(y(f,g){if(88[g]){d.41(7,88[g]);if(d.5t(88[g].59)){7.59()}}},7))},az:y(){7.dX();if(7.C.4k){7.8G(7.$1d)}F{7.$7S=7.$1d.1Y();7.$1d=7.6K(7.$7S);7.8G(7.$7S)}},8G:y(f){7.$1d.1a("4e",7.C.4h).1Y();7.$1R.5Z(f).Y(7.$1X).Y(7.$1d)},dX:y(){7.$1X=d(\'<1h Z="2u: 2l%;" jT="0" />\').6X("bg",d.J(y(){if(7.C.2K){7.7n();if(7.3x===""){7.3x=7.C.22}7.$1X.1y()[0].cy(7.3x);7.$1X.1y()[0].db();B f=a6(d.J(y(){if(7.$1X.1y().U("2a").T()){dj(f);7.9i()}},7),0)}F{7.9i()}},7))},8s:y(){E 7.$1X[0].9x.N},7n:y(){B f=7.8s();if(f.cv){f.jU(f.cv)}E f},9l:y(f){f=f||7.C.11;if(7.aD(f)){7.$1X.1y().U("6b").Y(\'<2m 2J="jV" 1g="\'+f+\'" />\')}if(d.jR(f)){d.15(f,d.J(y(h,g){7.9l(g)},7))}},9i:y(){7.$I=7.$1X.1y().U("2a").1a({3A:L,4e:7.C.4h});if(7.$I[0]){7.N=7.$I[0].jQ;7.31=7.N.jM||31}7.9l();if(7.C.2K){7.9L(7.$I.T())}F{7.6Z(7.3x)}7.9C();7.9D()},c8:y(f){if(7.8Z(f)){if(7.$3s.1a("3u")){7.C.3u=7.$3s.1a("3u")}if(7.C.3u===""){7.C.3u=D}if(7.C.3u!==D){7.C.1i=D;7.$I.6X("1i.4u",d.J(7.aP,7));E d(\'\').1a("3A",D).1c(7.C.3u)}}E D},aP:y(){7.$I.U("O.4u").1n();B f="";if(7.C.1z===D){f=7.C.3H}7.$I.36("1i.4u");7.$I.T(f);if(7.C.1z===D){7.3y(7.$I.63()[0])}7.12()},jL:y(){7.C.3u=D;7.$I.U("O.4u").1n();7.$I.36("1i.4u")},aO:y(f){E f.G(/(.*?)<\\/O>/i,"")},5W:y(g,f){if(!7.C.5W){E}if(!g.9B){if(f===77){7.3G(g,"jN")}F{if(f===66){7.3G(g,"2V")}F{if(f===73){7.3G(g,"2T")}F{if(f===74){7.3G(g,"5S")}F{if(f===75){7.3G(g,"6B")}F{if(f===72){7.3G(g,"jO")}F{if(f===76){7.3G(g,"jP")}}}}}}}}F{if(f===48){7.3S(g,"p")}F{if(f===49){7.3S(g,"h1")}F{if(f===50){7.3S(g,"h2")}F{if(f===51){7.3S(g,"h3")}F{if(f===52){7.3S(g,"h4")}F{if(f===53){7.3S(g,"h5")}F{if(f===54){7.3S(g,"h6")}}}}}}}}},3G:y(g,f){g.1V();7.1A(f,D)},3S:y(g,f){g.1V();7.3R(f)},1i:y(){if(!7.1B("6c")){7.31.2e(d.J(7.9r,7,L),1)}F{7.$I.1i()}},du:y(){7.9r()},9r:y(h){7.$I.1i();B f=7.2E();f.6k(7.$I[0]);f.8v(h||D);B g=7.1v();g.4t();g.5c(f)},9A:y(h){B g;if(7.C.3M){if(h!==D){7.1r()}B f=2h;if(7.C.1h){f=7.$1X.1G();if(7.C.2K){7.$I.2z("3A")}7.$1X.1Y()}F{f=7.$I.jW();7.$I.1Y()}g=7.$1d.1b();7.5V=g;7.$1d.1G(f).1w().1i();7.$1d.1x("5L.Q-4K",y(j){if(j.2k===9){B i=d(7);B k=i.1H(0).3y;i.1b(i.1b().bE(0,k)+"\\t"+i.1b().bE(i.1H(0).5u));i.1H(0).3y=i.1H(0).5u=k+1;E D}});7.by();7.3K("T");7.C.3M=D}F{g=7.$1d.1Y().1b();if(1s 7.5V!=="1p"){7.5V=7.5Q(7.5V,D)!==7.5Q(g,D)}if(7.5V){if(7.C.2K&&g===""){7.9L(g)}F{7.6Z(g);if(7.C.2K){7.9M()}}}if(7.C.1h){7.$1X.1w()}F{7.$I.1w()}if(7.C.2K){7.$I.1a("3A",L)}7.$1d.36("5L.Q-4K");7.$I.1i();7.1f();7.5b();7.bh();7.8m("T");7.C.3M=L}},4P:y(){B f=D;7.6T=a6(d.J(y(){B g=7.1H();if(f!==g){d.bO({2U:7.C.4P,1l:"6y",1L:7.$1d.1a("2b")+"="+jX(k4(g)),2R:d.J(y(h){7.1k("4P",D,h);f=g},7)})}},7),7.C.6T*k5)},an:y(){if(7.C.1P){7.C.2Z=7.C.aL}F{if(!7.C.aA){B g=7.C.2Z.39("T"),h=7.C.2Z[g+1];7.C.2Z.6v(g,1);if(h==="|"){7.C.2Z.6v(g,1)}}}d.41(7.C.19,7.C.aw);d.15(7.C.ax,d.J(y(j,k){7.C.2Z.1I(k)},7));if(7.C.19){d.15(7.C.19.4x.2I,d.J(y(j,k){if(d.4Z(j,7.C.aJ)=="-1"){k6 7.C.19.4x.2I[j]}},7))}if(7.C.2Z.X===0){E D}7.aq();7.$19=d("<1T>").1Q("k7").1a("id","k3"+7.9R);if(7.C.1P){7.$1P=d(\'\').1a("id","k2"+7.9R).1Y();7.$1P.Y(7.$19);d("2a").Y(7.$1P)}F{if(7.C.9T){d(7.C.9T).T(7.$19)}F{7.$1R.4N(7.$19)}}d.15(7.C.2Z,d.J(y(k,l){if(l==="|"){7.$19.Y(d(7.C.5U))}F{if(7.C.19[l]){B j=7.C.19[l];if(7.C.5x===D&&l==="2Q"){E L}7.$19.Y(d("<1F>").Y(7.4J(l,j)))}}},7));7.$19.U("a").1a("5C","-1");if(7.C.4n){7.9S();d(N).1x("jY.Q",d.J(7.9S,7))}if(7.C.6o){B f=d.J(7.5I,7);7.$I.1x("5m.Q 3B.Q",f)}},9S:y(){B j=d(7.N).4i();B h=7.$1R.3z().1M;B i=0;B f=h+7.$1R.1G()+40;if(j>h){B g="2l%";if(7.C.6U){i=7.$1R.3z().1C;g=7.$1R.d2();7.$19.1Q("c2")}7.4n=L;7.$19.11({2w:"6Y",2u:g,jZ:k0,1M:7.C.bW+"2L",1C:i});if(j\').11({jw:g});l.Y(h);h.1x("1D",y(){B i=d(7).1a("2J");if(o==="3j"){i=d(7).11("4S-45")}m.7R(n,i)})}B f=d(\'\').T(7.C.16.1K).1x("1D",y(){m.7R(n,D)});l.Y(f)},7R:y(g,f){7.1u();7.$I.1i();7.dF(g);if(f!==D){7.dB(g,f)}if(7.C.1P){7.$1P.4U(2l)}7.12()},bF:y(g,f){d.15(f,d.J(y(j,i){if(!i.3g){i.3g=""}B h;if(i.2b==="70"){h=d(\'\')}F{h=d(\'\'+i.M+"");h.1x("1D",d.J(y(k){if(k.1V){k.1V()}if(7.1B("30")){k.a8=D}if(i.1k){i.1k.3m(7,j,h,i,k)}if(i.1J){7.1A(i.1J,j)}if(i.18){7[i.18](j)}7.5I();if(7.C.1P){7.$1P.4U(2l)}},7))}g.Y(h)},7))},aj:y(l,k,i){if(!7.C.3M){l.1V();E D}if(7.24(i).33("4T")){7.6N()}F{7.6N();7.3K(i);7.24(i).1Q("4T");B h=7.24(i).2w(),j=h.1C+"2L",f=29;if(7.C.1P){k.11({2w:"9t",1C:j,1M:f+"2L"}).1w()}F{if(7.C.4n&&7.4n){k.11({2w:"6Y",1C:j,1M:f+"2L"}).1w()}F{k.11({2w:"9t",1C:j,1M:h.1M+f+"2L"}).1w()}}}B g=d.J(y(m){7.a3(m,k)},7);d(N).6X("1D",g);7.$I.6X("1D",g);l.jm()},6N:y(){7.$19.U("a.4T").21("57").21("4T");d(".a5").1Y()},a3:y(g,f){if(!d(g.1S).33("4T")){f.21("4T");7.6N()}},4J:y(i,f){B g=d(\'\');B h=d(\'\');g.1x("1D",d.J(y(j){if(j.1V){j.1V()}if(7.1B("30")){j.a8=D}if(g.33("7o")){E D}if(7.61()===D){7.$I.1i()}if(f.1J){7.1A(f.1J,i);7.6D()}F{if(f.18&&f.18!=="1w"){7[f.18](i);7.6D()}F{if(f.1k){f.1k.3m(7,i,g,f,j);7.6D()}F{if(i==="3j"||i==="3N"||f.2I){7.aj(j,h,i)}}}}7.5I(D,i)},7));if(i==="3j"||i==="3N"||f.2I){h.6u(7.$19);if(i==="3j"||i==="3N"){7.bL(h,i)}F{7.bF(h,f.2I)}}E g},24:y(f){if(!7.C.19){E D}E d(7.$19.U("a.6H"+f))},b9:y(g){B f=7.24(g);if(f.33("57")){f.21("57")}F{f.1Q("57")}},3K:y(f){7.24(f).1Q("57")},8m:y(f){7.24(f).21("57")},bj:y(f){d.15(7.C.6o,d.J(y(g,h){if(h!=f){7.8m(h)}},7))},bh:y(){7.$19.U("a.7J").d9("a.bq").21("7o")},by:y(){7.$19.U("a.7J").d9("a.bq").1Q("7o")},jo:y(f,g){7.24(f).1Q("6H"+g)},jp:y(f,g){7.24(f).21("6H"+g)},jq:y(){7.$19.Y(d(7.C.5U))},jx:y(f){7.24(f).1O().2d(d(7.C.5U))},jy:y(f){7.24(f).1O().2M(d(7.C.5U))},jF:y(f){7.24(f).1O().5D().1n()},jG:y(f){7.24(f).1O().68().1n()},jH:y(f){if(!7.C.19){E}7.24(f).1O().1Q("7H")},jI:y(f){if(!7.C.19){E}7.24(f).1O().21("7H")},jE:y(g,h,j,i){if(!7.C.19){E}B f=7.4J(g,{M:h,1k:j,2I:i});7.$19.Y(d("<1F>").Y(f))},jD:y(g,h,j,i){if(!7.C.19){E}B f=7.4J(g,{M:h,1k:j,2I:i});7.$19.4N(d("<1F>").Y(f))},jz:y(l,g,i,k,j){if(!7.C.19){E}B f=7.4J(g,{M:i,1k:k,2I:j});B h=7.24(l);h.1O().2d(d("<1F>").Y(f))},jA:y(j,g,i,l,k){if(!7.C.19){E}B f=7.4J(g,{M:i,1k:l,2I:k});B h=7.24(j);h.1O().2M(d("<1F>").Y(f))},jB:y(f,h){B g=7.24(f);if(h){g.1O().5D().1n()}g.1O().21("7H");g.1n()},5I:y(h,j){B f=7.3f();7.bj(j);if(h===D){7.b9(j);E}if(f&&f.R==="A"){7.$19.U("a.b7").1c(7.C.16.ba)}F{7.$19.U("a.b7").1c(7.C.16.7q)}if(7.C.6a){d.15(7.C.6a,d.J(y(k,l){7.C.6o.1I(l)},7));d.41(7.C.8P,7.C.6a)}d.15(7.C.8P,d.J(y(k,l){if(d(f).35(k,7.$I.1H()[0]).X!=0){7.3K(l)}},7));B g=d(f).35(7.C.6I.3k().3p(),7.$I[0]);if(g.X){B i=g.11("1c-8e");jC(i){8y"3X":7.3K("6n");5K;8y"aB":7.3K("6i");5K;8y"4W":7.3K("4W");5K;k8:7.3K("6s");5K}}},1J:y(g,h,f){if(g==="aK"&&7.1B("30")){h="<"+h+">"}if(g==="3O"&&7.1B("30")){7.$I.1i();7.N.28.5e().8E(h)}F{7.N.1A(g,D,h)}if(f!==D){7.12()}7.1k("1A",g,h)},1A:y(i,h,o){if(!7.C.3M){7.$1d.1i();E D}if(i==="3O"){7.8A(h,o);7.1k("1A",i,h);E}if(7.7N("4b")&&!7.C.bf){E D}if(i==="5S"||i==="6B"){B p=7.3f();B l=d(p).35("23, 1T");B k=D;if(l.X){k=L;B n=l[0].R;if((i==="5S"&&n==="kn")||(i==="6B"&&n==="ku")){k=D}}7.1u();7.1r();if(k){B g=7.56();B f=7.2x(g);if(1s g[0]!="1p"&&g.X>1&&g[0].3h==3){f.cU(7.25())}B j="",q="";d.15(f,d.J(y(u,v){if(v.R=="2N"){B t=d(v);B r=t.4m();r.U("1T","23").1n();if(7.C.1z===D){j+=7.4V(d("

        ").Y(r.1y()))}F{j+=r.T()+"
        "}if(u==0){t.1Q("Q-kq").71();q=7.4V(t)}F{t.1n()}}},7));T=7.$I.T().G(q,""+j+"<"+n+">");7.$I.T(T);7.$I.U(n+":71").1n();7.1f()}F{7.N.1A(i);B p=7.3f();B l=d(p).7b("23, 1T");if(l.X){if((7.1B("30")||7.1B("5s"))&&p.R!=="2N"){d(p).2f(d(p).T())}B m=l.1O();if(7.6L(m)&&7.6p(m[0])){m.2f(m.1y())}}if(7.1B("5s")){7.$I.1i()}7.1f()}7.12();7.1k("1A",i,h);E}if(i==="5O"){7.1u();B p=7.3f();if(d(p)[0].R==="A"){d(p).2f(d(p).1c());7.12();7.1k("1A",i,h);E}}7.1J(i,h,o);if(i==="c0"){7.$I.U("hr").2z("id")}},8o:y(){7.7P("4a")},8p:y(){7.7P("5a")},7P:y(k){if(k==="4a"){B l=7.25();if(l&&l.R=="2N"){7.1r();B j=7.3f();B i=d(j).35("23, 1T");B g=i[0].R;B f=7.2x();d.15(f,y(o,p){if(p.R=="2N"){B n=d(p).68();if(n.32()!=0&&n[0].R=="2N"){B m=n.63("1T, 23");if(m.32()==0){n.Y(d("<"+g+">").Y(p))}F{m.Y(p)}}}});7.1f()}}F{7.1r();B l=7.25();if(l&&l.R=="2N"){B f=7.2x();B h=0;7.8q(l,h,f)}7.1f()}},8q:y(f,h,g){if(f&&f.R=="2N"){B i=d(f).1O().1O();if(i.32()!=0&&i[0].R=="2N"){i.2d(f)}F{if(1s g[h]!="1p"){f=g[h];h++;7.8q(f,h,g)}F{7.1A("5S")}}}},8K:y(f){B g=7.c8(f);if(g!==D){E g}if(7.C.1z===D){if(f===""){f=7.C.3H}F{if(f.3e(/^$/gi)!==-1){f="


        "+7.C.3H}}}E f},8M:y(f){if(7.C.8O){f=f.G(/([\\w\\W]*?)<\\/K>/gi,"$2

        ")}if(7.C.4w){f=7.8N(f)}E f},8J:y(f){f=f.G(/<2c(.*?)>([\\w\\W]*?)<\\/2c>/gi,\'$2\');f=f.G(/([\\w\\W]*?)<\\/Z>/gi,\'<1m$1 Z="2g: 1K;" 2J="Q-Z-3o">$2\');f=f.G(/<1o(.*?)>([\\w\\W]*?)<\\/1o>/gi,\'<1m$1 2J="Q-1o-3o">$2\');if(7.C.5P){f=f.G(/<\\?34([\\w\\W]*?)\\?>/gi,\'<1m Z="2g: 1K;" 2J="Q-34-3o">$1\')}F{f=f.G(/<\\?34([\\w\\W]*?)\\?>/gi,"")}E f},c3:y(f){f=f.G(/([\\w\\W]*?)<\\/M>/gi,\'<2c$1 1l="1c/3U">$2<\\/2c>\');f=f.G(/<1m(.*?) Z="2g: 1K;" 2J="Q-Z-3o">([\\w\\W]*?)<\\/1m>/gi,"$2");f=f.G(/<1m(.*?)2J="Q-1o-3o"(.*?)>([\\w\\W]*?)<\\/1m>/gi,"<1o$1$2>$3");if(7.C.5P){f=f.G(/<1m Z="2g: 1K;" 2J="Q-34-3o">([\\w\\W]*?)<\\/1m>/gi,"")}E f},5Q:y(g,f){if(f!==D){B f=[],i=0,h;h=g.1W(/<(1U|Z|2c|M)(.*?)>([\\w\\W]*?)<\\/(1U|Z|2c|M)>/gi);if(h!==2h){d.15(h,y(j,k){i=j;g=g.G(k,"8D"+i);f.1I(k)})}if(7.C.5P){h=g.1W(/<\\?34([\\w\\W]*?)\\?>/gi);if(h!==2h){d.15(h,y(j,k){i=i+j;g=g.G(k,"8D"+j);f.1I(k)})}}}g=g.G(/\\n/g," ");g=g.G(/[\\t]*/g,"");g=g.G(/\\n\\s*\\n/g,"\\n");g=g.G(/^[\\s\\n]*/g," ");g=g.G(/[\\s\\n]*$/g," ");g=g.G(/>\\s{2,}<");if(f!==D){g=7.bT(f,g)}g=g.G(/\\n\\n/g,"\\n");E g},bT:y(f,g){if(f){d.15(f,y(h,j){g=g.G("8D"+h,j)})}E g},7Y:y(j){j=j.G(/([\\w\\W]*?)<\\/O>/gi,"$1");j=j.G(/[\\kw-\\kB\\kA]/g,"");B h=["<1U>","<2r>\\\\s*","
        ","
        ","\\\\s*","<1T>","<23>","<1F>","<1e>","<2y>","\\\\s*","&1Z;","\\\\s*","&1Z;","

        \\\\s*

        ","

        ","

        &1Z;

        ","

        \\\\s*
        \\\\s*

        ","\\\\s*","\\\\s*
        \\\\s*
        "];B f=h.X;2C(B g=0;g

        "){E 7.C.3H}h=h+"\\n";B f=[];B m=0;if(h.3e(/<(1e|K|1U|2t)/gi)!==-1){d.15(h.1W(/<(1e|K|1U|2t)(.*?)>([\\w\\W]*?)<\\/(1e|K|1U|2t)>/gi),y(n,o){m++;f[m]=o;h=h.G(o,"{G"+m+"}\\n")})}if(7.C.5P){if(h.3e(/<1m(.*?)2J="Q-34-3o">/gi)!==-1){d.15(h.1W(/<1m(.*?)2J="Q-34-3o">([\\w\\W]*?)<\\/1m>/gi),y(n,o){m++;f[m]=o;h=h.G(o,"{G"+m+"}\\n")})}}h=h.G(/<\\!\\-\\-([\\w\\W]*?)\\-\\->/gi,"<5X>$1");h=h.G(/
        \\s*
        /gi,"\\n\\n");y j(o,i,n){E h.G(1N 2B(o,i),n)}B l="(5X|T|2a|6b|M|7Z|Z|2c|2m|1h|1e|2H|84|kx|ky|kr|4B|2y|1t|81|K|dl|dd|dt|1T|23|1F|1U|5p|3c|1o|bQ|bR|2r|8H|kp|Z|p|h[1-6]|hr|bM|kd|1m|ds|dv|kc|5y|2S|ka|km|kl|ki|kj|ko)";h=j("(<"+l+"[^>]*>)","gi","\\n$1");h=j("()","gi","$1\\n\\n");h=j("\\r\\n","g","\\n");h=j("\\r","g","\\n");h=j("/\\n\\n+/","g","\\n\\n");B k=h.6F(1N 2B("\\kk*\\n","g"),-1);h="";2C(B g in k){if(k.kh(g)){if(k[g].3e("{G")==-1){h+="

        "+k[g].G(/^\\n+|\\n+$/g,"")+"

        "}F{h+=k[g]}}}if(h.3e(/<2r/gi)!==-1){d.15(h.1W(/<2r(.*?)>([\\w\\W]*?)<\\/2r>/gi),y(n,o){B p="";p=o.G("

        ","");p=p.G("

        ","
        ");h=h.G(o,p)})}h=j("

        s*

        ","gi","");h=j("

        ([^<]+)","gi","

        $1

        ");h=j("

        s*(]*>)s*

        ","gi","$1");h=j("

        (<1F.+?)

        ","gi","$1");h=j("

        s*(]*>)","gi","$1");h=j("(]*>)s*

        ","gi","$1");h=j("(]*>)s*
        ","gi","$1");h=j("
        (s*]*>)","gi","$1");h=j("\\n

        ","gi","

        ");h=j("

        ","gi","");h=j("

        (.*?)","gi","");h=j("

        ","gi","");h=j("

        \\t?\\n?

        ","gi","

        ");h=j("

        ","gi","");h=j("

        ","gi","");h=j("

        ","gi","");d.15(f,y(n,o){h=h.G("{G"+n+"}",o)});h=h.G(/<5X>([\\w\\W]*?)<\\/5X>/gi,"");E d.2s(h)},6G:y(f){B g="3C";if(7.C.85==="b"){g="b"}B h="em";if(7.C.8f==="i"){h="i"}f=f.G(/([\\w\\W]*?)<\\/O>/gi,"<"+h+">$1");f=f.G(/([\\w\\W]*?)<\\/O>/gi,"<"+g+">$1");if(7.C.85==="3C"){f=f.G(/([\\w\\W]*?)<\\/b>/gi,"<3C>$1")}F{f=f.G(/<3C>([\\w\\W]*?)<\\/3C>/gi,"$1")}if(7.C.8f==="em"){f=f.G(/([\\w\\W]*?)<\\/i>/gi,"$1")}F{f=f.G(/([\\w\\W]*?)<\\/em>/gi,"$1")}f=f.G(/<6W>([\\w\\W]*?)<\\/6W>/gi,"<6P>$1");if(!/([\\w\\W]*?)<\\/O>/gi.3r(f)){f=f.G(/([\\w\\W]*?)<\\/O>/gi,\'$3\')}E f},5J:y(h){if(h==""||1s h=="1p"){E h}B i=D;if(7.C.4O!==D){i=L}B f=i===L?7.C.4O:7.C.5T;B g=/<\\/?([a-z][a-7V-9]*)\\b[^>]*>/gi;h=h.G(g,y(k,j){if(i===L){E d.4Z(j.3p(),f)>"-1"?k:""}F{E d.4Z(j.3p(),f)>"-1"?"":k}});h=7.6G(h);E h},8g:y(f,g){B h=f.1W(/<(1U|4X)(.*?)>([\\w\\W]*?)<\\/(1U|4X)>/gi);if(h!==2h){d.15(h,d.J(y(k,l){B j=l.1W(/<(1U|4X)(.*?)>([\\w\\W]*?)<\\/(1U|4X)>/i);j[3]=j[3].G(/&1Z;/g," ");if(g!==D){j[3]=7.8L(j[3])}f=f.G(l,"<"+j[1]+j[2]+">"+j[3]+"")},7))}E f},8L:y(f){f=3i(f).G(/&8k;/g,"&").G(/&5z;/g,"<").G(/>/g,">").G(/&9Z;/g,\'"\');E 3i(f).G(/&/g,"&8k;").G(//g,">").G(/"/g,"&9Z;")},a4:y(){B f=7.$I.U("2j, a, b, 3C, ks, kv, i, em, u, ke, 6W, 6P, O, kb");f.89(\'[Z*="2v-32"][Z*="6R-1G"]\').11("2v-32","").11("6R-1G","");f.89(\'[Z*="4S-45: aS;"][Z*="6R-1G"]\').11("4S-45","").11("6R-1G","");f.89(\'[Z*="4S-45: aS;"]\').11("4S-45","");d.15(f,d.J(y(g,h){7.4A(h,"Z")},7));7.$I.U(\'K[Z="1c-8e: -3Y-3q;"]\').1y().dJ()},aQ:y(g){B k=0,m=g.X,l=0,f=2h,h=2h,p="",j="",o="";7.5v=0;2C(;k"!=g.3V(l)){l++}p=g.3a(f,l-f);k=l;B n;if("!--"==p.3a(1,3)){if(!p.1W(/--$/)){2n("-->"!=g.3a(l,3)){l++}l+=2;p=g.3a(f,l-f);k=l}if("\\n"!=j.3V(j.X-1)){j+="\\n"}j+=7.4Q();j+=p+">\\n"}F{if("!"==p[1]){j=7.6Q(p+">",j)}F{if("?"==p[1]){j+=p+">\\n"}F{if(n=p.1W(/^<(2c|Z|1U)/i)){n[1]=n[1].3p();p=7.8b(p);j=7.6Q(p,j);h=3i(g.3a(k+1)).3p().39("\\n<\\/2c>/gi,"<2c$1><\\/2c>");7.5v=0;E f},8b:y(g){B i="";g=g.G(/\\n/g," ");g=g.G(/\\s{2,}/g," ");g=g.G(/^\\s+|\\s+$/g," ");B h="";if(g.1W(/\\/$/)){h="/";g=g.G(/\\/+$/,"")}B f;2n(f=/\\s*([^= ]+)(?:=(([\'"\']).*?\\3|[^ ]+))?/.1J(g)){if(f[2]){i+=f[1].3p()+"="+f[2]}F{if(f[1]){i+=f[1].3p()}}i+=" ";g=g.3a(f[0].X)}E i.G(/\\s*$/,"")+h+">"},6Q:y(f,h){B g=f.1W(7.86);if(f.1W(7.aV)||g){h=h.G(/\\s*$/,"");h+="\\n"}if(g&&"/"==f.3V(1)){7.5v--}if("\\n"==h.3V(h.X-1)){h+=7.4Q()}if(g&&"/"!=f.3V(1)){7.5v++}h+=f;if(f.1W(7.aY)||f.1W(7.86)){h=h.G(/ *$/,"");h+="\\n"}E h},87:y(){7.5w("","kf")},8d:y(){7.5w("3X","kt")},8i:y(){7.5w("aB","kz")},8h:y(){7.5w("4W","jk")},5w:y(f,h){7.1u();if(7.9c()){7.N.1A(h,D,D);E L}7.1r();B g=7.2x();d.15(g,d.J(y(k,l){B j=D;if(d.4Z(l.R,7.C.6I)!==-1){j=d(l)}F{j=d(l).35(7.C.6I.3k().3p(),7.$I[0])}if(j){j.11("1c-8e",f);7.4A(j,"Z")}},7));7.1f();7.12()},aE:y(i){B f=d.2s(7.$I.T());f=f.G(//i,"");B h=f.G(/

        \\s?<\\/p>/gi,"");if(f===""||h===""){i.1V();B g=d(7.C.3H).1H(0);7.$I.T(g);7.1i()}7.12()},3R:y(f){7.1u();B g=7.2x();7.1r();d.15(g,d.J(y(h,j){if(j.R!=="2N"){7.7c(f,j)}},7));7.1f();7.12()},7c:y(f,i){if(i===D){i=7.25()}if(i===D){if(7.C.1z===L){7.1A("aK",f)}E L}B h="";if(f!=="1U"){h=d(i).1y()}F{h=d(i).T();if(d.2s(h)===""){h=\'\'}}if(i.R==="4b"){f="p"}if(7.C.1z===L&&f==="p"){d(i).2f(d("").Y(h).T()+"
        ")}F{B g=d("<"+f+">").Y(h);d(i).2f(g)}},cp:y(h,f,g){if(g!==D){7.1r()}B i=d("<"+f+"/>");d(h).2f(y(){E i.Y(d(7).1y())});if(g!==D){7.1f()}E i},aI:y(){7.1u();if(7.C.1z===D){7.1r();B k=7.2x();if(k){d.15(k,d.J(y(m,n){if(n.R==="3Q"){7.7c("p",n,D)}F{if(n.R!=="2N"){7.7c("2r",n,D)}}},7))}7.1f()}F{B j=7.25();if(j.R==="3Q"){7.1r();d(j).2f(d(j).T()+"
        ");7.1f()}F{B l=7.cj("2r");B h=d(l).T();B g=["1T","23","1e","2y","4B","2H","84","dl"];d.15(g,y(m,n){h=h.G(1N 2B("<"+n+"(.*?)>","gi"),"");h=h.G(1N 2B("","gi"),"")});B f=7.C.7T;f.1I("1t");d.15(f,y(m,n){h=h.G(1N 2B("<"+n+"(.*?)>","gi"),"");h=h.G(1N 2B("","gi"),"
        ")});d(l).T(h);7.8t(l);B i=d(l).5D();if(i[0].R==="e1"){i.1n()}}}7.12()},i2:y(f,h){B g=7.2x();d(g).2z(f);7.12()},i1:y(f,h){B g=7.2x();d(g).1a(f,h);7.12()},i3:y(g){B f=7.2x();d(f).11(g,"");7.4A(f,"Z");7.12()},i4:y(h,g){B f=7.2x();d(f).11(h,g);7.12()},i5:y(g){B f=7.2x();d(f).21(g);7.4A(f,"V");7.12()},i0:y(g){B f=7.2x();d(f).1Q(g);7.12()},hZ:y(f){7.1r();7.7X(y(g){d(g).21(f);7.4A(g,"V")});7.1f();7.12()},hU:y(f){B g=7.2p();if(!d(g).33(f)){7.4q("1Q",f)}},dF:y(f){7.1r();7.7X(y(g){d(g).11(f,"");7.4A(g,"Z")});7.1f();7.12()},dB:y(g,f){7.4q("11",g,f)},hT:y(f){7.1r();B h=7.2E(),i=7.5E(),g=7.56();if(h.4D||h.4E===h.5k&&i){g=d(i)}d(g).2z(f);7.dL();7.1f();7.12()},hV:y(f,g){7.4q("1a",f,g)},4q:y(i,f,j){7.1r();B g=7.2E(),h=7.5E();if(g.4D||g.4E===g.5k&&h){d(h)[i](f,j)}F{7.N.1A("dI",D,4);B k=7.$I.U("2v");d.15(k,d.J(y(l,m){7.dE(i,m,f,j)},7))}7.1f();7.12()},dE:y(j,i,f,k){B h=d(i).1O(),g;if(h&&h[0].R==="82"){g=h;d(i).2f(d(i).T())}F{g=d(\'\').Y(d(i).1y());d(i).2f(g)}d(g)[j](f,k);E g},7X:y(j){B g=7.2E(),h=7.5E(),f=7.56(),i;if(g.4D||g.4E===g.5k&&h){f=d(h);i=L}d.15(f,d.J(y(k,l){if(!i&&l.R!=="82"){if(l.3I.R==="82"&&!d(l.3I).33("2O")){l=l.3I}F{E}}j.3m(7,l)},7))},dL:y(){B f=7.$I.U("O[1L-Q-4q]");d.15(f,d.J(y(h,j){B g=d(j);if(g.1a("V")===1p&&g.1a("Z")===1p){g.1y().dJ()}},7))},hW:y(f){7.1r();7.N.1A("dI",D,4);B h=7.$I.U("2v");B g;d.15(h,y(j,l){B k=d("<"+f+"/>").Y(d(l).1y());d(l).2f(k);g=k});7.1f();7.12()},hY:y(f){7.1r();B g=f.hX();B h=7.56();d.15(h,y(j,k){if(k.R===g){d(k).2f(d(k).1y())}});7.1f();7.12()},8A:y(h,j){B l=7.2p();B i=l.3I;7.$I.1i();7.1u();B f=d("").Y(d.8F(h));h=f.T();h=7.7Y(h);f=d("").Y(d.8F(h));B g=7.25();if(f.1y().X==1){B k=f.1y()[0].R;if(k!="P"&&k==g.R||k=="4b"){h=f.1c();f=d("").Y(h)}}if(!7.C.1z&&f.1y().X==1&&f.1y()[0].3h==3&&(7.7z().X>2||(!l||l.R=="dm"&&!i||i.R=="dk"))){h="

        "+h+"

        "}if(g.R=="3Q"&&h.39("1&&g||f.1y().is("p, :5y, 1T, 23, K, 1e, 2r, 1U, 8H, 1m, 5y, 2S, dv, ds")){if(7.1B("30")){7.N.28.5e().8E(h)}F{7.N.1A("3O",D,h)}}F{7.6O(h)}}if(7.58){7.31.2e(d.J(y(){if(!7.C.1z){7.5u(7.$I.1y().ed())}F{7.du()}},7),1)}7.5b();if(j!==D){7.12()}},6O:y(g){B k=7.1v();if(k.2q&&k.44){B f=k.2q(0);f.e5();B h=7.N.42("K");h.4R=g;B l=7.N.ad(),j,i;2n((j=h.7F)){i=l.4F(j)}f.3d(l);if(i){f=f.8u();f.e2(i);f.8v(L);k.4t();k.5c(f)}}},dN:y(g){B f=d(d.8F(g));if(f.X){g=f.1c()}7.$I.1i();if(7.1B("30")){7.N.28.5e().8E(g)}F{7.N.1A("3O",D,g)}7.12()},3d:y(f){f=f[0]||f;B g=7.1v();if(g.2q&&g.44){47=g.2q(0);47.e5();47.3d(f);47.i6(f);47.e2(f);g.4t();g.5c(47)}},6g:y(f){if(7.dx()){if(7.$I.1y().ed()[0]!==f){E D}7.1u();if(7.C.1z===D){B g=d(7.C.3H);d(f).2d(g);7.3y(g)}F{B g=d(\'\'+7.C.22+"",7.N)[0];d(f).2d(g);d(g).2d(7.C.22);7.1f()}}},67:y(){7.1r();7.$I.U("#28-1E-1").2M("
        "+(7.1B("3Y")?7.C.22:""));7.1f()},hn:y(){7.1r();7.$I.U("#28-1E-1").2M("

        "+(7.1B("3Y")?7.C.22:""));7.1f()},e0:y(f){B g=d("
        "+7.C.22);d(f).2f(g);7.3y(g)},dS:y(f){f=7.1k("i7",D,f);if(7.7N("4b")){f=7.cz(f);7.8B(f);E L}f=f.G(/|<\\?(?:34)?[\\s\\S]*?\\?>/gi,"");f=f.G(/(&1Z;){2,}/gi,"&1Z;");f=f.G(/&1Z;/gi," ");f=f.G(/([\\w\\W]*?)<\\/b>/gi,"$2");f=7.5J(f);f=f.G(/<1t><\\/1t>/gi,"[1t]");f=f.G(/<1t>&1Z;<\\/1t>/gi,"[1t]");f=f.G(/<1t>
        <\\/1t>/gi,"[1t]");f=f.G(/([\\w\\W]*?)<\\/a>/gi,\'[a 1g="$2"]$4[/a]\');f=f.G(/<1h(.*?)>([\\w\\W]*?)<\\/1h>/gi,"[1h$1]$2[/1h]");f=f.G(/<2A(.*?)>([\\w\\W]*?)<\\/2A>/gi,"[2A$1]$2[/2A]");f=f.G(/<3F(.*?)>([\\w\\W]*?)<\\/3F>/gi,"[3F$1]$2[/3F]");f=f.G(/<3D(.*?)>([\\w\\W]*?)<\\/3D>/gi,"[3D$1]$2[/3D]");f=f.G(/<2t(.*?)>([\\w\\W]*?)<\\/2t>/gi,"[2t$1]$2[/2t]");f=f.G(/<5i(.*?)>/gi,"[5i$1]");f=f.G(/<2j(.*?)Z="(.*?)"(.*?)>/gi,"[2j$1$3]");f=f.G(/<(\\w+)([\\w\\W]*?)>/gi,"<$1>");f=f.G(/<[^\\/>][^>]*>(\\s*|\\t*|\\n*|&1Z;|
        )<\\/[^>]+>/gi,"");f=f.G(/\\s*?\\t*?\\n*?(<1T>|<23>|

        )/gi,"$1");f=f.G(/\\[1t\\]/gi,"<1t>&1Z;");f=f.G(/\\[a 1g="(.*?)"\\]([\\w\\W]*?)\\[\\/a\\]/gi,\'$2\');f=f.G(/\\[1h(.*?)\\]([\\w\\W]*?)\\[\\/1h\\]/gi,"<1h$1>$2");f=f.G(/\\[2A(.*?)\\]([\\w\\W]*?)\\[\\/2A\\]/gi,"<2A$1>$2");f=f.G(/\\[3F(.*?)\\]([\\w\\W]*?)\\[\\/3F\\]/gi,"<3F$1>$2");f=f.G(/\\[3D(.*?)\\]([\\w\\W]*?)\\[\\/3D\\]/gi,"<3D$1>$2");f=f.G(/\\[2t(.*?)\\]([\\w\\W]*?)\\[\\/2t\\]/gi,"<2t$1>$2");f=f.G(/\\[5i(.*?)\\]/gi,"<5i$1>");f=f.G(/\\[2j(.*?)\\]/gi,"<2j$1>");if(7.C.8O){f=f.G(/([\\w\\W]*?)<\\/K>/gi,"

        $2

        ");f=f.G(/<\\/K>

        /gi,"

        ");f=f.G(/<\\/p><\\/K>/gi,"

        ")}f=7.8N(f);f=f.G(/([\\w\\W]*?)<\\/O>/gi,"$2");f=f.G(/<2j>/gi,"");f=f.G(/<[^\\/>][^>][^2j|5i|1d]*>(\\s*|\\t*|\\n*|&1Z;|
        )<\\/[^>]+>/gi,"");f=f.G(/\\n{3,}/gi,"\\n");f=f.G(/

        /gi,"

        ");f=f.G(/<\\/p><\\/p>/gi,"

        ");f=f.G(/<1F>(\\s*|\\t*|\\n*)

        /gi,"<1F>");f=f.G(/<\\/p>(\\s*|\\t*|\\n*)<\\/1F>/gi,"");if(7.C.1z===L){f=f.G(/([\\w\\W]*?)<\\/p>/gi,"$2
        ")}f=f.G(/<[^\\/>][^>][^2j|5i|1d]*>(\\s*|\\t*|\\n*|&1Z;|
        )<\\/[^>]+>/gi,"");if(7.1B("5s")){2n(/
        $/gi.3r(f)){f=f.G(/
        $/gi,"")}}2n(/<2v>([\\w\\W]*?)<\\/2v>/gi.3r(f)){f=f.G(/<2v>([\\w\\W]*?)<\\/2v>/gi,"$1")}7.8B(f)},cz:y(g){g=g.G(/
        |<\\/H[1-6]>|<\\/p>|<\\/K>/gi,"\\n");B f=7.N.42("K");f.4R=g;E 7.8L(f.cX||f.ij)},8B:y(f){if(7.58){if(!7.C.1z){7.$I.T(7.C.3H)}F{7.$I.T("")}7.$I.1i()}f=7.1k("ik",D,f);7.8A(f);7.58=D;2e(y(){a=D},2l);if(7.C.5g){d(7.N.2a).4i(7.6x)}F{7.$I.4i(7.6x)}},1u:y(f){if(f!==1p){7.C.4c.1I(f)}F{7.1r();7.C.4c.1I(7.$I.T());7.7p(L)}},cC:y(){if(7.C.4c.X===0){7.$I.1i();E}7.1r();7.C.5o.1I(7.$I.T());7.1f(D,L);7.$I.T(7.C.4c.cg());7.1f();2e(d.J(7.5b,7),2l)},cD:y(){if(7.C.5o.X===0){7.$I.1i();E D}7.1r();7.C.4c.1I(7.$I.T());7.1f(D,L);7.$I.T(7.C.5o.cg());7.1f(L);2e(d.J(7.5b,7),4)},5b:y(){7.4j();7.cf()},cf:y(){7.$I.U("1e").1x("1D",d.J(7.7A,7))},4j:y(){if(7.C.4j===D){E D}7.$I.U("2j").15(d.J(y(f,g){if(7.1B("30")){d(g).1a("jl","1x")}7.d8(g)},7))},1v:y(){if(!7.C.2G){E 7.N.1v()}F{if(!7.C.1h){E 2G.1v()}F{E 2G.1v(7.$1X[0])}}},2E:y(){if(!7.C.2G){if(7.N.1v){B f=7.N.1v();if(f.2q&&f.44){E f.2q(0)}}E 7.N.5e()}F{if(!7.C.1h){E 2G.5e()}F{E 2G.5e(7.8s())}}},8t:y(f){7.cI(f)},3y:y(f){7.5j(f[0]||f,0,2h,0)},5u:y(f){7.5j(f[0]||f,1,2h,1)},5j:y(l,k,j,h){if(j==2h){j=l}if(h==2h){h=k}B g=7.1v();if(!g){E}B f=7.2E();f.8z(l,k);f.6j(j,h);7j{g.4t()}7e(i){}g.5c(f)},cj:y(f){f=f.3p();B i=7.25();if(i){B j=7.cp(i,f);7.12();E j}B h=7.1v();B g=h.2q(0);B j=N.42(f);j.4F(g.ig());g.3d(j);7.8t(j);E j},ie:y(){B f=7.2E();f.6k(7.$I[0]);B g=7.1v();g.4t();g.5c(f)},ck:y(){7.1v().4t()},e9:y(i){B f=0;B h=7.1v().2q(0);B g=h.8u();g.6k(i);g.6j(h.5k,h.cl);f=d.2s(g.3k()).X;E f},cP:y(){E 1N e(7.1v().2q(0))},cI:y(j,g,m){if(1s m==="1p"){m=g}j=j[0]||j;B o=7.2E();o.6k(j);B p=7.8x(j);B l=D;B f=0,q;if(p.X==1&&g){o.8z(p[0],g);o.6j(p[0],m)}F{2C(B n=0,k;k=p[n++];){q=f+k.X;if(!l&&g>=f&&(g\'+7.C.22+"",7.N)[0];B g=d(\'\'+7.C.22+"",7.N)[0];if(i.4D===L){7.6q(i,h,L)}F{7.6q(i,h,L);7.6q(i,g,D)}7.3L=7.$I.T();7.1f(D,D)},6q:y(f,h,g){B i=f.8u();i.8v(g);i.3d(h);i.i8()},1f:y(i,f){if(!7.C.2G){if(i===L&&7.3L){7.$I.T(7.3L)}B h=7.$I.U("O#28-1E-1");B g=7.$I.U("O#28-1E-2");if(!7.61()){7.$I.1i()}if(h.X!=0&&g.X!=0){7.5j(h[0],0,g[0],0)}F{if(h.X!=0){7.5j(h[0],0,2h,0)}}if(f!==D){7.7p();7.3L=D}}F{2G.ia(7.3L)}},7p:y(){if(!7.C.2G){7.$I.U("O#28-1E-1").1n();7.$I.U("O#28-1E-2").1n()}F{2G.ib(7.3L)}},2p:y(){B f=D;B g=7.1v();if(g.44>0){f=g.2q(0).4E}E 7.6L(f)},3f:y(f){f=f||7.2p();if(f){E 7.6L(d(f).1O()[0])}F{E D}},25:y(f){if(1s f==="1p"){f=7.2p()}2n(f){if(7.6p(f)){if(d(f).33("2O")){E D}E f}f=f.3I}E D},2x:y(g){B h=[];if(1s g=="1p"){B f=7.2E();if(f&&f.4D===L){E[7.25()]}B g=7.56(f)}d.15(g,d.J(y(j,k){if(7.C.1h===D&&d(k).7b("K.2O").32()==0){E D}if(7.6p(k)){h.1I(k)}},7));if(h.X===0){h=[7.25()]}E h},6p:y(f){E f.3h==1&&7.7r.3r(f.ic)},7L:y(f){E 7.7r.3r(f)},cR:y(j){if(1s j=="1p"||j==D){B j=7.2E()}if(j&&j.4D===L){E[7.2p()]}B f=7.1v();7j{B o=f.2q(0).cM()}7e(m){E(D)}B k=7.N.42("O");k.4F(o);31.7k=k.8C;B l=7k.X;B g=[];2C(B h=0,n=l;h"),f=2W.bZ(2W.bB()*be),p=d(\'<1e id="1e\'+f+\'"><4B>\'),h,l,m,o;2C(h=0;h");2C(m=0;m"+7.C.22+"");if(h===0&&m===0){o.Y(\'\'+7.C.22+"")}d(l).Y(o)}p.Y(l)}n.Y(p);B j=n.T();7.26();7.1f();B k=7.25()||7.2p();if(k){d(k).2d(j)}F{7.6O(j)}7.1f();B q=7.$I.U("#1e"+f);7.7A(q);7.5I();q.2z("id");7.12()},7A:y(f){7.$1e=d(f.1S||f).35("1e");7.$4B=d(f.1S).35("4B");7.$2H=7.$1e.U("2H");7.$7y=d(f.1S||7.$1e.U("1t").78());7.$3b=d(f.1S||7.$1e.U("2y").78()).35("2y")},ci:y(){7.1u();if(!7.$1e){E}7.$1e.1n();7.$1e=D;7.12()},cE:y(){7.1u();if(!7.$3b){E}B f=7.$3b.68().X?7.$3b.68():7.$3b.5D();if(f.X){B g=f.63("1t").78();if(g.X){g.4N(\'\'+7.C.22+"");7.1f()}}7.$3b.1n();7.12()},di:y(){7.1u();B f=7.$7y.1H(0).hA;7.$1e.U("2y").15(d.J(y(g,h){B j=f-1<0?f+1:f-1;if(g===0){d(h).U("1t").eq(j).4N(\'\'+7.C.22+"");7.1f()}d(h).U("1t").eq(f).1n()},7));7.12()},dO:y(){7.1u();if(7.$1e.U("2H").32()!==0){7.8Q()}F{B f=7.$1e.U("2y").78().4m();f.U("1t").T(7.C.22);7.$2H=d("<2H>");7.$2H.Y(f);7.$1e.4N(7.$2H);7.12()}},8Q:y(){7.1u();d(7.$2H).1n();7.$2H=D;7.12()},dD:y(){7.7l("2M")},dz:y(){7.7l("2d")},ca:y(){7.7v("2M")},aC:y(){7.7v("2d")},7l:y(f){7.1u();B g=7.$3b.4m();g.U("1t").T(7.C.22);if(f==="2d"){7.$3b.2d(g)}F{7.$3b.2M(g)}7.12()},7v:y(g){7.1u();B f=0;7.$3b.U("1t").15(d.J(y(h,j){if(d(j)[0]===7.$7y[0]){f=h}},7));7.$1e.U("2y").15(d.J(y(h,k){B j=d(k).U("1t").eq(f);B l=j.4m();l.T(7.C.22);g==="2d"?j.2d(l):j.2M(l)},7));7.12()},a9:y(){7.1r();7.4v(7.C.16.2A,7.C.e3,hB,d.J(y(){d("#dp").1D(d.J(7.al,7));2e(y(){d("#93").1i()},3W)},7))},al:y(){B f=d("#93").1b();f=7.5J(f);7.1f();B g=7.25()||7.2p();if(g){d(g).2d(f);7.12()}F{7.6O(f)}7.26()},bG:y(){7.1r();B f=d.J(y(){7.4Y=D;B h=7.1v();B g="",n="",j="";B i=7.3f();B k=d(i).1O().1H(0);if(k&&k.R==="A"){i=k}if(i&&i.R==="A"){g=i.1g;n=d(i).1c();j=i.1S;7.4Y=i}F{n=h.3k()}d(".64").1b(n);B o=hw.hv.1g.G(/\\/$/i,"");B m=g.G(o,"");B l=d("#3t").U("a");if(7.C.7i===D){l.eq(1).1n()}if(7.C.7g===D){l.eq(2).1n()}if(7.C.7i===D&&7.C.7g===D){d("#3t").1n();d("#5G").1b(m)}F{if(g.3e("5A:")===0){7.9N.3m(7,2);d("#5N").1b(2);d("#8T").1b(g.G("5A:",""))}F{if(m.3e(/^#/gi)===0){7.9N.3m(7,3);d("#5N").1b(3);d("#8X").1b(m.G(/^#/gi,""))}F{d("#5G").1b(m)}}}if(j==="7m"){d("#8V").b4("bw",L)}d("#dV").1D(d.J(7.b5,7));2e(y(){d("#5G").1i()},3W)},7);7.4v(7.C.16.2m,7.C.ch,hp,f)},b5:y(){B j=d("#5N").1b();B h="",m="",k="",l="";if(j==="1"){h=d("#5G").1b();m=d("#cF").1b();if(d("#8V").b4("bw")){k=\' 1S="7m"\';l="7m"}B i="((ho--)?[a-7V-9]+(-[a-7V-9]+)*.)+[a-z]{2,}";B g=1N 2B("^(dn|dW|e7)://"+i,"i");B f=1N 2B("^"+i,"i");if(h.3e(g)==-1&&h.3e(f)==0&&7.C.6S){h=7.C.6S+h}}F{if(j==="2"){h="5A:"+d("#8T").1b();m=d("#cx").1b()}F{if(j==="3"){h="#"+d("#8X").1b();m=d("#dU").1b()}}}7.bx(\'"+m+"",d.2s(m),h,l)},bx:y(f,i,g,h){7.1f();if(i!==""){if(7.4Y){7.1u();d(7.4Y).1c(i).1a("1g",g);if(h!==""){d(7.4Y).1a("1S",h)}F{d(7.4Y).2z("1S")}7.12()}F{7.1J("3O",f)}}7.26()},bc:y(){7.1r();B f=d.J(y(){B g=7.1v();B h="";if(7.9c()){h=g.1c}F{h=g.3k()}d("#9f").1b(h);if(!7.3w()){7.9v("#3E",{2U:7.C.5x,2P:7.C.2P,2R:d.J(7.9Q,7),2X:d.J(y(j,i){7.1k("bU",i)},7)})}7.9s("3E",{3q:L,2U:7.C.5x,2R:d.J(7.9Q,7),2X:d.J(y(j,i){7.1k("bU",i)},7)})},7);7.4v(7.C.16.2Q,7.C.cK,hq,f)},9Q:y(g){7.1f();if(g!==D){B i=d("#9f").1b();if(i===""){i=g.9e}B h=\'\'+i+"";if(7.1B("3Y")&&!!7.31.98){h=h+"&1Z;"}7.1A("3O",h,D);B f=d(7.$I.U("a#6z-1E"));if(f.32()!=0){f.2z("id")}F{f=D}7.12();7.1k("5x",f,g)}7.26()},ag:y(){7.1r();B f=d.J(y(){if(7.C.5B){d.hs(7.C.5B,d.J(y(l){B i={},k=0;d.15(l,d.J(y(n,o){if(1s o.6M!=="1p"){k++;i[o.6M]=k}},7));B j=D;d.15(l,d.J(y(q,r){B p="";if(1s r.M!=="1p"){p=r.M}B n=0;if(!d.aW(i)&&1s r.6M!=="1p"){n=i[r.6M];if(j===D){j=".4H"+n}}B o=d(\'<2j 4r="\'+r.hu+\'" V="4H 4H\'+n+\'" 2J="\'+r.2D+\'" M="\'+p+\'" />\');d("#97").Y(o);d(o).1D(d.J(7.cW,7))},7));if(!d.aW(i)){d(".4H").1Y();d(j).1w();B m=y(n){d(".4H").1Y();d(".4H"+d(n.1S).1b()).1w()};B h=d(\'<5p id="ht">\');d.15(i,y(o,n){h.Y(d(\'<3c 2F="\'+n+\'">\'+o+""))});d("#97").2M(h);h.6t(m)}},7))}F{d("#3t").U("a").eq(1).1n()}if(7.C.4s||7.C.5Y){if(!7.3w()&&7.C.5Y===D){if(d("#3E").X){7.9v("#3E",{2U:7.C.4s,2P:7.C.2P,2R:d.J(7.9a,7),2X:d.J(y(i,h){7.1k("aM",h)},7)})}}if(7.C.5Y===D){7.9s("3E",{3q:L,2U:7.C.4s,2R:d.J(7.9a,7),2X:d.J(y(i,h){7.1k("aM",h)},7)})}F{d("#3E").1x("6t.Q",d.J(7.aN,7))}}F{d(".38").1Y();if(!7.C.5B){d("#3t").1n();d("#8R").1w()}F{B g=d("#3t").U("a");g.eq(0).1n();g.eq(1).1Q("4o");d("#8W").1w()}}d("#cc").1D(d.J(7.cS,7));if(!7.C.4s&&!7.C.5B){2e(y(){d("#4d").1i()},3W)}},7);7.4v(7.C.16.2D,7.C.d6,hC,f)},cT:y(h){B f=d(h.1S);B g=f.1O();B i=d.J(y(){d("#9k").1b(f.1a("9b"));d("#hD").1a("1g",f.1a("4r"));d("#9j").1b(f.11("6d"));if(d(g).1H(0).R==="A"){d("#4d").1b(d(g).1a("1g"))}d("#d1").1D(d.J(y(){7.e6(f)},7));d("#d7").1D(d.J(y(){7.cG(f)},7))},7);7.4v(7.C.16.2D,7.C.d0,hN,i)},e6:y(g){B f=d(g).1O();d(g).1n();if(f.X&&f[0].R==="P"){7.$I.1i();7.3y(f)}7.1k("hM",g);7.26();7.12()},cG:y(g){B f=d(g).1O();d(g).1a("9b",d("#9k").1b());B i=d("#9j").1b();if(i==="1C"){d(g).11({"6d":"1C",4M:"0 69 69 0"})}F{if(i==="3X"){d(g).11({"6d":"3X",4M:"0 0 69 69"})}F{d(g).11({"6d":"1K",4M:"0"})}}B h=d.2s(d("#4d").1b());if(h!==""){if(d(f).1H(0).R!=="A"){d(g).2f(\'\'+7.4V(g)+"")}F{d(f).1a("1g",h)}}F{if(d(f).1H(0).R==="A"){d(f).2f(7.4V(g))}}7.26();7.4j();7.12()},d8:y(h){B g=d(h),k=D,f=D,n,m,j=g.2u()/g.1G(),l=10,i=10;g.36("5R 9V 5m 1D 9X");g.5R(y(){g.11("79","hO-hP")},y(){g.11("79","");k=D});g.9V(y(o){o.1V();j=g.2u()/g.1G();k=L;f=L;n=2W.4C(o.9O-g.eq(0).3z().1C);m=2W.4C(o.9d-g.eq(0).3z().1M)});g.5m(d.J(y(o){k=D;g.11("79","");7.12()},7));g.1D(d.J(y(o){if(f){7.cT(o)}},7));g.9X(y(s){if(k){f=D;B p=2W.4C(s.9O-d(7).eq(0).3z().1C)-n;B o=2W.4C(s.9d-d(7).eq(0).3z().1M)-m;B r=g.1G();B t=9W(r,10)+o;B q=2W.4C(t*j);if(q>l){g.2u(q)}n=2W.4C(s.9O-d(7).eq(0).3z().1C);m=2W.4C(s.9d-d(7).eq(0).3z().1M)}})},cW:y(g){B f=\'<2j id="2D-1E" 4r="\'+d(g.1S).1a("2J")+\'" 9b="\'+d(g.1S).1a("M")+\'" />\';if(7.C.4w){f="

        "+f+"

        "}7.6A(f,L)},cS:y(){B g=d("#4d").1b();if(g!==""){B f=\'<2j id="2D-1E" 4r="\'+g+\'" />\';if(7.C.1z===D){f="

        "+f+"

        "}7.6A(f,L)}F{7.26()}},9a:y(f){7.6A(f)},6A:y(g,h){7.1f();if(g!==D){B f="";if(h!==L){f=\'<2j id="2D-1E" 4r="\'+g.6z+\'" />\';if(7.C.4w){f="

        "+f+"

        "}}F{f=g}7.1A("3O",f,D);B i=d(7.$I.U("2j#2D-1E"));if(i.X){i.2z("id")}F{i=D}7.12();h!==L&&7.1k("4s",i,g)}7.26();7.4j()},cL:y(){d.41(7.C,{cK:3i()+\'<1m><1o id="hQ" 5f="6y" 4z="" 6h="6C/1o-1L"><1j>\'+7.C.16.9e+\'<1q 1l="1c" id="9f" V="3n" /><1q 1l="2Q" id="3E" 2b="2Q" />\',d0:3i()+"<1m><1j>"+7.C.16.M+\'<1q id="9k" V="3n" /><1j>\'+7.C.16.2m+\'<1q id="4d" V="3n" /><1j>\'+7.C.16.dg+\'<5p id="9j"><3c 2F="1K">\'+7.C.16.1K+\'<3c 2F="1C">\'+7.C.16.1C+\'<3c 2F="3X">\'+7.C.16.3X+\'<2S>\'+7.C.16.d5+\'&1Z;&1Z;&1Z;\'+7.C.16.4L+\'<1q 1l="55" 2b="9g" V="2Y" id="d7" 2F="\'+7.C.16.9g+\'" />\',d6:3i()+\'<1m>\'+7.C.16.4y+\'\'+7.C.16.9h+\'\'+7.C.16.2m+\'<1o id="hK" 5f="6y" 4z="" 6h="6C/1o-1L"><1q 1l="2Q" id="3E" 2b="2Q" /><1j>\'+7.C.16.cd+\'<1q 1l="1c" 2b="4d" id="4d" V="3n" /><2S>\'+7.C.16.4L+\'<1q 1l="55" 2b="4y" V="2Y" id="cc" 2F="\'+7.C.16.5H+\'" />\',ch:3i()+\'<1m><1o id="hF" 5f="6y" 4z="">968U\'+7.C.16.8S+\'<1q 1l="6m" id="5N" 2F="1" /><1j>96<1q 1l="1c" id="5G" V="3n" /><1j>\'+7.C.16.1c+\'<1q 1l="1c" V="3n 64" id="cF" /><1j><1q 1l="hE" id="8V"> \'+7.C.16.cB+\'<1j>8U<1q 1l="1c" id="8T" V="3n" /><1j>\'+7.C.16.1c+\'<1q 1l="1c" V="3n 64" id="cx" /><1j>\'+7.C.16.8S+\'<1q 1l="1c" V="3n" id="8X" /><1j>\'+7.C.16.1c+\'<1q 1l="1c" V="3n 64" id="dU" /><2S>\'+7.C.16.4L+\'<1q 1l="55" V="2Y" id="dV" 2F="\'+7.C.16.5H+\'" />\',dT:3i()+"<1m><1j>"+7.C.16.dP+\'<1q 1l="1c" 32="5" 2F="2" id="8Y" /><1j>\'+7.C.16.dQ+\'<1q 1l="1c" 32="5" 2F="3" id="ec" /><2S>\'+7.C.16.4L+\'<1q 1l="55" 2b="4y" V="2Y" id="e8" 2F="\'+7.C.16.5H+\'" />\',e3:3i()+\'<1m><1o id="hG"><1j>\'+7.C.16.dM+\'<4K id="93" Z="2u: 99%; 1G: hH;"><2S>\'+7.C.16.4L+\'<1q 1l="55" V="2Y" id="dp" 2F="\'+7.C.16.5H+\'" />\'})},4v:y(l,i,g,m){B f=d("#9E");if(!f.X){7.$dK=f=d(\'\');d("2a").4N(7.$dK)}if(7.C.9F){f.1w().1x("1D",d.J(7.26,7))}B j=d("#9G");if(!j.X){7.$dA=j=d(\'&hI;<5y id="7a">\');d("2a").Y(7.$dA)}d("#9m").1x("1D",d.J(7.26,7));7.5q=d.J(y(n){if(n.2k===7.2k.92){7.26();E D}},7);d(N).3B(7.5q);7.$I.3B(7.5q);7.4p=D;if(i.39("#")==0){7.4p=d(i);d("#6V").71().Y(7.4p.T());7.4p.T("")}F{d("#6V").71().Y(i)}j.U("#7a").T(l);if(1s d.fn.dy!=="1p"){j.dy({im:"#7a"});j.U("#7a").11("79","io")}B k=d("#3t");if(k.X){B h=7;k.U("a").15(y(n,o){n++;d(o).1x("1D",y(q){q.1V();k.U("a").21("4o");d(7).1Q("4o");d(".38").1Y();d("#38"+n).1w();d("#5N").1b(n);if(h.3w()===D){B p=j.ay();j.11("4M-1M","-"+(p+10)/2+"2L")}})})}j.U(".4G").1x("1D",d.J(7.26,7));if(7.3w()===D){j.11({2w:"6Y",1M:"-9z",1C:"50%",2u:g+"2L",j2:"-"+(g+60)/2+"2L"}).1w();7.9I=d(N.2a).11("9H");d(N.2a).11("9H","6m")}F{j.11({2w:"6Y",2u:"2l%",1G:"2l%",1M:"0",1C:"0",4M:"0",5M:"j1"}).1w()}if(1s m==="y"){m()}if(7.3w()===D){2e(y(){B n=j.ay();j.11({1M:"50%",1G:"3q",5M:"3q",j3:"-"+(n+10)/2+"2L"})},20)}},26:y(){d("#9m").36("1D",7.26);d("#9G").4U("j4",d.J(y(){B f=d("#6V");if(7.4p!==D){7.4p.T(f.T());7.4p=D}f.T("");if(7.C.9F){d("#9E").1Y().36("1D",7.26)}d(N).aX("3B",7.5q);7.$I.aX("3B",7.5q);7.1f()},7));if(7.3w()===D){d(N.2a).11("9H",7.9I?7.9I:"b0")}E D},9N:y(f){d(".38").1Y();d("#3t").U("a").21("4o").eq(f-1).1Q("4o");d("#38"+f).1w()},aN:y(k){B h=k.1S.bd;2C(B g=0,j;j=h[g];g++){7.av(j)}},av:y(f){7.b2(f,d.J(y(g){7.ap(f,g)},7))},b2:y(f,h){B g=1N a2();g.6E("j5",7.C.5Y+"?2b="+f.2b+"&1l="+f.1l,L);g.j0("1c/iZ; iU=x-iT-iV");g.iW=y(i){if(7.a1==4&&7.9J==3W){d("#Q-2o").bX();h(iY(7.iX))}F{if(7.a1==4&&7.9J!=3W){}}};g.c7()},ao:y(h,f){B g=1N a2();if("j6"in g){g.6E(h,f,L)}F{if(1s au!="1p"){g=1N au();g.6E(h,f)}F{g=2h}}E g},ap:y(g,f){B h=7.ao("j7",f);if(!h){}F{h.jg=d.J(y(){if(h.9J==3W){d("#Q-2o").1Y();B k=f.6F("?");if(!k[0]){E D}7.1f();B i="";i=\'<2j id="2D-1E" 4r="\'+k[0]+\'" />\';if(7.C.4w){i="

        "+i+"

        "}7.1A("3O",i,D);B j=d(7.$I.U("2j#2D-1E"));if(j.X){j.2z("id")}F{j=D}7.12();7.1k("4s",j,D);7.26();7.4j()}F{}},7);h.jf=y(){};h.4y.jh=y(i){};h.bJ("ji-jj",g.1l);h.bJ("x-je-jd","j9-j8");h.c7(g)}},9s:y(h,f){7.2i={2U:D,2R:D,2X:D,5d:D,9q:D,3q:D,1q:D};d.41(7.2i,f);B g=d("#"+h);if(g.X&&g[0].R==="ja"){7.2i.1q=g;7.el=d(g[0].1o)}F{7.el=g}7.bs=7.el.1a("4z");if(7.2i.3q){d(7.2i.1q).6t(d.J(y(i){7.el.9y(y(j){E D});7.9p(i)},7))}F{if(7.2i.9q){d("#"+7.2i.9q).1D(d.J(7.9p,7))}}},9p:y(f){d("#Q-2o").bX();7.bi(7.3s,7.bY())},bY:y(){7.id="f"+2W.bZ(2W.bB()*be);B g=7.N.42("K");B f=\'<1h Z="2g:1K" id="\'+7.id+\'" 2b="\'+7.id+\'">\';g.4R=f;d(g).6u("2a");if(7.2i.5d){7.2i.5d()}d("#"+7.id).bg(d.J(7.bA,7));E 7.id},bi:y(j,i){if(7.2i.1q){B k="jb"+7.id,g="jc"+7.id;7.1o=d(\'<1o 4z="\'+7.2i.2U+\'" 5f="9K" 1S="\'+i+\'" 2b="\'+k+\'" id="\'+k+\'" 6h="6C/1o-1L" />\');if(7.C.2P!==D&&1s 7.C.2P==="2t"){d.15(7.C.2P,d.J(y(m,f){if(f.3k().39("#")===0){f=d(f).1b()}B n=d("<1q/>",{1l:"6m",2b:m,2F:f});d(7.1o).Y(n)},7))}B h=7.2i.1q;B l=d(h).4m();d(h).1a("id",g).2M(l).6u(7.1o);d(7.1o).11("2w","9t").11("1M","-9z").11("1C","-9z").6u("2a");7.1o.9y()}F{j.1a("1S",i).1a("5f","9K").1a("6h","6C/1o-1L").1a("4z",7.2i.2U);7.3s.9y()}},bA:y(){B j=d("#"+7.id)[0],k;if(j.bz){k=j.bz}F{if(j.9x){k=j.9x.N}F{k=31.iS[7.id].N}}if(7.2i.2R){d("#Q-2o").1Y();if(1s k!=="1p"){B h=k.2a.4R;B g=h.1W(/\\{(.|\\n)*\\}/)[0];g=g.G(/^\\[/,"");g=g.G(/\\]$/,"");B f=d.as(g);if(1s f.2X=="1p"){7.2i.2R(f)}F{7.2i.2X(7,f);7.26()}}F{7.26();iR("bo iz!")}}7.el.1a("4z",7.bs);7.el.1a("1S","")},9v:y(g,f){7.3l=d.41({2U:D,2R:D,2X:D,iy:D,2P:D,1c:7.C.16.bm,b8:7.C.16.bn},f);if(31.bI===1p){E D}7.9u=d(\'\');7.3v=d(\'\'+7.3l.1c+"");7.b6=d(\'\'+7.3l.b8+"");7.9u.Y(7.3v);d(g).2M(7.9u);d(g).2M(7.b6);7.3v.1x("ix",d.J(y(){E 7.at()},7));7.3v.1x("iw",d.J(y(){E 7.ar()},7));7.3v.1H(0).iq=d.J(y(h){h.1V();7.3v.21("5R").1Q("ip");7.bC(h.ir.bd[0])},7)},bC:y(g){B i=ea.it.ak();if(i.4y){i.4y.iv("2o",d.J(7.aa,7),D)}B h=y(){E i};B f=1N bI();if(7.3l.2P!==D&&1s 7.3l.2P==="2t"){d.15(7.3l.2P,d.J(y(l,j){if(j.3k().39("#")===0){j=d(j).1b()}f.Y(l,j)},7))}f.Y("2Q",g);d.bO({2U:7.3l.2U,iu:"T",1L:f,ak:h,iD:D,iE:D,iN:D,1l:"9K",2R:d.J(y(k){k=k.G(/^\\[/,"");k=k.G(/\\]$/,"");B j=d.as(k);if(1s j.2X=="1p"){7.3l.2R(j)}F{7.3l.2X(7,j);7.3l.2R(D)}},7)})},at:y(){7.3v.1Q("5R");E D},ar:y(){7.3v.21("5R");E D},aa:y(g,h){B f=g.aR?9W(g.aR/g.iM*2l,10):g;7.3v.1c("iO "+f+"% "+(h||""))},3w:y(){E/(iP|iQ|iL|iK)/.3r(94.95)},4V:y(f){E d("").Y(d(f).eq(0).4m()).T()},aD:y(f){E iG.3Z.3k.3m(f)=="[2t 3i]"},8Z:y(f){f=f.G(/>|
        ||&1Z;/gi,"");f=f.G(/\\s/g,"");f=f.G(/^

        [^\\w\\d]*?<\\/p>$/i,"");E f==""},1B:y(g){B h=94.95.3p();B f=/(98)[ \\/]([\\w.]+)/.1J(h)||/(3Y)[ \\/]([\\w.]+)/.1J(h)||/(6c)(?:.*6f|)[ \\/]([\\w.]+)/.1J(h)||/(30) ([\\w.]+)/.1J(h)||h.39("iF")<0&&/(5s)(?:.*? iH:([\\w.]+)|)/.1J(h)||[];if(g=="6f"){E f[2]}if(g=="3Y"){E(f[1]=="98"||f[1]=="3Y")}E f[1]==g},9c:y(){if(7.1B("30")&&9W(7.1B("6f"),10)<9){E L}E D},cu:y(g){B f=g.iI(L);B h=7.N.42("K");h.4F(f);E h.4R},9U:y(){B f=7.$I[0];B h=7.N.ad();B g;2n((g=f.7F)){h.4F(g)}E h},6L:y(f){if(!f){E D}if(7.C.1h){E f}if(d(f).7b("K.2O").X==0||d(f).33("2O")){E D}F{E f}},7N:y(f){B g=7.3f(),h=7.2p();E g&&g.R===f?g:h&&h.R===f?h:D},dx:y(){B g=7.25();B i=7.e9(g);B h=d.2s(d(g).1c()).G(/\\n\\r\\n/g,"");B f=h.X;if(i==f){E L}F{E D}},61:y(){B f,g=7.1v();if(g.44&&g.44>0){f=g.2q(0).4E}if(!f){E D}if(7.C.1h){if(7.cP().cZ()){E!7.$I.is(f)}F{E L}}E d(f).35("K.2O").X!=0},4A:y(g,f){if(d(g).1a(f)==""){d(g).2z(f)}},cb:y(h,g){B f=2h;2n((f=h.39(g))!==-1){h.6v(f,1)}E h}};c.3Z.59.3Z=c.3Z;d.43.fn.7w=y(l){B j=/(^|&5z;|\\s)(iJ\\..+?\\..+?)(\\s|>|$)/g,h=/(^|&5z;|\\s)(((e7?|dW):\\/\\/|5A:).+?)(\\s|>|$)/g;B k=(7.$I?7.$I.1H(0):7).8C,g=k.X;2n(g--){B m=k[g];if(m.3h===3){B f=m.5r;if(f&&(f.1W(j)||f.1W(h))){f=f.G(/&/g,"&8k;").G(//g,">").G(j,\'$1$2$3\').G(h,\'$1$2$5\');d(m).2d(f).1n()}}F{if(m.3h===1&&!/^(a|55|4K)$/i.3r(m.R)){d.43.fn.7w.3m(m,l)}}}}})(ea);',62,1278,'|||||||this|||||||||||||||||||||||||||function|||var|opts|false|return|else|replace||editor|proxy|div|true|title|document|span||redactor|tagName||html|find|class||length|append|style||css|sync|||each|curLang||func|toolbar|attr|val|text|source|table|selectionRestore|href|iframe|focus|label|callback|type|section|remove|form|undefined|input|selectionSave|typeof|td|bufferSet|getSelection|show|on|contents|linebreaks|execCommand|browser|left|click|marker|li|height|get|push|exec|none|data|top|new|parent|air|addClass|box|target|ul|pre|preventDefault|match|frame|hide|nbsp||removeClass|invisibleSpace|ol|buttonGet|getBlock|modalClose||selection||body|name|script|after|setTimeout|replaceWith|display|null|uploadOptions|img|keyCode|100|link|while|progress|getCurrent|getRangeAt|blockquote|trim|object|width|font|position|getBlocks|tr|removeAttr|video|RegExp|for|image|getRange|value|rangy|thead|dropdown|rel|fullpage|px|before|LI|redactor_editor|uploadFields|file|success|footer|italic|url|bold|Math|error|redactor_modal_btn|buttons|msie|window|size|hasClass|php|closest|off||redactor_tab|indexOf|substr|current_tr|option|insertNode|search|getParent|className|nodeType|String|backcolor|toString|draguploadOptions|call|redactor_input|tag|toLowerCase|auto|test|element|redactor_tabs|placeholder|dropareabox|isMobile|content|selectionStart|offset|contenteditable|keyup|strong|embed|redactor_file|audio|shortcutsLoad|emptyHtml|parentNode|shiftKey|buttonActive|savedSel|visual|fontcolor|inserthtml|verified|BLOCKQUOTE|formatBlocks|shortcutsLoadFormat|deleted|javascript|charAt|200|right|webkit|prototype||extend|createElement|Redactor|rangeCount|color||range|||indent|PRE|buffer|redactor_file_link|dir|orderedlist|unorderedlist|direction|scrollTop|observeImages|textareamode|Insert|clone|toolbarFixed|redactor_tabs_act|modalcontent|inlineMethods|src|imageUpload|removeAllRanges|redactor_placeholder|modalInit|paragraphy|formatting|upload|action|removeEmptyAttr|tbody|round|collapsed|startContainer|appendChild|redactor_btn_modal_close|redactorfolder|join|buttonBuild|textarea|cancel|margin|prepend|allowedTags|autosave|cleanGetTabs|innerHTML|background|dropact|fadeOut|outerHtml|justify|code|insert_link_node|inArray||||||button|getNodes|redactor_act|selectall|init|outdent|observeStart|addRange|start|createRange|method|autoresize|underline|param|selectionSet|endContainer|Delete|mouseup|Add|rebuffer|select|hdlModalClose|nodeValue|mozilla|isFunction|selectionEnd|cleanlevel|alignmentSet|fileUpload|header|lt|mailto|imageGetJson|tabindex|next|getElement|horizontalrule|redactor_link_url|insert|buttonActiveObserver|cleanStripTags|break|keydown|minHeight|redactor_tab_selected|unlink|phpTags|cleanRemoveSpaces|hover|insertunorderedlist|deniedTags|buttonSeparator|modified|shortcuts|comment|s3|insertAfter||isFocused|x200b|children|redactor_link_text|||insertLineBreak|prev|10px|activeButtonsAdd|head|opera|float|DIV|version|insertAfterLastElement|enctype|aligncenter|setEnd|selectNodeContents|bar|hidden|alignright|activeButtons|nodeTestBlocks|selectionSetMarker|ENTER|alignleft|change|appendTo|splice|Header|saveScroll|post|filelink|imageInsert|insertorderedlist|multipart|airBindMousemoveHide|open|split|cleanConvertInlineTags|redactor_btn_|alignmentTags|alignment|buildCodearea|isParentRedactor|folder|dropdownHideAll|insertHtmlAdvanced|del|placeTag|line|linkProtocol|autosaveInterval|toolbarFixedBox|redactor_modal_inner|strike|one|fixed|set|separator|empty|||||||first|cursor|redactor_modal_header|parents|formatBlock|align_center|catch|add_head|linkAnchor|delete_column|linkEmail|try|selnodes|tableAddRow|_blank|iframePage|redactor_button_disabled|selectionRemoveMarkers|link_insert|rTestBlock|align_right|delete_row|syncClean|tableAddColumn|formatLinkify|delete_table|current_td|getRangeSelectedNodes|tableObserver|insert_column_left|Column|delete_head|insert_column_right|firstChild|align_left|redactor_btn_right|Row|redactor_btn|airShow|tagTestBlock|insert_row_below|currentOrParentIs|Table|indentingStart|ownLine|pickerSet|sourceOld|blockLevelElements|createTextNode|z0|focusCallback|inlineEachNodes|cleanRemoveEmptyTags|meta|colors|th|SPAN|contOwnLine|tfoot|boldTag|cleannewLevel|alignmentLeft|RedactorPlugins|filter|plugins|cleanTag|align_justify|alignmentRight|align|italicTag|cleanSavePreCode|alignmentJustify|alignmentCenter|blurCallback|amp|BACKSPACE|buttonInactive|insert_table|indentingIndent|indentingOutdent|insideOutdent|cleanFinish|iframeDoc|selectionElement|cloneRange|collapse|insert_row_above|getTextNodesIn|case|setStart|insertHtml|pasteInsert|childNodes|buffer_|pasteHTML|parseHTML|iframeAppend|address|which|cleanConvertProtected|cleanEmpty|cleanEncodeEntities|cleanConverters|cleanParagraphy|convertDivs|activeButtonsStates|tableDeleteHead|redactor_tab3|anchor|redactor_link_mailto|Email|redactor_link_blank|redactor_tab2|redactor_link_anchor|redactor_table_rows|isEmpty|||ESC|redactor_insert_video_area|navigator|userAgent|URL|redactor_image_box|chrome||imageCallback|alt|oldIE|pageY|filename|redactor_filename|save|choose|iframeLoad|redactor_form_image_align|redactor_file_alt|iframeAddCss|redactor_modal_close|buildEnable|DOWN|uploadSubmit|trigger|focusSet|uploadInit|absolute|droparea|draguploadInit|sourceHeight|contentWindow|submit|2000px|toggle|altKey|buildOptions|buildAfter|redactor_modal_overlay|modalOverlay|redactor_modal|overflow|modalSaveBodyOveflow|status|POST|setFullpageOnInit|buildBindKeyboard|modalSetTab|pageX|rBlockTest|fileCallback|uuid|toolbarObserveScroll|toolbarExternal|extractContent|mousedown|parseInt|mousemove|ctrlKey|quot|7f7f7f|readyState|XMLHttpRequest|dropdownHide|cleanUnverified|redactor_dropdown|setInterval|mobile|returnValue|videoShow|uploadProgress|buildPlugins|buildMobile|createDocumentFragment|lang|langs|imageShow|paragraph|quote|dropdownShow|xhr|videoInsert|newLevel|toolbarBuild|s3createCORSRequest|s3uploadToS3|airEnable|draguploadOndragleave|parseJSON|draguploadOndrag|XDomainRequest|s3uploadFile|buttonsCustom|buttonsAdd|outerHeight|iframeStart|buttonSource|center|tableAddColumnRight|isString|formatEmpty|H1|H2|nextNode|formatQuote|formattingTags|formatblock|airButtons|imageUploadError|s3handleFileSelect|placeholderRemoveFromCode|placeholderFocus|cleanHtml|loaded|transparent|header1|TAB|cleanlineBefore|isEmptyObject|unbind|cleanlineAfter|Color|visible|getCodeIframe|s3executeOnSignedUrl|header3|prop|linkProcess|dropalternative|redactor_dropdown_link|atext|buttonActiveToggle|link_edit|cleanup|fileShow|files|99999|formattingPre|load|buttonActiveVisual|uploadForm|buttonInactiveAll|convertLinks|redactor_editor_wym|drop_file_here|or_choose|Upload|List|redactor_btn_html||element_action|wym|visibility|8203|checked|linkInsert|buttonInactiveVisual|contentDocument|uploadLoaded|random|draguploadUpload|buildContent|substring|dropdownBuild|linkShow|DELETE|FormData|setRequestHeader|header4|pickerBuild|fieldset|header2|ajax|H3|map|area|metaKey|cleanReplacer|fileUploadError|LEFT_WIN|toolbarFixedTopOffset|fadeIn|uploadFrame|floor|inserthorizontalrule|buildAddClasses|toolbar_fixed_box|cleanReConvertProtected|buildFromTextarea|buildFromElement|b7dde8|send|placeholderStart|TD|tableAddColumnLeft|removeFromArrayByValue|redactor_upload_btn|image_web_link|Image|observeTables|pop|modal_link|tableDeleteTable|selectionWrap|selectionRemove|endOffset|setCodeIframe|Left|FOOTER|formatChangeTag|Right|HEADER|redactor_tab1|Link|getFragmentHtml|documentElement|H4|redactor_link_mailto_text|write|pastePre|setEditor|link_new_tab|bufferUndo|bufferRedo|tableDeleteRow|redactor_link_url_text|imageSave|SECTION|setCaret|striped|modal_file|modalTemplatesInit|cloneContents|ARTICLE|tableShow|getCaretOffsetRange|ASIDE|getSelectedNodes|imageCallbackLink|imageEdit|unshift|nextSibling|imageThumbClick|textContent|getSelectionText|equals|modal_image_edit|redactor_image_delete_btn|innerWidth|selectionCreateMarker|apply|_delete|modal_image|redactorSaveBtn|imageResize|not|FIGCAPTION|close|Head||redactor_air|tableInsert|image_position|Video|tableDeleteColumn|clearInterval|HTML||BODY|http|H6|redactor_insert_video_btn|buildStart|H5|article||focusEnd|aside|initToolbar|isEndOfElement|draggable|tableAddRowBelow|modal|inlineSetStyle|Align|tableAddRowAbove|inlineSetMethods|inlineRemoveStyle|to|the|fontSize|unwrap|overlay|inlineUnwrapSpan|video_html_code|insertText|tableAddHead|rows|columns|ADDRESS|pasteClean|modal_table|redactor_link_anchor_text|redactor_insert_link_btn|ftp|iframeCreate|airBindHide|Code|replaceLineBreak|BR|setStartAfter|modal_video|tabFocus|deleteContents|imageRemove|https|redactor_insert_table_btn|getCaretOffset|jQuery|htmlEncode|redactor_table_columns|last|enableInlineTableEditing|about|Chrome|Callback|syncAfter|destroy|enableObjectResizing||||min|redo||1data|TH|undo|TEXTAREA|getBox|getToolbar|getIframe|redactor_|getEditor|redactor_box|_code|536|syncBefore|getObject|blank|paste|removeData|Cancel|e5b9b7|b8cce4|8db3e2|d7e3bc|ccc1d9|bfbfbf|ffe694|fbd5b5|c4bd97|595959|ebf1dd|f2dcdb|dbe5f1|e5e0ec|dbeef3|d8d8d8|fff2ca|fdeada|3f3f3f|938953|366092|17365d|494429|953734|76923c|e36c09|92cddc|5f497a|262626|a5a5a5|d99694|95b3d7|548dd4|c3d69b|b2a2c7|f2c314|fac08f|c6d9f0|ddd9c3|keydownCallback||changeCallback|initCallback|keyupCallback|execCommandCallback|autosaveCallback|pasteAfterCallback|pasteBeforeCallback|VERSION|such|startOffset|strict|use|Array|slice|No|string|arguments|imageUploadCallback|imageUploadErrorCallback|9bbb59|c0504d|4f81bd|8064a2|4bacc6|f2f2f2|ffff00|f79646|1f497d|eeece1|fileUploadErrorCallback|fileUploadCallback|imageDeleteCallback|ltr|redactor_separator|000000|ffffff|c09100|0c0c0c|Horizontal|Justify|Center|Rule|Deleted|tab|Open|Anchor|here|Drop|Embed|web|Text|File|download|Or|Choose|Download||Underline|Alignment|redactor_format_h3|redactor_format_h2|redactor_format_h1|redactor_format_h4|strikethrough|separator_drop2|separator_drop1|bull||redactor_format_pre|redactor_format_blockquote|CTRL|optional|Name|META|LEFT|sourceWidth|dropdowns|Web|None|DD|frameset|noscript|DL|DT|Unlink|Edit|OUTPUT|applet|7f6000|244061|0f243e|1d1b10|632423|4f6128|974806|31859b|3f3151|Formatting|Normal|Above|Save|||||||u0000|Below|Rows|Position|Title|Columns|Indent|Outdent|Italic|Bold|Quote|Font|Back|Ordered|Unordered|separator_drop3|insertDoubleLineBreak|xn|460|500||getJSON|redactor_image_box_select|thumb|location|self|getSelectionHtml|hasChildNodes|300|cellIndex|600|610|redactor_image_edit_src|checkbox|redactorInsertLinkForm|redactorInsertVideoForm|160px|times|void|redactorInsertImageForm|7px|imageDelete|380|nw|resize|redactorUploadFileForm|commonAncestorContainer|isCollapsed|inlineRemoveAttr|inlineSetClass|inlineSetAttr|inlineFormat|toUpperCase|inlineRemoveFormat|inlineRemoveClass|blockSetClass|blockSetAttr|blockRemoveAttr|blockRemoveStyle|blockSetStyle|blockRemoveClass|setEndAfter|pasteBefore|detach|saveSelection|restoreSelection|removeMarkers|nodeName||selectionAll||extractContents|internal|sid|innerText|pasteAfter|charCodeAt|handle||move|drop|ondrop|dataTransfer||ajaxSettings|dataType|addEventListener|dragleave|dragover|preview|failed|redactor_droparea|redactor_dropareabox|redactor_dropalternative|cache|contentType|compatible|Object|rv|cloneNode|www|Android|BlackBerry|total|processData|Loading|iPhone|iPod|alert|frames|user|charset|defined|onreadystatechange|responseText|decodeURIComponent|plain|overrideMimeType|300px|marginLeft|marginTop|fast|GET|withCredentials|PUT|read|public|INPUT|redactorUploadForm|redactorUploadFile|acl|amz|onerror|onload|onprogress|Content|Type|JustifyFull|unselectable|stopPropagation|redactor_dropdown_|buttonChangeIcon|buttonRemoveIcon|buttonAddSeparator|redactor_separator_drop|redactor_color_none|clientY|210|redactor_color_link|backgroundColor|buttonAddSeparatorAfter|buttonAddSeparatorBefore|buttonAddAfter|buttonAddBefore|buttonRemove|switch|buttonAddFirst|buttonAdd|buttonRemoveSeparatorAfter|buttonRemoveSeparatorBefore|buttonSetRight|buttonSetLeft|clientX|focusNode|placeholderRemove|defaultView|removeFormat|superscript|subscript|ownerDocument|isArray|blur|frameborder|removeChild|stylesheet|innerHeight|escape|scroll|zIndex|1005|relative|redactor_air_|redactor_toolbar_|encodeURIComponent|1000|delete|redactor_toolbar|default|collapseToStart|nav|cite|hgroup|legend|small|JustifyLeft|weight|hasOwnProperty|details|menu|ns|figcaption|figure|OL|summary|math|replaced|colgroup|sub|JustifyRight|UL|sup|u200B|caption|col|JustifyCenter|uFEFF|u200D'.split('|'),0,{})) \ No newline at end of file diff --git a/public/javascripts/vendor/redactor/style.css b/public/javascripts/vendor/redactor/style.css deleted file mode 100755 index 5fa9b5aba..000000000 --- a/public/javascripts/vendor/redactor/style.css +++ /dev/null @@ -1,26 +0,0 @@ -html, body { - margin: 0; - padding: 0; -} - - -/* =Typography ------------------------------------------------------------------------------*/ -body { - font-family: Helvetica, Arial, sans-serif; - font-size: 14px; -} - - -/* =Layout ------------------------------------------------------------------------------*/ -#page { - width: 940px; - margin: 50px auto; -} - -/* =Misc ------------------------------------------------------------------------------*/ -.list li { - margin: 10px 0; -} \ No newline at end of file diff --git a/public/javascripts/vendor/tabby.js b/public/javascripts/vendor/tabby.js deleted file mode 100755 index e30e76fbf..000000000 --- a/public/javascripts/vendor/tabby.js +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Tabby jQuery plugin version 0.12 - * - * Ted Devito - http://teddevito.com/demos/textarea.html - * - * Copyright (c) 2009 Ted Devito - * - * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following - * conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - * - */ - -// create closure - -(function($) { - - // plugin definition - - $.fn.tabby = function(options) { - //debug(this); - // build main options before element iteration - var opts = $.extend({}, $.fn.tabby.defaults, options); - var pressed = $.fn.tabby.pressed; - - // iterate and reformat each matched element - return this.each(function() { - $this = $(this); - - // build element specific options - var options = $.meta ? $.extend({}, opts, $this.data()) : opts; - - $this.bind('keydown',function (e) { - var kc = $.fn.tabby.catch_kc(e); - if (16 == kc) pressed.shft = true; - /* - because both CTRL+TAB and ALT+TAB default to an event (changing tab/window) that - will prevent js from capturing the keyup event, we'll set a timer on releasing them. - */ - if (17 == kc) {pressed.ctrl = true; setTimeout("$.fn.tabby.pressed.ctrl = false;",1000);} - if (18 == kc) {pressed.alt = true; setTimeout("$.fn.tabby.pressed.alt = false;",1000);} - - if (9 == kc && !pressed.ctrl && !pressed.alt) { - e.preventDefault; // does not work in O9.63 ?? - pressed.last = kc; setTimeout("$.fn.tabby.pressed.last = null;",0); - process_keypress ($(e.target).get(0), pressed.shft, options); - return false; - } - - }).bind('keyup',function (e) { - if (16 == $.fn.tabby.catch_kc(e)) pressed.shft = false; - }).bind('blur',function (e) { // workaround for Opera -- http://www.webdeveloper.com/forum/showthread.php?p=806588 - if (9 == pressed.last) $(e.target).one('focus',function (e) {pressed.last = null;}).get(0).focus(); - }); - - }); - }; - - // define and expose any extra methods - $.fn.tabby.catch_kc = function(e) { return e.keyCode ? e.keyCode : e.charCode ? e.charCode : e.which; }; - $.fn.tabby.pressed = {shft : false, ctrl : false, alt : false, last: null}; - - // private function for debugging - function debug($obj) { - if (window.console && window.console.log) - window.console.log('textarea count: ' + $obj.size()); - }; - - function process_keypress (o,shft,options) { - var scrollTo = o.scrollTop; - //var tabString = String.fromCharCode(9); - - // gecko; o.setSelectionRange is only available when the text box has focus - if (o.setSelectionRange) gecko_tab (o, shft, options); - - // ie; document.selection is always available - else if (document.selection) ie_tab (o, shft, options); - - o.scrollTop = scrollTo; - } - - // plugin defaults - $.fn.tabby.defaults = {tabString : String.fromCharCode(9)}; - - function gecko_tab (o, shft, options) { - var ss = o.selectionStart; - var es = o.selectionEnd; - - // when there's no selection and we're just working with the caret, we'll add/remove the tabs at the caret, providing more control - if(ss == es) { - // SHIFT+TAB - if (shft) { - // check to the left of the caret first - if ("\t" == o.value.substring(ss-options.tabString.length, ss)) { - o.value = o.value.substring(0, ss-options.tabString.length) + o.value.substring(ss); // put it back together omitting one character to the left - o.focus(); - o.setSelectionRange(ss - options.tabString.length, ss - options.tabString.length); - } - // then check to the right of the caret - else if ("\t" == o.value.substring(ss, ss + options.tabString.length)) { - o.value = o.value.substring(0, ss) + o.value.substring(ss + options.tabString.length); // put it back together omitting one character to the right - o.focus(); - o.setSelectionRange(ss,ss); - } - } - // TAB - else { - o.value = o.value.substring(0, ss) + options.tabString + o.value.substring(ss); - o.focus(); - o.setSelectionRange(ss + options.tabString.length, ss + options.tabString.length); - } - } - // selections will always add/remove tabs from the start of the line - else { - // split the textarea up into lines and figure out which lines are included in the selection - var lines = o.value.split("\n"); - var indices = new Array(); - var sl = 0; // start of the line - var el = 0; // end of the line - var sel = false; - for (var i in lines) { - el = sl + lines[i].length; - indices.push({start: sl, end: el, selected: (sl <= ss && el > ss) || (el >= es && sl < es) || (sl > ss && el < es)}); - sl = el + 1;// for "\n" - } - - // walk through the array of lines (indices) and add tabs where appropriate - var modifier = 0; - for (var i in indices) { - if (indices[i].selected) { - var pos = indices[i].start + modifier; // adjust for tabs already inserted/removed - // SHIFT+TAB - if (shft && options.tabString == o.value.substring(pos,pos+options.tabString.length)) { // only SHIFT+TAB if there's a tab at the start of the line - o.value = o.value.substring(0,pos) + o.value.substring(pos + options.tabString.length); // omit the tabstring to the right - modifier -= options.tabString.length; - } - // TAB - else if (!shft) { - o.value = o.value.substring(0,pos) + options.tabString + o.value.substring(pos); // insert the tabstring - modifier += options.tabString.length; - } - } - } - o.focus(); - var ns = ss + ((modifier > 0) ? options.tabString.length : (modifier < 0) ? -options.tabString.length : 0); - var ne = es + modifier; - o.setSelectionRange(ns,ne); - } - } - - function ie_tab (o, shft, options) { - var range = document.selection.createRange(); - - if (o == range.parentElement()) { - // when there's no selection and we're just working with the caret, we'll add/remove the tabs at the caret, providing more control - if ('' == range.text) { - // SHIFT+TAB - if (shft) { - var bookmark = range.getBookmark(); - //first try to the left by moving opening up our empty range to the left - range.moveStart('character', -options.tabString.length); - if (options.tabString == range.text) { - range.text = ''; - } else { - // if that didn't work then reset the range and try opening it to the right - range.moveToBookmark(bookmark); - range.moveEnd('character', options.tabString.length); - if (options.tabString == range.text) - range.text = ''; - } - // move the pointer to the start of them empty range and select it - range.collapse(true); - range.select(); - } - - else { - // very simple here. just insert the tab into the range and put the pointer at the end - range.text = options.tabString; - range.collapse(false); - range.select(); - } - } - // selections will always add/remove tabs from the start of the line - else { - - var selection_text = range.text; - var selection_len = selection_text.length; - var selection_arr = selection_text.split("\r\n"); - - var before_range = document.body.createTextRange(); - before_range.moveToElementText(o); - before_range.setEndPoint("EndToStart", range); - var before_text = before_range.text; - var before_arr = before_text.split("\r\n"); - var before_len = before_text.length; // - before_arr.length + 1; - - var after_range = document.body.createTextRange(); - after_range.moveToElementText(o); - after_range.setEndPoint("StartToEnd", range); - var after_text = after_range.text; // we can accurately calculate distance to the end because we're not worried about MSIE trimming a \r\n - - var end_range = document.body.createTextRange(); - end_range.moveToElementText(o); - end_range.setEndPoint("StartToEnd", before_range); - var end_text = end_range.text; // we can accurately calculate distance to the end because we're not worried about MSIE trimming a \r\n - - var check_html = $(o).html(); - $("#r3").text(before_len + " + " + selection_len + " + " + after_text.length + " = " + check_html.length); - if((before_len + end_text.length) < check_html.length) { - before_arr.push(""); - before_len += 2; // for the \r\n that was trimmed - if (shft && options.tabString == selection_arr[0].substring(0,options.tabString.length)) - selection_arr[0] = selection_arr[0].substring(options.tabString.length); - else if (!shft) selection_arr[0] = options.tabString + selection_arr[0]; - } else { - if (shft && options.tabString == before_arr[before_arr.length-1].substring(0,options.tabString.length)) - before_arr[before_arr.length-1] = before_arr[before_arr.length-1].substring(options.tabString.length); - else if (!shft) before_arr[before_arr.length-1] = options.tabString + before_arr[before_arr.length-1]; - } - - for (var i = 1; i < selection_arr.length; i++) { - if (shft && options.tabString == selection_arr[i].substring(0,options.tabString.length)) - selection_arr[i] = selection_arr[i].substring(options.tabString.length); - else if (!shft) selection_arr[i] = options.tabString + selection_arr[i]; - } - - if (1 == before_arr.length && 0 == before_len) { - if (shft && options.tabString == selection_arr[0].substring(0,options.tabString.length)) - selection_arr[0] = selection_arr[0].substring(options.tabString.length); - else if (!shft) selection_arr[0] = options.tabString + selection_arr[0]; - } - - if ((before_len + selection_len + after_text.length) < check_html.length) { - selection_arr.push(""); - selection_len += 2; // for the \r\n that was trimmed - } - - before_range.text = before_arr.join("\r\n"); - range.text = selection_arr.join("\r\n"); - - var new_range = document.body.createTextRange(); - new_range.moveToElementText(o); - - if (0 < before_len) new_range.setEndPoint("StartToEnd", before_range); - else new_range.setEndPoint("StartToStart", before_range); - new_range.setEndPoint("EndToEnd", range); - - new_range.select(); - - } - } - } - -// end of closure -})(jQuery); \ No newline at end of file diff --git a/public/javascripts/vendor/tabby.min.js b/public/javascripts/vendor/tabby.min.js deleted file mode 100644 index ba37afd67..000000000 --- a/public/javascripts/vendor/tabby.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(e){function t(e){if(window.console&&window.console.log)window.console.log("textarea count: "+e.size())}function n(e,t,n){var s=e.scrollTop;if(e.setSelectionRange)r(e,t,n);else if(document.selection)i(e,t,n);e.scrollTop=s}function r(e,t,n){var r=e.selectionStart;var i=e.selectionEnd;if(r==i){if(t){if(r-n.tabString==e.value.substring(r-n.tabString.length,r)){e.value=e.value.substring(0,r-n.tabString.length)+e.value.substring(r);e.focus();e.setSelectionRange(r-n.tabString.length,r-n.tabString.length)}else if(r-n.tabString==e.value.substring(r,r+n.tabString.length)){e.value=e.value.substring(0,r)+e.value.substring(r+n.tabString.length);e.focus();e.setSelectionRange(r,r)}}else{e.value=e.value.substring(0,r)+n.tabString+e.value.substring(r);e.focus();e.setSelectionRange(r+n.tabString.length,r+n.tabString.length)}}else{while(rr||a>=i&&ur&&a0?n.tabString.length:c<0?-n.tabString.length:0);var d=i+c;e.setSelectionRange(p,d)}}function i(t,n,r){var i=document.selection.createRange();if(t==i.parentElement()){if(""==i.text){if(n){var s=i.getBookmark();i.moveStart("character",-r.tabString.length);if(r.tabString==i.text){i.text=""}else{i.moveToBookmark(s);i.moveEnd("character",r.tabString.length);if(r.tabString==i.text)i.text=""}i.collapse(true);i.select()}else{i.text=r.tabString;i.collapse(false);i.select()}}else{var o=i.text;var u=o.length;var a=o.split("\r\n");var f=document.body.createTextRange();f.moveToElementText(t);f.setEndPoint("EndToStart",i);var l=f.text;var c=l.split("\r\n");var h=l.length;var p=document.body.createTextRange();p.moveToElementText(t);p.setEndPoint("StartToEnd",i);var d=p.text;var v=document.body.createTextRange();v.moveToElementText(t);v.setEndPoint("StartToEnd",f);var m=v.text;var g=e(t).html();e("#r3").text(h+" + "+u+" + "+d.length+" = "+g.length);if(h+m.lengthdiv{margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;-moz-border-radius:3px 3px 3px 3px;-webkit-border-radius:3px 3px 3px 3px;border-radius:3px 3px 3px 3px;background-position:15px center;background-repeat:no-repeat;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#fff;opacity:.8;-ms-filter:alpha(opacity=80);filter:alpha(opacity=80)}#toast-container>:hover{-moz-box-shadow:0 0 12px #000;-webkit-box-shadow:0 0 12px #000;box-shadow:0 0 12px #000;opacity:1;-ms-filter:alpha(opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=")!important}#toast-container>.toast-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=")!important}#toast-container>.toast-success{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==")!important}#toast-container>.toast-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=")!important}#toast-container.toast-top-full-width>div,#toast-container.toast-bottom-full-width>div{width:96%;margin:auto}.toast{background-color:#030303}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}@media all and (max-width:240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}}@media all and (min-width:241px) and (max-width:480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}}@media all and (min-width:481px) and (max-width:768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}} \ No newline at end of file diff --git a/public/javascripts/vendor/toastr/toastr.min.js b/public/javascripts/vendor/toastr/toastr.min.js deleted file mode 100644 index f47c149a7..000000000 --- a/public/javascripts/vendor/toastr/toastr.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a){a(["jquery"],function(a){return function(){function b(a,b,c){return j({type:r.error,iconClass:l().iconClasses.error,message:a,optionsOverride:c,title:b})}function c(a,b,c){return j({type:r.info,iconClass:l().iconClasses.info,message:a,optionsOverride:c,title:b})}function d(a){o=a}function e(a,b,c){return j({type:r.success,iconClass:l().iconClasses.success,message:a,optionsOverride:c,title:b})}function f(a,b,c){return j({type:r.warning,iconClass:l().iconClasses.warning,message:a,optionsOverride:c,title:b})}function g(b){var c=l();return n||k(c),b&&0===a(":focus",b).length?(b[c.hideMethod]({duration:c.hideDuration,easing:c.hideEasing,complete:function(){m(b)}}),void 0):(n.children().length&&n[c.hideMethod]({duration:c.hideDuration,easing:c.hideEasing,complete:function(){n.remove()}}),void 0)}function h(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:"",newestOnTop:!0}}function i(a){o&&o(a)}function j(b){function c(b){return!a(":focus",j).length||b?j[f.hideMethod]({duration:f.hideDuration,easing:f.hideEasing,complete:function(){m(j),f.onHidden&&f.onHidden(),s.state="hidden",s.endTime=new Date,i(s)}}):void 0}function d(){(f.timeOut>0||f.extendedTimeOut>0)&&(h=setTimeout(c,f.extendedTimeOut))}function e(){clearTimeout(h),j.stop(!0,!0)[f.showMethod]({duration:f.showDuration,easing:f.showEasing})}var f=l(),g=b.iconClass||f.iconClass;"undefined"!=typeof b.optionsOverride&&(f=a.extend(f,b.optionsOverride),g=b.optionsOverride.iconClass||g),q++,n=k(f);var h=null,j=a("

        "),o=a("
        "),p=a("
        "),r=a(f.closeHtml),s={toastId:q,state:"visible",startTime:new Date,options:f,map:b};return b.iconClass&&j.addClass(f.toastClass).addClass(g),b.title&&(o.append(b.title).addClass(f.titleClass),j.append(o)),b.message&&(p.append(b.message).addClass(f.messageClass),j.append(p)),f.closeButton&&(r.addClass("toast-close-button"),j.prepend(r)),j.hide(),f.newestOnTop?n.prepend(j):n.append(j),j[f.showMethod]({duration:f.showDuration,easing:f.showEasing,complete:f.onShown}),f.timeOut>0&&(h=setTimeout(c,f.timeOut)),j.hover(e,d),!f.onclick&&f.tapToDismiss&&j.click(c),f.closeButton&&r&&r.click(function(a){a.stopPropagation?a.stopPropagation():void 0!==a.cancelBubble&&a.cancelBubble!==!0&&(a.cancelBubble=!0),c(!0)}),f.onclick&&j.click(function(){f.onclick(),c()}),i(s),f.debug&&console&&console.log(s),j}function k(b){return b||(b=l()),n=a("#"+b.containerId),n.length?n:(n=a("
        ").attr("id",b.containerId).addClass(b.positionClass),n.appendTo(a(b.target)),n)}function l(){return a.extend({},h(),s.options)}function m(a){n||(n=k()),a.is(":visible")||(a.remove(),a=null,0===n.children().length&&n.remove())}var n,o,p="2.0.1",q=0,r={error:"error",info:"info",success:"success",warning:"warning"},s={clear:g,error:b,getContainer:k,info:c,options:{},subscribe:d,success:e,version:p,warning:f};return s}()})}("function"==typeof define&&define.amd?define:function(a,b){"undefined"!=typeof module&&module.exports?module.exports=b(require(a[0])):window.toastr=b(window.jQuery)}); \ No newline at end of file diff --git a/public/javascripts/vendor/zclip.min.js b/public/javascripts/vendor/zclip.min.js deleted file mode 100644 index 51471a109..000000000 --- a/public/javascripts/vendor/zclip.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - * zClip :: jQuery ZeroClipboard v1.1.1 - * http://steamdev.com/zclip - * - * Copyright 2011, SteamDev - * Released under the MIT license. - * http://www.opensource.org/licenses/mit-license.php - * - * Date: Wed Jun 01, 2011 - */ - -(function(a){a.fn.zclip=function(c){if(typeof c=="object"&&!c.length){var b=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:true,setHandCursor:true,setCSSEffects:true},c);return this.each(function(){var e=a(this);if(e.is(":visible")&&(typeof b.copy=="string"||a.isFunction(b.copy))){ZeroClipboard.setMoviePath(b.path);var d=new ZeroClipboard.Client();if(a.isFunction(b.copy)){e.bind("zClip_copy",b.copy)}if(a.isFunction(b.beforeCopy)){e.bind("zClip_beforeCopy",b.beforeCopy)}if(a.isFunction(b.afterCopy)){e.bind("zClip_afterCopy",b.afterCopy)}d.setHandCursor(b.setHandCursor);d.setCSSEffects(b.setCSSEffects);d.addEventListener("mouseOver",function(f){e.trigger("mouseenter")});d.addEventListener("mouseOut",function(f){e.trigger("mouseleave")});d.addEventListener("mouseDown",function(f){e.trigger("mousedown");if(!a.isFunction(b.copy)){d.setText(b.copy)}else{d.setText(e.triggerHandler("zClip_copy"))}if(a.isFunction(b.beforeCopy)){e.trigger("zClip_beforeCopy")}});d.addEventListener("complete",function(f,g){if(a.isFunction(b.afterCopy)){e.trigger("zClip_afterCopy")}else{if(g.length>500){g=g.substr(0,500)+"...\n\n("+(g.length-500)+" characters not shown)"}e.removeClass("hover");alert("Copied text to clipboard:\n\n "+g)}if(b.clickAfter){e.trigger("click")}});d.glue(e[0],e.parent()[0]);a(window).bind("load resize",function(){d.reposition()})}})}else{if(typeof c=="string"){return this.each(function(){var f=a(this);c=c.toLowerCase();var e=f.data("zclipId");var d=a("#"+e+".zclip");if(c=="remove"){d.remove();f.removeClass("active hover")}else{if(c=="hide"){d.hide();f.removeClass("active hover")}else{if(c=="show"){d.show()}}}})}}}})(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){if(typeof(a)=="string"){a=document.getElementById(a)}if(!a.addClass){a.hide=function(){this.style.display="none"};a.show=function(){this.style.display=""};a.addClass=function(b){this.removeClass(b);this.className+=" "+b};a.removeClass=function(d){var e=this.className.split(/\s+/);var b=-1;for(var c=0;c-1){e.splice(b,1);this.className=e.join(" ")}return this};a.hasClass=function(b){return !!this.className.match(new RegExp("\\s*"+b+"\\s*"))}}return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(d,b,c){var a=this.clients[d];if(a){a.receiveEvent(b,c)}},register:function(b,a){this.clients[b]=a},getDOMObjectPosition:function(c,a){var b={left:0,top:0,width:c.width?c.width:c.offsetWidth,height:c.height?c.height:c.offsetHeight};if(c&&(c!=a)){b.left+=c.offsetLeft;b.top+=c.offsetTop}return b},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);if(a){this.glue(a)}}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:"",handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(d,b,e){this.domElement=ZeroClipboard.$(d);var f=99;if(this.domElement.style.zIndex){f=parseInt(this.domElement.style.zIndex,10)+1}if(typeof(b)=="string"){b=ZeroClipboard.$(b)}else{if(typeof(b)=="undefined"){b=document.getElementsByTagName("body")[0]}}var c=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div");this.div.className="zclip";this.div.id="zclip-"+this.movieId;$(this.domElement).data("zclipId","zclip-"+this.movieId);var a=this.div.style;a.position="absolute";a.left=""+c.left+"px";a.top=""+c.top+"px";a.width=""+c.width+"px";a.height=""+c.height+"px";a.zIndex=f;if(typeof(e)=="object"){for(addedStyle in e){a[addedStyle]=e[addedStyle]}}b.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(d,a){var c="";var b="id="+this.id+"&width="+d+"&height="+a;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+=''}else{c+=''}return c},hide:function(){if(this.div){this.div.style.left="-2000px"}},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null;this.div=null}},reposition:function(c){if(c){this.domElement=ZeroClipboard.$(c);if(!this.domElement){this.hide()}}if(this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement);var a=this.div.style;a.left=""+b.left+"px";a.top=""+b.top+"px"}},setText:function(a){this.clipText=a;if(this.ready){this.movie.setText(a)}},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");if(!this.handlers[a]){this.handlers[a]=[]}this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;if(this.ready){this.movie.setHandCursor(a)}},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(d,f){d=d.toString().toLowerCase().replace(/^on/,"");switch(d){case"load":this.movie=document.getElementById(this.movieId);if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=true;return}this.ready=true;try{this.movie.setText(this.clipText)}catch(h){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(h){}break;case"mouseover":if(this.domElement&&this.cssEffects){this.domElement.addClass("hover");if(this.recoverActive){this.domElement.addClass("active")}}break;case"mouseout":if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass("active")){this.domElement.removeClass("active");this.recoverActive=true}this.domElement.removeClass("hover")}break;case"mousedown":if(this.domElement&&this.cssEffects){this.domElement.addClass("active")}break;case"mouseup":if(this.domElement&&this.cssEffects){this.domElement.removeClass("active");this.recoverActive=false}break}if(this.handlers[d]){for(var b=0,a=this.handlers[d].length;b>> 0, k = 0, accumulator - if(typeof fun != 'function') throw new TypeError() - if(len == 0 && arguments.length == 1) throw new TypeError() - - if(arguments.length >= 2) - accumulator = arguments[1] - else - do{ - if(k in t){ - accumulator = t[k++] - break - } - if(++k >= len) throw new TypeError() - } while (true) - - while (k < len){ - if(k in t) accumulator = fun.call(undefined, accumulator, t[k], k, t) - k++ - } - return accumulator - } - -})() - -var Zepto = (function() { - var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter, - document = window.document, - elementDisplay = {}, classCache = {}, - getComputedStyle = document.defaultView.getComputedStyle, - cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 }, - fragmentRE = /^\s*<(\w+|!)[^>]*>/, - tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rootNodeRE = /^(?:body|html)$/i, - - // special attributes that should be get/set via method calls - methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'], - - adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ], - table = document.createElement('table'), - tableRow = document.createElement('tr'), - containers = { - 'tr': document.createElement('tbody'), - 'tbody': table, 'thead': table, 'tfoot': table, - 'td': tableRow, 'th': tableRow, - '*': document.createElement('div') - }, - readyRE = /complete|loaded|interactive/, - classSelectorRE = /^\.([\w-]+)$/, - idSelectorRE = /^#([\w-]*)$/, - tagSelectorRE = /^[\w-]+$/, - class2type = {}, - toString = class2type.toString, - zepto = {}, - camelize, uniq, - tempParent = document.createElement('div') - - zepto.matches = function(element, selector) { - if (!element || element.nodeType !== 1) return false - var matchesSelector = element.webkitMatchesSelector || element.mozMatchesSelector || - element.oMatchesSelector || element.matchesSelector - if (matchesSelector) return matchesSelector.call(element, selector) - // fall back to performing a selector: - var match, parent = element.parentNode, temp = !parent - if (temp) (parent = tempParent).appendChild(element) - match = ~zepto.qsa(parent, selector).indexOf(element) - temp && tempParent.removeChild(element) - return match - } - - function type(obj) { - return obj == null ? String(obj) : - class2type[toString.call(obj)] || "object" - } - - function isFunction(value) { return type(value) == "function" } - function isWindow(obj) { return obj != null && obj == obj.window } - function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE } - function isObject(obj) { return type(obj) == "object" } - function isPlainObject(obj) { - return isObject(obj) && !isWindow(obj) && obj.__proto__ == Object.prototype - } - function isArray(value) { return value instanceof Array } - function likeArray(obj) { return typeof obj.length == 'number' } - - function compact(array) { return filter.call(array, function(item){ return item != null }) } - function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array } - camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) } - function dasherize(str) { - return str.replace(/::/g, '/') - .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') - .replace(/([a-z\d])([A-Z])/g, '$1_$2') - .replace(/_/g, '-') - .toLowerCase() - } - uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) } - - function classRE(name) { - return name in classCache ? - classCache[name] : (classCache[name] = new RegExp('(^|\\s)' + name + '(\\s|$)')) - } - - function maybeAddPx(name, value) { - return (typeof value == "number" && !cssNumber[dasherize(name)]) ? value + "px" : value - } - - function defaultDisplay(nodeName) { - var element, display - if (!elementDisplay[nodeName]) { - element = document.createElement(nodeName) - document.body.appendChild(element) - display = getComputedStyle(element, '').getPropertyValue("display") - element.parentNode.removeChild(element) - display == "none" && (display = "block") - elementDisplay[nodeName] = display - } - return elementDisplay[nodeName] - } - - function children(element) { - return 'children' in element ? - slice.call(element.children) : - $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node }) - } - - // `$.zepto.fragment` takes a html string and an optional tag name - // to generate DOM nodes nodes from the given html string. - // The generated DOM nodes are returned as an array. - // This function can be overriden in plugins for example to make - // it compatible with browsers that don't support the DOM fully. - zepto.fragment = function(html, name, properties) { - if (html.replace) html = html.replace(tagExpanderRE, "<$1>") - if (name === undefined) name = fragmentRE.test(html) && RegExp.$1 - if (!(name in containers)) name = '*' - - var nodes, dom, container = containers[name] - container.innerHTML = '' + html - dom = $.each(slice.call(container.childNodes), function(){ - container.removeChild(this) - }) - if (isPlainObject(properties)) { - nodes = $(dom) - $.each(properties, function(key, value) { - if (methodAttributes.indexOf(key) > -1) nodes[key](value) - else nodes.attr(key, value) - }) - } - return dom - } - - // `$.zepto.Z` swaps out the prototype of the given `dom` array - // of nodes with `$.fn` and thus supplying all the Zepto functions - // to the array. Note that `__proto__` is not supported on Internet - // Explorer. This method can be overriden in plugins. - zepto.Z = function(dom, selector) { - dom = dom || [] - dom.__proto__ = $.fn - dom.selector = selector || '' - return dom - } - - // `$.zepto.isZ` should return `true` if the given object is a Zepto - // collection. This method can be overriden in plugins. - zepto.isZ = function(object) { - return object instanceof zepto.Z - } - - // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and - // takes a CSS selector and an optional context (and handles various - // special cases). - // This method can be overriden in plugins. - zepto.init = function(selector, context) { - // If nothing given, return an empty Zepto collection - if (!selector) return zepto.Z() - // If a function is given, call it when the DOM is ready - else if (isFunction(selector)) return $(document).ready(selector) - // If a Zepto collection is given, juts return it - else if (zepto.isZ(selector)) return selector - else { - var dom - // normalize array if an array of nodes is given - if (isArray(selector)) dom = compact(selector) - // Wrap DOM nodes. If a plain object is given, duplicate it. - else if (isObject(selector)) - dom = [isPlainObject(selector) ? $.extend({}, selector) : selector], selector = null - // If it's a html fragment, create nodes from it - else if (fragmentRE.test(selector)) - dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null - // If there's a context, create a collection on that context first, and select - // nodes from there - else if (context !== undefined) return $(context).find(selector) - // And last but no least, if it's a CSS selector, use it to select nodes. - else dom = zepto.qsa(document, selector) - // create a new Zepto collection from the nodes found - return zepto.Z(dom, selector) - } - } - - // `$` will be the base `Zepto` object. When calling this - // function just call `$.zepto.init, which makes the implementation - // details of selecting nodes and creating Zepto collections - // patchable in plugins. - $ = function(selector, context){ - return zepto.init(selector, context) - } - - function extend(target, source, deep) { - for (key in source) - if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { - if (isPlainObject(source[key]) && !isPlainObject(target[key])) - target[key] = {} - if (isArray(source[key]) && !isArray(target[key])) - target[key] = [] - extend(target[key], source[key], deep) - } - else if (source[key] !== undefined) target[key] = source[key] - } - - // Copy all but undefined properties from one or more - // objects to the `target` object. - $.extend = function(target){ - var deep, args = slice.call(arguments, 1) - if (typeof target == 'boolean') { - deep = target - target = args.shift() - } - args.forEach(function(arg){ extend(target, arg, deep) }) - return target - } - - // `$.zepto.qsa` is Zepto's CSS selector implementation which - // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`. - // This method can be overriden in plugins. - zepto.qsa = function(element, selector){ - var found - return (isDocument(element) && idSelectorRE.test(selector)) ? - ( (found = element.getElementById(RegExp.$1)) ? [found] : [] ) : - (element.nodeType !== 1 && element.nodeType !== 9) ? [] : - slice.call( - classSelectorRE.test(selector) ? element.getElementsByClassName(RegExp.$1) : - tagSelectorRE.test(selector) ? element.getElementsByTagName(selector) : - element.querySelectorAll(selector) - ) - } - - function filtered(nodes, selector) { - return selector === undefined ? $(nodes) : $(nodes).filter(selector) - } - - $.contains = function(parent, node) { - return parent !== node && parent.contains(node) - } - - function funcArg(context, arg, idx, payload) { - return isFunction(arg) ? arg.call(context, idx, payload) : arg - } - - function setAttribute(node, name, value) { - value == null ? node.removeAttribute(name) : node.setAttribute(name, value) - } - - // access className property while respecting SVGAnimatedString - function className(node, value){ - var klass = node.className, - svg = klass && klass.baseVal !== undefined - - if (value === undefined) return svg ? klass.baseVal : klass - svg ? (klass.baseVal = value) : (node.className = value) - } - - // "true" => true - // "false" => false - // "null" => null - // "42" => 42 - // "42.5" => 42.5 - // JSON => parse if valid - // String => self - function deserializeValue(value) { - var num - try { - return value ? - value == "true" || - ( value == "false" ? false : - value == "null" ? null : - !isNaN(num = Number(value)) ? num : - /^[\[\{]/.test(value) ? $.parseJSON(value) : - value ) - : value - } catch(e) { - return value - } - } - - $.type = type - $.isFunction = isFunction - $.isWindow = isWindow - $.isArray = isArray - $.isPlainObject = isPlainObject - - $.isEmptyObject = function(obj) { - var name - for (name in obj) return false - return true - } - - $.inArray = function(elem, array, i){ - return emptyArray.indexOf.call(array, elem, i) - } - - $.camelCase = camelize - $.trim = function(str) { return str.trim() } - - // plugin compatibility - $.uuid = 0 - $.support = { } - $.expr = { } - - $.map = function(elements, callback){ - var value, values = [], i, key - if (likeArray(elements)) - for (i = 0; i < elements.length; i++) { - value = callback(elements[i], i) - if (value != null) values.push(value) - } - else - for (key in elements) { - value = callback(elements[key], key) - if (value != null) values.push(value) - } - return flatten(values) - } - - $.each = function(elements, callback){ - var i, key - if (likeArray(elements)) { - for (i = 0; i < elements.length; i++) - if (callback.call(elements[i], i, elements[i]) === false) return elements - } else { - for (key in elements) - if (callback.call(elements[key], key, elements[key]) === false) return elements - } - - return elements - } - - $.grep = function(elements, callback){ - return filter.call(elements, callback) - } - - if (window.JSON) $.parseJSON = JSON.parse - - // Populate the class2type map - $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase() - }) - - // Define methods that will be available on all - // Zepto collections - $.fn = { - // Because a collection acts like an array - // copy over these useful array functions. - forEach: emptyArray.forEach, - reduce: emptyArray.reduce, - push: emptyArray.push, - sort: emptyArray.sort, - indexOf: emptyArray.indexOf, - concat: emptyArray.concat, - - // `map` and `slice` in the jQuery API work differently - // from their array counterparts - map: function(fn){ - return $($.map(this, function(el, i){ return fn.call(el, i, el) })) - }, - slice: function(){ - return $(slice.apply(this, arguments)) - }, - - ready: function(callback){ - if (readyRE.test(document.readyState)) callback($) - else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false) - return this - }, - get: function(idx){ - return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length] - }, - toArray: function(){ return this.get() }, - size: function(){ - return this.length - }, - remove: function(){ - return this.each(function(){ - if (this.parentNode != null) - this.parentNode.removeChild(this) - }) - }, - each: function(callback){ - emptyArray.every.call(this, function(el, idx){ - return callback.call(el, idx, el) !== false - }) - return this - }, - filter: function(selector){ - if (isFunction(selector)) return this.not(this.not(selector)) - return $(filter.call(this, function(element){ - return zepto.matches(element, selector) - })) - }, - add: function(selector,context){ - return $(uniq(this.concat($(selector,context)))) - }, - is: function(selector){ - return this.length > 0 && zepto.matches(this[0], selector) - }, - not: function(selector){ - var nodes=[] - if (isFunction(selector) && selector.call !== undefined) - this.each(function(idx){ - if (!selector.call(this,idx)) nodes.push(this) - }) - else { - var excludes = typeof selector == 'string' ? this.filter(selector) : - (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector) - this.forEach(function(el){ - if (excludes.indexOf(el) < 0) nodes.push(el) - }) - } - return $(nodes) - }, - has: function(selector){ - return this.filter(function(){ - return isObject(selector) ? - $.contains(this, selector) : - $(this).find(selector).size() - }) - }, - eq: function(idx){ - return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1) - }, - first: function(){ - var el = this[0] - return el && !isObject(el) ? el : $(el) - }, - last: function(){ - var el = this[this.length - 1] - return el && !isObject(el) ? el : $(el) - }, - find: function(selector){ - var result, $this = this - if (typeof selector == 'object') - result = $(selector).filter(function(){ - var node = this - return emptyArray.some.call($this, function(parent){ - return $.contains(parent, node) - }) - }) - else if (this.length == 1) result = $(zepto.qsa(this[0], selector)) - else result = this.map(function(){ return zepto.qsa(this, selector) }) - return result - }, - closest: function(selector, context){ - var node = this[0], collection = false - if (typeof selector == 'object') collection = $(selector) - while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector))) - node = node !== context && !isDocument(node) && node.parentNode - return $(node) - }, - parents: function(selector){ - var ancestors = [], nodes = this - while (nodes.length > 0) - nodes = $.map(nodes, function(node){ - if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) { - ancestors.push(node) - return node - } - }) - return filtered(ancestors, selector) - }, - parent: function(selector){ - return filtered(uniq(this.pluck('parentNode')), selector) - }, - children: function(selector){ - return filtered(this.map(function(){ return children(this) }), selector) - }, - contents: function() { - return this.map(function() { return slice.call(this.childNodes) }) - }, - siblings: function(selector){ - return filtered(this.map(function(i, el){ - return filter.call(children(el.parentNode), function(child){ return child!==el }) - }), selector) - }, - empty: function(){ - return this.each(function(){ this.innerHTML = '' }) - }, - // `pluck` is borrowed from Prototype.js - pluck: function(property){ - return $.map(this, function(el){ return el[property] }) - }, - show: function(){ - return this.each(function(){ - this.style.display == "none" && (this.style.display = null) - if (getComputedStyle(this, '').getPropertyValue("display") == "none") - this.style.display = defaultDisplay(this.nodeName) - }) - }, - replaceWith: function(newContent){ - return this.before(newContent).remove() - }, - wrap: function(structure){ - var func = isFunction(structure) - if (this[0] && !func) - var dom = $(structure).get(0), - clone = dom.parentNode || this.length > 1 - - return this.each(function(index){ - $(this).wrapAll( - func ? structure.call(this, index) : - clone ? dom.cloneNode(true) : dom - ) - }) - }, - wrapAll: function(structure){ - if (this[0]) { - $(this[0]).before(structure = $(structure)) - var children - // drill down to the inmost element - while ((children = structure.children()).length) structure = children.first() - $(structure).append(this) - } - return this - }, - wrapInner: function(structure){ - var func = isFunction(structure) - return this.each(function(index){ - var self = $(this), contents = self.contents(), - dom = func ? structure.call(this, index) : structure - contents.length ? contents.wrapAll(dom) : self.append(dom) - }) - }, - unwrap: function(){ - this.parent().each(function(){ - $(this).replaceWith($(this).children()) - }) - return this - }, - clone: function(){ - return this.map(function(){ return this.cloneNode(true) }) - }, - hide: function(){ - return this.css("display", "none") - }, - toggle: function(setting){ - return this.each(function(){ - var el = $(this) - ;(setting === undefined ? el.css("display") == "none" : setting) ? el.show() : el.hide() - }) - }, - prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') }, - next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') }, - html: function(html){ - return html === undefined ? - (this.length > 0 ? this[0].innerHTML : null) : - this.each(function(idx){ - var originHtml = this.innerHTML - $(this).empty().append( funcArg(this, html, idx, originHtml) ) - }) - }, - text: function(text){ - return text === undefined ? - (this.length > 0 ? this[0].textContent : null) : - this.each(function(){ this.textContent = text }) - }, - attr: function(name, value){ - var result - return (typeof name == 'string' && value === undefined) ? - (this.length == 0 || this[0].nodeType !== 1 ? undefined : - (name == 'value' && this[0].nodeName == 'INPUT') ? this.val() : - (!(result = this[0].getAttribute(name)) && name in this[0]) ? this[0][name] : result - ) : - this.each(function(idx){ - if (this.nodeType !== 1) return - if (isObject(name)) for (key in name) setAttribute(this, key, name[key]) - else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name))) - }) - }, - removeAttr: function(name){ - return this.each(function(){ this.nodeType === 1 && setAttribute(this, name) }) - }, - prop: function(name, value){ - return (value === undefined) ? - (this[0] && this[0][name]) : - this.each(function(idx){ - this[name] = funcArg(this, value, idx, this[name]) - }) - }, - data: function(name, value){ - var data = this.attr('data-' + dasherize(name), value) - return data !== null ? deserializeValue(data) : undefined - }, - val: function(value){ - return (value === undefined) ? - (this[0] && (this[0].multiple ? - $(this[0]).find('option').filter(function(o){ return this.selected }).pluck('value') : - this[0].value) - ) : - this.each(function(idx){ - this.value = funcArg(this, value, idx, this.value) - }) - }, - offset: function(coordinates){ - if (coordinates) return this.each(function(index){ - var $this = $(this), - coords = funcArg(this, coordinates, index, $this.offset()), - parentOffset = $this.offsetParent().offset(), - props = { - top: coords.top - parentOffset.top, - left: coords.left - parentOffset.left - } - - if ($this.css('position') == 'static') props['position'] = 'relative' - $this.css(props) - }) - if (this.length==0) return null - var obj = this[0].getBoundingClientRect() - return { - left: obj.left + window.pageXOffset, - top: obj.top + window.pageYOffset, - width: Math.round(obj.width), - height: Math.round(obj.height) - } - }, - css: function(property, value){ - if (arguments.length < 2 && typeof property == 'string') - return this[0] && (this[0].style[camelize(property)] || getComputedStyle(this[0], '').getPropertyValue(property)) - - var css = '' - if (type(property) == 'string') { - if (!value && value !== 0) - this.each(function(){ this.style.removeProperty(dasherize(property)) }) - else - css = dasherize(property) + ":" + maybeAddPx(property, value) - } else { - for (key in property) - if (!property[key] && property[key] !== 0) - this.each(function(){ this.style.removeProperty(dasherize(key)) }) - else - css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';' - } - - return this.each(function(){ this.style.cssText += ';' + css }) - }, - index: function(element){ - return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0]) - }, - hasClass: function(name){ - return emptyArray.some.call(this, function(el){ - return this.test(className(el)) - }, classRE(name)) - }, - addClass: function(name){ - return this.each(function(idx){ - classList = [] - var cls = className(this), newName = funcArg(this, name, idx, cls) - newName.split(/\s+/g).forEach(function(klass){ - if (!$(this).hasClass(klass)) classList.push(klass) - }, this) - classList.length && className(this, cls + (cls ? " " : "") + classList.join(" ")) - }) - }, - removeClass: function(name){ - return this.each(function(idx){ - if (name === undefined) return className(this, '') - classList = className(this) - funcArg(this, name, idx, classList).split(/\s+/g).forEach(function(klass){ - classList = classList.replace(classRE(klass), " ") - }) - className(this, classList.trim()) - }) - }, - toggleClass: function(name, when){ - return this.each(function(idx){ - var $this = $(this), names = funcArg(this, name, idx, className(this)) - names.split(/\s+/g).forEach(function(klass){ - (when === undefined ? !$this.hasClass(klass) : when) ? - $this.addClass(klass) : $this.removeClass(klass) - }) - }) - }, - scrollTop: function(){ - if (!this.length) return - return ('scrollTop' in this[0]) ? this[0].scrollTop : this[0].scrollY - }, - position: function() { - if (!this.length) return - - var elem = this[0], - // Get *real* offsetParent - offsetParent = this.offsetParent(), - // Get correct offsets - offset = this.offset(), - parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset() - - // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - offset.top -= parseFloat( $(elem).css('margin-top') ) || 0 - offset.left -= parseFloat( $(elem).css('margin-left') ) || 0 - - // Add offsetParent borders - parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0 - parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0 - - // Subtract the two offsets - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - } - }, - offsetParent: function() { - return this.map(function(){ - var parent = this.offsetParent || document.body - while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static") - parent = parent.offsetParent - return parent - }) - } - } - - // for now - $.fn.detach = $.fn.remove - - // Generate the `width` and `height` functions - ;['width', 'height'].forEach(function(dimension){ - $.fn[dimension] = function(value){ - var offset, el = this[0], - Dimension = dimension.replace(/./, function(m){ return m[0].toUpperCase() }) - if (value === undefined) return isWindow(el) ? el['inner' + Dimension] : - isDocument(el) ? el.documentElement['offset' + Dimension] : - (offset = this.offset()) && offset[dimension] - else return this.each(function(idx){ - el = $(this) - el.css(dimension, funcArg(this, value, idx, el[dimension]())) - }) - } - }) - - function traverseNode(node, fun) { - fun(node) - for (var key in node.childNodes) traverseNode(node.childNodes[key], fun) - } - - // Generate the `after`, `prepend`, `before`, `append`, - // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods. - adjacencyOperators.forEach(function(operator, operatorIndex) { - var inside = operatorIndex % 2 //=> prepend, append - - $.fn[operator] = function(){ - // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings - var argType, nodes = $.map(arguments, function(arg) { - argType = type(arg) - return argType == "object" || argType == "array" || arg == null ? - arg : zepto.fragment(arg) - }), - parent, copyByClone = this.length > 1 - if (nodes.length < 1) return this - - return this.each(function(_, target){ - parent = inside ? target : target.parentNode - - // convert all methods to a "before" operation - target = operatorIndex == 0 ? target.nextSibling : - operatorIndex == 1 ? target.firstChild : - operatorIndex == 2 ? target : - null - - nodes.forEach(function(node){ - if (copyByClone) node = node.cloneNode(true) - else if (!parent) return $(node).remove() - - traverseNode(parent.insertBefore(node, target), function(el){ - if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' && - (!el.type || el.type === 'text/javascript') && !el.src) - window['eval'].call(window, el.innerHTML) - }) - }) - }) - } - - // after => insertAfter - // prepend => prependTo - // before => insertBefore - // append => appendTo - $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){ - $(html)[operator](this) - return this - } - }) - - zepto.Z.prototype = $.fn - - // Export internal API functions in the `$.zepto` namespace - zepto.uniq = uniq - zepto.deserializeValue = deserializeValue - $.zepto = zepto - - return $ -})() - -window.Zepto = Zepto -'$' in window || (window.$ = Zepto) - -;(function($){ - function detect(ua){ - var os = this.os = {}, browser = this.browser = {}, - webkit = ua.match(/WebKit\/([\d.]+)/), - android = ua.match(/(Android)\s+([\d.]+)/), - ipad = ua.match(/(iPad).*OS\s([\d_]+)/), - iphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/), - webos = ua.match(/(webOS|hpwOS)[\s\/]([\d.]+)/), - touchpad = webos && ua.match(/TouchPad/), - kindle = ua.match(/Kindle\/([\d.]+)/), - silk = ua.match(/Silk\/([\d._]+)/), - blackberry = ua.match(/(BlackBerry).*Version\/([\d.]+)/), - bb10 = ua.match(/(BB10).*Version\/([\d.]+)/), - rimtabletos = ua.match(/(RIM\sTablet\sOS)\s([\d.]+)/), - playbook = ua.match(/PlayBook/), - chrome = ua.match(/Chrome\/([\d.]+)/) || ua.match(/CriOS\/([\d.]+)/), - firefox = ua.match(/Firefox\/([\d.]+)/) - - // Todo: clean this up with a better OS/browser seperation: - // - discern (more) between multiple browsers on android - // - decide if kindle fire in silk mode is android or not - // - Firefox on Android doesn't specify the Android version - // - possibly devide in os, device and browser hashes - - if (browser.webkit = !!webkit) browser.version = webkit[1] - - if (android) os.android = true, os.version = android[2] - if (iphone) os.ios = os.iphone = true, os.version = iphone[2].replace(/_/g, '.') - if (ipad) os.ios = os.ipad = true, os.version = ipad[2].replace(/_/g, '.') - if (webos) os.webos = true, os.version = webos[2] - if (touchpad) os.touchpad = true - if (blackberry) os.blackberry = true, os.version = blackberry[2] - if (bb10) os.bb10 = true, os.version = bb10[2] - if (rimtabletos) os.rimtabletos = true, os.version = rimtabletos[2] - if (playbook) browser.playbook = true - if (kindle) os.kindle = true, os.version = kindle[1] - if (silk) browser.silk = true, browser.version = silk[1] - if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true - if (chrome) browser.chrome = true, browser.version = chrome[1] - if (firefox) browser.firefox = true, browser.version = firefox[1] - - os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) || (firefox && ua.match(/Tablet/))) - os.phone = !!(!os.tablet && (android || iphone || webos || blackberry || bb10 || - (chrome && ua.match(/Android/)) || (chrome && ua.match(/CriOS\/([\d.]+)/)) || (firefox && ua.match(/Mobile/)))) - } - - detect.call($, navigator.userAgent) - // make available to unit tests - $.__detect = detect - -})(Zepto) - -;(function($){ - var $$ = $.zepto.qsa, handlers = {}, _zid = 1, specialEvents={}, - hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' } - - specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents' - - function zid(element) { - return element._zid || (element._zid = _zid++) - } - function findHandlers(element, event, fn, selector) { - event = parse(event) - if (event.ns) var matcher = matcherFor(event.ns) - return (handlers[zid(element)] || []).filter(function(handler) { - return handler - && (!event.e || handler.e == event.e) - && (!event.ns || matcher.test(handler.ns)) - && (!fn || zid(handler.fn) === zid(fn)) - && (!selector || handler.sel == selector) - }) - } - function parse(event) { - var parts = ('' + event).split('.') - return {e: parts[0], ns: parts.slice(1).sort().join(' ')} - } - function matcherFor(ns) { - return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)') - } - - function eachEvent(events, fn, iterator){ - if ($.type(events) != "string") $.each(events, iterator) - else events.split(/\s/).forEach(function(type){ iterator(type, fn) }) - } - - function eventCapture(handler, captureSetting) { - return handler.del && - (handler.e == 'focus' || handler.e == 'blur') || - !!captureSetting - } - - function realEvent(type) { - return hover[type] || type - } - - function add(element, events, fn, selector, getDelegate, capture){ - var id = zid(element), set = (handlers[id] || (handlers[id] = [])) - eachEvent(events, fn, function(event, fn){ - var handler = parse(event) - handler.fn = fn - handler.sel = selector - // emulate mouseenter, mouseleave - if (handler.e in hover) fn = function(e){ - var related = e.relatedTarget - if (!related || (related !== this && !$.contains(this, related))) - return handler.fn.apply(this, arguments) - } - handler.del = getDelegate && getDelegate(fn, event) - var callback = handler.del || fn - handler.proxy = function (e) { - var result = callback.apply(element, [e].concat(e.data)) - if (result === false) e.preventDefault(), e.stopPropagation() - return result - } - handler.i = set.length - set.push(handler) - element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) - }) - } - function remove(element, events, fn, selector, capture){ - var id = zid(element) - eachEvent(events || '', fn, function(event, fn){ - findHandlers(element, event, fn, selector).forEach(function(handler){ - delete handlers[id][handler.i] - element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) - }) - }) - } - - $.event = { add: add, remove: remove } - - $.proxy = function(fn, context) { - if ($.isFunction(fn)) { - var proxyFn = function(){ return fn.apply(context, arguments) } - proxyFn._zid = zid(fn) - return proxyFn - } else if (typeof context == 'string') { - return $.proxy(fn[context], fn) - } else { - throw new TypeError("expected function") - } - } - - $.fn.bind = function(event, callback){ - return this.each(function(){ - add(this, event, callback) - }) - } - $.fn.unbind = function(event, callback){ - return this.each(function(){ - remove(this, event, callback) - }) - } - $.fn.one = function(event, callback){ - return this.each(function(i, element){ - add(this, event, callback, null, function(fn, type){ - return function(){ - var result = fn.apply(element, arguments) - remove(element, type, fn) - return result - } - }) - }) - } - - var returnTrue = function(){return true}, - returnFalse = function(){return false}, - ignoreProperties = /^([A-Z]|layer[XY]$)/, - eventMethods = { - preventDefault: 'isDefaultPrevented', - stopImmediatePropagation: 'isImmediatePropagationStopped', - stopPropagation: 'isPropagationStopped' - } - function createProxy(event) { - var key, proxy = { originalEvent: event } - for (key in event) - if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key] - - $.each(eventMethods, function(name, predicate) { - proxy[name] = function(){ - this[predicate] = returnTrue - return event[name].apply(event, arguments) - } - proxy[predicate] = returnFalse - }) - return proxy - } - - // emulates the 'defaultPrevented' property for browsers that have none - function fix(event) { - if (!('defaultPrevented' in event)) { - event.defaultPrevented = false - var prevent = event.preventDefault - event.preventDefault = function() { - this.defaultPrevented = true - prevent.call(this) - } - } - } - - $.fn.delegate = function(selector, event, callback){ - return this.each(function(i, element){ - add(element, event, callback, selector, function(fn){ - return function(e){ - var evt, match = $(e.target).closest(selector, element).get(0) - if (match) { - evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element}) - return fn.apply(match, [evt].concat([].slice.call(arguments, 1))) - } - } - }) - }) - } - $.fn.undelegate = function(selector, event, callback){ - return this.each(function(){ - remove(this, event, callback, selector) - }) - } - - $.fn.live = function(event, callback){ - $(document.body).delegate(this.selector, event, callback) - return this - } - $.fn.die = function(event, callback){ - $(document.body).undelegate(this.selector, event, callback) - return this - } - - $.fn.on = function(event, selector, callback){ - return !selector || $.isFunction(selector) ? - this.bind(event, selector || callback) : this.delegate(selector, event, callback) - } - $.fn.off = function(event, selector, callback){ - return !selector || $.isFunction(selector) ? - this.unbind(event, selector || callback) : this.undelegate(selector, event, callback) - } - - $.fn.trigger = function(event, data){ - if (typeof event == 'string' || $.isPlainObject(event)) event = $.Event(event) - fix(event) - event.data = data - return this.each(function(){ - // items in the collection might not be DOM elements - // (todo: possibly support events on plain old objects) - if('dispatchEvent' in this) this.dispatchEvent(event) - }) - } - - // triggers event handlers on current element just as if an event occurred, - // doesn't trigger an actual event, doesn't bubble - $.fn.triggerHandler = function(event, data){ - var e, result - this.each(function(i, element){ - e = createProxy(typeof event == 'string' ? $.Event(event) : event) - e.data = data - e.target = element - $.each(findHandlers(element, event.type || event), function(i, handler){ - result = handler.proxy(e) - if (e.isImmediatePropagationStopped()) return false - }) - }) - return result - } - - // shortcut methods for `.bind(event, fn)` for each event type - ;('focusin focusout load resize scroll unload click dblclick '+ - 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+ - 'change select keydown keypress keyup error').split(' ').forEach(function(event) { - $.fn[event] = function(callback) { - return callback ? - this.bind(event, callback) : - this.trigger(event) - } - }) - - ;['focus', 'blur'].forEach(function(name) { - $.fn[name] = function(callback) { - if (callback) this.bind(name, callback) - else this.each(function(){ - try { this[name]() } - catch(e) {} - }) - return this - } - }) - - $.Event = function(type, props) { - if (typeof type != 'string') props = type, type = props.type - var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true - if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name]) - event.initEvent(type, bubbles, true, null, null, null, null, null, null, null, null, null, null, null, null) - event.isDefaultPrevented = function(){ return this.defaultPrevented } - return event - } - -})(Zepto) - -;(function($){ - var jsonpID = 0, - document = window.document, - key, - name, - rscript = /)<[^<]*)*<\/script>/gi, - scriptTypeRE = /^(?:text|application)\/javascript/i, - xmlTypeRE = /^(?:text|application)\/xml/i, - jsonType = 'application/json', - htmlType = 'text/html', - blankRE = /^\s*$/ - - // trigger a custom event and return false if it was cancelled - function triggerAndReturn(context, eventName, data) { - var event = $.Event(eventName) - $(context).trigger(event, data) - return !event.defaultPrevented - } - - // trigger an Ajax "global" event - function triggerGlobal(settings, context, eventName, data) { - if (settings.global) return triggerAndReturn(context || document, eventName, data) - } - - // Number of active Ajax requests - $.active = 0 - - function ajaxStart(settings) { - if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart') - } - function ajaxStop(settings) { - if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop') - } - - // triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable - function ajaxBeforeSend(xhr, settings) { - var context = settings.context - if (settings.beforeSend.call(context, xhr, settings) === false || - triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false) - return false - - triggerGlobal(settings, context, 'ajaxSend', [xhr, settings]) - } - function ajaxSuccess(data, xhr, settings) { - var context = settings.context, status = 'success' - settings.success.call(context, data, status, xhr) - triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data]) - ajaxComplete(status, xhr, settings) - } - // type: "timeout", "error", "abort", "parsererror" - function ajaxError(error, type, xhr, settings) { - var context = settings.context - settings.error.call(context, xhr, type, error) - triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error]) - ajaxComplete(type, xhr, settings) - } - // status: "success", "notmodified", "error", "timeout", "abort", "parsererror" - function ajaxComplete(status, xhr, settings) { - var context = settings.context - settings.complete.call(context, xhr, status) - triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings]) - ajaxStop(settings) - } - - // Empty function, used as default callback - function empty() {} - - $.ajaxJSONP = function(options){ - if (!('type' in options)) return $.ajax(options) - - var callbackName = 'jsonp' + (++jsonpID), - script = document.createElement('script'), - cleanup = function() { - clearTimeout(abortTimeout) - $(script).remove() - delete window[callbackName] - }, - abort = function(type){ - cleanup() - // In case of manual abort or timeout, keep an empty function as callback - // so that the SCRIPT tag that eventually loads won't result in an error. - if (!type || type == 'timeout') window[callbackName] = empty - ajaxError(null, type || 'abort', xhr, options) - }, - xhr = { abort: abort }, abortTimeout - - if (ajaxBeforeSend(xhr, options) === false) { - abort('abort') - return false - } - - window[callbackName] = function(data){ - cleanup() - ajaxSuccess(data, xhr, options) - } - - script.onerror = function() { abort('error') } - - script.src = options.url.replace(/=\?/, '=' + callbackName) - $('head').append(script) - - if (options.timeout > 0) abortTimeout = setTimeout(function(){ - abort('timeout') - }, options.timeout) - - return xhr - } - - $.ajaxSettings = { - // Default type of request - type: 'GET', - // Callback that is executed before request - beforeSend: empty, - // Callback that is executed if the request succeeds - success: empty, - // Callback that is executed the the server drops error - error: empty, - // Callback that is executed on request complete (both: error and success) - complete: empty, - // The context for the callbacks - context: null, - // Whether to trigger "global" Ajax events - global: true, - // Transport - xhr: function () { - return new window.XMLHttpRequest() - }, - // MIME types mapping - accepts: { - script: 'text/javascript, application/javascript', - json: jsonType, - xml: 'application/xml, text/xml', - html: htmlType, - text: 'text/plain' - }, - // Whether the request is to another domain - crossDomain: false, - // Default timeout - timeout: 0, - // Whether data should be serialized to string - processData: true, - // Whether the browser should be allowed to cache GET responses - cache: true, - } - - function mimeToDataType(mime) { - if (mime) mime = mime.split(';', 2)[0] - return mime && ( mime == htmlType ? 'html' : - mime == jsonType ? 'json' : - scriptTypeRE.test(mime) ? 'script' : - xmlTypeRE.test(mime) && 'xml' ) || 'text' - } - - function appendQuery(url, query) { - return (url + '&' + query).replace(/[&?]{1,2}/, '?') - } - - // serialize payload and append it to the URL for GET requests - function serializeData(options) { - if (options.processData && options.data && $.type(options.data) != "string") - options.data = $.param(options.data, options.traditional) - if (options.data && (!options.type || options.type.toUpperCase() == 'GET')) - options.url = appendQuery(options.url, options.data) - } - - $.ajax = function(options){ - var settings = $.extend({}, options || {}) - for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key] - - ajaxStart(settings) - - if (!settings.crossDomain) settings.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(settings.url) && - RegExp.$2 != window.location.host - - if (!settings.url) settings.url = window.location.toString() - serializeData(settings) - if (settings.cache === false) settings.url = appendQuery(settings.url, '_=' + Date.now()) - - var dataType = settings.dataType, hasPlaceholder = /=\?/.test(settings.url) - if (dataType == 'jsonp' || hasPlaceholder) { - if (!hasPlaceholder) settings.url = appendQuery(settings.url, 'callback=?') - return $.ajaxJSONP(settings) - } - - var mime = settings.accepts[dataType], - baseHeaders = { }, - protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol, - xhr = settings.xhr(), abortTimeout - - if (!settings.crossDomain) baseHeaders['X-Requested-With'] = 'XMLHttpRequest' - if (mime) { - baseHeaders['Accept'] = mime - if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0] - xhr.overrideMimeType && xhr.overrideMimeType(mime) - } - if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET')) - baseHeaders['Content-Type'] = (settings.contentType || 'application/x-www-form-urlencoded') - settings.headers = $.extend(baseHeaders, settings.headers || {}) - - xhr.onreadystatechange = function(){ - if (xhr.readyState == 4) { - xhr.onreadystatechange = empty; - clearTimeout(abortTimeout) - var result, error = false - if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) { - dataType = dataType || mimeToDataType(xhr.getResponseHeader('content-type')) - result = xhr.responseText - - try { - // http://perfectionkills.com/global-eval-what-are-the-options/ - if (dataType == 'script') (1,eval)(result) - else if (dataType == 'xml') result = xhr.responseXML - else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result) - } catch (e) { error = e } - - if (error) ajaxError(error, 'parsererror', xhr, settings) - else ajaxSuccess(result, xhr, settings) - } else { - ajaxError(null, xhr.status ? 'error' : 'abort', xhr, settings) - } - } - } - - var async = 'async' in settings ? settings.async : true - xhr.open(settings.type, settings.url, async) - - for (name in settings.headers) xhr.setRequestHeader(name, settings.headers[name]) - - if (ajaxBeforeSend(xhr, settings) === false) { - xhr.abort() - return false - } - - if (settings.timeout > 0) abortTimeout = setTimeout(function(){ - xhr.onreadystatechange = empty - xhr.abort() - ajaxError(null, 'timeout', xhr, settings) - }, settings.timeout) - - // avoid sending empty string (#319) - xhr.send(settings.data ? settings.data : null) - return xhr - } - - // handle optional data/success arguments - function parseArguments(url, data, success, dataType) { - var hasData = !$.isFunction(data) - return { - url: url, - data: hasData ? data : undefined, - success: !hasData ? data : $.isFunction(success) ? success : undefined, - dataType: hasData ? dataType || success : success - } - } - - $.get = function(url, data, success, dataType){ - return $.ajax(parseArguments.apply(null, arguments)) - } - - $.post = function(url, data, success, dataType){ - var options = parseArguments.apply(null, arguments) - options.type = 'POST' - return $.ajax(options) - } - - $.getJSON = function(url, data, success){ - var options = parseArguments.apply(null, arguments) - options.dataType = 'json' - return $.ajax(options) - } - - $.fn.load = function(url, data, success){ - if (!this.length) return this - var self = this, parts = url.split(/\s/), selector, - options = parseArguments(url, data, success), - callback = options.success - if (parts.length > 1) options.url = parts[0], selector = parts[1] - options.success = function(response){ - self.html(selector ? - $('
        ').html(response.replace(rscript, "")).find(selector) - : response) - callback && callback.apply(self, arguments) - } - $.ajax(options) - return this - } - - var escape = encodeURIComponent - - function serialize(params, obj, traditional, scope){ - var type, array = $.isArray(obj) - $.each(obj, function(key, value) { - type = $.type(value) - if (scope) key = traditional ? scope : scope + '[' + (array ? '' : key) + ']' - // handle data in serializeArray() format - if (!scope && array) params.add(value.name, value.value) - // recurse into nested objects - else if (type == "array" || (!traditional && type == "object")) - serialize(params, value, traditional, key) - else params.add(key, value) - }) - } - - $.param = function(obj, traditional){ - var params = [] - params.add = function(k, v){ this.push(escape(k) + '=' + escape(v)) } - serialize(params, obj, traditional) - return params.join('&').replace(/%20/g, '+') - } -})(Zepto) - -;(function ($) { - $.fn.serializeArray = function () { - var result = [], el - $( Array.prototype.slice.call(this.get(0).elements) ).each(function () { - el = $(this) - var type = el.attr('type') - if (this.nodeName.toLowerCase() != 'fieldset' && - !this.disabled && type != 'submit' && type != 'reset' && type != 'button' && - ((type != 'radio' && type != 'checkbox') || this.checked)) - result.push({ - name: el.attr('name'), - value: el.val() - }) - }) - return result - } - - $.fn.serialize = function () { - var result = [] - this.serializeArray().forEach(function (elm) { - result.push( encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value) ) - }) - return result.join('&') - } - - $.fn.submit = function (callback) { - if (callback) this.bind('submit', callback) - else if (this.length) { - var event = $.Event('submit') - this.eq(0).trigger(event) - if (!event.defaultPrevented) this.get(0).submit() - } - return this - } - -})(Zepto) - -;(function($, undefined){ - var prefix = '', eventPrefix, endEventName, endAnimationName, - vendors = { Webkit: 'webkit', Moz: '', O: 'o', ms: 'MS' }, - document = window.document, testEl = document.createElement('div'), - supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i, - transform, - transitionProperty, transitionDuration, transitionTiming, - animationName, animationDuration, animationTiming, - cssReset = {} - - function dasherize(str) { return downcase(str.replace(/([a-z])([A-Z])/, '$1-$2')) } - function downcase(str) { return str.toLowerCase() } - function normalizeEvent(name) { return eventPrefix ? eventPrefix + name : downcase(name) } - - $.each(vendors, function(vendor, event){ - if (testEl.style[vendor + 'TransitionProperty'] !== undefined) { - prefix = '-' + downcase(vendor) + '-' - eventPrefix = event - return false - } - }) - - transform = prefix + 'transform' - cssReset[transitionProperty = prefix + 'transition-property'] = - cssReset[transitionDuration = prefix + 'transition-duration'] = - cssReset[transitionTiming = prefix + 'transition-timing-function'] = - cssReset[animationName = prefix + 'animation-name'] = - cssReset[animationDuration = prefix + 'animation-duration'] = - cssReset[animationTiming = prefix + 'animation-timing-function'] = '' - - $.fx = { - off: (eventPrefix === undefined && testEl.style.transitionProperty === undefined), - speeds: { _default: 400, fast: 200, slow: 600 }, - cssPrefix: prefix, - transitionEnd: normalizeEvent('TransitionEnd'), - animationEnd: normalizeEvent('AnimationEnd') - } - - $.fn.animate = function(properties, duration, ease, callback){ - if ($.isPlainObject(duration)) - ease = duration.easing, callback = duration.complete, duration = duration.duration - if (duration) duration = (typeof duration == 'number' ? duration : - ($.fx.speeds[duration] || $.fx.speeds._default)) / 1000 - return this.anim(properties, duration, ease, callback) - } - - $.fn.anim = function(properties, duration, ease, callback){ - var key, cssValues = {}, cssProperties, transforms = '', - that = this, wrappedCallback, endEvent = $.fx.transitionEnd - - if (duration === undefined) duration = 0.4 - if ($.fx.off) duration = 0 - - if (typeof properties == 'string') { - // keyframe animation - cssValues[animationName] = properties - cssValues[animationDuration] = duration + 's' - cssValues[animationTiming] = (ease || 'linear') - endEvent = $.fx.animationEnd - } else { - cssProperties = [] - // CSS transitions - for (key in properties) - if (supportedTransforms.test(key)) transforms += key + '(' + properties[key] + ') ' - else cssValues[key] = properties[key], cssProperties.push(dasherize(key)) - - if (transforms) cssValues[transform] = transforms, cssProperties.push(transform) - if (duration > 0 && typeof properties === 'object') { - cssValues[transitionProperty] = cssProperties.join(', ') - cssValues[transitionDuration] = duration + 's' - cssValues[transitionTiming] = (ease || 'linear') - } - } - - wrappedCallback = function(event){ - if (typeof event !== 'undefined') { - if (event.target !== event.currentTarget) return // makes sure the event didn't bubble from "below" - $(event.target).unbind(endEvent, wrappedCallback) - } - $(this).css(cssReset) - callback && callback.call(this) - } - if (duration > 0) this.bind(endEvent, wrappedCallback) - - // trigger page reflow so new elements can animate - this.size() && this.get(0).clientLeft - - this.css(cssValues) - - if (duration <= 0) setTimeout(function() { - that.each(function(){ wrappedCallback.call(this) }) - }, 0) - - return this - } - - testEl = null -})(Zepto) - -// Zepto.js -// (c) 2010-2012 Thomas Fuchs -// Zepto.js may be freely distributed under the MIT license. - -;(function($, undefined){ - var document = window.document, docElem = document.documentElement, - origShow = $.fn.show, origHide = $.fn.hide, origToggle = $.fn.toggle - - function anim(el, speed, opacity, scale, callback) { - if (typeof speed == 'function' && !callback) callback = speed, speed = undefined - var props = { opacity: opacity } - if (scale) { - props.scale = scale - el.css($.fx.cssPrefix + 'transform-origin', '0 0') - } - return el.animate(props, speed, null, callback) - } - - function hide(el, speed, scale, callback) { - return anim(el, speed, 0, scale, function(){ - origHide.call($(this)) - callback && callback.call(this) - }) - } - - $.fn.show = function(speed, callback) { - origShow.call(this) - if (speed === undefined) speed = 0 - else this.css('opacity', 0) - return anim(this, speed, 1, '1,1', callback) - } - - $.fn.hide = function(speed, callback) { - if (speed === undefined) return origHide.call(this) - else return hide(this, speed, '0,0', callback) - } - - $.fn.toggle = function(speed, callback) { - if (speed === undefined || typeof speed == 'boolean') - return origToggle.call(this, speed) - else return this.each(function(){ - var el = $(this) - el[el.css('display') == 'none' ? 'show' : 'hide'](speed, callback) - }) - } - - $.fn.fadeTo = function(speed, opacity, callback) { - return anim(this, speed, opacity, null, callback) - } - - $.fn.fadeIn = function(speed, callback) { - var target = this.css('opacity') - if (target > 0) this.css('opacity', 0) - else target = 1 - return origShow.call(this).fadeTo(speed, target, callback) - } - - $.fn.fadeOut = function(speed, callback) { - return hide(this, speed, null, callback) - } - - $.fn.fadeToggle = function(speed, callback) { - return this.each(function(){ - var el = $(this) - el[ - (el.css('opacity') == 0 || el.css('display') == 'none') ? 'fadeIn' : 'fadeOut' - ](speed, callback) - }) - } - -})(Zepto) - -// Zepto.js -// (c) 2010-2012 Thomas Fuchs -// Zepto.js may be freely distributed under the MIT license. - -;(function($){ - var cache = [], timeout - - $.fn.remove = function(){ - return this.each(function(){ - if(this.parentNode){ - if(this.tagName === 'IMG'){ - cache.push(this) - this.src = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=' - if (timeout) clearTimeout(timeout) - timeout = setTimeout(function(){ cache = [] }, 60000) - } - this.parentNode.removeChild(this) - } - }) - } -})(Zepto) - -// Zepto.js -// (c) 2010-2012 Thomas Fuchs -// Zepto.js may be freely distributed under the MIT license. - -// The following code is heavily inspired by jQuery's $.fn.data() - -;(function($) { - var data = {}, dataAttr = $.fn.data, camelize = $.camelCase, - exp = $.expando = 'Zepto' + (+new Date()) - - // Get value from node: - // 1. first try key as given, - // 2. then try camelized key, - // 3. fall back to reading "data-*" attribute. - function getData(node, name) { - var id = node[exp], store = id && data[id] - if (name === undefined) return store || setData(node) - else { - if (store) { - if (name in store) return store[name] - var camelName = camelize(name) - if (camelName in store) return store[camelName] - } - return dataAttr.call($(node), name) - } - } - - // Store value under camelized key on node - function setData(node, name, value) { - var id = node[exp] || (node[exp] = ++$.uuid), - store = data[id] || (data[id] = attributeData(node)) - if (name !== undefined) store[camelize(name)] = value - return store - } - - // Read all "data-*" attributes from a node - function attributeData(node) { - var store = {} - $.each(node.attributes, function(i, attr){ - if (attr.name.indexOf('data-') == 0) - store[camelize(attr.name.replace('data-', ''))] = - $.zepto.deserializeValue(attr.value) - }) - return store - } - - $.fn.data = function(name, value) { - return value === undefined ? - // set multiple values via object - $.isPlainObject(name) ? - this.each(function(i, node){ - $.each(name, function(key, value){ setData(node, key, value) }) - }) : - // get value from first element - this.length == 0 ? undefined : getData(this[0], name) : - // set value on all elements - this.each(function(){ setData(this, name, value) }) - } - - $.fn.removeData = function(names) { - if (typeof names == 'string') names = names.split(/\s+/) - return this.each(function(){ - var id = this[exp], store = id && data[id] - if (store) $.each(names, function(){ delete store[camelize(this)] }) - }) - } -})(Zepto) - -;(function($){ - var zepto = $.zepto, oldQsa = zepto.qsa, oldMatches = zepto.matches - - function visible(elem){ - elem = $(elem) - return !!(elem.width() || elem.height()) && elem.css("display") !== "none" - } - - // Implements a subset from: - // http://api.jquery.com/category/selectors/jquery-selector-extensions/ - // - // Each filter function receives the current index, all nodes in the - // considered set, and a value if there were parentheses. The value - // of `this` is the node currently being considered. The function returns the - // resulting node(s), null, or undefined. - // - // Complex selectors are not supported: - // li:has(label:contains("foo")) + li:has(label:contains("bar")) - // ul.inner:first > li - var filters = $.expr[':'] = { - visible: function(){ if (visible(this)) return this }, - hidden: function(){ if (!visible(this)) return this }, - selected: function(){ if (this.selected) return this }, - checked: function(){ if (this.checked) return this }, - parent: function(){ return this.parentNode }, - first: function(idx){ if (idx === 0) return this }, - last: function(idx, nodes){ if (idx === nodes.length - 1) return this }, - eq: function(idx, _, value){ if (idx === value) return this }, - contains: function(idx, _, text){ if ($(this).text().indexOf(text) > -1) return this }, - has: function(idx, _, sel){ if (zepto.qsa(this, sel).length) return this } - } - - var filterRe = new RegExp('(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*'), - childRe = /^\s*>/, - classTag = 'Zepto' + (+new Date()) - - function process(sel, fn) { - // quote the hash in `a[href^=#]` expression - sel = sel.replace(/=#\]/g, '="#"]') - var filter, arg, match = filterRe.exec(sel) - if (match && match[2] in filters) { - filter = filters[match[2]], arg = match[3] - sel = match[1] - if (arg) { - var num = Number(arg) - if (isNaN(num)) arg = arg.replace(/^["']|["']$/g, '') - else arg = num - } - } - return fn(sel, filter, arg) - } - - zepto.qsa = function(node, selector) { - return process(selector, function(sel, filter, arg){ - try { - var taggedParent - if (!sel && filter) sel = '*' - else if (childRe.test(sel)) - // support "> *" child queries by tagging the parent node with a - // unique class and prepending that classname onto the selector - taggedParent = $(node).addClass(classTag), sel = '.'+classTag+' '+sel - - var nodes = oldQsa(node, sel) - } catch(e) { - console.error('error performing selector: %o', selector) - throw e - } finally { - if (taggedParent) taggedParent.removeClass(classTag) - } - return !filter ? nodes : - zepto.uniq($.map(nodes, function(n, i){ return filter.call(n, i, nodes, arg) })) - }) - } - - zepto.matches = function(node, selector){ - return process(selector, function(sel, filter, arg){ - return (!sel || oldMatches(node, sel)) && - (!filter || filter.call(node, null, arg) === node) - }) - } -})(Zepto) - -// Zepto.js -// (c) 2010-2012 Thomas Fuchs -// Zepto.js may be freely distributed under the MIT license. - -;(function($){ - $.fn.end = function(){ - return this.prevObject || $() - } - - $.fn.andSelf = function(){ - return this.add(this.prevObject || $()) - } - - 'filter,add,not,eq,first,last,find,closest,parents,parent,children,siblings'.split(',').forEach(function(property){ - var fn = $.fn[property] - $.fn[property] = function(){ - var ret = fn.apply(this, arguments) - ret.prevObject = this - return ret - } - }) -})(Zepto) - -// Zepto.js -// (c) 2010-2012 Thomas Fuchs -// Zepto.js may be freely distributed under the MIT license. - -;(function($){ - var touch = {}, - touchTimeout, tapTimeout, swipeTimeout, - longTapDelay = 750, longTapTimeout - - function parentIfText(node) { - return 'tagName' in node ? node : node.parentNode - } - - function swipeDirection(x1, x2, y1, y2) { - var xDelta = Math.abs(x1 - x2), yDelta = Math.abs(y1 - y2) - return xDelta >= yDelta ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down') - } - - function longTap() { - longTapTimeout = null - if (touch.last) { - touch.el.trigger('longTap') - touch = {} - } - } - - function cancelLongTap() { - if (longTapTimeout) clearTimeout(longTapTimeout) - longTapTimeout = null - } - - function cancelAll() { - if (touchTimeout) clearTimeout(touchTimeout) - if (tapTimeout) clearTimeout(tapTimeout) - if (swipeTimeout) clearTimeout(swipeTimeout) - if (longTapTimeout) clearTimeout(longTapTimeout) - touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null - touch = {} - } - - $(document).ready(function(){ - var now, delta - - $(document.body) - .bind('touchstart', function(e){ - now = Date.now() - delta = now - (touch.last || now) - touch.el = $(parentIfText(e.touches[0].target)) - touchTimeout && clearTimeout(touchTimeout) - touch.x1 = e.touches[0].pageX - touch.y1 = e.touches[0].pageY - if (delta > 0 && delta <= 250) touch.isDoubleTap = true - touch.last = now - longTapTimeout = setTimeout(longTap, longTapDelay) - }) - .bind('touchmove', function(e){ - cancelLongTap() - touch.x2 = e.touches[0].pageX - touch.y2 = e.touches[0].pageY - if (Math.abs(touch.x1 - touch.x2) > 10) - e.preventDefault() - }) - .bind('touchend', function(e){ - cancelLongTap() - - // swipe - if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || - (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)) - - swipeTimeout = setTimeout(function() { - touch.el.trigger('swipe') - touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2))) - touch = {} - }, 0) - - // normal tap - else if ('last' in touch) - - // delay by one tick so we can cancel the 'tap' event if 'scroll' fires - // ('tap' fires before 'scroll') - tapTimeout = setTimeout(function() { - - // trigger universal 'tap' with the option to cancelTouch() - // (cancelTouch cancels processing of single vs double taps for faster 'tap' response) - var event = $.Event('tap') - event.cancelTouch = cancelAll - touch.el.trigger(event) - - // trigger double tap immediately - if (touch.isDoubleTap) { - touch.el.trigger('doubleTap') - touch = {} - } - - // trigger single tap after 250ms of inactivity - else { - touchTimeout = setTimeout(function(){ - touchTimeout = null - touch.el.trigger('singleTap') - touch = {} - }, 250) - } - - }, 0) - - }) - .bind('touchcancel', cancelAll) - - $(window).bind('scroll', cancelAll) - }) - - ;['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', 'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function(m){ - $.fn[m] = function(callback){ return this.bind(m, callback) } - }) -})(Zepto) - - -// outer and inner height/width support -if (this.Zepto) { - (function($) { - var ioDim, _base; - ioDim = function(elem, Dimension, dimension, includeBorder, includeMargin) { - var sides, size; - if (elem) { - size = elem[dimension](); - sides = { - width: ["left", "right"], - height: ["top", "bottom"] - }; - sides[dimension].forEach(function(side) { - size += parseInt(elem.css("padding-" + side), 10); - if (includeBorder) { - size += parseInt(elem.css("border-" + side + "-width"), 10); - } - if (includeMargin) { - return size += parseInt(elem.css("margin-" + side), 10); - } - }); - return size; - } else { - return null; - } - }; - ["width", "height"].forEach(function(dimension) { - var Dimension, _base, _base1, _name, _name1; - Dimension = dimension.replace(/./, function(m) { - return m[0].toUpperCase(); - }); - (_base = $.fn)[_name = "inner" + Dimension] || (_base[_name] = function(includeMargin) { - return ioDim(this, Dimension, dimension, false, includeMargin); - }); - return (_base1 = $.fn)[_name1 = "outer" + Dimension] || (_base1[_name1] = function(includeMargin) { - return ioDim(this, Dimension, dimension, true, includeMargin); - }); - }); - return (_base = $.fn).detach || (_base.detach = function(selector) { - var cloned, set; - set = this; - if (selector != null) { - set = set.filter(selector); - } - cloned = set.clone(true); - set.remove(); - return cloned; - }); - })(Zepto); -} \ No newline at end of file diff --git a/public/scss/_elements.scss b/public/scss/_elements.scss deleted file mode 100644 index 055d39e6a..000000000 --- a/public/scss/_elements.scss +++ /dev/null @@ -1,7 +0,0 @@ -/* ========================================================================== - Anchors - ========================================================================== */ -a { - text-decoration: none; - color: $primary-color; -} diff --git a/public/scss/_settings.scss b/public/scss/_settings.scss deleted file mode 100644 index 4ca1f4f90..000000000 --- a/public/scss/_settings.scss +++ /dev/null @@ -1,24 +0,0 @@ -/* ========================================================================== - Grid settings - ========================================================================== */ - -$column: 70px; -$gutter: 30px; -$grid-columns: 12; -$max-width: 100%; - -/* ========================================================================== - Visual grid settings - ========================================================================== */ -$visual-grid: false; -$visual-grid-color: gray; - -/* ========================================================================== - Custom settings - ========================================================================== */ -$lioRed: #F0523F; -$lioGrey: #444; -$topbar-bg: $lioGrey; - -$primary-color: $lioRed; -$secondary-color: $lioGrey; \ No newline at end of file diff --git a/public/scss/app.scss b/public/scss/app.scss deleted file mode 100644 index f609978e4..000000000 --- a/public/scss/app.scss +++ /dev/null @@ -1,47 +0,0 @@ -@charset "UTF-8"; -/* ========================================================================== - Neat helpers - ========================================================================== */ -@import "vendor/neat/neat-helpers"; - -/* ========================================================================== - Settings - ========================================================================== */ -@import "settings"; -@import "elements"; - -/* ========================================================================== - Vendor - ========================================================================== */ -@import "vendor/normalize/normalize"; -@import "vendor/bourbon/bourbon"; -@import "vendor/neat/neat"; -@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700); -@import url(//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css); - - -/* ========================================================================== - Modules - ========================================================================== */ -@import "modules/_header"; -@import "modules/_navigation"; -@import "modules/_global"; -@import "modules/_forum"; -@import "modules/_buttons"; -@import "modules/_sidebar"; -@import "modules/_empty-state"; -@import "modules/_comments"; -@import "modules/_user"; -@import "modules/_reply"; -@import "modules/_pagination"; -@import "modules/_form"; -@import "modules/_section-headers"; -@import "modules/_tags"; -@import "modules/_alert"; -@import "modules/_footer"; -@import "modules/_profile"; -@import "modules/_bin"; -@import "modules/_markdown"; -@import "modules/_naver"; -@import "modules/_solution"; -@import "modules/_filter"; diff --git a/public/scss/modules/__clean-module-skeleton.scss b/public/scss/modules/__clean-module-skeleton.scss deleted file mode 100644 index 994033cec..000000000 --- a/public/scss/modules/__clean-module-skeleton.scss +++ /dev/null @@ -1,40 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.module {} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_alert.scss b/public/scss/modules/_alert.scss deleted file mode 100644 index 9ff4e539b..000000000 --- a/public/scss/modules/_alert.scss +++ /dev/null @@ -1,45 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.alert-box { - width:100%; - padding: 15px; - background: $lioRed; - color:white; -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_bin.scss b/public/scss/modules/_bin.scss deleted file mode 100644 index b86aa184c..000000000 --- a/public/scss/modules/_bin.scss +++ /dev/null @@ -1,292 +0,0 @@ -$orange_button_bg: #f0523f; -$orange_button_bg_hover: #c73e2d; -$sidebar_transition: 0.5s ease; - -body.bin { - background: #1D1F21; - -webkit-font-smoothing: antialiased; - - #copy-data { - position: absolute; - right: -200%; - } - - .show-container { - background: #1D1F21; - -ms-word-break: break-all; - word-break: break-all; - - // Non standard for webkit - word-break: break-word; - - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; - - padding-right: 2em; - -webkit-transition: width $sidebar_transition, padding-right $sidebar_transition; - transition: width $sidebar_transition, padding-right $sidebar_transition; - } - - .prettyprint { - background: #1D1F21; - border: 0; - margin: 3em 0 0 0; - padding: 0; - padding-bottom: 300px; - - .linenums { - color: #a0a0a0; - - li { - padding: 4px 0; - } - - li.selected { - background: #383838; - } - } - } - - .editor { - background: transparent; - border: 0; - color: #fff; - font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; - font-size: 12px; - -webkit-font-smoothing: antialiased; - line-height: 1.8em; - height: 100%; - margin-top: 1em; - outline: none; - padding: 2em; - position: fixed; - resize: none; - -webkit-transition: width $sidebar_transition, padding-right $sidebar_transition; - transition: width $sidebar_transition, padding-right $sidebar_transition; - -ms-word-break: break-all; - word-break: break-all; - // Non standard for webkit - word-break: break-word; - z-index: 1; - width: 100%; - } - - .show-sidebar { - background: #444; - color: #888; - font-size: 1em; - height: 3.15em; - padding: 1em 1em; - position: fixed; - right: 0; - text-align: center; - transition: right $sidebar_transition; - top: 0; - width: 3em; - z-index: 15; - - &:hover { - background: #666; - color: #eee; - } - - &.show { - right: 50%; - } - } - - .sidebar { - background: #2d2e2f; - border: 0; - box-shadow: -2px 0 3px rgba(black, 0.2); - -o-box-shadow: -2px 0 3px rgba(black, 0.2); - -moz-box-shadow: -2px 0 3px rgba(black, 0.2); - -webkit-box-shadow: -2px 0 3px rgba(black, 0.2); - color: #fff; - height: 100%; - padding: 15px; - position: fixed; - right: 0; - -webkit-transition: -webkit-transform $sidebar_transition; - transition: transform $sidebar_transition; - top: 0; - width: 50%; - z-index: 10; - - p { - margin-bottom: 0; - } - - .logo { - display: block; - margin: auto; - max-width: 100%; - padding: 15px 0; - width: 150px; - } - - .options { - border-bottom: 2px solid #747474; - overflow: hidden; - margin-bottom: 15px; - padding-bottom: 15px; - - ul { - margin: 0; - padding: 0; - - li { - margin-bottom: 10px; - width: 100%; - } - - li:last-child { - margin-bottom: 0; - } - } - } - - &.hide { - -webkit-transform: translateX(100%); - transform: translateX(100%); - } - } - - .button { - background: $orange_button_bg; - border: 0; - border-radius: 2px; - color: #fff; - display: inline-block; - -webkit-font-smoothing: antialiased; - outline: none; - padding: 10px 5px; - width: 100%; - - .fa { - font-size: 10px; - margin-right: 3px; - } - - &:hover { - background: $orange_button_bg_hover; - } - } - - .button.back { - .fa { - font-size: 12px; - } - } - - .comments { - color: #a6a6a6; - width: 100%; - - h3 { - color: #fff; - } - } - - .toast { - box-shadow: none !important; - } - - .toast-info { - background: rgba(#f0523f, 0.8); - } - - .cartalyst-ad { - border-top: 2px solid #747474; - color: white; - display: inline-block; - font-size: 12px; - line-height: 18px; - margin-top: 15px; - padding-top: 15px; - - img { - float: left; - padding: 0 10px 10px 0; - } - } - - // BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - - @media only screen and (min-width: 480px) { - .sidebar { - width: 30%; - } - - .show-sidebar.show { - right: 30%; - } - - .editor { - margin-top: 1em; - } - } - - - // BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - - @media screen and (min-width: 768px) { - .show-container, - .editor { - width: 70%; - } - .show-container.sidebar-hidden, - .editor.sidebar-hidden { - width: 100%; - padding-right: 2em; - } - } - - - // BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - - @media screen and (min-width: 1024px) { - .show-container, - .editor { - width: 100%; - padding-right: 290px; - } - .sidebar { - width: 250px; - } - .show-sidebar.show { - right: 250px; - } - } - - - // BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - - @media only screen and (min-width: 1440px) { - - } - - // SPECIAL HEIGHT BREAKPOINT - @media only screen and (max-height: 400px) { - .show-container, - .editor { - padding-right: 360px; - } - - .sidebar { - width: 320px; - } - - .show-sidebar.show { - right: 320px; - } - - .sidebar .options ul li { - float: left; - margin-right: 5%; - width: 45%; - } - } - -} diff --git a/public/scss/modules/_buttons.scss b/public/scss/modules/_buttons.scss deleted file mode 100644 index 689453189..000000000 --- a/public/scss/modules/_buttons.scss +++ /dev/null @@ -1,65 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.button { - padding: 5px 10px; - text-align: center; - background: $lioRed; - color:white; - - &:hover { - background:#cdcdcd; - color:$lioGrey; - } - - &.inverse { - background: $lioGrey; - - &:hover { - background: $lioRed; - } - } -} - -button[type=submit] { - font-family: 'Source Sans Pro', sans-serif; - font-weight:400; - padding: 10px 20px; - font-size:1.1em; -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - .module {} -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_comments.scss b/public/scss/modules/_comments.scss deleted file mode 100644 index b064d62a3..000000000 --- a/public/scss/modules/_comments.scss +++ /dev/null @@ -1,85 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.comments { - h6.title { - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - font-size:14px; - display: block; - width:70px; - background: #cdcdcd; - margin: auto; - padding: 5px 10px; - text-align: center; - } - - .comment { - @include clearfix; - background: white; - padding: 15px; - margin: 15px; - - &.solution-border { - border-right:3px solid $lioRed; - } - - p { - margin: 0; - line-height: 1.5; - } - - ul, li { - margin: 0; - padding: 0; - } - - li { - margin: 0 0 0 15px; - line-height: 1.5; - } - - img { - max-width: 100%; - } - } -} - - - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_empty-state.scss b/public/scss/modules/_empty-state.scss deleted file mode 100644 index bfc796e43..000000000 --- a/public/scss/modules/_empty-state.scss +++ /dev/null @@ -1,57 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.module {} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - .empty-state { - - text-align: center; - - h3 { - margin: 0; - padding: 25px 0 25px 0; - } - - p { - padding: 0 0 15px 0; - } - - .fa { - padding: 30px 0 0 0; - font-size:60px; - } - } -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_filter.scss b/public/scss/modules/_filter.scss deleted file mode 100644 index 18001599b..000000000 --- a/public/scss/modules/_filter.scss +++ /dev/null @@ -1,74 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.filter { - @include clearfix; - padding: 15px 0 15px 15px; - - p { - float: left; - margin: 0; - padding: 4px 10px 0 0; - font-weight:bold; - } - - ul { - float: left; - margin: 0; - padding: 0; - } - - li { - display: inline; - - a { - float: left; - display: block; - height: 25px; - padding: 5px 9px 0 9px; - margin: 0 8px 0 0; - color:$lioGrey; - - &:hover, &.current { - background:$lioRed; - color:white; - } - } - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_footer.scss b/public/scss/modules/_footer.scss deleted file mode 100644 index 2b4cef53a..000000000 --- a/public/scss/modules/_footer.scss +++ /dev/null @@ -1,91 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.push { - height: 84px; -} - -.site-footer { - background: #cdcdcd; - padding: 15px 15px 20px 15px; - color: #333; - font-size: 18px; - margin: 25px 0 0 0; - line-height: 18px; - text-align: center; -} - -.sponsors { - .span2, - .span4 { - margin-bottom: 15px; - } - - .fortrabbit { - font-family: Georgia, serif; - font-weight: bold; - font-style: italic; - color: #333; - text-transform: lowercase; - font-size: 30px; - display: inline; - } - .fortrabbit:hover { - text-decoration: none; - } - .fortrabbit:hover em { - color: red; - } - - .cartalyst a { - font-weight: bold; - color: #333; - font-size: 21px; - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - .row { - padding-top: 10px; - padding-bottom: 10px; - } - .span2 { - float: left; - width: 16.6666665%; - } - .span4 { - float: left; - text-align: center; - width: 33.333333%; - } -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - .container{ - max-width: 1024px; - margin: 0 auto; - } -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - .module {} -} diff --git a/public/scss/modules/_form.scss b/public/scss/modules/_form.scss deleted file mode 100644 index a9b225375..000000000 --- a/public/scss/modules/_form.scss +++ /dev/null @@ -1,114 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.form-row { - @include span-columns(12); - margin: 0 0 15px 0; - - label.field-title { - display: block; - margin: 0; - padding: 0 0 10px 0; - font-size:16px; - color:$lioGrey; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - } - - input[type=text] { - padding: 15px; - border:none; - width:100%; - } - - textarea { - @include span-columns(12); - float: none; - padding: 15px; - border:none; - } - - small { - display: block; - } - - textarea { - width:100%; - } - - button { - border: none; - } - - small { - padding: 10px 0; - display: block; - font-size:12px; - } - - .version { - margin: 0; - padding: 0; - - li { - display: inline; - } - - label { - float: left; - cursor: pointer; - } - - label.selected { - background: $lioRed; - color:white; - } - - input { - display: none; - } - } - - small.error { - width:100%; - padding: 5px; - background: $lioRed; - color:white; - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_forum.scss b/public/scss/modules/_forum.scss deleted file mode 100644 index 4899806dd..000000000 --- a/public/scss/modules/_forum.scss +++ /dev/null @@ -1,245 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.quote { - float: right; -} - -.threads { - @include span-columns(12); - float: none; - padding: 0 15px 15px 15px; - - .thread-summary { - position: relative; - width:100%; - @include clearfix; - padding: 12px 20px 12px 10px; - margin: 0 0 6px 0; - - .info { - float: none; - - .post-info { - display: block; - position: absolute; - right:0px; - top:0px; - - .accepted { - display: none; - } - - .mini { - margin: 0 0 3px 0; - float: none; - display: block; - } - } - } - - .post-info { - display: none; - } - - img { - display: none; - } - - h3 { - margin:0; - padding: 0 0 3px 0; - font-size:16px; - color:$lioGrey; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - - a { - color:$lioGrey; - - &:hover { - color:$lioRed; - } - } - } - - ul { - margin:0; - padding: 0; - } - - ul li { - display: inline; - float: left; - color:#959595; - padding: 0 5px 0 0; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - font-style: italic; - } - - .comment-count { - display: block; - min-width:25px; - background: #cdcdcd; - padding: 5px; - text-align: center; - color:white; - - &.new, &:hover { - background: $lioRed; - } - } - } - - .thread-summary { - background: white; - } -} - -.forum { - - @include span-columns(12); - float: none; - - .thread { - padding: 15px; - margin: 15px; - background: white; - - h1 { - padding: 3px 0 15px 0; - margin: 0 0 15px 0; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 600; - border-bottom:1px solid #cdcdcd; - font-size:1.4em; - } - - p { - margin: 0; - line-height: 1.5; - } - - ul, li { - margin: 0; - padding: 0; - } - - li { - margin: 0 0 0 15px; - line-height: 1.5; - } - - img { - max-width: 100%; - } - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - -.threads { - @include span-columns(12); - @include clearfix; - padding: 0 15px 15px 15px; - float: none; - - .post-info { - display: none; - } - - - .thread-summary { - .info { - float: none; - - .post-info { - display: block; - } - } - - .comment-count { - position: relative; - min-width:25px; - float: right; - background: #cdcdcd; - padding: 5px; - margin: 7px 0 0 0; - text-align: center; - color:white; - } - } - } - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - .threads { - .thread-summary { - - img { - float: left; - height: auto; - width:7%; - display: block; - padding: 0 10px 0 0; - } - - - .post-info { - width:23%; - float: right; - display: block; - } - - .info { - float: left; - width:65%; - .post-info { - display: none; - } - } - } - } - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .threads { - .thread-summary { - - .post-info { - width:15%; - } - - .info { - width:73%; - } - } - } - -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_global.scss b/public/scss/modules/_global.scss deleted file mode 100644 index a2836086e..000000000 --- a/public/scss/modules/_global.scss +++ /dev/null @@ -1,107 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -body,html { - background: #ebebeb; - font-size:13px; - height: 100%; -} - -.padding { - padding: 15px; -} -.clear { - clear: both; -} - - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - - .holder { - @include outer-container; - } - - .wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin-bottom:-84px; - } - - .table { - @include span-columns(12); - @include row(table); - } - - .sidebar { - @include span-columns(3.5); - padding: 0; - vertical-align:top; - } - - .content { - @include span-columns(8.5); - @include reset-display; - @include clearfix; - } - - // Lets put this here for now - - .gist-data { - max-height: 300px; - overflow: auto; - } -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - .holder { - max-width: 1024px; - margin: auto; - } - - .table { - @include span-columns(12); - @include row(table); - } - - - .sidebar { - @include span-columns(3); - padding: 0; - vertical-align:top; - } - - .content { - @include span-columns(9); - @include reset-display; - @include clearfix; - } -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - - -} \ No newline at end of file diff --git a/public/scss/modules/_header.scss b/public/scss/modules/_header.scss deleted file mode 100644 index c4510cd90..000000000 --- a/public/scss/modules/_header.scss +++ /dev/null @@ -1,87 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - - -.top-header { - background: $lioGrey; - - header { - text-align: center; - - li { - display: inline; - } - - @include clearfix; - padding: 15px 15px; - - } - - .user-navigation { - padding: 17px 0 0 0; - } - - .logo { - padding: 15px 0 15px 5px; - margin: auto; - width:125px; - } -} - - - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - .top-header { - .logo { - float: left; - padding: 15px 0 15px 5px; - width:125px; - } - - header { - @include clearfix; - padding: 15px 15px; - background: $lioGrey; - } - - .user-navigation { - padding: 17px 0 0 0; - float: right; - } - } -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .top-header header { - max-width: 1024px; - margin: auto; - } -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - -} \ No newline at end of file diff --git a/public/scss/modules/_markdown.scss b/public/scss/modules/_markdown.scss deleted file mode 100644 index 784a50b61..000000000 --- a/public/scss/modules/_markdown.scss +++ /dev/null @@ -1,172 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.forum .markdown, .comment .markdown { - - br:last-child { - display:none; - } - - h1,h2,h3,h4,h5,h6,p,li,ul,ol { - margin: 0; - padding: 0; - border:none !important; - padding: 0 0 3px 0; - } - - h1,h2,h3,h4,h5 { - font-family: 'Source Sans Pro', sans-serif; - font-weight:400; - } - - h1 { - font-size:1.4em; - font-weight: 600; - padding: 0 0 7px 0; - } - - h2 { - font-size:1.3em; - font-weight: 600; - padding: 0 0 7px 0; - } - - h3 { - font-size:1.2em; - font-weight: 600; - padding: 0 0 7px 0; - } - - h4,h5,h6 - { - font-size:1.1em; - font-weight: 600; - padding: 0 0 6px 0; - } - - p { - margin: 0; - line-height: 1.7; - padding: 0 0 14px 0; - - br:last-child { - display: block; - } - - &:nth-last-child(1) { - padding: 0; - } - } - - p:nth-last-child(1) { - padding:0 !important; - } - - ul { - margin: 0; - padding: 0 0 14px 0; - } - - li { - margin: 0 0 0 18px; - line-height: 1.5; - } - - li p { - padding: 0; - } - - blockquote { - background: #f9f9f9; - border-left: 5px solid $lioRed; - margin: 1.5em 0; - padding: 0.5em 7px; - quotes: "\201C""\201D""\2018""\2019"; - - blockquote { - margin: 0 0 0 10px; - border-top:1px solid #cdcdcd; - border-right:1px solid #cdcdcd; - border-bottom:1px solid #cdcdcd; - margin: 0 0 10px 10px; - } - } - - blockquote:before { - font-family: 'Source Sans Pro', sans-serif; - color: #ccc; - content: open-quote; - font-size: 4em; - line-height: 0.1em; - margin-right: 0.25em; - vertical-align: -0.4em; - } - blockquote p { - margin: 0 0 0 15px; - padding: 0; - - &:first-child { - padding:0; - } - - margin: 0 0 0 15px; - padding: 0 0 14px 0; - } - - pre { - margin: 0; - padding: 0 0 14px 0; - line-height: 2; - - code { - padding: 10px 15px; - - } - } - - .comment { - padding: 0 !important; - margin: 0 !important; - background: none; - } - - .comment:before, .comment:after { - display: none - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_naver.scss b/public/scss/modules/_naver.scss deleted file mode 100644 index c3e1e0b58..000000000 --- a/public/scss/modules/_naver.scss +++ /dev/null @@ -1,14 +0,0 @@ - .naver .naver-handle { color: #333; cursor: pointer; display: none; font-size: 14px; height: 30px; line-height: 28px; text-transform: uppercase; - padding: 0 13px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; - user-select: none; - } - .naver .naver-handle:before { background: url(../images/jquery.fs.naver-icon.png) no-repeat center; content: ''; display: block; float: left; height: 15px; margin: 7px 10px 0 0; width: 20px; } - .naver .naver-wrapper { height: auto; } - .naver .naver-container:after { clear: both; content: "."; display: block; height: 0; line-height: 0; visibility: hidden; } - - .naver.enabled .naver-handle { display: block; } - .naver.enabled .naver-wrapper { height: 0px; overflow: hidden; } \ No newline at end of file diff --git a/public/scss/modules/_navigation.scss b/public/scss/modules/_navigation.scss deleted file mode 100644 index 5892a0bed..000000000 --- a/public/scss/modules/_navigation.scss +++ /dev/null @@ -1,84 +0,0 @@ - /* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - - // MOBILE STYLES //////////////////////////////////////////////////////////// - - nav { - ul li { - display: inline; - } - - ul { - margin: 0; - padding: 0; - } - - ul li a { - padding: 0 3px 3px 3px; - margin: 0 10px; - font-size:16px; - color:white; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 300; - - &:hover, &.active { - border-bottom:3px solid $lioRed; - } - - } - } - - - // BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - - @media only screen and (min-width: 480px) { - - .module {} - - } - - - // BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - - @media only screen and (min-width: 768px) { - - nav { - float: left; - padding: 23px 0 0 15px; - - ul li { - display: inline; - } - - ul li a { - padding: 0 3px 3px 3px; - margin: 0 10px; - font-size:16px; - color:white; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 300; - - &:hover { - border-bottom:3px solid $lioRed; - } - - } - } - } - - - // BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - - @media only screen and (min-width: 1024px) { - - .module {} - } - - - // BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - - @media only screen and (min-width: 1440px) { - - .module {} - } \ No newline at end of file diff --git a/public/scss/modules/_pagination.scss b/public/scss/modules/_pagination.scss deleted file mode 100644 index c9cc4c042..000000000 --- a/public/scss/modules/_pagination.scss +++ /dev/null @@ -1,76 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.pagination { - @include clearfix; - text-align: center; - - ul { - margin:0; - padding: 0; - display: inline-block; - margin: auto; - } - - li { - float: left; - margin: 0; - list-style-type: none; - } - - li a, .disabled, .active { - display: inline-block; - padding: 7px 15px; - font-size: 13px; - color:$lioGrey; - } - - a:hover { - background: $lioRed; - color:white; - } - - .active { - background: #cdcdcd; - color:white; - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - .pagination { - float: right; - } - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_profile.scss b/public/scss/modules/_profile.scss deleted file mode 100644 index 78060e281..000000000 --- a/public/scss/modules/_profile.scss +++ /dev/null @@ -1,67 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.user-sidebar { - padding: 15px; - - img { - max-width: 100%; - } - - h1 { - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - } -} - -.user-content { - .section-navigation { - padding-left: 15px; - padding-bottom: 15px; - } - - div.pagination { - float: none; - text-align: center; - - ul.pagination { - float: none; - } - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_reply.scss b/public/scss/modules/_reply.scss deleted file mode 100644 index 4a4438364..000000000 --- a/public/scss/modules/_reply.scss +++ /dev/null @@ -1,70 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.reply-form { - @include clearfix; - padding: 30px 15px; - - h5 { - margin: 0; - padding: 0 0 10px 0; - font-size:16px; - color:$lioGrey; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - } -} - -.login-cta -{ - @include clearfix; - padding: 15px 15px; - text-align: center; - - p { - float: none; - font-size:15px; - display: block; - padding: 0 0 7px 0; - } - - .button { - float: none; - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_section-headers.scss b/public/scss/modules/_section-headers.scss deleted file mode 100644 index 71814a7aa..000000000 --- a/public/scss/modules/_section-headers.scss +++ /dev/null @@ -1,106 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.header { - @include clearfix; - padding: 19px 15px 18px 15px; - border-bottom:1px solid #cdcdcd; - - &.double { - border-top:1px solid #cdcdcd; - } - - h1, h2 { - font-size:22px; - margin: 0; - float: left; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 800; - } - - .tags { - display: block; - float: left; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - font-size:16px; - padding: 5px 0 0 7px; - font-style: italic; - - a { - color:$lioGrey; - - &:hover { - color:$lioRed; - } - } - } - - .button { - float: right; - } - - .pagination { - display: none; - } - - img { - float: left; - height: 35px; - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - -.header { - - padding-right:0; - - .button { - margin: 0 15px 0 0; - } - - .pagination { - display: block; - float: right; - margin: 0; - padding: 0; - - li { - line-height: 1; - } - } -} - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_sidebar.scss b/public/scss/modules/_sidebar.scss deleted file mode 100644 index 9e2293e37..000000000 --- a/public/scss/modules/_sidebar.scss +++ /dev/null @@ -1,106 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.sidebar { - - border-bottom:1px solid #cdcdcd; - - .search { - padding: 15px; - border-bottom:1px solid #cdcdcd; - - input { - width:100%; - padding: 10px 15px; - border:none; - } - } - - ul { - margin:0; - padding: 10px 10px 10px 5px; - } - - ul li { - list-style-type: none; - margin: 0; - @include clearfix; - - span { - padding: 5px 7px; - margin: 5px; - background: #cdcdcd; - color:$lioGrey; - font-size:11px; - position: absolute; - right:3px; - top:1px; - text-align: center; - min-width: 25px; - } - - a { - position: relative; - width:100%; - display: block; - padding: 10px 13px; - color:$lioGrey; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - border-right:3px solid #ebebeb; - - &:hover { - background:$lioRed; - color:white; - - span { - background: $lioGrey; - color:white; - } - } - - &.active { - border-right:3px solid $lioRed; - } - } - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - .sidebar { - border-right:1px solid #cdcdcd; - border-bottom:none; - } -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} diff --git a/public/scss/modules/_solution.scss b/public/scss/modules/_solution.scss deleted file mode 100644 index dff9a8e80..000000000 --- a/public/scss/modules/_solution.scss +++ /dev/null @@ -1,80 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.solution { - float: right; - display: block; - background: #ebebeb; - height: 25px; - padding: 5px 5px 0 5px; - color:$lioGrey; - - i { - margin: 0 8px 0 0; - } - - &:hover { - background:$lioRed; - color:white; - } - - &.accepted { - background: $lioRed; - padding: 5px 8px 2px 8px; - text-align: center; - color:white; - - &:hover{ - background: #ebebeb; - color:$lioGrey; - } - - i { - margin: 0; - } - } -} - -.thread-summary { - .solution { - float: right; - margin: 7px 6px 0 0; - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} - diff --git a/public/scss/modules/_tags.scss b/public/scss/modules/_tags.scss deleted file mode 100644 index 993655b45..000000000 --- a/public/scss/modules/_tags.scss +++ /dev/null @@ -1,95 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.tags { - - .tag { - display: block; - padding: 7px; - background: #cdcdcd; - text-align: center; - margin:0 5px 5px 0; - color:#444444; - cursor: pointer; - - &.active { - background: $lioRed; - color:white; - } - } - - margin: 0; - padding: 0; - - @include clearfix; - - ._tag_list ul, ._tag_list li { - margin: 0; - padding: 0; - } - - ._tag_list li { - display: inline; - } - - .tag { - float: left; - } -} - -._tag_description_container { - - padding: 15px 0 0 0; - - strong { - display: block; - margin: 0; - padding: 0 0 10px 0; - font-size:16px; - color:$lioGrey; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - } - - li { - list-style-type: disc; - padding: 5px 0; - float: none; - } -} - - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} \ No newline at end of file diff --git a/public/scss/modules/_user.scss b/public/scss/modules/_user.scss deleted file mode 100644 index cf53abfc1..000000000 --- a/public/scss/modules/_user.scss +++ /dev/null @@ -1,160 +0,0 @@ -/* ========================================================================== - MOBILE FIRST MODULE SKELETON - ========================================================================== */ - -// MOBILE STYLES //////////////////////////////////////////////////////////// - -.thread .user { - @include clearfix; - border-top:1px solid #cdcdcd; - border-bottom:none; - padding: 15px 0 0 0; - margin: 15px 0 0 0; -} - -.auth { - label { - display: inline-block; - width: 65px; - } - input { - display: inline-block; - padding: 5px 7px; - width: 100%; - max-width: 300px; - } -} - -.user { - @include clearfix; - border-bottom:1px solid #cdcdcd; - padding: 0 0 15px 0; - margin: 0 0 15px 0; - - img { - height: auto; - width:50px; - display: block; - padding: 0 10px 0 0; - } - - h6 { - margin:0; - padding: 0 0 3px 0; - font-size:16px; - color:$lioGrey; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - - a { - color:$lioGrey; - - &:hover { - color:$lioRed; - } - } - } - - .info { - float: left; - } - - ul { - margin:0; - padding: 0; - } - - li { - display: inline; - float: left; - color:#959595; - padding: 0 5px 0 0; - // Something is overwriting this, need to fix it - margin: 0 !important; - font-family: 'Source Sans Pro', sans-serif; - font-weight: 400; - font-style: italic; - } -} - -.user-settings { - padding: 15px; - - label { - display: inline-block; - width: 65px; - } - input { - display: inline-block; - padding: 5px 7px; - width: 100%; - max-width: 300px; - } -} - -.admin-bar { - margin: 15px 0 0 0; - padding: 15px 0 0 0; - border-top:1px solid #cdcdcd; - - ul, li { - @include display('flex'); - @include justify-content; - margin:0 !important; - } - - a:hover { - color:$lioGrey; - } - - li { - padding: 0 10px 0 0 !important; - margin: 0 10px 0 0 !important; - border-right:1px solid #cdcdcd; - } - - .space { - @include flex(1); - border: none; - } - - li:last-child - { - margin-right: 0px !important; - padding-right: 0px !important; - border:none; - } -} - -// BREAKPOINT 1 (480) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 480px) { - - .module {} - -} - - -// BREAKPOINT 2 (768) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 768px) { - - - -} - - -// BREAKPOINT 3 (1024) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1024px) { - - .module {} -} - - -// BREAKPOINT 4 (1440) //////////////////////////////////////////////////////////// - -@media only screen and (min-width: 1440px) { - - .module {} -} diff --git a/public/scss/vendor/bourbon/_bourbon-deprecated-upcoming.scss b/public/scss/vendor/bourbon/_bourbon-deprecated-upcoming.scss deleted file mode 100755 index 5332496d8..000000000 --- a/public/scss/vendor/bourbon/_bourbon-deprecated-upcoming.scss +++ /dev/null @@ -1,13 +0,0 @@ -//************************************************************************// -// These mixins/functions are deprecated -// They will be removed in the next MAJOR version release -//************************************************************************// -@mixin box-shadow ($shadows...) { - @include prefixer(box-shadow, $shadows, spec); - @warn "box-shadow is deprecated and will be removed in the next major version release"; -} - -@mixin background-size ($lengths...) { - @include prefixer(background-size, $lengths, spec); - @warn "background-size is deprecated and will be removed in the next major version release"; -} diff --git a/public/scss/vendor/bourbon/_bourbon.scss b/public/scss/vendor/bourbon/_bourbon.scss deleted file mode 100755 index 53fbca877..000000000 --- a/public/scss/vendor/bourbon/_bourbon.scss +++ /dev/null @@ -1,59 +0,0 @@ -// Custom Helpers -@import "helpers/deprecated-webkit-gradient"; -@import "helpers/gradient-positions-parser"; -@import "helpers/linear-positions-parser"; -@import "helpers/radial-arg-parser"; -@import "helpers/radial-positions-parser"; -@import "helpers/render-gradients"; -@import "helpers/shape-size-stripper"; - -// Custom Functions -@import "functions/compact"; -@import "functions/flex-grid"; -@import "functions/grid-width"; -@import "functions/linear-gradient"; -@import "functions/modular-scale"; -@import "functions/px-to-em"; -@import "functions/radial-gradient"; -@import "functions/tint-shade"; -@import "functions/transition-property-name"; - -// CSS3 Mixins -@import "css3/animation"; -@import "css3/appearance"; -@import "css3/backface-visibility"; -@import "css3/background"; -@import "css3/background-image"; -@import "css3/border-image"; -@import "css3/border-radius"; -@import "css3/box-sizing"; -@import "css3/columns"; -@import "css3/flex-box"; -@import "css3/font-face"; -@import "css3/hidpi-media-query"; -@import "css3/image-rendering"; -@import "css3/inline-block"; -@import "css3/keyframes"; -@import "css3/linear-gradient"; -@import "css3/perspective"; -@import "css3/radial-gradient"; -@import "css3/transform"; -@import "css3/transition"; -@import "css3/user-select"; -@import "css3/placeholder"; - -// Addons & other mixins -@import "addons/button"; -@import "addons/clearfix"; -@import "addons/font-family"; -@import "addons/hide-text"; -@import "addons/html5-input-types"; -@import "addons/position"; -@import "addons/prefixer"; -@import "addons/retina-image"; -@import "addons/size"; -@import "addons/timing-functions"; -@import "addons/triangle"; - -// Soon to be deprecated Mixins -@import "bourbon-deprecated-upcoming"; diff --git a/public/scss/vendor/bourbon/addons/_button.scss b/public/scss/vendor/bourbon/addons/_button.scss deleted file mode 100755 index 3ae393c09..000000000 --- a/public/scss/vendor/bourbon/addons/_button.scss +++ /dev/null @@ -1,273 +0,0 @@ -@mixin button ($style: simple, $base-color: #4294f0) { - - @if type-of($style) == color { - $base-color: $style; - $style: simple; - } - - // Grayscale button - @if $base-color == grayscale($base-color) { - @if $style == simple { - @include simple($base-color, $grayscale: true); - } - - @else if $style == shiny { - @include shiny($base-color, $grayscale: true); - } - - @else if $style == pill { - @include pill($base-color, $grayscale: true); - } - } - - // Colored button - @else { - @if $style == simple { - @include simple($base-color); - } - - @else if $style == shiny { - @include shiny($base-color); - } - - @else if $style == pill { - @include pill($base-color); - } - } - - &:disabled { - opacity: 0.5; - cursor: not-allowed; - } -} - - -// Simple Button -//************************************************************************// -@mixin simple($base-color, $grayscale: false) { - $color: hsl(0, 0, 100%); - $border: adjust-color($base-color, $saturation: 9%, $lightness: -14%); - $inset-shadow: adjust-color($base-color, $saturation: -8%, $lightness: 15%); - $stop-gradient: adjust-color($base-color, $saturation: 9%, $lightness: -11%); - $text-shadow: adjust-color($base-color, $saturation: 15%, $lightness: -18%); - - @if lightness($base-color) > 70% { - $color: hsl(0, 0, 20%); - $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%); - } - - @if $grayscale == true { - $border: grayscale($border); - $inset-shadow: grayscale($inset-shadow); - $stop-gradient: grayscale($stop-gradient); - $text-shadow: grayscale($text-shadow); - } - - border: 1px solid $border; - border-radius: 3px; - box-shadow: inset 0 1px 0 0 $inset-shadow; - color: $color; - display: inline-block; - font-size: 11px; - font-weight: bold; - @include linear-gradient ($base-color, $stop-gradient); - padding: 7px 18px; - text-decoration: none; - text-shadow: 0 1px 0 $text-shadow; - background-clip: padding-box; - - &:hover:not(:disabled) { - $base-color-hover: adjust-color($base-color, $saturation: -4%, $lightness: -5%); - $inset-shadow-hover: adjust-color($base-color, $saturation: -7%, $lightness: 5%); - $stop-gradient-hover: adjust-color($base-color, $saturation: 8%, $lightness: -14%); - - @if $grayscale == true { - $base-color-hover: grayscale($base-color-hover); - $inset-shadow-hover: grayscale($inset-shadow-hover); - $stop-gradient-hover: grayscale($stop-gradient-hover); - } - - box-shadow: inset 0 1px 0 0 $inset-shadow-hover; - cursor: pointer; - @include linear-gradient ($base-color-hover, $stop-gradient-hover); - } - - &:active:not(:disabled) { - $border-active: adjust-color($base-color, $saturation: 9%, $lightness: -14%); - $inset-shadow-active: adjust-color($base-color, $saturation: 7%, $lightness: -17%); - - @if $grayscale == true { - $border-active: grayscale($border-active); - $inset-shadow-active: grayscale($inset-shadow-active); - } - - border: 1px solid $border-active; - box-shadow: inset 0 0 8px 4px $inset-shadow-active, inset 0 0 8px 4px $inset-shadow-active, 0 1px 1px 0 #eee; - } -} - - -// Shiny Button -//************************************************************************// -@mixin shiny($base-color, $grayscale: false) { - $color: hsl(0, 0, 100%); - $border: adjust-color($base-color, $red: -117, $green: -111, $blue: -81); - $border-bottom: adjust-color($base-color, $red: -126, $green: -127, $blue: -122); - $fourth-stop: adjust-color($base-color, $red: -79, $green: -70, $blue: -46); - $inset-shadow: adjust-color($base-color, $red: 37, $green: 29, $blue: 12); - $second-stop: adjust-color($base-color, $red: -56, $green: -50, $blue: -33); - $text-shadow: adjust-color($base-color, $red: -140, $green: -141, $blue: -114); - $third-stop: adjust-color($base-color, $red: -86, $green: -75, $blue: -48); - - @if lightness($base-color) > 70% { - $color: hsl(0, 0, 20%); - $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%); - } - - @if $grayscale == true { - $border: grayscale($border); - $border-bottom: grayscale($border-bottom); - $fourth-stop: grayscale($fourth-stop); - $inset-shadow: grayscale($inset-shadow); - $second-stop: grayscale($second-stop); - $text-shadow: grayscale($text-shadow); - $third-stop: grayscale($third-stop); - } - - border: 1px solid $border; - border-bottom: 1px solid $border-bottom; - border-radius: 5px; - box-shadow: inset 0 1px 0 0 $inset-shadow; - color: $color; - display: inline-block; - font-size: 14px; - font-weight: bold; - @include linear-gradient(top, $base-color 0%, $second-stop 50%, $third-stop 50%, $fourth-stop 100%); - padding: 8px 20px; - text-align: center; - text-decoration: none; - text-shadow: 0 -1px 1px $text-shadow; - - &:hover:not(:disabled) { - $first-stop-hover: adjust-color($base-color, $red: -13, $green: -15, $blue: -18); - $second-stop-hover: adjust-color($base-color, $red: -66, $green: -62, $blue: -51); - $third-stop-hover: adjust-color($base-color, $red: -93, $green: -85, $blue: -66); - $fourth-stop-hover: adjust-color($base-color, $red: -86, $green: -80, $blue: -63); - - @if $grayscale == true { - $first-stop-hover: grayscale($first-stop-hover); - $second-stop-hover: grayscale($second-stop-hover); - $third-stop-hover: grayscale($third-stop-hover); - $fourth-stop-hover: grayscale($fourth-stop-hover); - } - - cursor: pointer; - @include linear-gradient(top, $first-stop-hover 0%, - $second-stop-hover 50%, - $third-stop-hover 50%, - $fourth-stop-hover 100%); - } - - &:active:not(:disabled) { - $inset-shadow-active: adjust-color($base-color, $red: -111, $green: -116, $blue: -122); - - @if $grayscale == true { - $inset-shadow-active: grayscale($inset-shadow-active); - } - - box-shadow: inset 0 0 20px 0 $inset-shadow-active, 0 1px 0 #fff; - } -} - - -// Pill Button -//************************************************************************// -@mixin pill($base-color, $grayscale: false) { - $color: hsl(0, 0, 100%); - $border-bottom: adjust-color($base-color, $hue: 8, $saturation: -11%, $lightness: -26%); - $border-sides: adjust-color($base-color, $hue: 4, $saturation: -21%, $lightness: -21%); - $border-top: adjust-color($base-color, $hue: -1, $saturation: -30%, $lightness: -15%); - $inset-shadow: adjust-color($base-color, $hue: -1, $saturation: -1%, $lightness: 7%); - $stop-gradient: adjust-color($base-color, $hue: 8, $saturation: 14%, $lightness: -10%); - $text-shadow: adjust-color($base-color, $hue: 5, $saturation: -19%, $lightness: -15%); - - @if lightness($base-color) > 70% { - $color: hsl(0, 0, 20%); - $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%); - } - - @if $grayscale == true { - $border-bottom: grayscale($border-bottom); - $border-sides: grayscale($border-sides); - $border-top: grayscale($border-top); - $inset-shadow: grayscale($inset-shadow); - $stop-gradient: grayscale($stop-gradient); - $text-shadow: grayscale($text-shadow); - } - - border: 1px solid $border-top; - border-color: $border-top $border-sides $border-bottom; - border-radius: 16px; - box-shadow: inset 0 1px 0 0 $inset-shadow, 0 1px 2px 0 #b3b3b3; - color: $color; - display: inline-block; - font-size: 11px; - font-weight: normal; - line-height: 1; - @include linear-gradient ($base-color, $stop-gradient); - padding: 5px 16px; - text-align: center; - text-decoration: none; - text-shadow: 0 -1px 1px $text-shadow; - background-clip: padding-box; - - &:hover:not(:disabled) { - $base-color-hover: adjust-color($base-color, $lightness: -4.5%); - $border-bottom: adjust-color($base-color, $hue: 8, $saturation: 13.5%, $lightness: -32%); - $border-sides: adjust-color($base-color, $hue: 4, $saturation: -2%, $lightness: -27%); - $border-top: adjust-color($base-color, $hue: -1, $saturation: -17%, $lightness: -21%); - $inset-shadow-hover: adjust-color($base-color, $saturation: -1%, $lightness: 3%); - $stop-gradient-hover: adjust-color($base-color, $hue: 8, $saturation: -4%, $lightness: -15.5%); - $text-shadow-hover: adjust-color($base-color, $hue: 5, $saturation: -5%, $lightness: -22%); - - @if $grayscale == true { - $base-color-hover: grayscale($base-color-hover); - $border-bottom: grayscale($border-bottom); - $border-sides: grayscale($border-sides); - $border-top: grayscale($border-top); - $inset-shadow-hover: grayscale($inset-shadow-hover); - $stop-gradient-hover: grayscale($stop-gradient-hover); - $text-shadow-hover: grayscale($text-shadow-hover); - } - - border: 1px solid $border-top; - border-color: $border-top $border-sides $border-bottom; - box-shadow: inset 0 1px 0 0 $inset-shadow-hover; - cursor: pointer; - @include linear-gradient ($base-color-hover, $stop-gradient-hover); - text-shadow: 0 -1px 1px $text-shadow-hover; - background-clip: padding-box; - } - - &:active:not(:disabled) { - $active-color: adjust-color($base-color, $hue: 4, $saturation: -12%, $lightness: -10%); - $border-active: adjust-color($base-color, $hue: 6, $saturation: -2.5%, $lightness: -30%); - $border-bottom-active: adjust-color($base-color, $hue: 11, $saturation: 6%, $lightness: -31%); - $inset-shadow-active: adjust-color($base-color, $hue: 9, $saturation: 2%, $lightness: -21.5%); - $text-shadow-active: adjust-color($base-color, $hue: 5, $saturation: -12%, $lightness: -21.5%); - - @if $grayscale == true { - $active-color: grayscale($active-color); - $border-active: grayscale($border-active); - $border-bottom-active: grayscale($border-bottom-active); - $inset-shadow-active: grayscale($inset-shadow-active); - $text-shadow-active: grayscale($text-shadow-active); - } - - background: $active-color; - border: 1px solid $border-active; - border-bottom: 1px solid $border-bottom-active; - box-shadow: inset 0 0 6px 3px $inset-shadow-active, 0 1px 0 0 #fff; - text-shadow: 0 -1px 1px $text-shadow-active; - } -} diff --git a/public/scss/vendor/bourbon/addons/_clearfix.scss b/public/scss/vendor/bourbon/addons/_clearfix.scss deleted file mode 100755 index ca9903cf0..000000000 --- a/public/scss/vendor/bourbon/addons/_clearfix.scss +++ /dev/null @@ -1,29 +0,0 @@ -// Micro clearfix provides an easy way to contain floats without adding additional markup -// -// Example usage: -// -// // Contain all floats within .wrapper -// .wrapper { -// @include clearfix; -// .content, -// .sidebar { -// float : left; -// } -// } - -@mixin clearfix { - *zoom: 1; - - &:before, - &:after { - content: " "; - display: table; - } - - &:after { - clear: both; - } -} - -// Acknowledgements -// Micro clearfix: [Nicolas Gallagher](http://nicolasgallagher.com/micro-clearfix-hack/) diff --git a/public/scss/vendor/bourbon/addons/_font-family.scss b/public/scss/vendor/bourbon/addons/_font-family.scss deleted file mode 100755 index df8a80ddf..000000000 --- a/public/scss/vendor/bourbon/addons/_font-family.scss +++ /dev/null @@ -1,5 +0,0 @@ -$georgia: Georgia, Cambria, "Times New Roman", Times, serif; -$helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif; -$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif; -$monospace: "Bitstream Vera Sans Mono", Consolas, Courier, monospace; -$verdana: Verdana, Geneva, sans-serif; diff --git a/public/scss/vendor/bourbon/addons/_hide-text.scss b/public/scss/vendor/bourbon/addons/_hide-text.scss deleted file mode 100755 index 68d4bf86c..000000000 --- a/public/scss/vendor/bourbon/addons/_hide-text.scss +++ /dev/null @@ -1,5 +0,0 @@ -@mixin hide-text { - color: transparent; - font: 0/0 a; - text-shadow: none; -} diff --git a/public/scss/vendor/bourbon/addons/_html5-input-types.scss b/public/scss/vendor/bourbon/addons/_html5-input-types.scss deleted file mode 100755 index b184382d9..000000000 --- a/public/scss/vendor/bourbon/addons/_html5-input-types.scss +++ /dev/null @@ -1,56 +0,0 @@ -//************************************************************************// -// Generate a variable ($all-text-inputs) with a list of all html5 -// input types that have a text-based input, excluding textarea. -// http://diveintohtml5.org/forms.html -//************************************************************************// -$inputs-list: 'input[type="email"]', - 'input[type="number"]', - 'input[type="password"]', - 'input[type="search"]', - 'input[type="tel"]', - 'input[type="text"]', - 'input[type="url"]', - - // Webkit & Gecko may change the display of these in the future - 'input[type="color"]', - 'input[type="date"]', - 'input[type="datetime"]', - 'input[type="datetime-local"]', - 'input[type="month"]', - 'input[type="time"]', - 'input[type="week"]'; - -$unquoted-inputs-list: (); -@each $input-type in $inputs-list { - $unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma); -} - -$all-text-inputs: $unquoted-inputs-list; - - -// Hover Pseudo-class -//************************************************************************// -$all-text-inputs-hover: (); -@each $input-type in $unquoted-inputs-list { - $input-type-hover: $input-type + ":hover"; - $all-text-inputs-hover: append($all-text-inputs-hover, $input-type-hover, comma); -} - -// Focus Pseudo-class -//************************************************************************// -$all-text-inputs-focus: (); -@each $input-type in $unquoted-inputs-list { - $input-type-focus: $input-type + ":focus"; - $all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma); -} - -// You must use interpolation on the variable: -// #{$all-text-inputs} -// #{$all-text-inputs-hover} -// #{$all-text-inputs-focus} - -// Example -//************************************************************************// -// #{$all-text-inputs}, textarea { -// border: 1px solid red; -// } diff --git a/public/scss/vendor/bourbon/addons/_position.scss b/public/scss/vendor/bourbon/addons/_position.scss deleted file mode 100755 index faad1cae5..000000000 --- a/public/scss/vendor/bourbon/addons/_position.scss +++ /dev/null @@ -1,42 +0,0 @@ -@mixin position ($position: relative, $coordinates: 0 0 0 0) { - - @if type-of($position) == list { - $coordinates: $position; - $position: relative; - } - - $top: nth($coordinates, 1); - $right: nth($coordinates, 2); - $bottom: nth($coordinates, 3); - $left: nth($coordinates, 4); - - position: $position; - - @if $top == auto { - top: $top; - } - @else if not(unitless($top)) { - top: $top; - } - - @if $right == auto { - right: $right; - } - @else if not(unitless($right)) { - right: $right; - } - - @if $bottom == auto { - bottom: $bottom; - } - @else if not(unitless($bottom)) { - bottom: $bottom; - } - - @if $left == auto { - left: $left; - } - @else if not(unitless($left)) { - left: $left; - } -} diff --git a/public/scss/vendor/bourbon/addons/_prefixer.scss b/public/scss/vendor/bourbon/addons/_prefixer.scss deleted file mode 100755 index 6bfd23a1d..000000000 --- a/public/scss/vendor/bourbon/addons/_prefixer.scss +++ /dev/null @@ -1,49 +0,0 @@ -//************************************************************************// -// Example: @include prefixer(border-radius, $radii, webkit ms spec); -//************************************************************************// -$prefix-for-webkit: true !default; -$prefix-for-mozilla: true !default; -$prefix-for-microsoft: true !default; -$prefix-for-opera: true !default; -$prefix-for-spec: true !default; // required for keyframe mixin - -@mixin prefixer ($property, $value, $prefixes) { - @each $prefix in $prefixes { - @if $prefix == webkit { - @if $prefix-for-webkit { - -webkit-#{$property}: $value; - } - } - @else if $prefix == moz { - @if $prefix-for-mozilla { - -moz-#{$property}: $value; - } - } - @else if $prefix == ms { - @if $prefix-for-microsoft { - -ms-#{$property}: $value; - } - } - @else if $prefix == o { - @if $prefix-for-opera { - -o-#{$property}: $value; - } - } - @else if $prefix == spec { - @if $prefix-for-spec { - #{$property}: $value; - } - } - @else { - @warn "Unrecognized prefix: #{$prefix}"; - } - } -} - -@mixin disable-prefix-for-all() { - $prefix-for-webkit: false; - $prefix-for-mozilla: false; - $prefix-for-microsoft: false; - $prefix-for-opera: false; - $prefix-for-spec: false; -} diff --git a/public/scss/vendor/bourbon/addons/_retina-image.scss b/public/scss/vendor/bourbon/addons/_retina-image.scss deleted file mode 100755 index a84b6faeb..000000000 --- a/public/scss/vendor/bourbon/addons/_retina-image.scss +++ /dev/null @@ -1,32 +0,0 @@ -@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $asset-pipeline: false) { - @if $asset-pipeline { - background-image: image-url("#{$filename}.#{$extension}"); - } - @else { - background-image: url("#{$filename}.#{$extension}"); - } - - @include hidpi { - - @if $asset-pipeline { - @if $retina-filename { - background-image: image-url("#{$retina-filename}.#{$extension}"); - } - @else { - background-image: image-url("#{$filename}@2x.#{$extension}"); - } - } - - @else { - @if $retina-filename { - background-image: url("#{$retina-filename}.#{$extension}"); - } - @else { - background-image: url("#{$filename}@2x.#{$extension}"); - } - } - - background-size: $background-size; - - } -} diff --git a/public/scss/vendor/bourbon/addons/_size.scss b/public/scss/vendor/bourbon/addons/_size.scss deleted file mode 100755 index 342e41b79..000000000 --- a/public/scss/vendor/bourbon/addons/_size.scss +++ /dev/null @@ -1,44 +0,0 @@ -@mixin size($size) { - @if length($size) == 1 { - @if $size == auto { - width: $size; - height: $size; - } - - @else if unitless($size) { - width: $size + px; - height: $size + px; - } - - @else if not(unitless($size)) { - width: $size; - height: $size; - } - } - - // Width x Height - @if length($size) == 2 { - $width: nth($size, 1); - $height: nth($size, 2); - - @if $width == auto { - width: $width; - } - @else if not(unitless($width)) { - width: $width; - } - @else if unitless($width) { - width: $width + px; - } - - @if $height == auto { - height: $height; - } - @else if not(unitless($height)) { - height: $height; - } - @else if unitless($height) { - height: $height + px; - } - } -} diff --git a/public/scss/vendor/bourbon/addons/_timing-functions.scss b/public/scss/vendor/bourbon/addons/_timing-functions.scss deleted file mode 100755 index 51b241091..000000000 --- a/public/scss/vendor/bourbon/addons/_timing-functions.scss +++ /dev/null @@ -1,32 +0,0 @@ -// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie) -// Timing functions are the same as demo'ed here: http://jqueryui.com/demos/effect/easing.html - -// EASE IN -$ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530); -$ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190); -$ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220); -$ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060); -$ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715); -$ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035); -$ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335); -$ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045); - -// EASE OUT -$ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940); -$ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000); -$ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000); -$ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000); -$ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000); -$ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000); -$ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000); -$ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275); - -// EASE IN OUT -$ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955); -$ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000); -$ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000); -$ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000); -$ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950); -$ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000); -$ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860); -$ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550); diff --git a/public/scss/vendor/bourbon/addons/_triangle.scss b/public/scss/vendor/bourbon/addons/_triangle.scss deleted file mode 100755 index 0e02aca2c..000000000 --- a/public/scss/vendor/bourbon/addons/_triangle.scss +++ /dev/null @@ -1,45 +0,0 @@ -@mixin triangle ($size, $color, $direction) { - height: 0; - width: 0; - - @if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) { - border-color: transparent; - border-style: solid; - border-width: $size / 2; - - @if $direction == up { - border-bottom-color: $color; - - } @else if $direction == right { - border-left-color: $color; - - } @else if $direction == down { - border-top-color: $color; - - } @else if $direction == left { - border-right-color: $color; - } - } - - @else if ($direction == up-right) or ($direction == up-left) { - border-top: $size solid $color; - - @if $direction == up-right { - border-left: $size solid transparent; - - } @else if $direction == up-left { - border-right: $size solid transparent; - } - } - - @else if ($direction == down-right) or ($direction == down-left) { - border-bottom: $size solid $color; - - @if $direction == down-right { - border-left: $size solid transparent; - - } @else if $direction == down-left { - border-right: $size solid transparent; - } - } -} diff --git a/public/scss/vendor/bourbon/css3/_animation.scss b/public/scss/vendor/bourbon/css3/_animation.scss deleted file mode 100755 index 08c3dbf15..000000000 --- a/public/scss/vendor/bourbon/css3/_animation.scss +++ /dev/null @@ -1,52 +0,0 @@ -// http://www.w3.org/TR/css3-animations/#the-animation-name-property- -// Each of these mixins support comma separated lists of values, which allows different transitions for individual properties to be described in a single style rule. Each value in the list corresponds to the value at that same position in the other properties. - -// Official animation shorthand property. -@mixin animation ($animations...) { - @include prefixer(animation, $animations, webkit moz spec); -} - -// Individual Animation Properties -@mixin animation-name ($names...) { - @include prefixer(animation-name, $names, webkit moz spec); -} - - -@mixin animation-duration ($times...) { - @include prefixer(animation-duration, $times, webkit moz spec); -} - - -@mixin animation-timing-function ($motions...) { -// ease | linear | ease-in | ease-out | ease-in-out - @include prefixer(animation-timing-function, $motions, webkit moz spec); -} - - -@mixin animation-iteration-count ($values...) { -// infinite | - @include prefixer(animation-iteration-count, $values, webkit moz spec); -} - - -@mixin animation-direction ($directions...) { -// normal | alternate - @include prefixer(animation-direction, $directions, webkit moz spec); -} - - -@mixin animation-play-state ($states...) { -// running | paused - @include prefixer(animation-play-state, $states, webkit moz spec); -} - - -@mixin animation-delay ($times...) { - @include prefixer(animation-delay, $times, webkit moz spec); -} - - -@mixin animation-fill-mode ($modes...) { -// none | forwards | backwards | both - @include prefixer(animation-fill-mode, $modes, webkit moz spec); -} diff --git a/public/scss/vendor/bourbon/css3/_appearance.scss b/public/scss/vendor/bourbon/css3/_appearance.scss deleted file mode 100755 index 3eb16e45d..000000000 --- a/public/scss/vendor/bourbon/css3/_appearance.scss +++ /dev/null @@ -1,3 +0,0 @@ -@mixin appearance ($value) { - @include prefixer(appearance, $value, webkit moz ms o spec); -} diff --git a/public/scss/vendor/bourbon/css3/_backface-visibility.scss b/public/scss/vendor/bourbon/css3/_backface-visibility.scss deleted file mode 100755 index 1161fe60d..000000000 --- a/public/scss/vendor/bourbon/css3/_backface-visibility.scss +++ /dev/null @@ -1,6 +0,0 @@ -//************************************************************************// -// Backface-visibility mixin -//************************************************************************// -@mixin backface-visibility($visibility) { - @include prefixer(backface-visibility, $visibility, webkit spec); -} diff --git a/public/scss/vendor/bourbon/css3/_background-image.scss b/public/scss/vendor/bourbon/css3/_background-image.scss deleted file mode 100755 index 17016b91b..000000000 --- a/public/scss/vendor/bourbon/css3/_background-image.scss +++ /dev/null @@ -1,48 +0,0 @@ -//************************************************************************// -// Background-image property for adding multiple background images with -// gradients, or for stringing multiple gradients together. -//************************************************************************// - -@mixin background-image($images...) { - background-image: _add-prefix($images, webkit); - background-image: _add-prefix($images); -} - -@function _add-prefix($images, $vendor: false) { - $images-prefixed: (); - $gradient-positions: false; - @for $i from 1 through length($images) { - $type: type-of(nth($images, $i)); // Get type of variable - List or String - - // If variable is a list - Gradient - @if $type == list { - $gradient-type: nth(nth($images, $i), 1); // linear or radial - $gradient-pos: null; - $gradient-args: null; - - @if ($gradient-type == linear) or ($gradient-type == radial) { - $gradient-pos: nth(nth($images, $i), 2); // Get gradient position - $gradient-args: nth(nth($images, $i), 3); // Get actual gradient (red, blue) - } - @else { - $gradient-args: nth(nth($images, $i), 2); // Get actual gradient (red, blue) - } - - $gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos); - $gradient: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor); - $images-prefixed: append($images-prefixed, $gradient, comma); - } - // If variable is a string - Image - @else if $type == string { - $images-prefixed: join($images-prefixed, nth($images, $i), comma); - } - } - @return $images-prefixed; -} - -//Examples: - //@include background-image(linear-gradient(top, orange, red)); - //@include background-image(radial-gradient(50% 50%, cover circle, orange, red)); - //@include background-image(url("/images/a.png"), linear-gradient(orange, red)); - //@include background-image(url("image.png"), linear-gradient(orange, red), url("image.png")); - //@include background-image(linear-gradient(hsla(0, 100%, 100%, 0.25) 0%, hsla(0, 100%, 100%, 0.08) 50%, transparent 50%), linear-gradient(orange, red)); diff --git a/public/scss/vendor/bourbon/css3/_background.scss b/public/scss/vendor/bourbon/css3/_background.scss deleted file mode 100755 index 766d5d322..000000000 --- a/public/scss/vendor/bourbon/css3/_background.scss +++ /dev/null @@ -1,103 +0,0 @@ -//************************************************************************// -// Background property for adding multiple backgrounds using shorthand -// notation. -//************************************************************************// - -@mixin background( - $background-1 , $background-2: false, - $background-3: false, $background-4: false, - $background-5: false, $background-6: false, - $background-7: false, $background-8: false, - $background-9: false, $background-10: false, - $fallback: false -) { - $backgrounds: compact($background-1, $background-2, - $background-3, $background-4, - $background-5, $background-6, - $background-7, $background-8, - $background-9, $background-10); - - $fallback-color: false; - @if (type-of($fallback) == color) or ($fallback == "transparent") { - $fallback-color: $fallback; - } - @else { - $fallback-color: _extract-background-color($backgrounds); - } - - @if $fallback-color { - background-color: $fallback-color; - } - background: _background-add-prefix($backgrounds, webkit); - background: _background-add-prefix($backgrounds); -} - -@function _extract-background-color($backgrounds) { - $final-bg-layer: nth($backgrounds, length($backgrounds)); - @if type-of($final-bg-layer) == list { - @for $i from 1 through length($final-bg-layer) { - $value: nth($final-bg-layer, $i); - @if type-of($value) == color { - @return $value; - } - } - } - @return false; -} - -@function _background-add-prefix($backgrounds, $vendor: false) { - $backgrounds-prefixed: (); - - @for $i from 1 through length($backgrounds) { - $shorthand: nth($backgrounds, $i); // Get member for current index - $type: type-of($shorthand); // Get type of variable - List (gradient) or String (image) - - // If shorthand is a list (gradient) - @if $type == list { - $first-member: nth($shorthand, 1); // Get first member of shorthand - - // Linear Gradient - @if index(linear radial, nth($first-member, 1)) { - $gradient-type: nth($first-member, 1); // linear || radial - $gradient-args: false; - $gradient-positions: false; - $shorthand-start: false; - @if type-of($first-member) == list { // Linear gradient plus additional shorthand values - lg(red,orange)repeat,... - $gradient-positions: nth($first-member, 2); - $gradient-args: nth($first-member, 3); - $shorthand-start: 2; - } - @else { // Linear gradient only - lg(red,orange),... - $gradient-positions: nth($shorthand, 2); - $gradient-args: nth($shorthand, 3); // Get gradient (red, blue) - } - - $gradient-positions: _gradient-positions-parser($gradient-type, $gradient-positions); - $gradient: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor); - - // Append any additional shorthand args to gradient - @if $shorthand-start { - @for $j from $shorthand-start through length($shorthand) { - $gradient: join($gradient, nth($shorthand, $j), space); - } - } - $backgrounds-prefixed: append($backgrounds-prefixed, $gradient, comma); - } - // Image with additional properties - @else { - $backgrounds-prefixed: append($backgrounds-prefixed, $shorthand, comma); - } - } - // If shorthand is a simple string (color or image) - @else if $type == string { - $backgrounds-prefixed: join($backgrounds-prefixed, $shorthand, comma); - } - } - @return $backgrounds-prefixed; -} - -//Examples: - //@include background(linear-gradient(top, orange, red)); - //@include background(radial-gradient(circle at 40% 40%, orange, red)); - //@include background(url("/images/a.png") no-repeat, linear-gradient(orange, red)); - //@include background(url("image.png") center center, linear-gradient(orange, red), url("image.png")); diff --git a/public/scss/vendor/bourbon/css3/_border-image.scss b/public/scss/vendor/bourbon/css3/_border-image.scss deleted file mode 100755 index 1fff212df..000000000 --- a/public/scss/vendor/bourbon/css3/_border-image.scss +++ /dev/null @@ -1,55 +0,0 @@ -@mixin border-image($images) { - -webkit-border-image: _border-add-prefix($images, webkit); - -moz-border-image: _border-add-prefix($images, moz); - -o-border-image: _border-add-prefix($images, o); - border-image: _border-add-prefix($images); -} - -@function _border-add-prefix($images, $vendor: false) { - $border-image: null; - $images-type: type-of(nth($images, 1)); - $first-var: nth(nth($images, 1), 1); // Get type of Gradient (Linear || radial) - - // If input is a gradient - @if $images-type == string { - @if ($first-var == "linear") or ($first-var == "radial") { - $gradient-type: nth($images, 1); // Get type of gradient (linear || radial) - $gradient-pos: nth($images, 2); // Get gradient position - $gradient-args: nth($images, 3); // Get actual gradient (red, blue) - $gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos); - $border-image: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor); - } - // If input is a URL - @else { - $border-image: $images; - } - } - // If input is gradient or url + additional args - @else if $images-type == list { - $type: type-of(nth($images, 1)); // Get type of variable - List or String - - // If variable is a list - Gradient - @if $type == list { - $gradient: nth($images, 1); - $gradient-type: nth($gradient, 1); // Get type of gradient (linear || radial) - $gradient-pos: nth($gradient, 2); // Get gradient position - $gradient-args: nth($gradient, 3); // Get actual gradient (red, blue) - $gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos); - $border-image: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor); - - @for $i from 2 through length($images) { - $border-image: append($border-image, nth($images, $i)); - } - } - } - @return $border-image; -} - -//Examples: -// @include border-image(url("image.png")); -// @include border-image(url("image.png") 20 stretch); -// @include border-image(linear-gradient(45deg, orange, yellow)); -// @include border-image(linear-gradient(45deg, orange, yellow) stretch); -// @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round); -// @include border-image(radial-gradient(top, cover, orange, yellow, orange)); - diff --git a/public/scss/vendor/bourbon/css3/_border-radius.scss b/public/scss/vendor/bourbon/css3/_border-radius.scss deleted file mode 100755 index 7c1719010..000000000 --- a/public/scss/vendor/bourbon/css3/_border-radius.scss +++ /dev/null @@ -1,22 +0,0 @@ -//************************************************************************// -// Shorthand Border-radius mixins -//************************************************************************// -@mixin border-top-radius($radii) { - @include prefixer(border-top-left-radius, $radii, spec); - @include prefixer(border-top-right-radius, $radii, spec); -} - -@mixin border-bottom-radius($radii) { - @include prefixer(border-bottom-left-radius, $radii, spec); - @include prefixer(border-bottom-right-radius, $radii, spec); -} - -@mixin border-left-radius($radii) { - @include prefixer(border-top-left-radius, $radii, spec); - @include prefixer(border-bottom-left-radius, $radii, spec); -} - -@mixin border-right-radius($radii) { - @include prefixer(border-top-right-radius, $radii, spec); - @include prefixer(border-bottom-right-radius, $radii, spec); -} diff --git a/public/scss/vendor/bourbon/css3/_box-sizing.scss b/public/scss/vendor/bourbon/css3/_box-sizing.scss deleted file mode 100755 index f07e1d412..000000000 --- a/public/scss/vendor/bourbon/css3/_box-sizing.scss +++ /dev/null @@ -1,4 +0,0 @@ -@mixin box-sizing ($box) { -// content-box | border-box | inherit - @include prefixer(box-sizing, $box, webkit moz spec); -} diff --git a/public/scss/vendor/bourbon/css3/_columns.scss b/public/scss/vendor/bourbon/css3/_columns.scss deleted file mode 100755 index 42274a4ee..000000000 --- a/public/scss/vendor/bourbon/css3/_columns.scss +++ /dev/null @@ -1,47 +0,0 @@ -@mixin columns($arg: auto) { -// || - @include prefixer(columns, $arg, webkit moz spec); -} - -@mixin column-count($int: auto) { -// auto || integer - @include prefixer(column-count, $int, webkit moz spec); -} - -@mixin column-gap($length: normal) { -// normal || length - @include prefixer(column-gap, $length, webkit moz spec); -} - -@mixin column-fill($arg: auto) { -// auto || length - @include prefixer(columns-fill, $arg, webkit moz spec); -} - -@mixin column-rule($arg) { -// || || - @include prefixer(column-rule, $arg, webkit moz spec); -} - -@mixin column-rule-color($color) { - @include prefixer(column-rule-color, $color, webkit moz spec); -} - -@mixin column-rule-style($style: none) { -// none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid - @include prefixer(column-rule-style, $style, webkit moz spec); -} - -@mixin column-rule-width ($width: none) { - @include prefixer(column-rule-width, $width, webkit moz spec); -} - -@mixin column-span($arg: none) { -// none || all - @include prefixer(column-span, $arg, webkit moz spec); -} - -@mixin column-width($length: auto) { -// auto || length - @include prefixer(column-width, $length, webkit moz spec); -} diff --git a/public/scss/vendor/bourbon/css3/_flex-box.scss b/public/scss/vendor/bourbon/css3/_flex-box.scss deleted file mode 100755 index 03ee836c5..000000000 --- a/public/scss/vendor/bourbon/css3/_flex-box.scss +++ /dev/null @@ -1,320 +0,0 @@ -// CSS3 Flexible Box Model and property defaults - -// Custom shorthand notation for flexbox -@mixin box($orient: inline-axis, $pack: start, $align: stretch) { - @include display-box; - @include box-orient($orient); - @include box-pack($pack); - @include box-align($align); -} - -@mixin display-box { - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; // IE 10 - display: box; -} - -@mixin box-orient($orient: inline-axis) { -// horizontal|vertical|inline-axis|block-axis|inherit - @include prefixer(box-orient, $orient, webkit moz spec); -} - -@mixin box-pack($pack: start) { -// start|end|center|justify - @include prefixer(box-pack, $pack, webkit moz spec); - -ms-flex-pack: $pack; // IE 10 -} - -@mixin box-align($align: stretch) { -// start|end|center|baseline|stretch - @include prefixer(box-align, $align, webkit moz spec); - -ms-flex-align: $align; // IE 10 -} - -@mixin box-direction($direction: normal) { -// normal|reverse|inherit - @include prefixer(box-direction, $direction, webkit moz spec); - -ms-flex-direction: $direction; // IE 10 -} - -@mixin box-lines($lines: single) { -// single|multiple - @include prefixer(box-lines, $lines, webkit moz spec); -} - -@mixin box-ordinal-group($int: 1) { - @include prefixer(box-ordinal-group, $int, webkit moz spec); - -ms-flex-order: $int; // IE 10 -} - -@mixin box-flex($value: 0.0) { - @include prefixer(box-flex, $value, webkit moz spec); - -ms-flex: $value; // IE 10 -} - -@mixin box-flex-group($int: 1) { - @include prefixer(box-flex-group, $int, webkit moz spec); -} - -// CSS3 Flexible Box Model and property defaults -// Unified attributes for 2009, 2011, and 2012 flavours. - -// 2009 - display (box | inline-box) -// 2011 - display (flexbox | inline-flexbox) -// 2012 - display (flex | inline-flex) -@mixin display($value) { -// flex | inline-flex - @if $value == "flex" { - // 2009 - display: -webkit-box; - display: -moz-box; - display: box; - - // 2012 - display: -webkit-flex; - display: -moz-flex; - display: -ms-flexbox; // 2011 (IE 10) - display: flex; - } - - @elseif $value == "inline-flex" { - display: -webkit-inline-box; - display: -moz-inline-box; - display: inline-box; - - display: -webkit-inline-flex; - display: -moz-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; - } - - @else { - display: $value; - } -} - -// 2009 - box-flex (integer) -// 2011 - flex (decimal | width decimal) -// 2012 - flex (integer integer width) -@mixin flex($value) { - - // Grab flex-grow for older browsers. - $flex-grow: nth($value, 1); - - // 2009 - @include prefixer(box-flex, $flex-grow, webkit moz spec); - - // 2011 (IE 10), 2012 - @include prefixer(flex, $value, webkit moz ms spec); -} - -// 2009 - box-orient ( horizontal | vertical | inline-axis | block-axis) -// - box-direction (normal | reverse) -// 2011 - flex-direction (row | row-reverse | column | column-reverse) -// 2012 - flex-direction (row | row-reverse | column | column-reverse) -@mixin flex-direction($value: row) { - - // Alt values. - $value-2009: $value; - $value-2011: $value; - $direction: "normal"; - - @if $value == row { - $value-2009: horizontal; - } - - @elseif $value == "row-reverse" { - $value-2009: horizontal; - $direction: reverse; - } - - @elseif $value == column { - $value-2009: vertical; - } - - @elseif $value == "column-reverse" { - $value-2009: vertical; - $direction: reverse; - } - - // 2009 - @include prefixer(box-orient, $value-2009, webkit moz spec); - @if $direction == "reverse" { - @include prefixer(box-direction, $direction, webkit moz spec); - } - - // 2012 - @include prefixer(flex-direction, $value, webkit moz spec); - - // 2011 (IE 10) - -ms-flex-direction: $value; -} - -// 2009 - box-lines (single | multiple) -// 2011 - flex-wrap (nowrap | wrap | wrap-reverse) -// 2012 - flex-wrap (nowrap | wrap | wrap-reverse) -@mixin flex-wrap($value: nowrap) { - - // Alt values. - $alt-value: $value; - @if $value == nowrap { - $alt-value: single; - } - - @elseif $value == wrap { - $alt-value: multiple; - } - - @elseif $value == "wrap-reverse" { - $alt-value: multiple; - } - - @include prefixer(box-lines, $alt-value, webkit moz spec); - @include prefixer(flex-wrap, $value, webkit moz ms spec); -} - -// 2009 - TODO: parse values into flex-direction/flex-wrap -// 2011 - TODO: parse values into flex-direction/flex-wrap -// 2012 - flex-flow (flex-direction || flex-wrap) -@mixin flex-flow($value) { - @include prefixer(flex-flow, $value, webkit moz spec); -} - -// 2009 - box-ordinal-group (integer) -// 2011 - flex-order (integer) -// 2012 - order (integer) -@mixin order($int: 0) { - // 2009 - @include prefixer(box-ordinal-group, $int, webkit moz spec); - - // 2012 - @include prefixer(order, $int, webkit moz spec); - - // 2011 (IE 10) - -ms-flex-order: $int; -} - -// 2012 - flex-grow (number) -@mixin flex-grow($number: 0) { - @include prefixer(flex-grow, $number, webkit moz spec); - -ms-flex-positive: $number; -} - -// 2012 - flex-shrink (number) -@mixin flex-shrink($number: 1) { - @include prefixer(flex-shrink, $number, webkit moz spec); - -ms-flex-negative: $number; -} - -// 2012 - flex-basis (number) -@mixin flex-basis($width: auto) { - @include prefixer(flex-basis, $width, webkit moz spec); - -ms-flex-preferred-size: $width; -} - -// 2009 - box-pack (start | end | center | justify) -// 2011 - flex-pack (start | end | center | justify) -// 2012 - justify-content (flex-start | flex-end | center | space-between | space-around) -@mixin justify-content ($value: flex-start) { - - // Alt values. - $alt-value: $value; - @if $value == "flex-start" { - $alt-value: start; - } - - @elseif $value == "flex-end" { - $alt-value: end; - } - - @elseif $value == "space-between" { - $alt-value: justify; - } - - @elseif $value == "space-around" { - $alt-value: center; - } - - // 2009 - @include prefixer(box-pack, $alt-value, webkit moz spec); - - // 2012 - @include prefixer(justify-content, $value, webkit moz ms o spec); - - // 2011 (IE 10) - -ms-flex-pack: $alt-value; -} - -// 2009 - box-align (start | end | center | baseline | stretch) -// 2011 - flex-align (start | end | center | baseline | stretch) -// 2012 - align-items (flex-start | flex-end | center | baseline | stretch) -@mixin align-items($value: stretch) { - - $alt-value: $value; - - @if $value == "flex-start" { - $alt-value: start; - } - - @elseif $value == "flex-end" { - $alt-value: end; - } - - // 2009 - @include prefixer(box-align, $alt-value, webkit moz spec); - - // 2012 - @include prefixer(align-items, $value, webkit moz ms o spec); - - // 2011 (IE 10) - -ms-flex-align: $alt-value; -} - -// 2011 - flex-item-align (auto | start | end | center | baseline | stretch) -// 2012 - align-self (auto | flex-start | flex-end | center | baseline | stretch) -@mixin align-self($value: auto) { - - $value-2011: $value; - @if $value == "flex-start" { - $value-2011: start; - } - - @elseif $value == "flex-end" { - $value-2011: end; - } - - // 2012 - @include prefixer(align-self, $value, webkit moz spec); - - // 2011 (IE 10) - -ms-flex-item-align: $value-2011; -} - -// 2011 - flex-line-pack (start | end | center | justify | distribute | stretch) -// 2012 - align-content (flex-start | flex-end | center | space-between | space-around | stretch) -@mixin align-content($value: stretch) { - - $value-2011: $value; - @if $value == "flex-start" { - $value-2011: start; - } - - @elseif $value == "flex-end" { - $value-2011: end; - } - - @elseif $value == "space-between" { - $value-2011: justify; - } - - @elseif $value == "space-around" { - $value-2011: distribute; - } - - // 2012 - @include prefixer(align-content, $value, webkit moz spec); - - // 2011 (IE 10) - -ms-flex-line-pack: $value-2011; -} \ No newline at end of file diff --git a/public/scss/vendor/bourbon/css3/_font-face.scss b/public/scss/vendor/bourbon/css3/_font-face.scss deleted file mode 100755 index 029ee8fe8..000000000 --- a/public/scss/vendor/bourbon/css3/_font-face.scss +++ /dev/null @@ -1,23 +0,0 @@ -// Order of the includes matters, and it is: normal, bold, italic, bold+italic. - -@mixin font-face($font-family, $file-path, $weight: normal, $style: normal, $asset-pipeline: false ) { - @font-face { - font-family: $font-family; - font-weight: $weight; - font-style: $style; - - @if $asset-pipeline == true { - src: font-url('#{$file-path}.eot'); - src: font-url('#{$file-path}.eot?#iefix') format('embedded-opentype'), - font-url('#{$file-path}.woff') format('woff'), - font-url('#{$file-path}.ttf') format('truetype'), - font-url('#{$file-path}.svg##{$font-family}') format('svg'); - } @else { - src: url('#{$file-path}.eot'); - src: url('#{$file-path}.eot?#iefix') format('embedded-opentype'), - url('#{$file-path}.woff') format('woff'), - url('#{$file-path}.ttf') format('truetype'), - url('#{$file-path}.svg##{$font-family}') format('svg'); - } - } -} diff --git a/public/scss/vendor/bourbon/css3/_hidpi-media-query.scss b/public/scss/vendor/bourbon/css3/_hidpi-media-query.scss deleted file mode 100755 index 111e4009b..000000000 --- a/public/scss/vendor/bourbon/css3/_hidpi-media-query.scss +++ /dev/null @@ -1,10 +0,0 @@ -// HiDPI mixin. Default value set to 1.3 to target Google Nexus 7 (http://bjango.com/articles/min-device-pixel-ratio/) -@mixin hidpi($ratio: 1.3) { - @media only screen and (-webkit-min-device-pixel-ratio: $ratio), - only screen and (min--moz-device-pixel-ratio: $ratio), - only screen and (-o-min-device-pixel-ratio: #{$ratio}/1), - only screen and (min-resolution: #{round($ratio*96)}dpi), - only screen and (min-resolution: #{$ratio}dppx) { - @content; - } -} diff --git a/public/scss/vendor/bourbon/css3/_image-rendering.scss b/public/scss/vendor/bourbon/css3/_image-rendering.scss deleted file mode 100755 index abc7ee1aa..000000000 --- a/public/scss/vendor/bourbon/css3/_image-rendering.scss +++ /dev/null @@ -1,13 +0,0 @@ -@mixin image-rendering ($mode:optimizeQuality) { - - @if ($mode == optimize-contrast) { - image-rendering: -moz-crisp-edges; - image-rendering: -o-crisp-edges; - image-rendering: -webkit-optimize-contrast; - image-rendering: optimize-contrast; - } - - @else { - image-rendering: $mode; - } -} diff --git a/public/scss/vendor/bourbon/css3/_inline-block.scss b/public/scss/vendor/bourbon/css3/_inline-block.scss deleted file mode 100755 index 3272a0010..000000000 --- a/public/scss/vendor/bourbon/css3/_inline-block.scss +++ /dev/null @@ -1,8 +0,0 @@ -// Legacy support for inline-block in IE7 (maybe IE6) -@mixin inline-block { - display: inline-block; - vertical-align: baseline; - zoom: 1; - *display: inline; - *vertical-align: auto; -} diff --git a/public/scss/vendor/bourbon/css3/_keyframes.scss b/public/scss/vendor/bourbon/css3/_keyframes.scss deleted file mode 100755 index dca61f2a0..000000000 --- a/public/scss/vendor/bourbon/css3/_keyframes.scss +++ /dev/null @@ -1,43 +0,0 @@ -// Adds keyframes blocks for supported prefixes, removing redundant prefixes in the block's content -@mixin keyframes($name) { - $original-prefix-for-webkit: $prefix-for-webkit; - $original-prefix-for-mozilla: $prefix-for-mozilla; - $original-prefix-for-microsoft: $prefix-for-microsoft; - $original-prefix-for-opera: $prefix-for-opera; - $original-prefix-for-spec: $prefix-for-spec; - - @if $original-prefix-for-webkit { - @include disable-prefix-for-all(); - $prefix-for-webkit: true; - @-webkit-keyframes #{$name} { - @content; - } - } - @if $original-prefix-for-mozilla { - @include disable-prefix-for-all(); - $prefix-for-mozilla: true; - @-moz-keyframes #{$name} { - @content; - } - } - @if $original-prefix-for-opera { - @include disable-prefix-for-all(); - $prefix-for-opera: true; - @-o-keyframes #{$name} { - @content; - } - } - @if $original-prefix-for-spec { - @include disable-prefix-for-all(); - $prefix-for-spec: true; - @keyframes #{$name} { - @content; - } - } - - $prefix-for-webkit: $original-prefix-for-webkit; - $prefix-for-mozilla: $original-prefix-for-mozilla; - $prefix-for-microsoft: $original-prefix-for-microsoft; - $prefix-for-opera: $original-prefix-for-opera; - $prefix-for-spec: $original-prefix-for-spec; -} diff --git a/public/scss/vendor/bourbon/css3/_linear-gradient.scss b/public/scss/vendor/bourbon/css3/_linear-gradient.scss deleted file mode 100755 index d5b687b00..000000000 --- a/public/scss/vendor/bourbon/css3/_linear-gradient.scss +++ /dev/null @@ -1,41 +0,0 @@ -@mixin linear-gradient($pos, $G1, $G2: false, - $G3: false, $G4: false, - $G5: false, $G6: false, - $G7: false, $G8: false, - $G9: false, $G10: false, - $deprecated-pos1: left top, - $deprecated-pos2: left bottom, - $fallback: false) { - // Detect what type of value exists in $pos - $pos-type: type-of(nth($pos, 1)); - $pos-spec: null; - $pos-degree: null; - - // If $pos is missing from mixin, reassign vars and add default position - @if ($pos-type == color) or (nth($pos, 1) == "transparent") { - $G10: $G9; $G9: $G8; $G8: $G7; $G7: $G6; $G6: $G5; - $G5: $G4; $G4: $G3; $G3: $G2; $G2: $G1; $G1: $pos; - $pos: null; - } - - @if $pos { - $positions: _linear-positions-parser($pos); - $pos-degree: nth($positions, 1); - $pos-spec: nth($positions, 2); - } - - $full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10); - - // Set $G1 as the default fallback color - $fallback-color: nth($G1, 1); - - // If $fallback is a color use that color as the fallback color - @if (type-of($fallback) == color) or ($fallback == "transparent") { - $fallback-color: $fallback; - } - - background-color: $fallback-color; - background-image: _deprecated-webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $full); // Safari <= 5.0 - background-image: -webkit-linear-gradient($pos-degree $full); // Safari 5.1+, Chrome - background-image: unquote("linear-gradient(#{$pos-spec}#{$full})"); -} diff --git a/public/scss/vendor/bourbon/css3/_perspective.scss b/public/scss/vendor/bourbon/css3/_perspective.scss deleted file mode 100755 index 0e4deb80f..000000000 --- a/public/scss/vendor/bourbon/css3/_perspective.scss +++ /dev/null @@ -1,8 +0,0 @@ -@mixin perspective($depth: none) { - // none | - @include prefixer(perspective, $depth, webkit moz spec); -} - -@mixin perspective-origin($value: 50% 50%) { - @include prefixer(perspective-origin, $value, webkit moz spec); -} diff --git a/public/scss/vendor/bourbon/css3/_placeholder.scss b/public/scss/vendor/bourbon/css3/_placeholder.scss deleted file mode 100755 index 22fd92b4f..000000000 --- a/public/scss/vendor/bourbon/css3/_placeholder.scss +++ /dev/null @@ -1,29 +0,0 @@ -$placeholders: '-webkit-input-placeholder', - '-moz-placeholder', - '-ms-input-placeholder'; - -@mixin placeholder { - @each $placeholder in $placeholders { - @if $placeholder == "-webkit-input-placeholder" { - &::#{$placeholder} { - @content; - } - } - @else if $placeholder == "-moz-placeholder" { - // FF 18- - &:#{$placeholder} { - @content; - } - - // FF 19+ - &::#{$placeholder} { - @content; - } - } - @else { - &:#{$placeholder} { - @content; - } - } - } -} diff --git a/public/scss/vendor/bourbon/css3/_radial-gradient.scss b/public/scss/vendor/bourbon/css3/_radial-gradient.scss deleted file mode 100755 index e87b45a5a..000000000 --- a/public/scss/vendor/bourbon/css3/_radial-gradient.scss +++ /dev/null @@ -1,44 +0,0 @@ -// Requires Sass 3.1+ -@mixin radial-gradient($G1, $G2, - $G3: false, $G4: false, - $G5: false, $G6: false, - $G7: false, $G8: false, - $G9: false, $G10: false, - $pos: null, - $shape-size: null, - $deprecated-pos1: center center, - $deprecated-pos2: center center, - $deprecated-radius1: 0, - $deprecated-radius2: 460, - $fallback: false) { - - $data: _radial-arg-parser($G1, $G2, $pos, $shape-size); - $G1: nth($data, 1); - $G2: nth($data, 2); - $pos: nth($data, 3); - $shape-size: nth($data, 4); - - $full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10); - - // Strip deprecated cover/contain for spec - $shape-size-spec: _shape-size-stripper($shape-size); - - // Set $G1 as the default fallback color - $first-color: nth($full, 1); - $fallback-color: nth($first-color, 1); - - @if (type-of($fallback) == color) or ($fallback == "transparent") { - $fallback-color: $fallback; - } - - // Add Commas and spaces - $shape-size: if($shape-size, '#{$shape-size}, ', null); - $pos: if($pos, '#{$pos}, ', null); - $pos-spec: if($pos, 'at #{$pos}', null); - $shape-size-spec: if(($shape-size-spec != ' ') and ($pos == null), '#{$shape-size-spec}, ', '#{$shape-size-spec} '); - - background-color: $fallback-color; - background-image: _deprecated-webkit-gradient(radial, $deprecated-pos1, $deprecated-pos2, $full, $deprecated-radius1, $deprecated-radius2); // Safari <= 5.0 && IOS 4 - background-image: -webkit-radial-gradient(unquote(#{$pos}#{$shape-size}#{$full})); - background-image: unquote("radial-gradient(#{$shape-size-spec}#{$pos-spec}#{$full})"); -} diff --git a/public/scss/vendor/bourbon/css3/_transform.scss b/public/scss/vendor/bourbon/css3/_transform.scss deleted file mode 100755 index 8cc35963d..000000000 --- a/public/scss/vendor/bourbon/css3/_transform.scss +++ /dev/null @@ -1,15 +0,0 @@ -@mixin transform($property: none) { -// none | - @include prefixer(transform, $property, webkit moz ms o spec); -} - -@mixin transform-origin($axes: 50%) { -// x-axis - left | center | right | length | % -// y-axis - top | center | bottom | length | % -// z-axis - length - @include prefixer(transform-origin, $axes, webkit moz ms o spec); -} - -@mixin transform-style ($style: flat) { - @include prefixer(transform-style, $style, webkit moz ms o spec); -} diff --git a/public/scss/vendor/bourbon/css3/_transition.scss b/public/scss/vendor/bourbon/css3/_transition.scss deleted file mode 100755 index 180cde6c8..000000000 --- a/public/scss/vendor/bourbon/css3/_transition.scss +++ /dev/null @@ -1,34 +0,0 @@ -// Shorthand mixin. Supports multiple parentheses-deliminated values for each variable. -// Example: @include transition (all, 2.0s, ease-in-out); -// @include transition ((opacity, width), (1.0s, 2.0s), ease-in, (0, 2s)); -// @include transition ($property:(opacity, width), $delay: (1.5s, 2.5s)); - -@mixin transition ($properties...) { - @if length($properties) >= 1 { - @include prefixer(transition, $properties, webkit moz spec); - } - - @else { - $properties: all 0.15s ease-out 0; - @include prefixer(transition, $properties, webkit moz spec); - } -} - -@mixin transition-property ($properties...) { - -webkit-transition-property: transition-property-names($properties, 'webkit'); - -moz-transition-property: transition-property-names($properties, 'moz'); - transition-property: transition-property-names($properties, false); -} - -@mixin transition-duration ($times...) { - @include prefixer(transition-duration, $times, webkit moz spec); -} - -@mixin transition-timing-function ($motions...) { -// ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier() - @include prefixer(transition-timing-function, $motions, webkit moz spec); -} - -@mixin transition-delay ($times...) { - @include prefixer(transition-delay, $times, webkit moz spec); -} diff --git a/public/scss/vendor/bourbon/css3/_user-select.scss b/public/scss/vendor/bourbon/css3/_user-select.scss deleted file mode 100755 index 1380aa8ba..000000000 --- a/public/scss/vendor/bourbon/css3/_user-select.scss +++ /dev/null @@ -1,3 +0,0 @@ -@mixin user-select($arg: none) { - @include prefixer(user-select, $arg, webkit moz ms spec); -} diff --git a/public/scss/vendor/bourbon/functions/_compact.scss b/public/scss/vendor/bourbon/functions/_compact.scss deleted file mode 100755 index 871500e33..000000000 --- a/public/scss/vendor/bourbon/functions/_compact.scss +++ /dev/null @@ -1,11 +0,0 @@ -// Remove `false` values from a list - -@function compact($vars...) { - $list: (); - @each $var in $vars { - @if $var { - $list: append($list, $var, comma); - } - } - @return $list; -} diff --git a/public/scss/vendor/bourbon/functions/_flex-grid.scss b/public/scss/vendor/bourbon/functions/_flex-grid.scss deleted file mode 100755 index 3bbd86657..000000000 --- a/public/scss/vendor/bourbon/functions/_flex-grid.scss +++ /dev/null @@ -1,39 +0,0 @@ -// Flexible grid -@function flex-grid($columns, $container-columns: $fg-max-columns) { - $width: $columns * $fg-column + ($columns - 1) * $fg-gutter; - $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; - @return percentage($width / $container-width); -} - -// Flexible gutter -@function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) { - $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; - @return percentage($gutter / $container-width); -} - -// The $fg-column, $fg-gutter and $fg-max-columns variables must be defined in your base stylesheet to properly use the flex-grid function. -// This function takes the fluid grid equation (target / context = result) and uses columns to help define each. -// -// The calculation presumes that your column structure will be missing the last gutter: -// -// -- column -- gutter -- column -- gutter -- column -// -// $fg-column: 60px; // Column Width -// $fg-gutter: 25px; // Gutter Width -// $fg-max-columns: 12; // Total Columns For Main Container -// -// div { -// width: flex-grid(4); // returns (315px / 995px) = 31.65829%; -// margin-left: flex-gutter(); // returns (25px / 995px) = 2.51256%; -// -// p { -// width: flex-grid(2, 4); // returns (145px / 315px) = 46.031746%; -// float: left; -// margin: flex-gutter(4); // returns (25px / 315px) = 7.936508%; -// } -// -// blockquote { -// float: left; -// width: flex-grid(2, 4); // returns (145px / 315px) = 46.031746%; -// } -// } \ No newline at end of file diff --git a/public/scss/vendor/bourbon/functions/_grid-width.scss b/public/scss/vendor/bourbon/functions/_grid-width.scss deleted file mode 100755 index 8e63d83d6..000000000 --- a/public/scss/vendor/bourbon/functions/_grid-width.scss +++ /dev/null @@ -1,13 +0,0 @@ -@function grid-width($n) { - @return $n * $gw-column + ($n - 1) * $gw-gutter; -} - -// The $gw-column and $gw-gutter variables must be defined in your base stylesheet to properly use the grid-width function. -// -// $gw-column: 100px; // Column Width -// $gw-gutter: 40px; // Gutter Width -// -// div { -// width: grid-width(4); // returns 520px; -// margin-left: $gw-gutter; // returns 40px; -// } diff --git a/public/scss/vendor/bourbon/functions/_linear-gradient.scss b/public/scss/vendor/bourbon/functions/_linear-gradient.scss deleted file mode 100755 index c8454d83f..000000000 --- a/public/scss/vendor/bourbon/functions/_linear-gradient.scss +++ /dev/null @@ -1,13 +0,0 @@ -@function linear-gradient($pos, $gradients...) { - $type: linear; - $pos-type: type-of(nth($pos, 1)); - - // if $pos doesn't exist, fix $gradient - @if ($pos-type == color) or (nth($pos, 1) == "transparent") { - $gradients: zip($pos $gradients); - $pos: false; - } - - $type-gradient: $type, $pos, $gradients; - @return $type-gradient; -} diff --git a/public/scss/vendor/bourbon/functions/_modular-scale.scss b/public/scss/vendor/bourbon/functions/_modular-scale.scss deleted file mode 100755 index dddccb522..000000000 --- a/public/scss/vendor/bourbon/functions/_modular-scale.scss +++ /dev/null @@ -1,40 +0,0 @@ -@function modular-scale($value, $increment, $ratio) { - @if $increment > 0 { - @for $i from 1 through $increment { - $value: ($value * $ratio); - } - } - - @if $increment < 0 { - $increment: abs($increment); - @for $i from 1 through $increment { - $value: ($value / $ratio); - } - } - - @return $value; -} - -// div { -// Increment Up GR with positive value -// font-size: modular-scale(14px, 1, 1.618); // returns: 22.652px -// -// Increment Down GR with negative value -// font-size: modular-scale(14px, -1, 1.618); // returns: 8.653px -// -// Can be used with ceil(round up) or floor(round down) -// font-size: floor( modular-scale(14px, 1, 1.618) ); // returns: 22px -// font-size: ceil( modular-scale(14px, 1, 1.618) ); // returns: 23px -// } -// -// modularscale.com - -@function golden-ratio($value, $increment) { - @return modular-scale($value, $increment, 1.618) -} - -// div { -// font-size: golden-ratio(14px, 1); // returns: 22.652px -// } -// -// goldenratiocalculator.com diff --git a/public/scss/vendor/bourbon/functions/_px-to-em.scss b/public/scss/vendor/bourbon/functions/_px-to-em.scss deleted file mode 100755 index 2eb1031c6..000000000 --- a/public/scss/vendor/bourbon/functions/_px-to-em.scss +++ /dev/null @@ -1,8 +0,0 @@ -// Convert pixels to ems -// eg. for a relational value of 12px write em(12) when the parent is 16px -// if the parent is another value say 24px write em(12, 24) - -@function em($pxval, $base: 16) { - @return ($pxval / $base) * 1em; -} - diff --git a/public/scss/vendor/bourbon/functions/_radial-gradient.scss b/public/scss/vendor/bourbon/functions/_radial-gradient.scss deleted file mode 100755 index 75584060d..000000000 --- a/public/scss/vendor/bourbon/functions/_radial-gradient.scss +++ /dev/null @@ -1,23 +0,0 @@ -// This function is required and used by the background-image mixin. -@function radial-gradient($G1, $G2, - $G3: false, $G4: false, - $G5: false, $G6: false, - $G7: false, $G8: false, - $G9: false, $G10: false, - $pos: null, - $shape-size: null) { - - $data: _radial-arg-parser($G1, $G2, $pos, $shape-size); - $G1: nth($data, 1); - $G2: nth($data, 2); - $pos: nth($data, 3); - $shape-size: nth($data, 4); - - $type: radial; - $gradient: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10); - - $type-gradient: $type, $shape-size $pos, $gradient; - @return $type-gradient; -} - - diff --git a/public/scss/vendor/bourbon/functions/_tint-shade.scss b/public/scss/vendor/bourbon/functions/_tint-shade.scss deleted file mode 100755 index f7172004a..000000000 --- a/public/scss/vendor/bourbon/functions/_tint-shade.scss +++ /dev/null @@ -1,9 +0,0 @@ -// Add percentage of white to a color -@function tint($color, $percent){ - @return mix(white, $color, $percent); -} - -// Add percentage of black to a color -@function shade($color, $percent){ - @return mix(black, $color, $percent); -} diff --git a/public/scss/vendor/bourbon/functions/_transition-property-name.scss b/public/scss/vendor/bourbon/functions/_transition-property-name.scss deleted file mode 100755 index 54cd42281..000000000 --- a/public/scss/vendor/bourbon/functions/_transition-property-name.scss +++ /dev/null @@ -1,22 +0,0 @@ -// Return vendor-prefixed property names if appropriate -// Example: transition-property-names((transform, color, background), moz) -> -moz-transform, color, background -//************************************************************************// -@function transition-property-names($props, $vendor: false) { - $new-props: (); - - @each $prop in $props { - $new-props: append($new-props, transition-property-name($prop, $vendor), comma); - } - - @return $new-props; -} - -@function transition-property-name($prop, $vendor: false) { - // put other properties that need to be prefixed here aswell - @if $vendor and $prop == transform { - @return unquote('-'+$vendor+'-'+$prop); - } - @else { - @return $prop; - } -} \ No newline at end of file diff --git a/public/scss/vendor/bourbon/helpers/_deprecated-webkit-gradient.scss b/public/scss/vendor/bourbon/helpers/_deprecated-webkit-gradient.scss deleted file mode 100755 index cd17e2832..000000000 --- a/public/scss/vendor/bourbon/helpers/_deprecated-webkit-gradient.scss +++ /dev/null @@ -1,39 +0,0 @@ -// Render Deprecated Webkit Gradient - Linear || Radial -//************************************************************************// -@function _deprecated-webkit-gradient($type, - $deprecated-pos1, $deprecated-pos2, - $full, - $deprecated-radius1: false, $deprecated-radius2: false) { - $gradient-list: (); - $gradient: false; - $full-length: length($full); - $percentage: false; - $gradient-type: $type; - - @for $i from 1 through $full-length { - $gradient: nth($full, $i); - - @if length($gradient) == 2 { - $color-stop: color-stop(nth($gradient, 2), nth($gradient, 1)); - $gradient-list: join($gradient-list, $color-stop, comma); - } - @else if $gradient != null { - @if $i == $full-length { - $percentage: 100%; - } - @else { - $percentage: ($i - 1) * (100 / ($full-length - 1)) + "%"; - } - $color-stop: color-stop(unquote($percentage), $gradient); - $gradient-list: join($gradient-list, $color-stop, comma); - } - } - - @if $type == radial { - $gradient: -webkit-gradient(radial, $deprecated-pos1, $deprecated-radius1, $deprecated-pos2, $deprecated-radius2, $gradient-list); - } - @else if $type == linear { - $gradient: -webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $gradient-list); - } - @return $gradient; -} diff --git a/public/scss/vendor/bourbon/helpers/_gradient-positions-parser.scss b/public/scss/vendor/bourbon/helpers/_gradient-positions-parser.scss deleted file mode 100755 index 07d30b6cf..000000000 --- a/public/scss/vendor/bourbon/helpers/_gradient-positions-parser.scss +++ /dev/null @@ -1,13 +0,0 @@ -@function _gradient-positions-parser($gradient-type, $gradient-positions) { - @if $gradient-positions - and ($gradient-type == linear) - and (type-of($gradient-positions) != color) { - $gradient-positions: _linear-positions-parser($gradient-positions); - } - @else if $gradient-positions - and ($gradient-type == radial) - and (type-of($gradient-positions) != color) { - $gradient-positions: _radial-positions-parser($gradient-positions); - } - @return $gradient-positions; -} diff --git a/public/scss/vendor/bourbon/helpers/_linear-positions-parser.scss b/public/scss/vendor/bourbon/helpers/_linear-positions-parser.scss deleted file mode 100755 index d26383edc..000000000 --- a/public/scss/vendor/bourbon/helpers/_linear-positions-parser.scss +++ /dev/null @@ -1,61 +0,0 @@ -@function _linear-positions-parser($pos) { - $type: type-of(nth($pos, 1)); - $spec: null; - $degree: null; - $side: null; - $corner: null; - $length: length($pos); - // Parse Side and corner positions - @if ($length > 1) { - @if nth($pos, 1) == "to" { // Newer syntax - $side: nth($pos, 2); - - @if $length == 2 { // eg. to top - // Swap for backwards compatability - $degree: _position-flipper(nth($pos, 2)); - } - @else if $length == 3 { // eg. to top left - $corner: nth($pos, 3); - } - } - @else if $length == 2 { // Older syntax ("top left") - $side: _position-flipper(nth($pos, 1)); - $corner: _position-flipper(nth($pos, 2)); - } - - @if ("#{$side} #{$corner}" == "left top") or ("#{$side} #{$corner}" == "top left") { - $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); - } - @else if ("#{$side} #{$corner}" == "right top") or ("#{$side} #{$corner}" == "top right") { - $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); - } - @else if ("#{$side} #{$corner}" == "right bottom") or ("#{$side} #{$corner}" == "bottom right") { - $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); - } - @else if ("#{$side} #{$corner}" == "left bottom") or ("#{$side} #{$corner}" == "bottom left") { - $degree: _position-flipper(#{$side}) _position-flipper(#{$corner}); - } - $spec: to $side $corner; - } - @else if $length == 1 { - // Swap for backwards compatability - @if $type == string { - $degree: $pos; - $spec: to _position-flipper($pos); - } - @else { - $degree: -270 - $pos; //rotate the gradient opposite from spec - $spec: $pos; - } - } - $degree: unquote($degree + ","); - $spec: unquote($spec + ","); - @return $degree $spec; -} - -@function _position-flipper($pos) { - @return if($pos == left, right, null) - if($pos == right, left, null) - if($pos == top, bottom, null) - if($pos == bottom, top, null); -} diff --git a/public/scss/vendor/bourbon/helpers/_radial-arg-parser.scss b/public/scss/vendor/bourbon/helpers/_radial-arg-parser.scss deleted file mode 100755 index 3466695bd..000000000 --- a/public/scss/vendor/bourbon/helpers/_radial-arg-parser.scss +++ /dev/null @@ -1,69 +0,0 @@ -@function _radial-arg-parser($G1, $G2, $pos, $shape-size) { - @each $value in $G1, $G2 { - $first-val: nth($value, 1); - $pos-type: type-of($first-val); - $spec-at-index: null; - - // Determine if spec was passed to mixin - @if type-of($value) == list { - $spec-at-index: if(index($value, at), index($value, at), false); - } - @if $spec-at-index { - @if $spec-at-index > 1 { - @for $i from 1 through ($spec-at-index - 1) { - $shape-size: $shape-size nth($value, $i); - } - @for $i from ($spec-at-index + 1) through length($value) { - $pos: $pos nth($value, $i); - } - } - @else if $spec-at-index == 1 { - @for $i from ($spec-at-index + 1) through length($value) { - $pos: $pos nth($value, $i); - } - } - $G1: false; - } - - // If not spec calculate correct values - @else { - @if ($pos-type != color) or ($first-val != "transparent") { - @if ($pos-type == number) - or ($first-val == "center") - or ($first-val == "top") - or ($first-val == "right") - or ($first-val == "bottom") - or ($first-val == "left") { - - $pos: $value; - - @if $pos == $G1 { - $G1: false; - } - } - - @else if - ($first-val == "ellipse") - or ($first-val == "circle") - or ($first-val == "closest-side") - or ($first-val == "closest-corner") - or ($first-val == "farthest-side") - or ($first-val == "farthest-corner") - or ($first-val == "contain") - or ($first-val == "cover") { - - $shape-size: $value; - - @if $value == $G1 { - $G1: false; - } - - @else if $value == $G2 { - $G2: false; - } - } - } - } - } - @return $G1, $G2, $pos, $shape-size; -} diff --git a/public/scss/vendor/bourbon/helpers/_radial-positions-parser.scss b/public/scss/vendor/bourbon/helpers/_radial-positions-parser.scss deleted file mode 100755 index 6a5b47777..000000000 --- a/public/scss/vendor/bourbon/helpers/_radial-positions-parser.scss +++ /dev/null @@ -1,18 +0,0 @@ -@function _radial-positions-parser($gradient-pos) { - $shape-size: nth($gradient-pos, 1); - $pos: nth($gradient-pos, 2); - $shape-size-spec: _shape-size-stripper($shape-size); - - $pre-spec: unquote(if($pos, "#{$pos}, ", null)) - unquote(if($shape-size, "#{$shape-size},", null)); - $pos-spec: if($pos, "at #{$pos}", null); - - $spec: "#{$shape-size-spec} #{$pos-spec}"; - - // Add comma - @if ($spec != ' ') { - $spec: "#{$spec}," - } - - @return $pre-spec $spec; -} diff --git a/public/scss/vendor/bourbon/helpers/_render-gradients.scss b/public/scss/vendor/bourbon/helpers/_render-gradients.scss deleted file mode 100755 index 576567683..000000000 --- a/public/scss/vendor/bourbon/helpers/_render-gradients.scss +++ /dev/null @@ -1,26 +0,0 @@ -// User for linear and radial gradients within background-image or border-image properties - -@function _render-gradients($gradient-positions, $gradients, $gradient-type, $vendor: false) { - $pre-spec: null; - $spec: null; - $vendor-gradients: null; - @if $gradient-type == linear { - @if $gradient-positions { - $pre-spec: nth($gradient-positions, 1); - $spec: nth($gradient-positions, 2); - } - } - @else if $gradient-type == radial { - $pre-spec: nth($gradient-positions, 1); - $spec: nth($gradient-positions, 2); - } - - @if $vendor { - $vendor-gradients: -#{$vendor}-#{$gradient-type}-gradient(#{$pre-spec} $gradients); - } - @else if $vendor == false { - $vendor-gradients: "#{$gradient-type}-gradient(#{$spec} #{$gradients})"; - $vendor-gradients: unquote($vendor-gradients); - } - @return $vendor-gradients; -} diff --git a/public/scss/vendor/bourbon/helpers/_shape-size-stripper.scss b/public/scss/vendor/bourbon/helpers/_shape-size-stripper.scss deleted file mode 100755 index ee5eda422..000000000 --- a/public/scss/vendor/bourbon/helpers/_shape-size-stripper.scss +++ /dev/null @@ -1,10 +0,0 @@ -@function _shape-size-stripper($shape-size) { - $shape-size-spec: null; - @each $value in $shape-size { - @if ($value == "cover") or ($value == "contain") { - $value: null; - } - $shape-size-spec: "#{$shape-size-spec} #{$value}"; - } - @return $shape-size-spec; -} diff --git a/public/scss/vendor/foundation/_alert-boxes.scss b/public/scss/vendor/foundation/_alert-boxes.scss deleted file mode 100755 index 01c536025..000000000 --- a/public/scss/vendor/foundation/_alert-boxes.scss +++ /dev/null @@ -1,107 +0,0 @@ -// -// Alert Box Variables -// -$include-html-alert-classes: $include-html-classes !default; - -// We use this to control alert padding. -$alert-padding-top: em-calc(11) !default; -$alert-padding-default-float: $alert-padding-top !default; -$alert-padding-opposite-direction: $alert-padding-top + em-calc(10) !default; -$alert-padding-bottom: $alert-padding-top + em-calc(1) !default; - -// We use these to control text style. -$alert-font-weight: bold !default; -$alert-font-size: em-calc(14) !default; -$alert-font-color: #fff !default; -$alert-font-color-alt: darken($secondary-color, 60%) !default; - -// We use this for close hover effect. -$alert-function-factor: 10% !default; - -// We use these to control border styles. -$alert-border-style: solid !default; -$alert-border-width: 1px !default; -$alert-border-color: darken($primary-color, $alert-function-factor) !default; -$alert-bottom-margin: em-calc(20) !default; - -// We use these to style the close buttons -$alert-close-color: #333 !default; -$alert-close-position: em-calc(5) !default; -$alert-close-font-size: em-calc(22) !default; -$alert-close-opacity: 0.3 !default; -$alert-close-opacity-hover: 0.5 !default; -$alert-close-padding: 5px 4px 4px !default; - -// We use this to control border radius -$alert-radius: $global-radius !default; - -// -// Alert Mixins -// - -// We use this mixin to create a default alert base. -@mixin alert-base { - border-style: $alert-border-style; - border-width: $alert-border-width; - display: block; - font-weight: $alert-font-weight; - margin-bottom: $alert-bottom-margin; - position: relative; - padding: $alert-padding-top $alert-padding-opposite-direction $alert-padding-bottom $alert-padding-default-float; - font-size: $alert-font-size; -} - -// We use this mixin to add alert styles -@mixin alert-style($bg:$primary-color) { - - // This find the lightness percentage of the background color. - $bg-lightness: lightness($bg); - - // We control which background color and border come through. - background-color: $bg; - border-color: darken($bg, $alert-function-factor); - - // We control the text color for you based on the background color. - @if $bg-lightness > 70% { color: $alert-font-color-alt; } - @else { color: $alert-font-color; } - -} - -// We use this to create the close button. -@mixin alert-close { - font-size: $alert-close-font-size; - padding: $alert-close-padding; - line-height: 0; - position: absolute; - top: $alert-close-position + em-calc(2); - #{$opposite-direction}: $alert-close-position; - color: $alert-close-color; - opacity: $alert-close-opacity; - &:hover, - &:focus { opacity: $alert-close-opacity-hover; } -} - -// We use this to quickly create alerts with a single mixin. -@mixin alert($bg:$primary-color, $radius:false) { - @include alert-base; - @include alert-style($bg); - @include radius($radius); -} - -@if $include-html-alert-classes != false { - - /* Foundation Alerts */ - .alert-box { - @include alert; - - .close { @include alert-close; } - - &.radius { @include radius($alert-radius); } - &.round { @include radius($global-rounded); } - - &.success { @include alert-style($success-color); } - &.alert { @include alert-style($alert-color); } - &.secondary { @include alert-style($secondary-color); } - } - -} diff --git a/public/scss/vendor/foundation/_block-grid.scss b/public/scss/vendor/foundation/_block-grid.scss deleted file mode 100755 index 4b1474ab9..000000000 --- a/public/scss/vendor/foundation/_block-grid.scss +++ /dev/null @@ -1,71 +0,0 @@ -// -// Block Grid Variables -// -$include-html-grid-classes: $include-html-classes !default; - -// We use this to control the maximum number of block grid elements per row -$block-grid-elements: 12 !default; -$block-grid-default-spacing: em-calc(20) !default; - -// Enables media queries for block-grid classes. Set to false if writing semantic HTML. -$block-grid-media-queries: true !default; - -// -// Block Grid Mixins -// - -// We use this mixin to create different block-grids. You can apply per-row and spacing options. -// Setting $base-style to false will ommit default styles. -@mixin block-grid($per-row:false, $spacing:$block-grid-default-spacing, $base-style:true) { - - @if $base-style { - display: block; - padding: 0; - margin: 0 (-$spacing/2); - @include clearfix; - - &>li { - display: inline; - height: auto; - float: $default-float; - padding: 0 ($spacing/2) $spacing; - } - } - - @if $per-row { - &>li { - width: 100%/$per-row; - padding: 0 ($spacing/2) $spacing; - - &:nth-of-type(n) { clear: none; } - &:nth-of-type(#{$per-row}n+1) { clear: both; } - } - } - -} - -@if $include-html-grid-classes { - /* Foundation Block Grids for below small breakpoint */ - @media only screen { - [class*="block-grid-"] { @include block-grid; } - - @for $i from 1 through $block-grid-elements { - .small-block-grid-#{($i)} { - @include block-grid($i,$block-grid-default-spacing,false); - } - } - } - - /* Foundation Block Grids for above small breakpoint */ - @media #{$small} { - /* Remove small grid clearing */ - @for $i from 1 through $block-grid-elements { - .small-block-grid-#{($i)} > li:nth-of-type(#{$i}n+1) { clear: none; } - } - @for $i from 1 through $block-grid-elements { - .large-block-grid-#{($i)} { - @include block-grid($i,$block-grid-default-spacing,false); - } - } - } -} diff --git a/public/scss/vendor/foundation/_breadcrumbs.scss b/public/scss/vendor/foundation/_breadcrumbs.scss deleted file mode 100755 index 24b42246a..000000000 --- a/public/scss/vendor/foundation/_breadcrumbs.scss +++ /dev/null @@ -1,124 +0,0 @@ -// -// Breadcrumb Variables -// -$include-html-nav-classes: $include-html-classes !default; - -// We use this to set the background color for the breadcrumb container. -$crumb-bg: lighten($secondary-color, 5%) !default; - -// We use these to set the padding around the breadcrumbs. -$crumb-padding: em-calc(9 14 9) !default; -$crumb-side-padding: em-calc(12) !default; - -// We use these to control border styles. -$crumb-function-factor: 10% !default; -$crumb-border-size: 1px !default; -$crumb-border-style: solid !default; -$crumb-border-color: darken($crumb-bg, $crumb-function-factor) !default; -$crumb-radius: $global-radius !default; - -// We use these to set various text styles for breadcrumbs. -$crumb-font-size: em-calc(11) !default; -$crumb-font-color: $primary-color !default; -$crumb-font-color-current: #333 !default; -$crumb-font-color-unavailable: #999 !default; -$crumb-font-transform: uppercase !default; -$crumb-link-decor: underline !default; - -// We use these to control the slash between breadcrumbs -$crumb-slash-color: #aaa !default; -$crumb-slash: "/" !default; - -// -// Breakcrumb Mixins -// - -// We use this mixin to create a container around our breadcrumbs -@mixin crumb-container { - display: block; - padding: $crumb-padding; - overflow: hidden; - margin-#{$default-float}: 0; - list-style: none; - border-style: $crumb-border-style; - border-width: $crumb-border-size; - - // We control which background color and border come through. - background-color: $crumb-bg; - border-color: $crumb-border-color; -} - -// We use this mixin to create breadcrumb styles from list items. -@mixin crumbs { - - // A normal state will make the links look and act like clickable breadcrumbs. - margin: 0; - float: $default-float; - font-size: $crumb-font-size; - text-transform: $crumb-font-transform; - - &:hover a, &:focus a { text-decoration: $crumb-link-decor; } - - a, - span { - text-transform: $crumb-font-transform; - color: $crumb-font-color; - } - - // Current is for the link of the current page - &.current { - cursor: $cursor-default-value; - color: $crumb-font-color-current; - a { - cursor: $cursor-default-value; - color: $crumb-font-color-current; - } - - &:hover, &:hover a, - &:focus, &:focus a { text-decoration: none; } - } - - // Unavailable removed color and link styles so it looks inactive. - &.unavailable { - color: $crumb-font-color-unavailable; - a { color: $crumb-font-color-unavailable; } - - &:hover, - &:hover a, - &:focus, - a:focus { - text-decoration: none; - color: $crumb-font-color-unavailable; - cursor: $cursor-default-value; - } - } - - &:before { - content: "#{$crumb-slash}"; - color: $crumb-slash-color; - margin: 0 $crumb-side-padding; - position: relative; - top: 1px; - } - - &:first-child:before { - content: " "; - margin: 0; - } - -} - - -@if $include-html-nav-classes != false { - - /* Breadcrumbs */ - .breadcrumbs { - @include crumb-container; - @include radius($crumb-radius); - - &>* { - @include crumbs; - } - } - -} diff --git a/public/scss/vendor/foundation/_button-groups.scss b/public/scss/vendor/foundation/_button-groups.scss deleted file mode 100755 index d35e05ad9..000000000 --- a/public/scss/vendor/foundation/_button-groups.scss +++ /dev/null @@ -1,89 +0,0 @@ -// -// Button Group Variables -// -$include-html-button-classes: $include-html-classes !default; - -// Sets the margin for the right side by default, and the left margin if right-to-left direction is used -$button-bar-margin-opposite: em-calc(10) !default; - -// -// Button Group Mixins -// - -// We use this to add styles for a button group container -@mixin button-group-container($styles:true, $float:false) { - @if $styles { - list-style: none; - margin: 0; - @include clearfix(); - } - @if $float { - float: #{$default-float}; - margin-#{$opposite-direction}: $button-bar-margin-opposite; - & div { overflow: hidden; } - } -} - -// We use this to control styles for button groups -@mixin button-group-style($radius:false, $even:false, $float:$default-float) { - - // We use this to control the flow, or remove those styles completely. - @if $float { - margin: 0 0 0 (-$button-border-width); - float: $float; - // Make sure the first child doesn't get the negative margin. - &:first-child { margin-#{$default-float}: 0; } - } - - // We use these to control left and right radius on first/last buttons in the group. - @if $radius == true { - &:first-child, - &:first-child > a, - &:first-child > button, - &:first-child > .button { @include side-radius($default-float, $button-radius); } - &:last-child, - &:last-child > a, - &:last-child > button, - &:last-child > .button { @include side-radius($opposite-direction, $button-radius); } - } - @else if $radius { - &:first-child, - &:first-child > a, - &:first-child > button, - &:first-child > .button { @include side-radius($default-float, $radius); } - &:last-child, - &:last-child > a, - &:last-child > button, - &:last-child > .button { @include side-radius($opposite-direction, $radius); } - } - - // We use this to make the buttons even width across their container - @if $even { - width: percentage((100/$even) / 100); - button, .button { width: 100%; } - } - -} - -// Only include these CSS classes if $include-html-classes: true -@if $include-html-button-classes != false { - - /* Button Groups */ - .button-group { @include button-group-container; - - &> * { @include button-group-style(); } - - &.radius > * { @include button-group-style($radius:$button-radius, $float:null); } - &.round > * { @include button-group-style($radius:$button-round, $float:null); } - - @for $i from 2 through 8 { - &.even#{-$i} li { @include button-group-style($even:$i, $float:null); } - } - } - - .button-bar { - @include clearfix; - .button-group { @include button-group-container($styles:false,$float:true); } - } - -} diff --git a/public/scss/vendor/foundation/_buttons.scss b/public/scss/vendor/foundation/_buttons.scss deleted file mode 100755 index c5954ad82..000000000 --- a/public/scss/vendor/foundation/_buttons.scss +++ /dev/null @@ -1,230 +0,0 @@ -// -// Button Variables -// -$include-html-button-classes: $include-html-classes !default; - -// We use these to build padding for buttons. -$button-med: em-calc(12) !default; -$button-tny: em-calc(7) !default; -$button-sml: em-calc(9) !default; -$button-lrg: em-calc(16) !default; - -// We use this to control the display property. -$button-display: inline-block !default; -$button-margin-bottom: em-calc(20) !default; - -// We use these to control button text styles. -$button-font-family: inherit !default; -$button-font-color: #fff !default; -$button-font-color-alt: #333 !default; -$button-font-med: em-calc(16) !default; -$button-font-tny: em-calc(11) !default; -$button-font-sml: em-calc(13) !default; -$button-font-lrg: em-calc(20) !default; -$button-font-weight: bold !default; -$button-font-align: center !default; - -// We use these to control various hover effects. -$button-function-factor: 10% !default; - -// We use these to control button border styles. -$button-border-width: 1px !default; -$button-border-style: solid !default; - -// We use this to set the default radius used throughout the core. -$button-radius: $global-radius !default; -$button-round: $global-rounded !default; - -// We use this to set default opacity for disabled buttons. -$button-disabled-opacity: 0.6 !default; - - -// -// Button Mixins -// - -// We use this mixin to create a default button base. -@mixin button-base($style:true, $display:$button-display) { - @if $style { - border-style: $button-border-style; - border-width: $button-border-width; - cursor: $cursor-pointer-value; - font-family: $button-font-family; - font-weight: $button-font-weight; - line-height: normal; - margin: 0 0 $button-margin-bottom; - position: relative; - text-decoration: none; - text-align: $button-font-align; - } - @if $display { display: $display; } -} - -// We use this mixin to add button size styles -@mixin button-size($padding:$button-med, $full-width:false, $is-input:false) { - - // We control which padding styles come through, - // these can be turned off by setting $padding:false - @if $padding { - padding-top: $padding; - padding-#{$opposite-direction}: $padding * 2; - padding-bottom: $padding + em-calc(1); - padding-#{$default-float}: $padding * 2; - - // We control the font-size based on mixin input. - @if $padding == $button-med { font-size: $button-font-med; } - @else if $padding == $button-tny { font-size: $button-font-tny; } - @else if $padding == $button-sml { font-size: $button-font-sml; } - @else if $padding == $button-lrg { font-size: $button-font-lrg; } - @else { font-size: $padding - em-calc(2); } - } - - // We can set $full-width:true to remove side padding extend width. - @if $full-width { - // We still need to check if $padding is set. - @if $padding { - padding-top: $padding; - padding-bottom: $padding + em-calc(1); - } @else if $padding == false { - padding-top:0; - padding-bottom:0; - } - padding-right: 0; - padding-left: 0; - width: 100%; - } - - // 's and - - -
        -

        Please note that all pasted data is publicly available.

        - - @include('bin._cartalyst-ad') -
        - -
        -
        -{{{ $paste->code }}}
        -        
        -
        -@stop diff --git a/resources/views/chat/index.blade.php b/resources/views/chat/index.blade.php deleted file mode 100644 index 82aa383c1..000000000 --- a/resources/views/chat/index.blade.php +++ /dev/null @@ -1,9 +0,0 @@ -@extends('layouts.default', ['pageTitle' => 'Live Chat']) - -@section('table') -

        #Laravel IRC Chat

        - - - Search the chat logs to see if your question has already been answered.You can use your own IRC client at Freenode.net in #Laravel.
        - Channel Moderators are: TaylorOtwell, ShawnMcCool, PhillSparks, daylerees, JasonLewis, machuga and JesseOBrien. -@stop diff --git a/resources/views/emails/confirmation.blade.php b/resources/views/emails/confirmation.blade.php deleted file mode 100644 index c87281e41..000000000 --- a/resources/views/emails/confirmation.blade.php +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - -

        Verify your email address for your Laravel.io account

        - -

        - Thanks for creating an account on Laravel.io.
        - Please follow the link below to verify your email address -

        -

        {{ route('auth.confirm', $confirmationCode) }}

        - - - diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php index 0380666a8..4a4150592 100644 --- a/resources/views/errors/503.blade.php +++ b/resources/views/errors/503.blade.php @@ -3,7 +3,7 @@ Be right back. - + + + + 'margin: 0; padding: 0; width: 100%; background-color: #F2F4F6;', + 'email-wrapper' => 'width: 100%; margin: 0; padding: 0; background-color: #F2F4F6;', + + /* Masthead ----------------------- */ + + 'email-masthead' => 'padding: 25px 0; text-align: center;', + 'email-masthead_name' => 'font-size: 16px; font-weight: bold; color: #2F3133; text-decoration: none; text-shadow: 0 1px 0 white;', + + 'email-body' => 'width: 100%; margin: 0; padding: 0; border-top: 1px solid #EDEFF2; border-bottom: 1px solid #EDEFF2; background-color: #FFF;', + 'email-body_inner' => 'width: auto; max-width: 570px; margin: 0 auto; padding: 0;', + 'email-body_cell' => 'padding: 35px;', + + 'email-footer' => 'width: auto; max-width: 570px; margin: 0 auto; padding: 0; text-align: center;', + 'email-footer_cell' => 'color: #AEAEAE; padding: 35px; text-align: center;', + + /* Body ------------------------------ */ + + 'body_action' => 'width: 100%; margin: 30px auto; padding: 0; text-align: center;', + 'body_sub' => 'margin-top: 25px; padding-top: 25px; border-top: 1px solid #EDEFF2;', + + /* Type ------------------------------ */ + + 'anchor' => 'color: #3869D4;', + 'header-1' => 'margin-top: 0; color: #2F3133; font-size: 19px; font-weight: bold; text-align: left;', + 'paragraph' => 'margin-top: 0; color: #74787E; font-size: 16px; line-height: 1.5em;', + 'paragraph-sub' => 'margin-top: 0; color: #74787E; font-size: 12px; line-height: 1.5em;', + 'paragraph-center' => 'text-align: center;', + + /* Buttons ------------------------------ */ + + 'button' => 'display: block; display: inline-block; width: 200px; min-height: 20px; padding: 10px; + background-color: #3869D4; border-radius: 3px; color: #ffffff; font-size: 15px; line-height: 25px; + text-align: center; text-decoration: none; -webkit-text-size-adjust: none;', + + 'button--green' => 'background-color: #22BC66;', + 'button--red' => 'background-color: #dc4d2f;', + 'button--blue' => 'background-color: #3869D4;', +]; +?> + + + + + + + + +
        + + + + + + + + + + + + + + + +
        + + {{ config('app.name') }} + +
        + + + + +
        + +

        + @if (! empty($greeting)) + {{ $greeting }} + @else + @if ($level == 'error') + Whoops! + @else + Hello! + @endif + @endif +

        + + + @foreach ($introLines as $line) +

        + {{ $line }} +

        + @endforeach + + + @if (isset($actionText)) + + + + +
        + + + + {{ $actionText }} + +
        + @endif + + + @foreach ($outroLines as $line) +

        + {{ $line }} +

        + @endforeach + + +

        + Regards,
        {{ config('app.name') }} +

        + + + @if (isset($actionText)) + + + + +
        +

        + If you’re having trouble clicking the "{{ $actionText }}" button, + copy and paste the URL below into your web browser: +

        + +

        + + {{ $actionUrl }} + +

        +
        + @endif +
        +
        + + + + +
        +

        + © {{ date('Y') }} + {{ config('app.name') }}. + All rights reserved. +

        +
        +
        +
        + + diff --git a/resources/views/vendor/pagination/bootstrap-4.blade.php b/resources/views/vendor/pagination/bootstrap-4.blade.php new file mode 100644 index 000000000..3f984557b --- /dev/null +++ b/resources/views/vendor/pagination/bootstrap-4.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) +
          + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) +
        • «
        • + @else +
        • + @endif + + {{-- Pagination Elements --}} + @foreach ($elements as $element) + {{-- "Three Dots" Separator --}} + @if (is_string($element)) +
        • {{ $element }}
        • + @endif + + {{-- Array Of Links --}} + @if (is_array($element)) + @foreach ($element as $page => $url) + @if ($page == $paginator->currentPage()) +
        • {{ $page }}
        • + @else +
        • {{ $page }}
        • + @endif + @endforeach + @endif + @endforeach + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) +
        • + @else +
        • »
        • + @endif +
        +@endif diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/default.blade.php new file mode 100644 index 000000000..4e795ff41 --- /dev/null +++ b/resources/views/vendor/pagination/default.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) +
          + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) +
        • «
        • + @else +
        • + @endif + + {{-- Pagination Elements --}} + @foreach ($elements as $element) + {{-- "Three Dots" Separator --}} + @if (is_string($element)) +
        • {{ $element }}
        • + @endif + + {{-- Array Of Links --}} + @if (is_array($element)) + @foreach ($element as $page => $url) + @if ($page == $paginator->currentPage()) +
        • {{ $page }}
        • + @else +
        • {{ $page }}
        • + @endif + @endforeach + @endif + @endforeach + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) +
        • + @else +
        • »
        • + @endif +
        +@endif diff --git a/resources/views/vendor/pagination/simple-bootstrap-4.blade.php b/resources/views/vendor/pagination/simple-bootstrap-4.blade.php new file mode 100644 index 000000000..98653d31a --- /dev/null +++ b/resources/views/vendor/pagination/simple-bootstrap-4.blade.php @@ -0,0 +1,17 @@ +@if ($paginator->hasPages()) +
          + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) +
        • «
        • + @else +
        • + @endif + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) +
        • + @else +
        • »
        • + @endif +
        +@endif diff --git a/resources/views/vendor/pagination/simple-default.blade.php b/resources/views/vendor/pagination/simple-default.blade.php new file mode 100644 index 000000000..cf53b8971 --- /dev/null +++ b/resources/views/vendor/pagination/simple-default.blade.php @@ -0,0 +1,17 @@ +@if ($paginator->hasPages()) +
          + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) +
        • «
        • + @else +
        • + @endif + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) +
        • + @else +
        • »
        • + @endif +
        +@endif From 5d2c92dc65ed524275603d2349cd184a1c3f2e87 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 18 Nov 2016 23:17:35 +0100 Subject: [PATCH 095/288] Update gitignore --- .gitignore | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 58f3280fe..5e73de6cf 100755 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,11 @@ .DS_Store -/.idea -/vendor /node_modules -Homestead.yaml +/public/storage +/storage/*.key +/vendor +/.idea Homestead.json +Homestead.yaml .env /public/build /public/css From 647aa1de990be3f6f0ef80f920c48bbc1262d946 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 13:23:40 +0100 Subject: [PATCH 096/288] Move jobs nav item --- resources/views/layouts/_nav.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/layouts/_nav.blade.php b/resources/views/layouts/_nav.blade.php index 58921b7e6..1fb936e5c 100644 --- a/resources/views/layouts/_nav.blade.php +++ b/resources/views/layouts/_nav.blade.php @@ -15,6 +15,7 @@
      10. Forum
      11. Pastebin
      12. Chat
      13. +
      14. Jobs
      15. About
      16. Laravel
      17. Laracasts
      18. -
      19. Larajobs
      20. Laravel News
      21. Podcast
      22. From deec1d8255d54864614d959494cdf02265acbfc2 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 13:25:20 +0100 Subject: [PATCH 097/288] Add command to run specs --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index be26dde14..ac6be5b13 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,8 @@ "Illuminate\\Foundation\\ComposerScripts::postUpdate", "php artisan optimize" ], - "test": "phpunit" + "test": "phpunit", + "specs": "phpspec run" }, "config": { "preferred-install": "dist", From 59e0c22ce6d3298863b80bf32d3751003a61c79e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 13:25:29 +0100 Subject: [PATCH 098/288] Improve GithubUser --- app/Social/GithubUser.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Social/GithubUser.php b/app/Social/GithubUser.php index fbbc549b7..656ff4ee6 100644 --- a/app/Social/GithubUser.php +++ b/app/Social/GithubUser.php @@ -41,10 +41,10 @@ private function get($name) public function toArray(): array { return [ - 'id' => $this->attributes['id'], - 'name' => $this->attributes['name'], - 'email' => $this->attributes['email'], - 'username' => $this->attributes['login'], + 'id' => $this->get('id'), + 'name' => $this->get('name'), + 'email' => $this->get('email'), + 'username' => $this->get('login'), ]; } } From 76e815e348487b56ef9aa7174501f507f93a3835 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 13:39:12 +0100 Subject: [PATCH 099/288] Require latest laravel collective html version --- composer.json | 2 +- composer.lock | 23 ++++++++--------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index ac6be5b13..1786a34dc 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "guzzlehttp/guzzle": "^6.2", "laravel/framework": "5.3.*", "laravel/socialite": "^2.0", - "laravelcollective/html": "^5.2@dev", + "laravelcollective/html": "^5.3", "league/commonmark": "^0.15.1", "tijsverkoyen/akismet": "^1.1" }, diff --git a/composer.lock b/composer.lock index c10218daa..c1449b383 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "0e6b6c1f1de5bbb44d2c2730c2fa2ea2", - "content-hash": "2a6354fa4c869e82f117c15bafac8f32", + "hash": "74cfdbb6263c542424c88a0158be6590", + "content-hash": "1502f5a7a43df7b3668da5d6c86cac12", "packages": [ { "name": "bugsnag/bugsnag", @@ -945,16 +945,16 @@ }, { "name": "laravelcollective/html", - "version": "dev-master", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/LaravelCollective/html.git", - "reference": "c4c87916c34e04aa9d4e860315ab1858304d786a" + "reference": "961ce141c16c6b085128f209496c26efd3e681ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LaravelCollective/html/zipball/c4c87916c34e04aa9d4e860315ab1858304d786a", - "reference": "c4c87916c34e04aa9d4e860315ab1858304d786a", + "url": "https://api.github.com/repos/LaravelCollective/html/zipball/961ce141c16c6b085128f209496c26efd3e681ca", + "reference": "961ce141c16c6b085128f209496c26efd3e681ca", "shasum": "" }, "require": { @@ -971,11 +971,6 @@ "phpunit/phpunit": "~5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.3-dev" - } - }, "autoload": { "psr-4": { "Collective\\Html\\": "src/" @@ -1000,7 +995,7 @@ ], "description": "HTML and Form Builders for the Laravel Framework", "homepage": "http://laravelcollective.com", - "time": "2016-08-04 03:49:50" + "time": "2016-08-27 23:52:43" }, { "name": "league/commonmark", @@ -4794,9 +4789,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "laravelcollective/html": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From f2d67075527998ac196b56194ccd9ef59e52a2d3 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 13:39:20 +0100 Subject: [PATCH 100/288] Remove uri property --- tests/RequiresLogin.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/RequiresLogin.php b/tests/RequiresLogin.php index 92f91c981..7074f8a9a 100644 --- a/tests/RequiresLogin.php +++ b/tests/RequiresLogin.php @@ -4,11 +4,6 @@ trait RequiresLogin { - /** - * @var string - */ - protected $uri = '/'; - /** @test */ function requires_login() { From 8af06a484963aea2dce0b5aa67bb5e542336084e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 13:45:20 +0100 Subject: [PATCH 101/288] Clean up stuff --- .env.example | 5 --- app/helpers.php | 8 ++-- config/services.php | 7 ---- resources/views/forum/overview.blade.php | 18 ++++---- resources/views/forum/threads/show.blade.php | 44 ++++++++++---------- resources/views/layouts/_snappy.blade.php | 17 -------- resources/views/layouts/base.blade.php | 1 - 7 files changed, 32 insertions(+), 68 deletions(-) delete mode 100644 resources/views/layouts/_snappy.blade.php diff --git a/.env.example b/.env.example index 0521d2215..f90a37da6 100644 --- a/.env.example +++ b/.env.example @@ -22,8 +22,3 @@ MAIL_ENCRYPTION=null GITHUB_ID= GITHUB_SECRET= GITHUB_URL= - -SNAPPY_ENABLED=false -SNAPPY_DEBUG=true -SNAPPY_EMBED_URL= -SNAPPY_DOMAIN= diff --git a/app/helpers.php b/app/helpers.php index 799f31a5e..956a43655 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -1,7 +1,5 @@ toHtml($markdown); + return app(App\Markdown\Converter::class)->toHtml($markdown); } } @@ -26,9 +24,9 @@ function md_to_html(string $markdown): string /** * Returns the route for the replyAble. */ - function route_to_reply_able(ReplyAble $replyAble): string + function route_to_reply_able(App\Replies\ReplyAble $replyAble): string { - if ($replyAble instanceof \App\Forum\Thread) { + if ($replyAble instanceof App\Forum\Thread) { return route('thread', $replyAble->slug()); } } diff --git a/config/services.php b/config/services.php index 76f244967..4cebf93ba 100644 --- a/config/services.php +++ b/config/services.php @@ -41,13 +41,6 @@ 'redirect' => env('GITHUB_URL'), ], - 'snappy' => [ - 'enabled' => env('SNAPPY_ENABLED', false), - 'debug' => env('SNAPPY_DEBUG', false), - 'embed_url' => env('SNAPPY_EMBED_URL'), - 'domain' => env('SNAPPY_DOMAIN'), - ], - 'akismet' => [ 'api_key' => env('AKISMET_API_KEY'), ], diff --git a/resources/views/forum/overview.blade.php b/resources/views/forum/overview.blade.php index c50ddbe38..8201d7590 100644 --- a/resources/views/forum/overview.blade.php +++ b/resources/views/forum/overview.blade.php @@ -19,16 +19,14 @@ @endforeach @endif - @if (count($threads)) - @foreach ($threads as $thread) -

        {{ $thread->subject() }}

        -

        - Topic: {{ $thread->topic()->name() }} | - {{ $thread->createdAt()->diffForHumans() }} | - {{ count($thread->replies()) }} replies -

        - @endforeach - @endif + @foreach ($threads as $thread) +

        {{ $thread->subject() }}

        +

        + Topic: {{ $thread->topic()->name() }} | + {{ $thread->createdAt()->diffForHumans() }} | + {{ count($thread->replies()) }} replies +

        + @endforeach
        {!! $threads->render() !!} diff --git a/resources/views/forum/threads/show.blade.php b/resources/views/forum/threads/show.blade.php index a50e6e5db..82729ca6f 100644 --- a/resources/views/forum/threads/show.blade.php +++ b/resources/views/forum/threads/show.blade.php @@ -21,31 +21,29 @@

        @endcan - @if (count($replies = $thread->replies())) - @foreach ($replies as $reply) -
        - @md($reply->body()) -

        By {{ $reply->author()->name() }} - {{ $reply->createdAt()->diffForHumans() }}

        - - @can('update', $reply) + @foreach ($thread->replies() as $reply) +
        + @md($reply->body()) +

        By {{ $reply->author()->name() }} - {{ $reply->createdAt()->diffForHumans() }}

        + + @can('update', $reply) +

        + Edit | + Delete +

        + @endcan + + @can('update', $thread) + @if ($thread->isSolutionReply($reply))

        - Edit | - Delete + This is the solution. + Unmark As Solution

        - @endcan - - @can('update', $thread) - @if ($thread->isSolutionReply($reply)) -

        - This is the solution. - Unmark As Solution -

        - @else -

        Mark As Solution

        - @endif - @endcan - @endforeach - @endif + @else +

        Mark As Solution

        + @endif + @endcan + @endforeach @if (Auth::check())
        diff --git a/resources/views/layouts/_snappy.blade.php b/resources/views/layouts/_snappy.blade.php deleted file mode 100644 index 506319036..000000000 --- a/resources/views/layouts/_snappy.blade.php +++ /dev/null @@ -1,17 +0,0 @@ -@if (config('services.snappy.enabled')) - -@endif diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 421bcd2fe..14d064720 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -25,6 +25,5 @@
        - @include('layouts._snappy') From ec076d39f367ef5b1310a79405723f8eede3a33b Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 13:51:44 +0100 Subject: [PATCH 102/288] Update readme --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 8684e09d3..81b455795 100644 --- a/readme.md +++ b/readme.md @@ -67,7 +67,7 @@ You can now visit the app in your browser by visiting [http://lio.loc/](http://l ## Maintainers -The Laravel.io portal is currently maintained by [Dries Vints](https://github.com/driesvints). If you have any questions please don't hesitate to contact us through the support widget on the [Laravel.io](http://laravel.io/) website. +The Laravel.io portal is currently maintained by [Dries Vints](https://github.com/driesvints). If you have any questions please don't hesitate to create an issue on this repo or ask us through the #laravelio channel on [Slack](https://larachat.slack.com). ## Contributing From 526588ad067d18bf6627b88595c5c2c7feb2d981 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 13:59:11 +0100 Subject: [PATCH 103/288] Update PhpSpec config file --- phpspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpspec.yml b/phpspec.yml index 7beed002b..d931e5030 100644 --- a/phpspec.yml +++ b/phpspec.yml @@ -1,5 +1,5 @@ suites: - lio: + app: namespace: App psr4_prefix: App src_path: app From 045142559fee908344e853b8f2f6f507027e1ef1 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 13:59:17 +0100 Subject: [PATCH 104/288] Update url --- contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing.md b/contributing.md index d595b71df..7139335ff 100644 --- a/contributing.md +++ b/contributing.md @@ -4,7 +4,7 @@ We welcome contributions to the Laravel.io project. Please read the following gu ## Pull Requests -- **Feature requests** first need to be discussed and accepted [through an issue](https://github.com/LaravelIO/laravel.io/issues/new) before sending in a pull request +- **Feature requests** first need to be discussed and accepted [through an issue](https://github.com/laravelio/laravel.io/issues/new) before sending in a pull request - **Bug fixes** should contain [regression tests](https://laracasts.com/lessons/regression-testing) - All pull requests should follow the [coding standards](#coding-standards) - Pull requests will be merged after being reviewed by [the maintainers](readme.md#maintainers) From 99ed8d4ae0dc9ef609e0f249c6741958ee16928e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 14:02:40 +0100 Subject: [PATCH 105/288] Comment --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 3e4dce6e0..0393c57b3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -23,7 +23,7 @@ Route::get('signup', 'RegisterController@redirectToRegistrationForm'); // BC for old links Route::post('register', ['as' => 'register.post', 'uses' => 'RegisterController@register']); - // Password reset link request + // Request password reset Route::get('password/reset', ['as' => 'password.forgot', 'uses' => 'ForgotPasswordController@showLinkRequestForm']); Route::post('password/email', ['as' => 'password.forgot.post', 'uses' => 'ForgotPasswordController@sendResetLinkEmail']); From 5fa2a74a5c234ab75df813bfe3f2aebc3ca53522 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 14:10:58 +0100 Subject: [PATCH 106/288] Remove todo --- app/Forum/EloquentThreadRepository.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/Forum/EloquentThreadRepository.php b/app/Forum/EloquentThreadRepository.php index 7ad14b3e7..4f1bcf152 100644 --- a/app/Forum/EloquentThreadRepository.php +++ b/app/Forum/EloquentThreadRepository.php @@ -46,8 +46,6 @@ public function create(User $author, Topic $topic, string $subject, string $body $thread = $this->model->newInstance(compact('subject', 'body')); $thread->authorRelation()->associate($author); $thread->topicRelation()->associate($topic); - - // Todo: Figure out what to do with these $thread->slug = $this->generateUniqueSlug($subject); $thread->ip = Arr::get($attributes, 'ip', ''); $thread->save(); From dabb7ff3bcb72d431a22a1be977c2813b7ea63ca Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 15:25:07 +0100 Subject: [PATCH 107/288] Improve spam detectors --- app/Forum/ThreadRequest.php | 4 +-- app/Replies/ReplyRequest.php | 2 +- app/Spam/AkismetSpamDetector.php | 4 +-- app/Spam/SpamRule.php | 29 ++++++++++++++++++++++ app/Spam/SpamServiceProvider.php | 31 +++++++++++++----------- app/Validation/DoesNotContainUrlRule.php | 2 +- resources/lang/en/validation.php | 1 + 7 files changed, 53 insertions(+), 20 deletions(-) create mode 100644 app/Spam/SpamRule.php diff --git a/app/Forum/ThreadRequest.php b/app/Forum/ThreadRequest.php index 7ccdfb408..4377b5de0 100644 --- a/app/Forum/ThreadRequest.php +++ b/app/Forum/ThreadRequest.php @@ -17,8 +17,8 @@ public function rules() { $rules = [ 'topic' => 'required|exists:topics,id', - 'subject' => 'required|not_contain_url', - 'body' => 'required', + 'subject' => 'required|not_contain_url|spam', + 'body' => 'required|spam', 'tags' => 'array', 'tags.*' => 'exists:tags,id', ]; diff --git a/app/Replies/ReplyRequest.php b/app/Replies/ReplyRequest.php index 35bd056ed..3651f5220 100644 --- a/app/Replies/ReplyRequest.php +++ b/app/Replies/ReplyRequest.php @@ -14,7 +14,7 @@ public function authorize() public function rules() { return [ - 'body' => 'required', + 'body' => 'required|spam', ]; } } diff --git a/app/Spam/AkismetSpamDetector.php b/app/Spam/AkismetSpamDetector.php index db98bddf7..fa784bede 100644 --- a/app/Spam/AkismetSpamDetector.php +++ b/app/Spam/AkismetSpamDetector.php @@ -19,8 +19,8 @@ public function __construct(Akismet $akismet) public function detectsSpam($value, User $user = null): bool { - $name = $user ? $user->name : null; - $email = $user ? $user->email : null; + $name = $user ? $user->name() : null; + $email = $user ? $user->emailAddress() : null; if (! $this->akismet->verifyKey()) { return false; diff --git a/app/Spam/SpamRule.php b/app/Spam/SpamRule.php new file mode 100644 index 000000000..ff20e9894 --- /dev/null +++ b/app/Spam/SpamRule.php @@ -0,0 +1,29 @@ +spamDetector = $spamDetector; + $this->guard = $guard; + } + + public function validate($attribute, $value): bool + { + return ! $this->spamDetector->detectsSpam($value, $this->guard->user()); + } +} diff --git a/app/Spam/SpamServiceProvider.php b/app/Spam/SpamServiceProvider.php index 1858496bf..c8695b7eb 100644 --- a/app/Spam/SpamServiceProvider.php +++ b/app/Spam/SpamServiceProvider.php @@ -4,30 +4,33 @@ use Illuminate\Support\ServiceProvider; use TijsVerkoyen\Akismet\Akismet; +use Validator; class SpamServiceProvider extends ServiceProvider { - public function register() + public function boot() { - $this->app->singleton(AkismetSpamDetector::class, function ($app) { - $config = $app['config']; - $apiKey = $config['services']['akismet']['api_key']; - $url = $config['app']['url']; - - return new AkismetSpamDetector(new Akismet($apiKey, $url)); - }); + Validator::extend('spam', SpamRule::class.'@validate'); + } - $this->app->singleton(SpamDetector::class, function ($app) { - return new SpamFilter([ + public function register() + { + $this->app->singleton(SpamDetector::class, function () { + $detectors = [ new PhoneNumberSpamDetector, new ForeignLanguageSpamDetector, - $app[AkismetSpamDetector::class] - ]); + ]; + + if ($apiKey = config('services.akismet.api_key')) { + $detectors[] = $this->akismetSpamDetector($apiKey); + } + + return new SpamFilter($detectors); }); } - public function provides() + private function akismetSpamDetector($apiKey): AkismetSpamDetector { - return [AkismetSpamDetector::class, SpamDetector::class]; + return new AkismetSpamDetector(new Akismet($apiKey, config('app.url'))); } } diff --git a/app/Validation/DoesNotContainUrlRule.php b/app/Validation/DoesNotContainUrlRule.php index 511fc67a5..e84224d48 100644 --- a/app/Validation/DoesNotContainUrlRule.php +++ b/app/Validation/DoesNotContainUrlRule.php @@ -16,7 +16,7 @@ public function __construct(Validator $validator) $this->validator = $validator; } - public function validate($attribute, $value) + public function validate($attribute, $value): bool { return ! collect(explode(' ', $value))->contains(function ($word) { return $this->validator diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index 98e4ea542..d9b3e8c76 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -84,6 +84,7 @@ 'not_contain_url' => 'The :attribute field cannot contain an url.', 'passcheck' => 'Your current password is incorrect.', 'recaptcha' => 'The captcha field is not correct.', + 'spam' => 'The :attribute field contains spam.', /* |-------------------------------------------------------------------------- From acc8311001e167624ebd6dc1e32420781910bb9e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 15:26:00 +0100 Subject: [PATCH 108/288] Add more keys to example.env --- .env.example | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.env.example b/.env.example index f90a37da6..41440e658 100644 --- a/.env.example +++ b/.env.example @@ -19,6 +19,11 @@ MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null +RECAPTCHA_PUBLIC_KEY= +RECAPTCHA_PRIVATE_KEY= + GITHUB_ID= GITHUB_SECRET= GITHUB_URL= + +AKISMET_API_KEY= From d22e582a9c4ab24ac6e5bd57ad17b8c78c1c30ee Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 15:48:17 +0100 Subject: [PATCH 109/288] Prevent banned users from using the app --- app/Http/Kernel.php | 2 ++ .../Middleware/RedirectIfAuthenticated.php | 5 ---- app/Http/Middleware/RedirectIfBanned.php | 25 +++++++++++++++++++ app/Http/Middleware/RedirectIfUnconfirmed.php | 5 ---- app/Users/EloquentUser.php | 5 ++++ app/Users/User.php | 1 + database/factories/ModelFactory.php | 1 + resources/lang/en/errors.php | 1 + tests/Features/AuthTest.php | 13 ++++++++++ 9 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 app/Http/Middleware/RedirectIfBanned.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index c323d93ae..79b66595e 100755 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -2,6 +2,7 @@ namespace App\Http; +use App\Http\Middleware\RedirectIfBanned; use Illuminate\Auth\Middleware\Authenticate; use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth; use Illuminate\Auth\Middleware\Authorize; @@ -43,6 +44,7 @@ class Kernel extends HttpKernel ShareErrorsFromSession::class, SubstituteBindings::class, VerifyCsrfToken::class, + RedirectIfBanned::class, ], 'api' => [ 'throttle:60,1', diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index b6563c11f..b1057a9f9 100755 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -7,11 +7,6 @@ class RedirectIfAuthenticated { - /** - * Handle an incoming request. - * - * @param \Illuminate\Http\Request $request - */ public function handle($request, Closure $next, string $guard = null) { if (Auth::guard($guard)->check()) { diff --git a/app/Http/Middleware/RedirectIfBanned.php b/app/Http/Middleware/RedirectIfBanned.php new file mode 100644 index 000000000..6596d3fa7 --- /dev/null +++ b/app/Http/Middleware/RedirectIfBanned.php @@ -0,0 +1,25 @@ +isBanned()) { + $this->error('errors.banned'); + + Auth::logout(); + + return redirect()->home(); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/RedirectIfUnconfirmed.php b/app/Http/Middleware/RedirectIfUnconfirmed.php index 4a3215722..97383f53b 100644 --- a/app/Http/Middleware/RedirectIfUnconfirmed.php +++ b/app/Http/Middleware/RedirectIfUnconfirmed.php @@ -10,11 +10,6 @@ class RedirectIfUnconfirmed { use SendsAlerts; - /** - * Handle an incoming request. - * - * @param \Illuminate\Http\Request $request - */ public function handle($request, Closure $next, string $guard = null) { if (Auth::user()->isUnconfirmed()) { diff --git a/app/Users/EloquentUser.php b/app/Users/EloquentUser.php index 508e644ae..ea1314bc4 100644 --- a/app/Users/EloquentUser.php +++ b/app/Users/EloquentUser.php @@ -83,6 +83,11 @@ public function isUnconfirmed(): bool return ! $this->isConfirmed(); } + public function isBanned(): bool + { + return (bool) $this->is_banned; + } + public function confirmationCode(): string { return (string) $this->confirmation_code; diff --git a/app/Users/User.php b/app/Users/User.php index 14f2a2bb0..70907e590 100644 --- a/app/Users/User.php +++ b/app/Users/User.php @@ -14,6 +14,7 @@ public function githubUsername(): string; public function gratavarUrl($size = 100): string; public function isConfirmed(): bool; public function isUnconfirmed(): bool; + public function isBanned(): bool; public function confirmationCode(): string; public function matchesConfirmationCode(string $code): bool; diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index 58fa309b4..f8850d0f1 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -31,6 +31,7 @@ 'github_id' => $faker->numberBetween(10000, 99999), 'github_url' => $faker->userName, 'ip' => $faker->ipv4, + 'is_banned' => false, ]; }); diff --git a/resources/lang/en/errors.php b/resources/lang/en/errors.php index a83a8e79e..fae19774a 100644 --- a/resources/lang/en/errors.php +++ b/resources/lang/en/errors.php @@ -2,6 +2,7 @@ return [ + 'banned' => 'This account is banned.', 'fields' => 'Something went wrong. Please review the fields below.', 'unconfirmed' => 'Please confirm your email address first.', diff --git a/tests/Features/AuthTest.php b/tests/Features/AuthTest.php index 3ccc6b73d..19f7f0513 100644 --- a/tests/Features/AuthTest.php +++ b/tests/Features/AuthTest.php @@ -126,6 +126,19 @@ function login_fails_when_password_is_incorrect() ->see('Incorrect login, please try again.'); } + /** @test */ + function login_fails_when_user_is_banned() + { + $this->createUser(['is_banned' => true]); + + $this->visit('/login') + ->type('johndoe', 'username') + ->type('password', 'password') + ->press('Login') + ->seePageIs('/') + ->see('This account is banned.'); + } + /** @test */ function users_can_logout() { From 0e75b2ca5c5873409b9fe29f94c35c2a2249fb8d Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 17:32:11 +0100 Subject: [PATCH 110/288] Greatly simplify things --- app/AppServiceProvider.php | 4 +- app/Auth/AuthServiceProvider.php | 8 +- app/Forum/EloquentThread.php | 82 ------------- app/Forum/EloquentThreadRepository.php | 115 ------------------ app/Forum/ForumServiceProvider.php | 16 --- app/Forum/Thread.php | 81 +++++++++--- app/Forum/ThreadRepository.php | 113 +++++++++++++++-- app/Forum/ThreadRequest.php | 2 - .../{Topics/EloquentTopic.php => Topic.php} | 8 +- ...opicRepository.php => TopicRepository.php} | 10 +- app/Forum/Topics/Topic.php | 19 --- app/Forum/Topics/TopicRepository.php | 14 --- .../BuildsModels.php | 6 +- app/{Eloquent => Helpers}/GeneratesSlugs.php | 2 +- app/{Alerts => Helpers}/SendsAlerts.php | 2 +- app/Http/Controllers/Controller.php | 2 +- .../Controllers/Forum/ThreadsController.php | 2 +- .../Controllers/Forum/TopicController.php | 2 +- app/Http/Controllers/ReplyController.php | 2 +- app/Http/Middleware/RedirectIfBanned.php | 2 +- app/Http/Middleware/RedirectIfUnconfirmed.php | 2 +- app/Http/Requests/Request.php | 2 +- app/Http/bindings.php | 2 +- app/ModelFactories/EloquentModelFactory.php | 58 --------- app/ModelFactories/InvalidModelException.php | 11 -- app/ModelFactories/ModelFactory.php | 9 -- .../ModelFactoryServiceProvider.php | 13 -- app/Replies/EloquentReply.php | 43 ------- app/Replies/EloquentReplyRepository.php | 47 ------- app/Replies/HasManyReplies.php | 4 +- app/Replies/Reply.php | 40 +++++- app/Replies/ReplyRepository.php | 44 ++++++- app/Replies/ReplyServiceProvider.php | 13 -- app/Replies/UsesReplies.php | 2 +- app/Tags/EloquentTag.php | 55 --------- app/Tags/EloquentTagRepository.php | 29 ----- app/Tags/Tag.php | 51 +++++++- app/Tags/TagRepository.php | 23 +++- app/Tags/TagServiceProvider.php | 13 -- app/Tags/UsesTags.php | 2 +- app/Users/EloquentUser.php | 100 --------------- app/Users/EloquentUserRepository.php | 88 -------------- app/Users/HasAuthor.php | 2 +- app/Users/SaveSettingsRequest.php | 2 +- app/Users/User.php | 104 +++++++++++++--- app/Users/UserRepository.php | 89 ++++++++++++-- app/Users/UserServiceProvider.php | 13 -- config/app.php | 5 - config/auth.php | 2 +- config/services.php | 2 +- database/factories/ModelFactory.php | 28 ++--- database/seeds/TagSeeder.php | 2 +- database/seeds/ThreadSeeder.php | 2 +- database/seeds/TopicSeeder.php | 4 +- database/seeds/UserSeeder.php | 2 +- .../Components/Forum/ThreadRepositoryTest.php | 2 +- tests/Features/ForumTest.php | 2 +- tests/Features/TagsTest.php | 2 +- tests/TestCase.php | 2 +- 59 files changed, 540 insertions(+), 868 deletions(-) delete mode 100644 app/Forum/EloquentThread.php delete mode 100644 app/Forum/EloquentThreadRepository.php delete mode 100644 app/Forum/ForumServiceProvider.php rename app/Forum/{Topics/EloquentTopic.php => Topic.php} (84%) rename app/Forum/{Topics/EloquentTopicRepository.php => TopicRepository.php} (64%) delete mode 100644 app/Forum/Topics/Topic.php delete mode 100644 app/Forum/Topics/TopicRepository.php rename app/{ModelFactories => Helpers}/BuildsModels.php (53%) rename app/{Eloquent => Helpers}/GeneratesSlugs.php (96%) rename app/{Alerts => Helpers}/SendsAlerts.php (95%) delete mode 100644 app/ModelFactories/EloquentModelFactory.php delete mode 100644 app/ModelFactories/InvalidModelException.php delete mode 100644 app/ModelFactories/ModelFactory.php delete mode 100644 app/ModelFactories/ModelFactoryServiceProvider.php delete mode 100644 app/Replies/EloquentReply.php delete mode 100644 app/Replies/EloquentReplyRepository.php delete mode 100644 app/Replies/ReplyServiceProvider.php delete mode 100644 app/Tags/EloquentTag.php delete mode 100644 app/Tags/EloquentTagRepository.php delete mode 100644 app/Tags/TagServiceProvider.php delete mode 100644 app/Users/EloquentUser.php delete mode 100644 app/Users/EloquentUserRepository.php delete mode 100644 app/Users/UserServiceProvider.php diff --git a/app/AppServiceProvider.php b/app/AppServiceProvider.php index 3050e6da7..87e6e4f81 100755 --- a/app/AppServiceProvider.php +++ b/app/AppServiceProvider.php @@ -2,7 +2,7 @@ namespace App; -use App\Forum\EloquentThread; +use App\Forum\Thread; use Auth; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Support\ServiceProvider; @@ -39,7 +39,7 @@ private function bootPasscheckValidationRule() private function bootEloquentMorphs() { Relation::morphMap([ - EloquentThread::TYPE => EloquentThread::class, + Thread::TABLE => Thread::class, ]); } } diff --git a/app/Auth/AuthServiceProvider.php b/app/Auth/AuthServiceProvider.php index 9eb8d5965..d5587ef5a 100644 --- a/app/Auth/AuthServiceProvider.php +++ b/app/Auth/AuthServiceProvider.php @@ -4,9 +4,9 @@ use Illuminate\Contracts\Auth\Access\Gate as GateContract; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; -use App\Forum\EloquentThread; +use App\Forum\Thread; use App\Forum\ThreadPolicy; -use App\Replies\EloquentReply; +use App\Replies\Reply; use App\Replies\ReplyPolicy; class AuthServiceProvider extends ServiceProvider @@ -17,8 +17,8 @@ class AuthServiceProvider extends ServiceProvider * @var array */ protected $policies = [ - EloquentReply::class => ReplyPolicy::class, - EloquentThread::class => ThreadPolicy::class, + Reply::class => ReplyPolicy::class, + Thread::class => ThreadPolicy::class, ]; /** diff --git a/app/Forum/EloquentThread.php b/app/Forum/EloquentThread.php deleted file mode 100644 index f50ef134c..000000000 --- a/app/Forum/EloquentThread.php +++ /dev/null @@ -1,82 +0,0 @@ -id; - } - - public function subject(): string - { - return $this->subject; - } - - public function body(): string - { - return $this->body; - } - - public function slug(): string - { - return $this->slug; - } - - public function topic(): Topic - { - return $this->topicRelation; - } - - public function topicRelation(): BelongsTo - { - return $this->belongsTo(EloquentTopic::class, 'topic_id'); - } - - /** - * @return \App\Replies\Reply|null - */ - public function solutionReply() - { - return $this->solutionReplyRelation; - } - - public function solutionReplyRelation(): BelongsTo - { - return $this->belongsTo(EloquentReply::class, 'solution_reply_id'); - } - - public function isSolutionReply(Reply $reply): bool - { - if ($solution = $this->solutionReply()) { - return $solution->id() === $reply->id(); - } - - return false; - } -} diff --git a/app/Forum/EloquentThreadRepository.php b/app/Forum/EloquentThreadRepository.php deleted file mode 100644 index 4f1bcf152..000000000 --- a/app/Forum/EloquentThreadRepository.php +++ /dev/null @@ -1,115 +0,0 @@ -model = $model; - } - - /** - * @return \App\Forum\Thread[]|\Illuminate\Contracts\Pagination\Paginator - */ - public function findAllPaginated() - { - return $this->model->orderBy('created_at', 'desc')->paginate(20); - } - - public function find(int $id): Thread - { - return $this->model->findOrFail($id); - } - - public function findBySlug(string $slug): Thread - { - return $this->model->where('slug', $slug)->firstOrFail(); - } - - public function create(User $author, Topic $topic, string $subject, string $body, array $attributes = []): Thread - { - $thread = $this->model->newInstance(compact('subject', 'body')); - $thread->authorRelation()->associate($author); - $thread->topicRelation()->associate($topic); - $thread->slug = $this->generateUniqueSlug($subject); - $thread->ip = Arr::get($attributes, 'ip', ''); - $thread->save(); - - $thread = $this->updateTags($thread, $attributes); - $thread->save(); - - return $thread; - } - - public function update(Thread $thread, array $attributes = []): Thread - { - $thread->update(Arr::only($attributes, ['subject', 'body'])); - - $thread->slug = $this->generateUniqueSlug($thread->subject(), $thread->id()); - $thread = $this->updateTopic($thread, $attributes); - $thread = $this->updateTags($thread, $attributes); - $thread->save(); - - return $thread; - } - - private function updateTopic(EloquentThread $thread, $attributes): EloquentThread - { - if ($topic = Arr::get($attributes, 'topic')) { - $thread->topicRelation()->associate($topic); - } - - return $thread; - } - - private function updateTags(EloquentThread $thread, array $attributes): EloquentThread - { - if ($tags = Arr::get($attributes, 'tags')) { - $thread->tagsRelation()->sync($attributes['tags']); - } - - return $thread; - } - - public function delete(Thread $thread) - { - $thread->delete(); - } - - public function markSolution(Reply $reply): Thread - { - $thread = $reply->replyAble(); - - if (! $thread instanceof EloquentThread) { - throw CouldNotMarkReplyAsSolution::replyAbleIsNotAThread($reply); - } - - $thread->solutionReplyRelation()->associate($reply); - $thread->save(); - - return $thread; - } - - public function unmarkSolution(Thread $thread): Thread - { - $thread->solutionReplyRelation()->dissociate(); - $thread->save(); - - return $thread; - } -} diff --git a/app/Forum/ForumServiceProvider.php b/app/Forum/ForumServiceProvider.php deleted file mode 100644 index bedd26f6a..000000000 --- a/app/Forum/ForumServiceProvider.php +++ /dev/null @@ -1,16 +0,0 @@ -app->bind(TopicRepository::class, EloquentTopicRepository::class); - $this->app->bind(ThreadRepository::class, EloquentThreadRepository::class); - } -} diff --git a/app/Forum/Thread.php b/app/Forum/Thread.php index d75468abe..5dcd666ff 100644 --- a/app/Forum/Thread.php +++ b/app/Forum/Thread.php @@ -3,29 +3,82 @@ namespace App\Forum; use App\DateTime\Timestamps; -use App\Forum\Topics\Topic; -use App\Replies\Reply; use App\Tags\Taggable; use App\Users\Authored; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use App\DateTime\HasTimestamps; +use App\Replies\Reply; +use App\Replies\UsesReplies; +use App\Replies\ReplyAble; +use App\Tags\UsesTags; +use App\Users\HasAuthor; -interface Thread extends Authored, Taggable, Timestamps +class Thread extends Model implements Authored, ReplyAble, Taggable, Timestamps { - const TYPE = 'threads'; + use HasAuthor, HasTimestamps, UsesReplies, UsesTags; - public function id(): int; - public function subject(): string; - public function body(): string; - public function slug(): string; - public function topic(): Topic; + const TABLE = 'threads'; /** - * @return \App\Replies\Reply|null + * @var string + */ + protected $table = self::TABLE; + + /** + * @var array */ - public function solutionReply(); - public function isSolutionReply(Reply $reply): bool; + protected $fillable = ['subject', 'body']; + + public function id(): int + { + return $this->id; + } + + public function subject(): string + { + return $this->subject; + } + + public function body(): string + { + return $this->body; + } + + public function slug(): string + { + return $this->slug; + } + + public function topic(): Topic + { + return $this->topicRelation; + } + + public function topicRelation(): BelongsTo + { + return $this->belongsTo(Topic::class, 'topic_id'); + } /** - * @return \App\Replies\Reply[] + * @return \App\Replies\Reply|null */ - public function replies(); + public function solutionReply() + { + return $this->solutionReplyRelation; + } + + public function solutionReplyRelation(): BelongsTo + { + return $this->belongsTo(Reply::class, 'solution_reply_id'); + } + + public function isSolutionReply(Reply $reply): bool + { + if ($solution = $this->solutionReply()) { + return $solution->id() === $reply->id(); + } + + return false; + } } diff --git a/app/Forum/ThreadRepository.php b/app/Forum/ThreadRepository.php index 4d4e3ab1c..6ea353ca9 100644 --- a/app/Forum/ThreadRepository.php +++ b/app/Forum/ThreadRepository.php @@ -2,22 +2,113 @@ namespace App\Forum; -use App\Forum\Topics\Topic; +use App\Forum\Exceptions\CouldNotMarkReplyAsSolution; +use App\Helpers\GeneratesSlugs; use App\Replies\Reply; use App\Users\User; +use Illuminate\Support\Arr; -interface ThreadRepository +class ThreadRepository { + use GeneratesSlugs; + + /** + * @var \App\Forum\Thread + */ + private $model; + + public function __construct(Thread $model) + { + $this->model = $model; + } + /** * @return \App\Forum\Thread[]|\Illuminate\Contracts\Pagination\Paginator */ - public function findAllPaginated(); - - public function find(int $id): Thread; - public function findBySlug(string $slug): Thread; - public function create(User $author, Topic $topic, string $subject, string $body, array $attributes = []): Thread; - public function update(Thread $thread, array $attributes = []): Thread; - public function delete(Thread $thread); - public function markSolution(Reply $reply): Thread; - public function unmarkSolution(Thread $thread): Thread; + public function findAllPaginated() + { + return $this->model->orderBy('created_at', 'desc')->paginate(20); + } + + public function find(int $id): Thread + { + return $this->model->findOrFail($id); + } + + public function findBySlug(string $slug): Thread + { + return $this->model->where('slug', $slug)->firstOrFail(); + } + + public function create(User $author, Topic $topic, string $subject, string $body, array $attributes = []): Thread + { + $thread = $this->model->newInstance(compact('subject', 'body')); + $thread->authorRelation()->associate($author); + $thread->topicRelation()->associate($topic); + $thread->slug = $this->generateUniqueSlug($subject); + $thread->ip = Arr::get($attributes, 'ip', ''); + $thread->save(); + + $thread = $this->updateTags($thread, $attributes); + $thread->save(); + + return $thread; + } + + public function update(Thread $thread, array $attributes = []): Thread + { + $thread->update(Arr::only($attributes, ['subject', 'body'])); + + $thread->slug = $this->generateUniqueSlug($thread->subject(), $thread->id()); + $thread = $this->updateTopic($thread, $attributes); + $thread = $this->updateTags($thread, $attributes); + $thread->save(); + + return $thread; + } + + private function updateTopic(Thread $thread, $attributes): Thread + { + if ($topic = Arr::get($attributes, 'topic')) { + $thread->topicRelation()->associate($topic); + } + + return $thread; + } + + private function updateTags(Thread $thread, array $attributes): Thread + { + if ($tags = Arr::get($attributes, 'tags')) { + $thread->tagsRelation()->sync($attributes['tags']); + } + + return $thread; + } + + public function delete(Thread $thread) + { + $thread->delete(); + } + + public function markSolution(Reply $reply): Thread + { + $thread = $reply->replyAble(); + + if (! $thread instanceof Thread) { + throw CouldNotMarkReplyAsSolution::replyAbleIsNotAThread($reply); + } + + $thread->solutionReplyRelation()->associate($reply); + $thread->save(); + + return $thread; + } + + public function unmarkSolution(Thread $thread): Thread + { + $thread->solutionReplyRelation()->dissociate(); + $thread->save(); + + return $thread; + } } diff --git a/app/Forum/ThreadRequest.php b/app/Forum/ThreadRequest.php index 4377b5de0..26c426431 100644 --- a/app/Forum/ThreadRequest.php +++ b/app/Forum/ThreadRequest.php @@ -2,8 +2,6 @@ namespace App\Forum; -use App\Forum\Topics\Topic; -use App\Forum\Topics\TopicRepository; use App\Http\Requests\Request; class ThreadRequest extends Request diff --git a/app/Forum/Topics/EloquentTopic.php b/app/Forum/Topic.php similarity index 84% rename from app/Forum/Topics/EloquentTopic.php rename to app/Forum/Topic.php index 208799f79..23b501c38 100644 --- a/app/Forum/Topics/EloquentTopic.php +++ b/app/Forum/Topic.php @@ -1,14 +1,14 @@ hasMany(EloquentThread::class, 'topic_id'); + return $this->hasMany(Thread::class, 'topic_id'); } } diff --git a/app/Forum/Topics/EloquentTopicRepository.php b/app/Forum/TopicRepository.php similarity index 64% rename from app/Forum/Topics/EloquentTopicRepository.php rename to app/Forum/TopicRepository.php index e65ce231f..8f29f177e 100644 --- a/app/Forum/Topics/EloquentTopicRepository.php +++ b/app/Forum/TopicRepository.php @@ -1,21 +1,21 @@ model = $model; } /** - * @return \App\Forum\Topics\Topic[] + * @return \App\Forum\Topic[] */ public function findAll() { diff --git a/app/Forum/Topics/Topic.php b/app/Forum/Topics/Topic.php deleted file mode 100644 index 2ddba8d45..000000000 --- a/app/Forum/Topics/Topic.php +++ /dev/null @@ -1,19 +0,0 @@ -make($model, $attributes); + return factory($model)->make($attributes); } public function create(string $model, array $attributes = [], int $times = 1) { - return app(ModelFactory::class)->create($model, $attributes, $times); + return factory($model, $times)->create($attributes); } } diff --git a/app/Eloquent/GeneratesSlugs.php b/app/Helpers/GeneratesSlugs.php similarity index 96% rename from app/Eloquent/GeneratesSlugs.php rename to app/Helpers/GeneratesSlugs.php index 9487f86e5..e88bfe88b 100644 --- a/app/Eloquent/GeneratesSlugs.php +++ b/app/Helpers/GeneratesSlugs.php @@ -1,6 +1,6 @@ threads->find($id); } diff --git a/app/Http/Middleware/RedirectIfBanned.php b/app/Http/Middleware/RedirectIfBanned.php index 6596d3fa7..c1b175a22 100644 --- a/app/Http/Middleware/RedirectIfBanned.php +++ b/app/Http/Middleware/RedirectIfBanned.php @@ -2,7 +2,7 @@ namespace App\Http\Middleware; -use App\Alerts\SendsAlerts; +use App\Helpers\SendsAlerts; use Auth; use Closure; diff --git a/app/Http/Middleware/RedirectIfUnconfirmed.php b/app/Http/Middleware/RedirectIfUnconfirmed.php index 97383f53b..30d324a6c 100644 --- a/app/Http/Middleware/RedirectIfUnconfirmed.php +++ b/app/Http/Middleware/RedirectIfUnconfirmed.php @@ -2,7 +2,7 @@ namespace App\Http\Middleware; -use App\Alerts\SendsAlerts; +use App\Helpers\SendsAlerts; use Auth; use Closure; diff --git a/app/Http/Requests/Request.php b/app/Http/Requests/Request.php index 9a44aabf9..9568ab735 100755 --- a/app/Http/Requests/Request.php +++ b/app/Http/Requests/Request.php @@ -4,7 +4,7 @@ use Illuminate\Contracts\Validation\Validator; use Illuminate\Foundation\Http\FormRequest; -use App\Alerts\SendsAlerts; +use App\Helpers\SendsAlerts; abstract class Request extends FormRequest { diff --git a/app/Http/bindings.php b/app/Http/bindings.php index f6e041859..25e752a99 100644 --- a/app/Http/bindings.php +++ b/app/Http/bindings.php @@ -1,7 +1,7 @@ EloquentReply::class, - Tag::class => EloquentTag::class, - Topic::class => EloquentTopic::class, - Thread::class => EloquentThread::class, - User::class => EloquentUser::class, - ]; - - /** - * @var \Illuminate\Database\Eloquent\Factory - */ - private $factory; - - public function __construct(Factory $factory) - { - $this->factory = $factory; - } - - public function make(string $model, array $attributes = []) - { - return $this->factory->of($this->resolveModel($model))->make($attributes); - } - - public function create(string $model, array $attributes = [],int $times = 1) - { - return $this->factory->of($this->resolveModel($model))->times($times)->create($attributes); - } - - private function resolveModel(string $model) - { - if (! isset($this->models[$model])) { - throw InvalidModelException::notRegistered($model); - } - - return $this->models[$model]; - } -} diff --git a/app/ModelFactories/InvalidModelException.php b/app/ModelFactories/InvalidModelException.php deleted file mode 100644 index 2a4ca6b88..000000000 --- a/app/ModelFactories/InvalidModelException.php +++ /dev/null @@ -1,11 +0,0 @@ -app->bind(ModelFactory::class, EloquentModelFactory::class); - } -} diff --git a/app/Replies/EloquentReply.php b/app/Replies/EloquentReply.php deleted file mode 100644 index e1ac4784e..000000000 --- a/app/Replies/EloquentReply.php +++ /dev/null @@ -1,43 +0,0 @@ -id; - } - - public function body(): string - { - return $this->body; - } - - public function replyAble(): ReplyAble - { - return $this->replyAbleRelation; - } - - public function replyAbleRelation(): MorphTo - { - return $this->morphTo('replyable'); - } -} diff --git a/app/Replies/EloquentReplyRepository.php b/app/Replies/EloquentReplyRepository.php deleted file mode 100644 index 1530766d8..000000000 --- a/app/Replies/EloquentReplyRepository.php +++ /dev/null @@ -1,47 +0,0 @@ -model = $model; - } - - public function find(int $id): Reply - { - return $this->model->findOrFail($id); - } - - public function create(ReplyAble $relation, User $author, string $body, array $attributes = []): Reply - { - $reply = $this->model->newInstance(compact('body')); - $reply->author_id = $author->id(); - $reply->ip = Arr::get($attributes, 'ip', ''); - - $relation->replyAble()->save($reply); - - return $reply; - } - - public function update(Reply $reply, array $attributes = []): Reply - { - $reply->update($attributes); - - return $reply; - } - - public function delete(Reply $reply) - { - $reply->delete(); - } -} diff --git a/app/Replies/HasManyReplies.php b/app/Replies/HasManyReplies.php index 9ad1d2ef5..f8a084520 100644 --- a/app/Replies/HasManyReplies.php +++ b/app/Replies/HasManyReplies.php @@ -14,8 +14,8 @@ public function replies() return $this->replyable; } - public function replyable(): HasMany + public function replyAble(): HasMany { - return $this->hasMany(EloquentReply::class); + return $this->hasMany(Reply::class); } } diff --git a/app/Replies/Reply.php b/app/Replies/Reply.php index aac14faa2..30cb6a624 100644 --- a/app/Replies/Reply.php +++ b/app/Replies/Reply.php @@ -4,10 +4,42 @@ use App\DateTime\Timestamps; use App\Users\Authored; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\MorphTo; +use App\DateTime\HasTimestamps; +use App\Users\HasAuthor; -interface Reply extends Authored, Timestamps +class Reply extends Model implements Authored, Timestamps { - public function id(): int; - public function body(): string; - public function replyAble(): ReplyAble; + use HasAuthor, HasTimestamps; + + /** + * @var string + */ + protected $table = 'replies'; + + /** + * @var array + */ + protected $fillable = ['body']; + + public function id(): int + { + return $this->id; + } + + public function body(): string + { + return $this->body; + } + + public function replyAble(): ReplyAble + { + return $this->replyAbleRelation; + } + + public function replyAbleRelation(): MorphTo + { + return $this->morphTo('replyable'); + } } diff --git a/app/Replies/ReplyRepository.php b/app/Replies/ReplyRepository.php index 820f72f8c..b68c436e6 100644 --- a/app/Replies/ReplyRepository.php +++ b/app/Replies/ReplyRepository.php @@ -2,12 +2,46 @@ namespace App\Replies; +use Illuminate\Support\Arr; use App\Users\User; -interface ReplyRepository +class ReplyRepository { - public function find(int $id): Reply; - public function create(ReplyAble $relation, User $author, string $body, array $attributes = []): Reply; - public function update(Reply $reply, array $attributes = []): Reply; - public function delete(Reply $reply); + /** + * @var \App\Replies\Reply + */ + private $model; + + public function __construct(Reply $model) + { + $this->model = $model; + } + + public function find(int $id): Reply + { + return $this->model->findOrFail($id); + } + + public function create(ReplyAble $relation, User $author, string $body, array $attributes = []): Reply + { + $reply = $this->model->newInstance(compact('body')); + $reply->author_id = $author->id(); + $reply->ip = Arr::get($attributes, 'ip', ''); + + $relation->replyAble()->save($reply); + + return $reply; + } + + public function update(Reply $reply, array $attributes = []): Reply + { + $reply->update($attributes); + + return $reply; + } + + public function delete(Reply $reply) + { + $reply->delete(); + } } diff --git a/app/Replies/ReplyServiceProvider.php b/app/Replies/ReplyServiceProvider.php deleted file mode 100644 index f5d00df1f..000000000 --- a/app/Replies/ReplyServiceProvider.php +++ /dev/null @@ -1,13 +0,0 @@ -app->bind(ReplyRepository::class, EloquentReplyRepository::class); - } -} diff --git a/app/Replies/UsesReplies.php b/app/Replies/UsesReplies.php index 59f04860b..32cdbb6f8 100644 --- a/app/Replies/UsesReplies.php +++ b/app/Replies/UsesReplies.php @@ -16,6 +16,6 @@ public function replies() public function replyAble(): MorphMany { - return $this->morphMany(EloquentReply::class, 'replyable'); + return $this->morphMany(Reply::class, 'replyable'); } } diff --git a/app/Tags/EloquentTag.php b/app/Tags/EloquentTag.php deleted file mode 100644 index 86a4bf86a..000000000 --- a/app/Tags/EloquentTag.php +++ /dev/null @@ -1,55 +0,0 @@ -id; - } - - public function name(): string - { - return $this->name; - } - - public function slug(): string - { - return $this->slug; - } - - public function description(): string - { - return $this->description; - } - - /** - * @return \App\Forum\Thread[] - */ - public function threads() - { - return $this->threadsRelation; - } - - public function threadsRelation(): MorphToMany - { - return $this->morphedByMany(EloquentThread::class, 'taggable', 'taggables', 'tag_id'); - } -} diff --git a/app/Tags/EloquentTagRepository.php b/app/Tags/EloquentTagRepository.php deleted file mode 100644 index c03078ba9..000000000 --- a/app/Tags/EloquentTagRepository.php +++ /dev/null @@ -1,29 +0,0 @@ -model = $model; - } - - /** - * @return \App\Tags\Tag[] - */ - public function findAll() - { - return $this->model->all(); - } - - public function findBySlug(string $slug): Tag - { - return $this->model->where('slug', $slug)->firstOrFail(); - } -} diff --git a/app/Tags/Tag.php b/app/Tags/Tag.php index 6dc946e70..80b3baa42 100644 --- a/app/Tags/Tag.php +++ b/app/Tags/Tag.php @@ -2,15 +2,54 @@ namespace App\Tags; -interface Tag +use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\MorphToMany; +use App\Forum\Thread; + +class Tag extends Model { - public function id(): int; - public function name(): string; - public function slug(): string; - public function description(): string; + /** + * @var string + */ + protected $table = 'tags'; + + /** + * Indicates if the model should be timestamped. + * + * @var bool + */ + public $timestamps = false; + + public function id(): int + { + return $this->id; + } + + public function name(): string + { + return $this->name; + } + + public function slug(): string + { + return $this->slug; + } + + public function description(): string + { + return $this->description; + } /** * @return \App\Forum\Thread[] */ - public function threads(); + public function threads() + { + return $this->threadsRelation; + } + + public function threadsRelation(): MorphToMany + { + return $this->morphedByMany(Thread::class, 'taggable', 'taggables', 'tag_id'); + } } diff --git a/app/Tags/TagRepository.php b/app/Tags/TagRepository.php index 031375eb9..777470a91 100644 --- a/app/Tags/TagRepository.php +++ b/app/Tags/TagRepository.php @@ -2,11 +2,28 @@ namespace App\Tags; -interface TagRepository +class TagRepository { + /** + * @var \App\Tags\Tag + */ + private $model; + + public function __construct(Tag $model) + { + $this->model = $model; + } + /** * @return \App\Tags\Tag[] */ - public function findAll(); - public function findBySlug(string $slug): Tag; + public function findAll() + { + return $this->model->all(); + } + + public function findBySlug(string $slug): Tag + { + return $this->model->where('slug', $slug)->firstOrFail(); + } } diff --git a/app/Tags/TagServiceProvider.php b/app/Tags/TagServiceProvider.php deleted file mode 100644 index b9ad901fa..000000000 --- a/app/Tags/TagServiceProvider.php +++ /dev/null @@ -1,13 +0,0 @@ -app->bind(TagRepository::class, EloquentTagRepository::class); - } -} diff --git a/app/Tags/UsesTags.php b/app/Tags/UsesTags.php index 9f9968398..e78e7741d 100644 --- a/app/Tags/UsesTags.php +++ b/app/Tags/UsesTags.php @@ -16,7 +16,7 @@ public function tags() public function tagsRelation(): MorphToMany { - return $this->morphToMany(EloquentTag::class, 'taggable', 'taggables', null, 'tag_id') + return $this->morphToMany(Tag::class, 'taggable', 'taggables', null, 'tag_id') ->withTimestamps(); } } diff --git a/app/Users/EloquentUser.php b/app/Users/EloquentUser.php deleted file mode 100644 index ea1314bc4..000000000 --- a/app/Users/EloquentUser.php +++ /dev/null @@ -1,100 +0,0 @@ -id; - } - - public function name(): string - { - return $this->name; - } - - public function emailAddress(): string - { - return $this->email; - } - - public function username(): string - { - return $this->username; - } - - public function githubUsername(): string - { - return $this->github_url; - } - - public function gratavarUrl($size = 100): string - { - $hash = md5(strtolower(trim($this->email))); - - return "https://www.gravatar.com/avatar/$hash?s=$size"; - } - - public function isConfirmed(): bool - { - return (bool) $this->confirmed; - } - - public function isUnconfirmed(): bool - { - return ! $this->isConfirmed(); - } - - public function isBanned(): bool - { - return (bool) $this->is_banned; - } - - public function confirmationCode(): string - { - return (string) $this->confirmation_code; - } - - public function matchesConfirmationCode(string $code): bool - { - return $this->confirmation_code === $code; - } -} diff --git a/app/Users/EloquentUserRepository.php b/app/Users/EloquentUserRepository.php deleted file mode 100644 index e6a258a95..000000000 --- a/app/Users/EloquentUserRepository.php +++ /dev/null @@ -1,88 +0,0 @@ -model = $model; - } - - public function findByUsername(string $username): User - { - return $this->model->where('username', $username)->firstOrFail(); - } - - public function findByEmailAddress(string $emailAddress): User - { - return $this->model->where('email', $emailAddress)->firstOrFail(); - } - - public function findByGithubId(string $githubId): User - { - return $this->model->where('github_id', $githubId)->firstOrFail(); - } - - public function create(NewUserData $data): User - { - $this->assertEmailAddressIsUnique($data->emailAddress()); - $this->assertUsernameIsUnique($data->username()); - - $user = $this->model->newInstance(); - $user->name = $data->name(); - $user->email = $data->emailAddress(); - $user->username = $data->username(); - $user->password = $data->password(); - $user->ip = $data->ip(); - $user->github_id = $data->githubId(); - $user->github_url = $data->githubUsername(); - $user->confirmation_code = Str::random(40); - $user->save(); - - return $user; - } - - private function assertEmailAddressIsUnique(string $emailAddress) - { - try { - $this->findByEmailAddress($emailAddress); - } catch (ModelNotFoundException $exception) { - return true; - } - - throw CannotCreateUser::duplicateEmailAddress($emailAddress); - } - - private function assertUsernameIsUnique(string $username) - { - try { - $this->findByUsername($username); - } catch (ModelNotFoundException $exception) { - return true; - } - - throw CannotCreateUser::duplicateUsername($username); - } - - public function update(User $user, array $attributes): User - { - $user->update($attributes); - - return $user; - } - - public function confirmUser(User $user) - { - $user->update(['confirmed' => true, 'confirmation_code' => null]); - } -} diff --git a/app/Users/HasAuthor.php b/app/Users/HasAuthor.php index f63000f8a..284ba4c0a 100644 --- a/app/Users/HasAuthor.php +++ b/app/Users/HasAuthor.php @@ -13,7 +13,7 @@ public function author(): User public function authorRelation(): BelongsTo { - return $this->belongsTo(EloquentUser::class, 'author_id'); + return $this->belongsTo(User::class, 'author_id'); } public function isAuthoredBy(User $user): bool diff --git a/app/Users/SaveSettingsRequest.php b/app/Users/SaveSettingsRequest.php index 6d160f1ad..8d09b9cd9 100644 --- a/app/Users/SaveSettingsRequest.php +++ b/app/Users/SaveSettingsRequest.php @@ -2,8 +2,8 @@ namespace App\Users; -use Auth; use App\Http\Requests\Request; +use Auth; class SaveSettingsRequest extends Request { diff --git a/app/Users/User.php b/app/Users/User.php index 70907e590..38b1910ce 100644 --- a/app/Users/User.php +++ b/app/Users/User.php @@ -2,24 +2,100 @@ namespace App\Users; +use App\DateTime\HasTimestamps; use App\DateTime\Timestamps; +use App\Replies\HasManyReplies; +use Illuminate\Foundation\Auth\User as Authenticatable; +use Illuminate\Notifications\Notifiable; -interface User extends Timestamps +class User extends Authenticatable implements Timestamps { - public function id(): int; - public function name(): string; - public function emailAddress(): string; - public function username(): string; - public function githubUsername(): string; - public function gratavarUrl($size = 100): string; - public function isConfirmed(): bool; - public function isUnconfirmed(): bool; - public function isBanned(): bool; - public function confirmationCode(): string; - public function matchesConfirmationCode(string $code): bool; + use HasManyReplies, HasTimestamps, Notifiable; /** - * @return \App\Replies\Reply[] + * The database table used by the model. + * + * @var string */ - public function replies(); + protected $table = 'users'; + + /** + * The attributes that are mass assignable. + * + * @var array + */ + protected $fillable = [ + 'name', + 'email', + 'username', + 'password', + 'ip', + 'confirmed', + 'confirmation_code', + 'github_id', + ]; + + /** + * The attributes excluded from the model's JSON form. + * + * @var array + */ + protected $hidden = ['password', 'remember_token']; + + public function id(): int + { + return $this->id; + } + + public function name(): string + { + return $this->name; + } + + public function emailAddress(): string + { + return $this->email; + } + + public function username(): string + { + return $this->username; + } + + public function githubUsername(): string + { + return $this->github_url; + } + + public function gratavarUrl($size = 100): string + { + $hash = md5(strtolower(trim($this->email))); + + return "https://www.gravatar.com/avatar/$hash?s=$size"; + } + + public function isConfirmed(): bool + { + return (bool) $this->confirmed; + } + + public function isUnconfirmed(): bool + { + return ! $this->isConfirmed(); + } + + public function isBanned(): bool + { + return (bool) $this->is_banned; + } + + public function confirmationCode(): string + { + return (string) $this->confirmation_code; + } + + public function matchesConfirmationCode(string $code): bool + { + return $this->confirmation_code === $code; + } } diff --git a/app/Users/UserRepository.php b/app/Users/UserRepository.php index 2ee0fb4f0..55ac46224 100644 --- a/app/Users/UserRepository.php +++ b/app/Users/UserRepository.php @@ -2,12 +2,87 @@ namespace App\Users; -interface UserRepository +use Illuminate\Database\Eloquent\ModelNotFoundException; +use App\Users\Exceptions\CannotCreateUser; +use Illuminate\Support\Str; + +class UserRepository { - public function findByUsername(string $username): User; - public function findByEmailAddress(string $emailAddress): User; - public function findByGithubId(string $githubId): User; - public function create(NewUserData $data): User; - public function update(User $user, array $attributes): User; - public function confirmUser(User $user); + /** + * @var \App\Users\User + */ + private $model; + + public function __construct(User $model) + { + $this->model = $model; + } + + public function findByUsername(string $username): User + { + return $this->model->where('username', $username)->firstOrFail(); + } + + public function findByEmailAddress(string $emailAddress): User + { + return $this->model->where('email', $emailAddress)->firstOrFail(); + } + + public function findByGithubId(string $githubId): User + { + return $this->model->where('github_id', $githubId)->firstOrFail(); + } + + public function create(NewUserData $data): User + { + $this->assertEmailAddressIsUnique($data->emailAddress()); + $this->assertUsernameIsUnique($data->username()); + + $user = $this->model->newInstance(); + $user->name = $data->name(); + $user->email = $data->emailAddress(); + $user->username = $data->username(); + $user->password = $data->password(); + $user->ip = $data->ip(); + $user->github_id = $data->githubId(); + $user->github_url = $data->githubUsername(); + $user->confirmation_code = Str::random(40); + $user->save(); + + return $user; + } + + private function assertEmailAddressIsUnique(string $emailAddress) + { + try { + $this->findByEmailAddress($emailAddress); + } catch (ModelNotFoundException $exception) { + return true; + } + + throw CannotCreateUser::duplicateEmailAddress($emailAddress); + } + + private function assertUsernameIsUnique(string $username) + { + try { + $this->findByUsername($username); + } catch (ModelNotFoundException $exception) { + return true; + } + + throw CannotCreateUser::duplicateUsername($username); + } + + public function update(User $user, array $attributes): User + { + $user->update($attributes); + + return $user; + } + + public function confirmUser(User $user) + { + $user->update(['confirmed' => true, 'confirmation_code' => null]); + } } diff --git a/app/Users/UserServiceProvider.php b/app/Users/UserServiceProvider.php deleted file mode 100644 index 8eee5ff54..000000000 --- a/app/Users/UserServiceProvider.php +++ /dev/null @@ -1,13 +0,0 @@ -app->bind(UserRepository::class, EloquentUserRepository::class); - } -} diff --git a/config/app.php b/config/app.php index b5475a5ea..b68ba9d7c 100644 --- a/config/app.php +++ b/config/app.php @@ -176,15 +176,10 @@ */ App\AppServiceProvider::class, App\Auth\AuthServiceProvider::class, - App\Forum\ForumServiceProvider::class, App\Http\RouteServiceProvider::class, App\Markdown\MarkdownServiceProvider::class, - App\ModelFactories\ModelFactoryServiceProvider::class, - App\Replies\ReplyServiceProvider::class, App\Social\SocialServiceProvider::class, App\Spam\SpamServiceProvider::class, - App\Tags\TagServiceProvider::class, - App\Users\UserServiceProvider::class, App\Validation\ValidationServiceProvider::class, App\Views\ViewServiceProvider::class, diff --git a/config/auth.php b/config/auth.php index ff1848a6c..80c5b6540 100644 --- a/config/auth.php +++ b/config/auth.php @@ -67,7 +67,7 @@ 'providers' => [ 'users' => [ 'driver' => 'eloquent', - 'model' => App\Users\EloquentUser::class, + 'model' => App\Users\User::class, ], // 'users' => [ diff --git a/config/services.php b/config/services.php index 4cebf93ba..6db0f3481 100644 --- a/config/services.php +++ b/config/services.php @@ -30,7 +30,7 @@ ], 'stripe' => [ - 'model' => App\Users\EloquentUser::class, + 'model' => App\Users\User::class, 'key' => env('STRIPE_KEY'), 'secret' => env('STRIPE_SECRET'), ], diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index f8850d0f1..6e6b9476f 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -11,13 +11,13 @@ | */ -use App\Forum\EloquentThread; -use App\Forum\Topics\EloquentTopic; -use App\Replies\EloquentReply; -use App\Tags\EloquentTag; -use App\Users\EloquentUser; +use App\Forum\Thread; +use App\Forum\Topic; +use App\Replies\Reply; +use App\Tags\Tag; +use App\Users\User; -$factory->define(EloquentUser::class, function (Faker\Generator $faker) { +$factory->define(User::class, function (Faker\Generator $faker) { static $password; return [ @@ -35,35 +35,35 @@ ]; }); -$factory->define(EloquentThread::class, function (Faker\Generator $faker) { +$factory->define(Thread::class, function (Faker\Generator $faker) { return [ 'topic_id' => 1, 'subject' => $faker->text(20), 'body' => $faker->text, 'slug' => $faker->slug, - 'author_id' => factory(EloquentUser::class)->create()->id(), + 'author_id' => factory(User::class)->create()->id(), 'ip' => $faker->ipv6, ]; }); -$factory->define(EloquentTopic::class, function (Faker\Generator $faker) { +$factory->define(Topic::class, function (Faker\Generator $faker) { return [ 'name' => $faker->text(20), 'slug' => $faker->slug, ]; }); -$factory->define(EloquentReply::class, function (Faker\Generator $faker) { +$factory->define(Reply::class, function (Faker\Generator $faker) { return [ 'body' => $faker->text(), - 'author_id' => factory(EloquentUser::class)->create()->id(), - 'replyable_id' => factory(EloquentThread::class)->create()->id(), - 'replyable_type' => EloquentThread::TYPE, + 'author_id' => factory(User::class)->create()->id(), + 'replyable_id' => factory(Thread::class)->create()->id(), + 'replyable_type' => Thread::TABLE, 'ip' => $faker->ipv6, ]; }); -$factory->define(EloquentTag::class, function (Faker\Generator $faker) { +$factory->define(Tag::class, function (Faker\Generator $faker) { return [ 'name' => $faker->text(15), 'slug' => $faker->slug, diff --git a/database/seeds/TagSeeder.php b/database/seeds/TagSeeder.php index a4127f49f..a1266e921 100644 --- a/database/seeds/TagSeeder.php +++ b/database/seeds/TagSeeder.php @@ -1,6 +1,6 @@ Date: Sat, 19 Nov 2016 18:01:03 +0100 Subject: [PATCH 111/288] Simplify HTTP layer --- app/Http/Controllers/ReplyController.php | 4 ++-- app/Http/Controllers/SettingsController.php | 8 +++---- .../{Forum => }/ThreadsController.php | 9 ++++--- .../{Forum => }/TopicController.php | 3 +-- .../Requests}/ReplyRequest.php | 6 ++--- .../Requests}/ThreadRequest.php | 8 ++++--- .../Requests/UpdatePasswordRequest.php} | 5 ++-- .../Requests/UpdateProfileRequest.php} | 5 ++-- routes/web.php | 24 +++++++++---------- 9 files changed, 34 insertions(+), 38 deletions(-) rename app/Http/Controllers/{Forum => }/ThreadsController.php (94%) rename app/Http/Controllers/{Forum => }/TopicController.php (70%) rename app/{Replies => Http/Requests}/ReplyRequest.php (72%) rename app/{Forum => Http/Requests}/ThreadRequest.php (88%) rename app/{Users/ChangePasswordRequest.php => Http/Requests/UpdatePasswordRequest.php} (80%) rename app/{Users/SaveSettingsRequest.php => Http/Requests/UpdateProfileRequest.php} (79%) diff --git a/app/Http/Controllers/ReplyController.php b/app/Http/Controllers/ReplyController.php index 6fc96684c..671f8f4f1 100644 --- a/app/Http/Controllers/ReplyController.php +++ b/app/Http/Controllers/ReplyController.php @@ -2,13 +2,13 @@ namespace App\Http\Controllers; -use Illuminate\Http\RedirectResponse; use App\Forum\Thread; use App\Forum\ThreadRepository; -use App\Replies\ReplyRequest; +use App\Http\Requests\ReplyRequest; use App\Replies\Reply; use App\Replies\ReplyAble; use App\Replies\ReplyRepository; +use Illuminate\Http\RedirectResponse; class ReplyController extends Controller { diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index bc7e1eaf6..7f082a433 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -3,8 +3,8 @@ namespace App\Http\Controllers; use Auth; -use App\Users\ChangePasswordRequest; -use App\Users\SaveSettingsRequest; +use App\Http\Requests\UpdatePasswordRequest; +use App\Http\Requests\UpdateProfileRequest; use App\Users\UserRepository; class SettingsController extends Controller @@ -19,7 +19,7 @@ public function profile() return view('users.settings.profile'); } - public function updateProfile(SaveSettingsRequest $request, UserRepository $users) + public function updateProfile(UpdateProfileRequest $request, UserRepository $users) { $users->update(Auth::user(), $request->only('name', 'email', 'username')); @@ -33,7 +33,7 @@ public function password() return view('users.settings.password'); } - public function updatePassword(ChangePasswordRequest $request, UserRepository $users) + public function updatePassword(UpdatePasswordRequest $request, UserRepository $users) { $users->update(Auth::user(), $request->dataForUpdate()); diff --git a/app/Http/Controllers/Forum/ThreadsController.php b/app/Http/Controllers/ThreadsController.php similarity index 94% rename from app/Http/Controllers/Forum/ThreadsController.php rename to app/Http/Controllers/ThreadsController.php index 41203b6fd..a660f82d3 100644 --- a/app/Http/Controllers/Forum/ThreadsController.php +++ b/app/Http/Controllers/ThreadsController.php @@ -1,12 +1,11 @@ $topics->findAll(), 'tags' => $tags->findAll()]); } - public function store(ThreadRequest $request) + public function store(\App\Http\Requests\ThreadRequest $request) { $thread = $this->threads->create( $request->user(), diff --git a/app/Http/Controllers/Forum/TopicController.php b/app/Http/Controllers/TopicController.php similarity index 70% rename from app/Http/Controllers/Forum/TopicController.php rename to app/Http/Controllers/TopicController.php index 75551c023..f2981c752 100644 --- a/app/Http/Controllers/Forum/TopicController.php +++ b/app/Http/Controllers/TopicController.php @@ -1,9 +1,8 @@ 'settings.password.update', 'uses' => 'SettingsController@updatePassword']); // Forum -Route::group(['namespace' => 'Forum'], function() { - Route::get('forum', ['as' => 'forum', 'uses' => 'ThreadsController@overview']); - Route::get('forum/create-thread', ['as' => 'threads.create', 'uses' => 'ThreadsController@create']); - Route::post('forum/create-thread', ['as' => 'threads.store', 'uses' => 'ThreadsController@store']); - Route::get('forum/{thread}', ['as' => 'thread', 'uses' => 'ThreadsController@show']); - Route::get('forum/{thread}/edit', ['as' => 'threads.edit', 'uses' => 'ThreadsController@edit']); - Route::put('forum/{thread}', ['as' => 'threads.update', 'uses' => 'ThreadsController@update']); - Route::get('forum/{thread}/delete', ['as' => 'threads.delete', 'uses' => 'ThreadsController@delete']); - Route::get('forum/{thread}/mark-solution/{reply}', ['as' => 'threads.solution.mark', 'uses' => 'ThreadsController@markSolution']); - Route::get('forum/{thread}/unmark-solution', ['as' => 'threads.solution.unmark', 'uses' => 'ThreadsController@unmarkSolution']); +Route::get('forum', ['as' => 'forum', 'uses' => 'ThreadsController@overview']); +Route::get('forum/create-thread', ['as' => 'threads.create', 'uses' => 'ThreadsController@create']); +Route::post('forum/create-thread', ['as' => 'threads.store', 'uses' => 'ThreadsController@store']); +Route::get('forum/{thread}', ['as' => 'thread', 'uses' => 'ThreadsController@show']); +Route::get('forum/{thread}/edit', ['as' => 'threads.edit', 'uses' => 'ThreadsController@edit']); +Route::put('forum/{thread}', ['as' => 'threads.update', 'uses' => 'ThreadsController@update']); +Route::get('forum/{thread}/delete', ['as' => 'threads.delete', 'uses' => 'ThreadsController@delete']); +Route::get('forum/{thread}/mark-solution/{reply}', ['as' => 'threads.solution.mark', 'uses' => 'ThreadsController@markSolution']); +Route::get('forum/{thread}/unmark-solution', ['as' => 'threads.solution.unmark', 'uses' => 'ThreadsController@unmarkSolution']); - // Topics - Route::get('forum/topics/{topic}', ['as' => 'forum.topic', 'uses' => 'TopicController@show']); -}); +// Topics +Route::get('forum/topics/{topic}', ['as' => 'forum.topic', 'uses' => 'TopicController@show']); // Replies Route::post('replies', ['as' => 'replies.store', 'uses' => 'ReplyController@store']); From 9f12f829b9a5f07c95848e24f3dc67159d745f4e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 18:13:06 +0100 Subject: [PATCH 112/288] Move classes to dedicated Laravel directories --- app/Auth/AuthServiceProvider.php | 4 ++-- app/Http/Controllers/Auth/EmailAddressController.php | 2 +- app/Http/Controllers/Auth/RegisterController.php | 2 +- app/{Users => Jobs}/SendEmailAddressConfirmation.php | 7 ++++++- app/{Users => Mail}/ConfirmEmailAddress.php | 3 ++- app/{Replies => Policies}/ReplyPolicy.php | 5 +++-- app/{Forum => Policies}/ThreadPolicy.php | 5 +++-- tests/Features/AuthTest.php | 2 +- 8 files changed, 19 insertions(+), 11 deletions(-) rename app/{Users => Jobs}/SendEmailAddressConfirmation.php (73%) rename app/{Users => Mail}/ConfirmEmailAddress.php (92%) rename app/{Replies => Policies}/ReplyPolicy.php (91%) rename app/{Forum => Policies}/ThreadPolicy.php (92%) diff --git a/app/Auth/AuthServiceProvider.php b/app/Auth/AuthServiceProvider.php index d5587ef5a..e70e7d833 100644 --- a/app/Auth/AuthServiceProvider.php +++ b/app/Auth/AuthServiceProvider.php @@ -2,12 +2,12 @@ namespace App\Auth; +use App\Policies\ReplyPolicy; +use App\Policies\ThreadPolicy; use Illuminate\Contracts\Auth\Access\Gate as GateContract; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use App\Forum\Thread; -use App\Forum\ThreadPolicy; use App\Replies\Reply; -use App\Replies\ReplyPolicy; class AuthServiceProvider extends ServiceProvider { diff --git a/app/Http/Controllers/Auth/EmailAddressController.php b/app/Http/Controllers/Auth/EmailAddressController.php index 3f5ee536e..8e26fbeb3 100644 --- a/app/Http/Controllers/Auth/EmailAddressController.php +++ b/app/Http/Controllers/Auth/EmailAddressController.php @@ -2,8 +2,8 @@ namespace App\Http\Controllers\Auth; +use App\Jobs\SendEmailAddressConfirmation; use App\Http\Controllers\Controller; -use App\Users\SendEmailAddressConfirmation; use App\Users\User; use App\Users\UserRepository; use Auth; diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 3256c0e11..98efdf0c5 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -2,9 +2,9 @@ namespace App\Http\Controllers\Auth; +use App\Jobs\SendEmailAddressConfirmation; use App\Http\Controllers\Controller; use App\Users\NewUserData; -use App\Users\SendEmailAddressConfirmation; use App\Users\User; use App\Users\UserRepository; use App\Users\UserWasRegistered; diff --git a/app/Users/SendEmailAddressConfirmation.php b/app/Jobs/SendEmailAddressConfirmation.php similarity index 73% rename from app/Users/SendEmailAddressConfirmation.php rename to app/Jobs/SendEmailAddressConfirmation.php index 01d1180cf..6d4446a21 100644 --- a/app/Users/SendEmailAddressConfirmation.php +++ b/app/Jobs/SendEmailAddressConfirmation.php @@ -1,11 +1,16 @@ Date: Sat, 19 Nov 2016 18:17:26 +0100 Subject: [PATCH 113/288] Fix incorrect case --- app/Replies/HasManyReplies.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Replies/HasManyReplies.php b/app/Replies/HasManyReplies.php index f8a084520..19d852da3 100644 --- a/app/Replies/HasManyReplies.php +++ b/app/Replies/HasManyReplies.php @@ -11,7 +11,7 @@ trait HasManyReplies */ public function replies() { - return $this->replyable; + return $this->replyAble; } public function replyAble(): HasMany From 42b5c571aeb044150cda6a885ac1a0d387da6c9e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 19 Nov 2016 18:41:59 +0100 Subject: [PATCH 114/288] Refactor NewUser DTO --- .../Controllers/Auth/RegisterController.php | 23 +--- app/Http/Requests/CreateUserRequest.php | 76 +++++++++++++ app/Users/NewUser.php | 14 +++ app/Users/NewUserData.php | 103 ------------------ app/Users/UserRepository.php | 2 +- tests/Components/Users/UserRepositoryTest.php | 78 ++++++++++++- 6 files changed, 166 insertions(+), 130 deletions(-) create mode 100644 app/Http/Requests/CreateUserRequest.php create mode 100644 app/Users/NewUser.php delete mode 100644 app/Users/NewUserData.php diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 98efdf0c5..34a2fe348 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -2,14 +2,13 @@ namespace App\Http\Controllers\Auth; +use App\Http\Requests\CreateUserRequest; use App\Jobs\SendEmailAddressConfirmation; use App\Http\Controllers\Controller; -use App\Users\NewUserData; use App\Users\User; use App\Users\UserRepository; use App\Users\UserWasRegistered; use Illuminate\Foundation\Auth\RegistersUsers; -use Session; use Validator; class RegisterController extends Controller @@ -54,23 +53,7 @@ public function redirectToRegistrationForm() */ protected function validator(array $data) { - $rules = [ - 'name' => 'required|max:255', - 'email' => 'required|email|max:255|unique:users', - 'username' => 'required|max:40|unique:users', - ]; - - if (Session::has('githubData')) { - $rules['password'] = 'confirmed|min:6'; - } else { - $rules['password'] = 'required|confirmed|min:6'; - } - - if (! app()->runningUnitTests()) { - $rules['g-recaptcha-response'] = 'required|recaptcha'; - } - - return Validator::make($data, $rules); + return Validator::make($data, app(CreateUserRequest::class)->rules()); } /** @@ -78,7 +61,7 @@ protected function validator(array $data) */ protected function create(array $data): User { - $user = $this->users->create(NewUserData::makeFromRequestAndSession(app('request'), app('session.store'))); + $user = $this->users->create(app(CreateUserRequest::class)); $this->dispatchNow(new SendEmailAddressConfirmation($user)); diff --git a/app/Http/Requests/CreateUserRequest.php b/app/Http/Requests/CreateUserRequest.php new file mode 100644 index 000000000..2efb19cfb --- /dev/null +++ b/app/Http/Requests/CreateUserRequest.php @@ -0,0 +1,76 @@ + 'required|max:255', + 'email' => 'required|email|max:255|unique:users', + 'username' => 'required|max:40|unique:users', + ]; + + if (Session::has('githubData')) { + $rules['password'] = 'confirmed|min:6'; + } else { + $rules['password'] = 'required|confirmed|min:6'; + } + + if (! app()->runningUnitTests()) { + $rules['g-recaptcha-response'] = 'required|recaptcha'; + } + + return $rules; + } + + public function name(): string + { + return$this->get('name'); + } + + public function emailAddress(): string + { + return $this->get('email'); + } + + public function username(): string + { + return $this->get('username'); + } + + public function password(): string + { + return $this->has('password') ? bcrypt($this->get('password')) : ''; + } + + public function githubId(): string + { + return session('githubData.id', ''); + } + + public function githubUsername(): string + { + return session('githubData.username', ''); + } +} diff --git a/app/Users/NewUser.php b/app/Users/NewUser.php new file mode 100644 index 000000000..9992a414e --- /dev/null +++ b/app/Users/NewUser.php @@ -0,0 +1,14 @@ +name = $name; - $this->emailAddress = $emailAddress; - $this->username = $username; - $this->password = $password; - $this->ip = $ip; - $this->githubId = $githubId; - $this->githubUsername = $githubUsername; - } - - public static function makeFromRequestAndSession(Request $request, Session $session): NewUserData - { - return new self( - $request->get('name'), - $request->get('email'), - $request->get('username'), - $request->has('password') ? bcrypt($request->get('password')) : null, - $request->ip(), - $session->get('githubData.id'), - $session->get('githubData.username') - ); - } - - public function name(): string - { - return $this->name; - } - - public function emailAddress(): string - { - return $this->emailAddress; - } - - public function username(): string - { - return $this->username; - } - - public function password(): string - { - return $this->password ?: ''; - } - - public function ip(): string - { - return $this->ip ?: ''; - } - - public function githubId(): string - { - return $this->githubId ?: ''; - } - - public function githubUsername() - { - return $this->githubUsername ?: ''; - } -} diff --git a/app/Users/UserRepository.php b/app/Users/UserRepository.php index 55ac46224..2d02fdf89 100644 --- a/app/Users/UserRepository.php +++ b/app/Users/UserRepository.php @@ -33,7 +33,7 @@ public function findByGithubId(string $githubId): User return $this->model->where('github_id', $githubId)->firstOrFail(); } - public function create(NewUserData $data): User + public function create(NewUser $data): User { $this->assertEmailAddressIsUnique($data->emailAddress()); $this->assertUsernameIsUnique($data->username()); diff --git a/tests/Components/Users/UserRepositoryTest.php b/tests/Components/Users/UserRepositoryTest.php index 0043785ea..9a705ae92 100644 --- a/tests/Components/Users/UserRepositoryTest.php +++ b/tests/Components/Users/UserRepositoryTest.php @@ -3,7 +3,7 @@ namespace Tests\Components\Users; use App\Users\Exceptions\CannotCreateUser; -use App\Users\NewUserData; +use App\Users\NewUser; use App\Users\User; use App\Users\UserRepository; use Illuminate\Foundation\Testing\DatabaseMigrations; @@ -38,7 +38,7 @@ function find_by_email_address() /** @test */ function we_can_create_a_user() { - $this->assertInstanceOf(User::class, $this->repo->create(new NewUserData( + $this->assertInstanceOf(User::class, $this->repo->create(new DummyNewUser( 'John Doe', 'john@example.com', 'johndoe', @@ -51,8 +51,8 @@ function we_cannot_create_a_user_with_the_same_email_address() { $this->expectException(CannotCreateUser::class); - $this->repo->create(new NewUserData('John Doe', 'john@example.com', 'johndoe', 'password')); - $this->repo->create(new NewUserData('John Foo', 'john@example.com', 'johnfoo', 'password')); + $this->repo->create(new DummyNewUser('John Doe', 'john@example.com', 'johndoe', 'password')); + $this->repo->create(new DummyNewUser('John Foo', 'john@example.com', 'johnfoo', 'password')); } /** @test */ @@ -60,8 +60,8 @@ function we_cannot_create_a_user_with_the_same_username() { $this->expectException(CannotCreateUser::class); - $this->repo->create(new NewUserData('John Doe', 'john@example.com', 'johndoe', 'password')); - $this->repo->create(new NewUserData('John Doe', 'john.doe@example.com', 'johndoe', 'password')); + $this->repo->create(new DummyNewUser('John Doe', 'john@example.com', 'johndoe', 'password')); + $this->repo->create(new DummyNewUser('John Doe', 'john.doe@example.com', 'johndoe', 'password')); } /** @test */ @@ -75,3 +75,69 @@ function we_can_update_a_user() $this->seeInDatabase('users', ['username' => 'foo', 'name' => 'bar']); } } + +class DummyNewUser implements NewUser +{ + /** + * @var string + */ + private $name; + + /** + * @var string + */ + private $emailAddress; + + /** + * @var string + */ + private $username; + + /** + * @var string|null + */ + private $password; + + public function __construct($name, $emailAddress, $username, $password = null) + { + $this->name = $name; + $this->emailAddress = $emailAddress; + $this->username = $username; + $this->password = $password; + } + + public function name(): string + { + return $this->name; + } + + public function emailAddress(): string + { + return $this->emailAddress; + } + + public function username(): string + { + return $this->username; + } + + public function password(): string + { + return $this->password ?: ''; + } + + public function ip() + { + return ''; + } + + public function githubId(): string + { + return ''; + } + + public function githubUsername(): string + { + return ''; + } +} From 2a8c74493139f1ee3c84f5c4015c826932ca5106 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 25 Nov 2016 11:12:02 +0100 Subject: [PATCH 115/288] Implement DTO strategy for creating models --- app/Forum/NewThread.php | 15 +++ app/Forum/ThreadRepository.php | 25 ++-- app/Http/Controllers/ThreadsController.php | 10 +- app/Http/Requests/ThreadRequest.php | 31 ++++- .../Components/Forum/ThreadRepositoryTest.php | 43 ++++++- tests/Components/Users/UserRepositoryTest.php | 121 ++++++++---------- tests/Features/TagsTest.php | 51 ++++++-- 7 files changed, 186 insertions(+), 110 deletions(-) create mode 100644 app/Forum/NewThread.php diff --git a/app/Forum/NewThread.php b/app/Forum/NewThread.php new file mode 100644 index 000000000..e640b6dd9 --- /dev/null +++ b/app/Forum/NewThread.php @@ -0,0 +1,15 @@ +model->where('slug', $slug)->firstOrFail(); } - public function create(User $author, Topic $topic, string $subject, string $body, array $attributes = []): Thread + public function create(NewThread $data): Thread { - $thread = $this->model->newInstance(compact('subject', 'body')); - $thread->authorRelation()->associate($author); - $thread->topicRelation()->associate($topic); - $thread->slug = $this->generateUniqueSlug($subject); - $thread->ip = Arr::get($attributes, 'ip', ''); + $thread = $this->model->newInstance(); + $thread->subject = $data->subject(); + $thread->body = $data->body(); + $thread->authorRelation()->associate($data->author()); + $thread->topicRelation()->associate($data->topic()); + $thread->slug = $this->generateUniqueSlug($data->subject()); + $thread->ip = $data->ip(); $thread->save(); - $thread = $this->updateTags($thread, $attributes); + $thread = $this->updateTags($thread, $data->tags()); $thread->save(); return $thread; @@ -61,7 +62,7 @@ public function update(Thread $thread, array $attributes = []): Thread $thread->slug = $this->generateUniqueSlug($thread->subject(), $thread->id()); $thread = $this->updateTopic($thread, $attributes); - $thread = $this->updateTags($thread, $attributes); + $thread = $this->updateTags($thread, Arr::get($attributes, 'tags', [])); $thread->save(); return $thread; @@ -76,10 +77,10 @@ private function updateTopic(Thread $thread, $attributes): Thread return $thread; } - private function updateTags(Thread $thread, array $attributes): Thread + private function updateTags(Thread $thread, array $tags): Thread { - if ($tags = Arr::get($attributes, 'tags')) { - $thread->tagsRelation()->sync($attributes['tags']); + if ($tags) { + $thread->tagsRelation()->sync($tags); } return $thread; diff --git a/app/Http/Controllers/ThreadsController.php b/app/Http/Controllers/ThreadsController.php index a660f82d3..22141a421 100644 --- a/app/Http/Controllers/ThreadsController.php +++ b/app/Http/Controllers/ThreadsController.php @@ -41,15 +41,9 @@ public function create(TopicRepository $topics, TagRepository $tags) return view('forum.threads.create', ['topics' => $topics->findAll(), 'tags' => $tags->findAll()]); } - public function store(\App\Http\Requests\ThreadRequest $request) + public function store(ThreadRequest $request) { - $thread = $this->threads->create( - $request->user(), - $request->topic(), - $request->get('subject'), - $request->get('body'), - $request->dataForStore() - ); + $thread = $this->threads->create($request); $this->success('forum.threads.created'); diff --git a/app/Http/Requests/ThreadRequest.php b/app/Http/Requests/ThreadRequest.php index 8bfeb0f87..7a4b64467 100644 --- a/app/Http/Requests/ThreadRequest.php +++ b/app/Http/Requests/ThreadRequest.php @@ -2,11 +2,13 @@ namespace App\Http\Requests; +use App\Forum\NewThread; use App\Forum\Topic; use App\Forum\TopicRepository; +use App\Users\User; use Auth; -class ThreadRequest extends Request +class ThreadRequest extends Request implements NewThread { public function authorize() { @@ -30,18 +32,33 @@ public function rules() return $rules; } - public function topic(): Topic + public function dataForUpdate(): array { - return app(TopicRepository::class)->find((int) $this->get('topic')); + return array_merge($this->only('subject', 'body', 'tags'), ['topic' => $this->topic()]); } - public function dataForStore(): array + public function author(): User { - return array_merge($this->only('tags'), ['ip' => $this->ip()]); + return $this->user(); } - public function dataForUpdate(): array + public function subject(): string { - return array_merge($this->only('subject', 'body', 'tags'), ['topic' => $this->topic()]); + return $this->get('subject'); + } + + public function body(): string + { + return $this->get('body'); + } + + public function topic(): Topic + { + return app(TopicRepository::class)->find((int) $this->get('topic')); + } + + public function tags(): array + { + return $this->get('tags'); } } diff --git a/tests/Components/Forum/ThreadRepositoryTest.php b/tests/Components/Forum/ThreadRepositoryTest.php index d9b711777..34e703394 100644 --- a/tests/Components/Forum/ThreadRepositoryTest.php +++ b/tests/Components/Forum/ThreadRepositoryTest.php @@ -2,10 +2,12 @@ namespace Tests\Components\Forum; +use App\Forum\NewThread; use App\Forum\Thread; use App\Forum\ThreadRepository; use App\Forum\Topic; use App\Replies\Reply; +use App\Users\User; use Illuminate\Contracts\Pagination\Paginator; use Illuminate\Foundation\Testing\DatabaseMigrations; use Tests\TestCase; @@ -50,10 +52,7 @@ public function find_by_slug() /** @test */ function we_can_create_a_thread() { - $user = $this->createUser(); - $topic = $this->create(Topic::class); - - $this->assertInstanceOf(Thread::class, $this->repo->create($user, $topic, 'Foo', 'Baz')); + $this->assertInstanceOf(Thread::class, $this->repo->create($this->newThread())); } /** @test */ @@ -98,4 +97,40 @@ function we_can_mark_and_unmark_a_reply_as_the_solution() $this->assertFalse($thread->isSolutionReply($reply)); } + + private function newThread(): NewThread + { + return new class extends ThreadRepositoryTest implements NewThread + { + public function author(): User + { + return $this->createUser(); + } + + public function subject(): string + { + return 'Foo Thread'; + } + + public function body(): string + { + return 'Foo Thread Body'; + } + + public function topic(): Topic + { + return $this->create(Topic::class); + } + + public function ip() + { + return ''; + } + + public function tags(): array + { + return []; + } + }; + } } diff --git a/tests/Components/Users/UserRepositoryTest.php b/tests/Components/Users/UserRepositoryTest.php index 9a705ae92..86309a446 100644 --- a/tests/Components/Users/UserRepositoryTest.php +++ b/tests/Components/Users/UserRepositoryTest.php @@ -38,11 +38,9 @@ function find_by_email_address() /** @test */ function we_can_create_a_user() { - $this->assertInstanceOf(User::class, $this->repo->create(new DummyNewUser( - 'John Doe', + $this->assertInstanceOf(User::class, $this->repo->create($this->newUser( 'john@example.com', - 'johndoe', - 'password' + 'johndoe' ))); } @@ -51,8 +49,8 @@ function we_cannot_create_a_user_with_the_same_email_address() { $this->expectException(CannotCreateUser::class); - $this->repo->create(new DummyNewUser('John Doe', 'john@example.com', 'johndoe', 'password')); - $this->repo->create(new DummyNewUser('John Foo', 'john@example.com', 'johnfoo', 'password')); + $this->repo->create($this->newUser('john@example.com', 'johndoe')); + $this->repo->create($this->newUser('john@example.com', 'johnfoo')); } /** @test */ @@ -60,8 +58,8 @@ function we_cannot_create_a_user_with_the_same_username() { $this->expectException(CannotCreateUser::class); - $this->repo->create(new DummyNewUser('John Doe', 'john@example.com', 'johndoe', 'password')); - $this->repo->create(new DummyNewUser('John Doe', 'john.doe@example.com', 'johndoe', 'password')); + $this->repo->create($this->newUser('john@example.com', 'johndoe')); + $this->repo->create($this->newUser('john.doe@example.com', 'johndoe')); } /** @test */ @@ -74,70 +72,51 @@ function we_can_update_a_user() $this->assertEquals('foo', $user->username()); $this->seeInDatabase('users', ['username' => 'foo', 'name' => 'bar']); } -} - -class DummyNewUser implements NewUser -{ - /** - * @var string - */ - private $name; - - /** - * @var string - */ - private $emailAddress; - - /** - * @var string - */ - private $username; - - /** - * @var string|null - */ - private $password; - - public function __construct($name, $emailAddress, $username, $password = null) - { - $this->name = $name; - $this->emailAddress = $emailAddress; - $this->username = $username; - $this->password = $password; - } - - public function name(): string - { - return $this->name; - } - - public function emailAddress(): string - { - return $this->emailAddress; - } - - public function username(): string - { - return $this->username; - } - - public function password(): string - { - return $this->password ?: ''; - } - - public function ip() - { - return ''; - } - - public function githubId(): string - { - return ''; - } - public function githubUsername(): string + private function newUser($emailAddress, $username) { - return ''; + return new class($emailAddress, $username) implements NewUser + { + public function __construct($emailAddress, $username) + { + $this->emailAddress = $emailAddress; + $this->username = $username; + } + + public function name(): string + { + return 'John Doe'; + } + + public function emailAddress(): string + { + return $this->emailAddress; + } + + public function username(): string + { + return $this->username; + } + + public function password(): string + { + return 'password'; + } + + public function ip() + { + return ''; + } + + public function githubId(): string + { + return ''; + } + + public function githubUsername(): string + { + return ''; + } + }; } } diff --git a/tests/Features/TagsTest.php b/tests/Features/TagsTest.php index 039516b9d..7f2c48449 100644 --- a/tests/Features/TagsTest.php +++ b/tests/Features/TagsTest.php @@ -2,6 +2,7 @@ namespace Tests\Features; +use App\Forum\NewThread; use App\Forum\ThreadRepository; use App\Forum\Topic; use App\Tags\Tag; @@ -26,20 +27,54 @@ public function users_can_see_a_list_of_tags() /** @test */ public function users_can_see_content_related_to_a_tag() { - $topic = $this->create(Topic::class); $tag = $this->create(Tag::class, ['name' => 'Eloquent', 'description' => 'Example description.']); - $this->app->make(ThreadRepository::class)->create( - $this->create(User::class), - $topic, - 'Foo Thread', - 'Foo Thread Body', - ['tags' => [$tag->id()]] - ); + $this->app->make(ThreadRepository::class)->create($this->newThread($tag)); $this->visit('/tags/'.$tag->slug()) ->see('Eloquent') ->see('Example description.') ->see('Foo Thread'); } + + private function newThread(Tag $tag): NewThread + { + return new class($tag) extends TagsTest implements NewThread + { + public function __construct($tag) + { + $this->tag = $tag; + } + + public function author(): User + { + return $this->createUser(); + } + + public function subject(): string + { + return 'Foo Thread'; + } + + public function body(): string + { + return 'Foo Thread Body'; + } + + public function topic(): Topic + { + return $this->create(Topic::class); + } + + public function ip() + { + return ''; + } + + public function tags(): array + { + return [$this->tag->id()]; + } + }; + } } From efd4ced35fc6596a189b2f1252abe17df4709ea6 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 14:39:40 +0100 Subject: [PATCH 116/288] Refactor new reply to DTO --- app/Http/Controllers/ReplyController.php | 25 ++------------ app/Http/Requests/ReplyRequest.php | 32 ++++++++++++++++- app/Replies/NewReply.php | 13 +++++++ app/Replies/ReplyAble.php | 6 +++- app/Replies/ReplyRepository.php | 14 ++++---- app/Replies/UsesReplies.php | 4 +-- .../Replies/ReplyRepositoryTest.php | 34 ++++++++++++++++--- 7 files changed, 90 insertions(+), 38 deletions(-) create mode 100644 app/Replies/NewReply.php diff --git a/app/Http/Controllers/ReplyController.php b/app/Http/Controllers/ReplyController.php index 671f8f4f1..088558496 100644 --- a/app/Http/Controllers/ReplyController.php +++ b/app/Http/Controllers/ReplyController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers; use App\Forum\Thread; -use App\Forum\ThreadRepository; use App\Http\Requests\ReplyRequest; use App\Replies\Reply; use App\Replies\ReplyAble; @@ -17,14 +16,8 @@ class ReplyController extends Controller */ private $replies; - /** - * @var \App\Forum\ThreadRepository - */ - private $threads; - - public function __construct(ReplyRepository $replies, ThreadRepository $threads) + public function __construct(ReplyRepository $replies) { - $this->threads = $threads; $this->replies = $replies; $this->middleware(['auth', 'confirmed']); @@ -32,13 +25,11 @@ public function __construct(ReplyRepository $replies, ThreadRepository $threads) public function store(ReplyRequest $request) { - $replyAble = $this->findReplyAble($request->get('replyable_id'), $request->get('replyable_type')); - - $this->replies->create($replyAble, $request->user(), $request->get('body'), ['ip' => $request->ip()]); + $reply = $this->replies->create($request); $this->success('replies.created'); - return $this->redirectToReplyAble($replyAble); + return $this->redirectToReplyAble($reply->replyAble()); } public function edit(Reply $reply) @@ -70,16 +61,6 @@ public function delete(Reply $reply) return $this->redirectToReplyAble($reply->replyAble()); } - private function findReplyAble(int $id, string $type): ReplyAble - { - switch ($type) { - case Thread::TABLE: - return $this->threads->find($id); - } - - abort(404); - } - private function redirectToReplyAble(ReplyAble $replyAble): RedirectResponse { if ($replyAble instanceof Thread) { diff --git a/app/Http/Requests/ReplyRequest.php b/app/Http/Requests/ReplyRequest.php index 09043efdd..733a1deb5 100644 --- a/app/Http/Requests/ReplyRequest.php +++ b/app/Http/Requests/ReplyRequest.php @@ -2,9 +2,14 @@ namespace App\Http\Requests; +use App\Forum\Thread; +use App\Forum\ThreadRepository; +use App\Replies\NewReply; +use App\Replies\ReplyAble; +use App\Users\User; use Auth; -class ReplyRequest extends Request +class ReplyRequest extends Request implements NewReply { public function authorize() { @@ -17,4 +22,29 @@ public function rules() 'body' => 'required|spam', ]; } + + public function replyAble(): ReplyAble + { + return $this->findReplyAble($this->get('replyable_id'), $this->get('replyable_type')); + } + + private function findReplyAble(int $id, string $type): ReplyAble + { + switch ($type) { + case Thread::TABLE: + return app(ThreadRepository::class)->find($id); + } + + abort(404); + } + + public function author(): User + { + return $this->user(); + } + + public function body(): string + { + return $this->get('body'); + } } diff --git a/app/Replies/NewReply.php b/app/Replies/NewReply.php new file mode 100644 index 000000000..178a1d5b7 --- /dev/null +++ b/app/Replies/NewReply.php @@ -0,0 +1,13 @@ +model->findOrFail($id); } - public function create(ReplyAble $relation, User $author, string $body, array $attributes = []): Reply + public function create(NewReply $data): Reply { - $reply = $this->model->newInstance(compact('body')); - $reply->author_id = $author->id(); - $reply->ip = Arr::get($attributes, 'ip', ''); + $reply = $this->model->newInstance(); + $reply->body = $data->body(); + $reply->author_id = $data->author()->id(); + $reply->ip = $data->ip(); - $relation->replyAble()->save($reply); + $data->replyAble()->repliesRelation()->save($reply); return $reply; } diff --git a/app/Replies/UsesReplies.php b/app/Replies/UsesReplies.php index 32cdbb6f8..929f0e0f3 100644 --- a/app/Replies/UsesReplies.php +++ b/app/Replies/UsesReplies.php @@ -11,10 +11,10 @@ trait UsesReplies */ public function replies() { - return $this->replyAble; + return $this->repliesRelation; } - public function replyAble(): MorphMany + public function repliesRelation(): MorphMany { return $this->morphMany(Reply::class, 'replyable'); } diff --git a/tests/Components/Replies/ReplyRepositoryTest.php b/tests/Components/Replies/ReplyRepositoryTest.php index 3978129d8..005bc03ef 100644 --- a/tests/Components/Replies/ReplyRepositoryTest.php +++ b/tests/Components/Replies/ReplyRepositoryTest.php @@ -3,8 +3,11 @@ namespace Tests\Components\Replies; use App\Forum\Thread; +use App\Replies\NewReply; use App\Replies\Reply; +use App\Replies\ReplyAble; use App\Replies\ReplyRepository; +use App\Users\User; use Illuminate\Foundation\Testing\DatabaseMigrations; use Tests\TestCase; use Tests\TestsRepository; @@ -21,10 +24,7 @@ class ReplyRepositoryTest extends TestCase /** @test */ function we_can_create_a_reply() { - $thread = $this->create(Thread::class); - $user = $this->createUser(); - - $this->assertInstanceOf(Reply::class, $this->repo->create($thread, $user, 'Foo')); + $this->assertInstanceOf(Reply::class, $this->repo->create($this->newReply())); } /** @test */ @@ -52,4 +52,30 @@ function we_can_delete_a_reply() $this->notSeeInDatabase('replies', ['id' => 1]); } + + private function newReply() + { + return new class extends ReplyRepositoryTest implements NewReply + { + public function replyAble(): ReplyAble + { + return $this->create(Thread::class); + } + + public function author(): User + { + return $this->createUser(); + } + + public function body(): string + { + return 'Foo'; + } + + public function ip() + { + return ''; + } + }; + } } From e655535a7e34fc15ab8c6aad0e22b24c26baed42 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 14:40:40 +0100 Subject: [PATCH 117/288] Shorten script --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1786a34dc..15d5e2274 100644 --- a/composer.json +++ b/composer.json @@ -53,7 +53,7 @@ "php artisan optimize" ], "test": "phpunit", - "specs": "phpspec run" + "spec": "phpspec run" }, "config": { "preferred-install": "dist", From 905de22f88bf48a87da73c0f853ee7c1f1f33c20 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 14:42:29 +0100 Subject: [PATCH 118/288] Rename app --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 15d5e2274..ec39eebd2 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "laravelio/laravelio", + "name": "laravelio/portal", "description": "The source code for the Laravel.io community portal.", "license": "MIT", "type": "project", From ea64f74285e2f156d8de0c6417833783d72ee3d4 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 14:49:48 +0100 Subject: [PATCH 119/288] Rename DTO's --- app/Forum/{NewThread.php => ThreadData.php} | 2 +- app/Forum/ThreadRepository.php | 2 +- app/Http/Controllers/Auth/RegisterController.php | 6 +++--- ...CreateUserRequest.php => RegisterRequest.php} | 4 ++-- app/Http/Requests/ReplyRequest.php | 4 ++-- app/Http/Requests/ThreadRequest.php | 4 ++-- app/Replies/{NewReply.php => ReplyData.php} | 2 +- app/Replies/ReplyRepository.php | 2 +- app/Users/{NewUser.php => UserData.php} | 2 +- app/Users/UserRepository.php | 2 +- tests/Components/Forum/ThreadRepositoryTest.php | 8 ++++---- tests/Components/Replies/ReplyRepositoryTest.php | 8 ++++---- tests/Components/Users/UserRepositoryTest.php | 16 ++++++++-------- tests/Features/TagsTest.php | 8 ++++---- 14 files changed, 35 insertions(+), 35 deletions(-) rename app/Forum/{NewThread.php => ThreadData.php} (92%) rename app/Http/Requests/{CreateUserRequest.php => RegisterRequest.php} (94%) rename app/Replies/{NewReply.php => ReplyData.php} (90%) rename app/Users/{NewUser.php => UserData.php} (94%) diff --git a/app/Forum/NewThread.php b/app/Forum/ThreadData.php similarity index 92% rename from app/Forum/NewThread.php rename to app/Forum/ThreadData.php index e640b6dd9..1fbb172fd 100644 --- a/app/Forum/NewThread.php +++ b/app/Forum/ThreadData.php @@ -4,7 +4,7 @@ use App\Users\User; -interface NewThread +interface ThreadData { public function author(): User; public function subject(): string; diff --git a/app/Forum/ThreadRepository.php b/app/Forum/ThreadRepository.php index 57fb45954..c6fb50033 100644 --- a/app/Forum/ThreadRepository.php +++ b/app/Forum/ThreadRepository.php @@ -39,7 +39,7 @@ public function findBySlug(string $slug): Thread return $this->model->where('slug', $slug)->firstOrFail(); } - public function create(NewThread $data): Thread + public function create(ThreadData $data): Thread { $thread = $this->model->newInstance(); $thread->subject = $data->subject(); diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 34a2fe348..e69699e60 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers\Auth; -use App\Http\Requests\CreateUserRequest; +use App\Http\Requests\RegisterRequest; use App\Jobs\SendEmailAddressConfirmation; use App\Http\Controllers\Controller; use App\Users\User; @@ -53,7 +53,7 @@ public function redirectToRegistrationForm() */ protected function validator(array $data) { - return Validator::make($data, app(CreateUserRequest::class)->rules()); + return Validator::make($data, app(RegisterRequest::class)->rules()); } /** @@ -61,7 +61,7 @@ protected function validator(array $data) */ protected function create(array $data): User { - $user = $this->users->create(app(CreateUserRequest::class)); + $user = $this->users->create(app(RegisterRequest::class)); $this->dispatchNow(new SendEmailAddressConfirmation($user)); diff --git a/app/Http/Requests/CreateUserRequest.php b/app/Http/Requests/RegisterRequest.php similarity index 94% rename from app/Http/Requests/CreateUserRequest.php rename to app/Http/Requests/RegisterRequest.php index 2efb19cfb..efd5bb02e 100644 --- a/app/Http/Requests/CreateUserRequest.php +++ b/app/Http/Requests/RegisterRequest.php @@ -2,11 +2,11 @@ namespace App\Http\Requests; -use App\Users\NewUser; +use App\Users\UserData; use Illuminate\Foundation\Http\FormRequest; use Session; -class CreateUserRequest extends FormRequest implements NewUser +class RegisterRequest extends FormRequest implements UserData { /** * Determine if the user is authorized to make this request. diff --git a/app/Http/Requests/ReplyRequest.php b/app/Http/Requests/ReplyRequest.php index 733a1deb5..31b6826a0 100644 --- a/app/Http/Requests/ReplyRequest.php +++ b/app/Http/Requests/ReplyRequest.php @@ -4,12 +4,12 @@ use App\Forum\Thread; use App\Forum\ThreadRepository; -use App\Replies\NewReply; +use App\Replies\ReplyData; use App\Replies\ReplyAble; use App\Users\User; use Auth; -class ReplyRequest extends Request implements NewReply +class ReplyRequest extends Request implements ReplyData { public function authorize() { diff --git a/app/Http/Requests/ThreadRequest.php b/app/Http/Requests/ThreadRequest.php index 7a4b64467..14e34ae90 100644 --- a/app/Http/Requests/ThreadRequest.php +++ b/app/Http/Requests/ThreadRequest.php @@ -2,13 +2,13 @@ namespace App\Http\Requests; -use App\Forum\NewThread; +use App\Forum\ThreadData; use App\Forum\Topic; use App\Forum\TopicRepository; use App\Users\User; use Auth; -class ThreadRequest extends Request implements NewThread +class ThreadRequest extends Request implements ThreadData { public function authorize() { diff --git a/app/Replies/NewReply.php b/app/Replies/ReplyData.php similarity index 90% rename from app/Replies/NewReply.php rename to app/Replies/ReplyData.php index 178a1d5b7..45dc56097 100644 --- a/app/Replies/NewReply.php +++ b/app/Replies/ReplyData.php @@ -4,7 +4,7 @@ use App\Users\User; -interface NewReply +interface ReplyData { public function replyAble(): ReplyAble; public function author(): User; diff --git a/app/Replies/ReplyRepository.php b/app/Replies/ReplyRepository.php index 6e0a92ff9..ed611bcd2 100644 --- a/app/Replies/ReplyRepository.php +++ b/app/Replies/ReplyRepository.php @@ -19,7 +19,7 @@ public function find(int $id): Reply return $this->model->findOrFail($id); } - public function create(NewReply $data): Reply + public function create(ReplyData $data): Reply { $reply = $this->model->newInstance(); $reply->body = $data->body(); diff --git a/app/Users/NewUser.php b/app/Users/UserData.php similarity index 94% rename from app/Users/NewUser.php rename to app/Users/UserData.php index 9992a414e..2b15fa5dd 100644 --- a/app/Users/NewUser.php +++ b/app/Users/UserData.php @@ -2,7 +2,7 @@ namespace App\Users; -interface NewUser +interface UserData { public function name(): string; public function emailAddress(): string; diff --git a/app/Users/UserRepository.php b/app/Users/UserRepository.php index 2d02fdf89..7ae85f577 100644 --- a/app/Users/UserRepository.php +++ b/app/Users/UserRepository.php @@ -33,7 +33,7 @@ public function findByGithubId(string $githubId): User return $this->model->where('github_id', $githubId)->firstOrFail(); } - public function create(NewUser $data): User + public function create(UserData $data): User { $this->assertEmailAddressIsUnique($data->emailAddress()); $this->assertUsernameIsUnique($data->username()); diff --git a/tests/Components/Forum/ThreadRepositoryTest.php b/tests/Components/Forum/ThreadRepositoryTest.php index 34e703394..522a46523 100644 --- a/tests/Components/Forum/ThreadRepositoryTest.php +++ b/tests/Components/Forum/ThreadRepositoryTest.php @@ -2,7 +2,7 @@ namespace Tests\Components\Forum; -use App\Forum\NewThread; +use App\Forum\ThreadData; use App\Forum\Thread; use App\Forum\ThreadRepository; use App\Forum\Topic; @@ -52,7 +52,7 @@ public function find_by_slug() /** @test */ function we_can_create_a_thread() { - $this->assertInstanceOf(Thread::class, $this->repo->create($this->newThread())); + $this->assertInstanceOf(Thread::class, $this->repo->create($this->threadData())); } /** @test */ @@ -98,9 +98,9 @@ function we_can_mark_and_unmark_a_reply_as_the_solution() $this->assertFalse($thread->isSolutionReply($reply)); } - private function newThread(): NewThread + private function threadData(): ThreadData { - return new class extends ThreadRepositoryTest implements NewThread + return new class extends ThreadRepositoryTest implements ThreadData { public function author(): User { diff --git a/tests/Components/Replies/ReplyRepositoryTest.php b/tests/Components/Replies/ReplyRepositoryTest.php index 005bc03ef..fd9946c1f 100644 --- a/tests/Components/Replies/ReplyRepositoryTest.php +++ b/tests/Components/Replies/ReplyRepositoryTest.php @@ -3,7 +3,7 @@ namespace Tests\Components\Replies; use App\Forum\Thread; -use App\Replies\NewReply; +use App\Replies\ReplyData; use App\Replies\Reply; use App\Replies\ReplyAble; use App\Replies\ReplyRepository; @@ -24,7 +24,7 @@ class ReplyRepositoryTest extends TestCase /** @test */ function we_can_create_a_reply() { - $this->assertInstanceOf(Reply::class, $this->repo->create($this->newReply())); + $this->assertInstanceOf(Reply::class, $this->repo->create($this->replyData())); } /** @test */ @@ -53,9 +53,9 @@ function we_can_delete_a_reply() $this->notSeeInDatabase('replies', ['id' => 1]); } - private function newReply() + private function replyData() { - return new class extends ReplyRepositoryTest implements NewReply + return new class extends ReplyRepositoryTest implements ReplyData { public function replyAble(): ReplyAble { diff --git a/tests/Components/Users/UserRepositoryTest.php b/tests/Components/Users/UserRepositoryTest.php index 86309a446..aec1c9ae8 100644 --- a/tests/Components/Users/UserRepositoryTest.php +++ b/tests/Components/Users/UserRepositoryTest.php @@ -3,7 +3,7 @@ namespace Tests\Components\Users; use App\Users\Exceptions\CannotCreateUser; -use App\Users\NewUser; +use App\Users\UserData; use App\Users\User; use App\Users\UserRepository; use Illuminate\Foundation\Testing\DatabaseMigrations; @@ -38,7 +38,7 @@ function find_by_email_address() /** @test */ function we_can_create_a_user() { - $this->assertInstanceOf(User::class, $this->repo->create($this->newUser( + $this->assertInstanceOf(User::class, $this->repo->create($this->userData( 'john@example.com', 'johndoe' ))); @@ -49,8 +49,8 @@ function we_cannot_create_a_user_with_the_same_email_address() { $this->expectException(CannotCreateUser::class); - $this->repo->create($this->newUser('john@example.com', 'johndoe')); - $this->repo->create($this->newUser('john@example.com', 'johnfoo')); + $this->repo->create($this->userData('john@example.com', 'johndoe')); + $this->repo->create($this->userData('john@example.com', 'johnfoo')); } /** @test */ @@ -58,8 +58,8 @@ function we_cannot_create_a_user_with_the_same_username() { $this->expectException(CannotCreateUser::class); - $this->repo->create($this->newUser('john@example.com', 'johndoe')); - $this->repo->create($this->newUser('john.doe@example.com', 'johndoe')); + $this->repo->create($this->userData('john@example.com', 'johndoe')); + $this->repo->create($this->userData('john.doe@example.com', 'johndoe')); } /** @test */ @@ -73,9 +73,9 @@ function we_can_update_a_user() $this->seeInDatabase('users', ['username' => 'foo', 'name' => 'bar']); } - private function newUser($emailAddress, $username) + private function userData($emailAddress, $username) { - return new class($emailAddress, $username) implements NewUser + return new class($emailAddress, $username) implements UserData { public function __construct($emailAddress, $username) { diff --git a/tests/Features/TagsTest.php b/tests/Features/TagsTest.php index 7f2c48449..f824fe09f 100644 --- a/tests/Features/TagsTest.php +++ b/tests/Features/TagsTest.php @@ -2,7 +2,7 @@ namespace Tests\Features; -use App\Forum\NewThread; +use App\Forum\ThreadData; use App\Forum\ThreadRepository; use App\Forum\Topic; use App\Tags\Tag; @@ -29,7 +29,7 @@ public function users_can_see_content_related_to_a_tag() { $tag = $this->create(Tag::class, ['name' => 'Eloquent', 'description' => 'Example description.']); - $this->app->make(ThreadRepository::class)->create($this->newThread($tag)); + $this->app->make(ThreadRepository::class)->create($this->ThreadData($tag)); $this->visit('/tags/'.$tag->slug()) ->see('Eloquent') @@ -37,9 +37,9 @@ public function users_can_see_content_related_to_a_tag() ->see('Foo Thread'); } - private function newThread(Tag $tag): NewThread + private function ThreadData(Tag $tag): ThreadData { - return new class($tag) extends TagsTest implements NewThread + return new class($tag) extends TagsTest implements ThreadData { public function __construct($tag) { From 730d423184367593118f3e4b3a7cd755f68b2abf Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 14:56:37 +0100 Subject: [PATCH 120/288] Remove white line --- resources/views/forum/overview.blade.php | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/views/forum/overview.blade.php b/resources/views/forum/overview.blade.php index 8201d7590..f39cb5645 100644 --- a/resources/views/forum/overview.blade.php +++ b/resources/views/forum/overview.blade.php @@ -3,7 +3,6 @@ @extends('layouts.default') @section('content') - @if (isset($topic))

        {{ $topic->name() }}

        From e9d19e70c66b25af3a7f2790b3551074525d167a Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 15:13:35 +0100 Subject: [PATCH 121/288] Refactor some things --- app/Http/Controllers/Auth/GithubController.php | 2 +- app/Http/Controllers/SettingsController.php | 2 +- app/Http/Controllers/ThreadsController.php | 2 +- app/Http/Requests/ReplyRequest.php | 2 +- app/Http/Requests/ThreadRequest.php | 12 ++++++------ app/Http/Requests/UpdatePasswordRequest.php | 2 +- resources/lang/en/errors.php | 1 + 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/Auth/GithubController.php b/app/Http/Controllers/Auth/GithubController.php index c66709a0f..ed3e40610 100644 --- a/app/Http/Controllers/Auth/GithubController.php +++ b/app/Http/Controllers/Auth/GithubController.php @@ -74,7 +74,7 @@ private function userNotFound(GithubUser $user): RedirectResponse private function redirectUserToHome(): RedirectResponse { - $this->error('Your Github account needs to be older than 2 weeks in order to register.'); + $this->error('errors.github_account_too_young'); return redirect()->home(); } diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 7f082a433..dc19acb91 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -35,7 +35,7 @@ public function password() public function updatePassword(UpdatePasswordRequest $request, UserRepository $users) { - $users->update(Auth::user(), $request->dataForUpdate()); + $users->update(Auth::user(), $request->changed()); $this->success('settings.password.updated'); diff --git a/app/Http/Controllers/ThreadsController.php b/app/Http/Controllers/ThreadsController.php index 22141a421..9d1534c27 100644 --- a/app/Http/Controllers/ThreadsController.php +++ b/app/Http/Controllers/ThreadsController.php @@ -65,7 +65,7 @@ public function update(ThreadRequest $request, Thread $thread) { $this->authorize('update', $thread); - $this->threads->update($thread, $request->dataForUpdate()); + $this->threads->update($thread, $request->changed()); $this->success('forum.threads.updated'); diff --git a/app/Http/Requests/ReplyRequest.php b/app/Http/Requests/ReplyRequest.php index 31b6826a0..67fc864d5 100644 --- a/app/Http/Requests/ReplyRequest.php +++ b/app/Http/Requests/ReplyRequest.php @@ -32,7 +32,7 @@ private function findReplyAble(int $id, string $type): ReplyAble { switch ($type) { case Thread::TABLE: - return app(ThreadRepository::class)->find($id); + return $this->container->make(ThreadRepository::class)->find($id); } abort(404); diff --git a/app/Http/Requests/ThreadRequest.php b/app/Http/Requests/ThreadRequest.php index 14e34ae90..0caf23876 100644 --- a/app/Http/Requests/ThreadRequest.php +++ b/app/Http/Requests/ThreadRequest.php @@ -32,11 +32,6 @@ public function rules() return $rules; } - public function dataForUpdate(): array - { - return array_merge($this->only('subject', 'body', 'tags'), ['topic' => $this->topic()]); - } - public function author(): User { return $this->user(); @@ -54,11 +49,16 @@ public function body(): string public function topic(): Topic { - return app(TopicRepository::class)->find((int) $this->get('topic')); + return $this->container->make(TopicRepository::class)->find((int) $this->get('topic')); } public function tags(): array { return $this->get('tags'); } + + public function changed(): array + { + return array_merge($this->only('subject', 'body', 'tags'), ['topic' => $this->topic()]); + } } diff --git a/app/Http/Requests/UpdatePasswordRequest.php b/app/Http/Requests/UpdatePasswordRequest.php index 08e892611..34585222d 100644 --- a/app/Http/Requests/UpdatePasswordRequest.php +++ b/app/Http/Requests/UpdatePasswordRequest.php @@ -19,7 +19,7 @@ public function rules() ]; } - public function dataForUpdate(): array + public function changed(): array { return ['password' => bcrypt($this->get('password'))]; } diff --git a/resources/lang/en/errors.php b/resources/lang/en/errors.php index fae19774a..cf820a56e 100644 --- a/resources/lang/en/errors.php +++ b/resources/lang/en/errors.php @@ -5,5 +5,6 @@ 'banned' => 'This account is banned.', 'fields' => 'Something went wrong. Please review the fields below.', 'unconfirmed' => 'Please confirm your email address first.', + 'github_account_too_young' => 'Your Github account needs to be older than 2 weeks in order to register.', ]; From f5ff99c9f26018bdccb8b9ca0a49aa8d7fe1eb3e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 15:21:01 +0100 Subject: [PATCH 122/288] Split up controllers more --- app/Http/Controllers/DashboardController.php | 16 +++++++ app/Http/Controllers/HomeController.php | 2 +- app/Http/Controllers/ProfileController.php | 13 ++++++ .../Settings/PasswordController.php | 30 +++++++++++++ .../Settings/ProfileController.php | 30 +++++++++++++ app/Http/Controllers/SettingsController.php | 44 ------------------- app/Http/Controllers/UsersController.php | 23 ---------- routes/web.php | 14 +++--- 8 files changed, 97 insertions(+), 75 deletions(-) create mode 100644 app/Http/Controllers/DashboardController.php create mode 100644 app/Http/Controllers/ProfileController.php create mode 100644 app/Http/Controllers/Settings/PasswordController.php create mode 100644 app/Http/Controllers/Settings/ProfileController.php delete mode 100644 app/Http/Controllers/SettingsController.php delete mode 100644 app/Http/Controllers/UsersController.php diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php new file mode 100644 index 000000000..7416cf98f --- /dev/null +++ b/app/Http/Controllers/DashboardController.php @@ -0,0 +1,16 @@ +middleware('auth'); + } + + public function show() + { + return view('users.dashboard'); + } +} diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index c8d935809..d890966a3 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -4,7 +4,7 @@ class HomeController extends Controller { - public function home() + public function show() { return view('home'); } diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php new file mode 100644 index 000000000..02a97a1c5 --- /dev/null +++ b/app/Http/Controllers/ProfileController.php @@ -0,0 +1,13 @@ +middleware('auth'); + } + + public function edit() + { + return view('users.settings.password'); + } + + public function update(UpdatePasswordRequest $request, UserRepository $users) + { + $users->update(Auth::user(), $request->changed()); + + $this->success('settings.password.updated'); + + return redirect()->route('settings.password'); + } +} diff --git a/app/Http/Controllers/Settings/ProfileController.php b/app/Http/Controllers/Settings/ProfileController.php new file mode 100644 index 000000000..6294bf9a4 --- /dev/null +++ b/app/Http/Controllers/Settings/ProfileController.php @@ -0,0 +1,30 @@ +middleware('auth'); + } + + public function edit() + { + return view('users.settings.profile'); + } + + public function update(UpdateProfileRequest $request, UserRepository $users) + { + $users->update(Auth::user(), $request->only('name', 'email', 'username')); + + $this->success('settings.updated'); + + return redirect()->route('settings.profile'); + } +} diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php deleted file mode 100644 index dc19acb91..000000000 --- a/app/Http/Controllers/SettingsController.php +++ /dev/null @@ -1,44 +0,0 @@ -middleware('auth'); - } - - public function profile() - { - return view('users.settings.profile'); - } - - public function updateProfile(UpdateProfileRequest $request, UserRepository $users) - { - $users->update(Auth::user(), $request->only('name', 'email', 'username')); - - $this->success('settings.updated'); - - return redirect()->route('settings.profile'); - } - - public function password() - { - return view('users.settings.password'); - } - - public function updatePassword(UpdatePasswordRequest $request, UserRepository $users) - { - $users->update(Auth::user(), $request->changed()); - - $this->success('settings.password.updated'); - - return redirect()->route('settings.password'); - } -} diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php deleted file mode 100644 index 2d4f57ade..000000000 --- a/app/Http/Controllers/UsersController.php +++ /dev/null @@ -1,23 +0,0 @@ -middleware('auth', ['except' => 'profile']); - } - - public function dashboard() - { - return view('users.dashboard'); - } - - public function profile(User $user) - { - return view('users.profile', compact('user')); - } -} diff --git a/routes/web.php b/routes/web.php index 44313eb0e..9ca30d0b5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -9,7 +9,7 @@ } // Home -Route::get('/', ['as' => 'home', 'uses' => 'HomeController@home']); +Route::get('/', ['as' => 'home', 'uses' => 'HomeController@show']); // Authentication Route::group(['namespace' => 'Auth'], function () { @@ -41,14 +41,14 @@ }); // Users -Route::get('dashboard', ['as' => 'dashboard', 'uses' => 'UsersController@dashboard']); -Route::get('user/{username}', ['as' => 'profile', 'uses' => 'UsersController@profile']); +Route::get('dashboard', ['as' => 'dashboard', 'uses' => 'DashboardController@show']); +Route::get('user/{username}', ['as' => 'profile', 'uses' => 'ProfileController@show']); // Settings -Route::get('settings', ['as' => 'settings.profile', 'uses' => 'SettingsController@profile']); -Route::put('settings', ['as' => 'settings.profile.update', 'uses' => 'SettingsController@updateProfile']); -Route::get('settings/password', ['as' => 'settings.password', 'uses' => 'SettingsController@password']); -Route::put('settings/password', ['as' => 'settings.password.update', 'uses' => 'SettingsController@updatePassword']); +Route::get('settings', ['as' => 'settings.profile', 'uses' => 'Settings\ProfileController@edit']); +Route::put('settings', ['as' => 'settings.profile.update', 'uses' => 'Settings\ProfileController@update']); +Route::get('settings/password', ['as' => 'settings.password', 'uses' => 'Settings\PasswordController@edit']); +Route::put('settings/password', ['as' => 'settings.password.update', 'uses' => 'Settings\PasswordController@update']); // Forum Route::get('forum', ['as' => 'forum', 'uses' => 'ThreadsController@overview']); From c2c194f90d7c90009aea86971788f54c25c79dbc Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 16:35:04 +0100 Subject: [PATCH 123/288] Rename class --- app/Forum/Thread.php | 4 ++-- app/Tags/{Taggable.php => TagAble.php} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename app/Tags/{Taggable.php => TagAble.php} (91%) diff --git a/app/Forum/Thread.php b/app/Forum/Thread.php index 5dcd666ff..7759ca334 100644 --- a/app/Forum/Thread.php +++ b/app/Forum/Thread.php @@ -3,7 +3,7 @@ namespace App\Forum; use App\DateTime\Timestamps; -use App\Tags\Taggable; +use App\Tags\TagAble; use App\Users\Authored; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; @@ -14,7 +14,7 @@ use App\Tags\UsesTags; use App\Users\HasAuthor; -class Thread extends Model implements Authored, ReplyAble, Taggable, Timestamps +class Thread extends Model implements Authored, ReplyAble, TagAble, Timestamps { use HasAuthor, HasTimestamps, UsesReplies, UsesTags; diff --git a/app/Tags/Taggable.php b/app/Tags/TagAble.php similarity index 91% rename from app/Tags/Taggable.php rename to app/Tags/TagAble.php index 8c3dd42e5..c77aad986 100644 --- a/app/Tags/Taggable.php +++ b/app/Tags/TagAble.php @@ -4,7 +4,7 @@ use Illuminate\Database\Eloquent\Relations\MorphToMany; -interface Taggable +interface TagAble { /** * @return \App\Tags\Tag[] From 9bd56dbbbdbc09080c9dc6814b3d7d2bfe9f0738 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 16:35:20 +0100 Subject: [PATCH 124/288] Upgrade frontend dependencies --- gulpfile.js | 4 ++-- package.json | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 950c9bcf3..23db2c45c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,6 @@ const elixir = require('laravel-elixir'); -require('laravel-elixir-vue'); +require('laravel-elixir-vue-2'); /* |-------------------------------------------------------------------------- @@ -13,7 +13,7 @@ require('laravel-elixir-vue'); | */ -elixir(mix => { +elixir((mix) => { mix.sass('app.scss') .webpack('app.js') .version(['css/app.css', 'js/app.js']); diff --git a/package.json b/package.json index afaf83444..19b9a6344 100644 --- a/package.json +++ b/package.json @@ -5,19 +5,19 @@ "dev": "gulp watch" }, "dependencies": { - "bootstrap-sass": "^3.3.5", - "bootswatch": "^3.3.6", + "bootstrap-sass": "^3.3.7", + "bootswatch": "^3.3.7", "jquery": "^2.2.4", - "lodash": "^4.15.0", - "selectize": "^0.12.2", - "selectize-scss": "^0.9.1", - "vue": "^1.0.26", - "vue-resource": "^0.9.3" + "laravel-elixir-vue-2": "^0.2.0", + "lodash": "^4.17.2", + "selectize": "^0.12.4", + "selectize-scss": "^0.9.2", + "vue": "^2.1.3", + "vue-resource": "^1.0.3" }, "devDependencies": { "gulp": "^3.9.1", - "laravel-elixir": "^6.0.0-10", - "laravel-elixir-vue": "^0.1.6", - "laravel-elixir-webpack-official": "^1.0.4" + "laravel-elixir": "^6.0.0-15", + "laravel-elixir-webpack-official": "^1.0.9" } } From 0de74aa3fa7612bb49c18ad0f05a762e7ac3083d Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 16:35:30 +0100 Subject: [PATCH 125/288] Start using Yarn --- yarn.lock | 4451 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 4451 insertions(+) create mode 100644 yarn.lock diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 000000000..87e18199d --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4451 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 +abbrev@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + +accord@^0.26.3: + version "0.26.3" + resolved "https://registry.yarnpkg.com/accord/-/accord-0.26.3.tgz#7a6f07dfe204f67f0d48ee6c7b0fe40723183010" + dependencies: + convert-source-map "^1.2.0" + glob "^7.0.5" + indx "^0.2.3" + lodash.clone "^4.3.2" + lodash.defaults "^4.0.1" + lodash.flatten "^4.2.0" + lodash.merge "^4.4.0" + lodash.partialright "^4.1.4" + lodash.pick "^4.2.1" + lodash.uniq "^4.3.0" + resolve "^1.1.7" + semver "^5.3.0" + uglify-js "^2.7.0" + when "^3.7.7" + +acorn-jsx@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn-object-spread@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/acorn-object-spread/-/acorn-object-spread-1.0.0.tgz#48ead0f4a8eb16995a17a0db9ffc6acaada4ba68" + dependencies: + acorn "^3.1.0" + +acorn@^3.0.0, acorn@^3.0.4, acorn@^3.1.0, acorn@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@4.X: + version "4.0.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.3.tgz#1a3e850b428e73ba6b09d1cc527f5aaad4d03ef1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansicolors@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" + +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + +aproba@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" + +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + +are-we-there-yet@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.0 || ^1.1.13" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" + +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-index@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-index/-/array-index-1.0.0.tgz#ec56a749ee103e4e08c790b9c353df16055b97f9" + dependencies: + debug "^2.2.0" + es6-symbol "^3.0.2" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1, array-uniq@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asap@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" + +asn1.js@^4.0.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.0.tgz#f71a1243f3e79d46d7b07d7fbf4824ee73af054a" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +async-done@^1.0.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/async-done/-/async-done-1.2.2.tgz#ba4280da55a16e15f4bb8bf3a844a91878740e31" + dependencies: + end-of-stream "^1.1.0" + next-tick "^1.0.0" + once "^1.3.2" + stream-exhaust "^1.0.1" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async-foreach@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" + +async@^0.9.0: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + +async@^1.3.0, async@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.0.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" + dependencies: + lodash "^4.14.0" + +async@~0.2.6, async@0.2.x: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + +async@2.0.0-rc.4: + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.0.0-rc.4.tgz#9b7f60724c17962a973f787419e0ebc5571dbad8" + dependencies: + lodash "^4.3.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +atob@~1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773" + +autoprefixer@^6.0.0, autoprefixer@^6.3.1: + version "6.5.3" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.5.3.tgz#2d853af66d04449fcf50db3066279ab54c3e4b01" + dependencies: + browserslist "~1.4.0" + caniuse-db "^1.0.30000578" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^5.2.5" + postcss-value-parser "^3.2.3" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" + +balanced-match@^0.4.1, balanced-match@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +balanced-match@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.1.0.tgz#b504bd05869b39259dd0c5efc35d843176dccc4a" + +base64-js@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" + +Base64@~0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028" + +bcrypt-pbkdf@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" + dependencies: + tweetnacl "^0.14.3" + +beeper@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + +big.js@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" + +binary-extensions@^1.0.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.7.0.tgz#6c1610db163abfb34edfe42fa423343a1e01185d" + +bindings@1.2.x: + version "1.2.1" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11" + +bl@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398" + dependencies: + readable-stream "~2.0.5" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +bluebird@^3.0.5, bluebird@^3.1.1: + version "3.4.6" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.6.tgz#01da8d821d87813d158967e743d5fe6c62cf8c0f" + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +bootstrap-sass@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/bootstrap-sass/-/bootstrap-sass-3.3.7.tgz#6596c7ab40f6637393323ab0bc80d064fc630498" + +bootswatch@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/bootswatch/-/bootswatch-3.3.7.tgz#eb6f9a9a8523b87a706ea91deec3e0d7eaa8ab1f" + +brace-expansion@^1.0.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +brorand@^1.0.1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.0.6.tgz#4028706b915f91f7b349a2e0bf3c376039d216e5" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a" + dependencies: + buffer-xor "^1.0.2" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + inherits "^2.0.1" + +browserify-cipher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.0.tgz#10773910c3c206d5420a46aad8694f820b85968f" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.1.4, browserify-zlib@~0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + dependencies: + pako "~0.2.0" + +browserslist@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.4.0.tgz#9cfdcf5384d9158f5b70da2aa00b30e8ff019049" + dependencies: + caniuse-db "^1.0.30000539" + +buble-loader@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/buble-loader/-/buble-loader-0.2.2.tgz#da706c840c4ac9485ba84cec9df8c864ca39d6b7" + +buble@^0.12.3: + version "0.12.5" + resolved "https://registry.yarnpkg.com/buble/-/buble-0.12.5.tgz#c66ffe92f9f4a3c65d3256079b711e2bd0bc5013" + dependencies: + acorn "^3.1.0" + acorn-jsx "^3.0.1" + acorn-object-spread "^1.0.0" + chalk "^1.1.3" + magic-string "^0.14.0" + minimist "^1.2.0" + os-homedir "^1.0.1" + +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +buffer-xor@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^4.3.0, buffer@^4.9.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +builtin-status-codes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-2.0.0.tgz#6f22003baacf003ccd287afe6872151fddc58579" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +caniuse-db@^1.0.30000539, caniuse-db@^1.0.30000578: + version "1.0.30000588" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000588.tgz#20baa051c5bd7e33ae32c7781b5379289c3d39d2" + +cardinal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9" + dependencies: + ansicolors "~0.2.1" + redeyed "~1.0.0" + +cardinal@0.4.x: + version "0.4.4" + resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-0.4.4.tgz#ca5bb68a5b511b90fe93b9acea49bdee5c32bfe2" + dependencies: + ansicolors "~0.2.1" + redeyed "~0.4.0" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@*, chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chokidar@^1.0.0, chokidar@^1.4.3: + version "1.6.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +cipher-base@^1.0.0, cipher-base@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.3.tgz#eeabf194419ce900da3018c207d212f2a6df0a07" + dependencies: + inherits "^2.0.1" + +clap@^1.0.9: + version "1.1.1" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.1.1.tgz#a8a93e0bfb7581ac199c4f001a5525a724ce696d" + dependencies: + chalk "^1.1.3" + +clean-css@^3.4.12: + version "3.4.21" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-3.4.21.tgz#2101d5dbd19d63dbc16a75ebd570e7c33948f65b" + dependencies: + commander "2.8.x" + source-map "0.4.x" + +cli-table@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" + dependencies: + colors "1.0.3" + +cli-usage@^0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/cli-usage/-/cli-usage-0.1.4.tgz#7c01e0dc706c234b39c933838c8e20b2175776e2" + dependencies: + marked "^0.3.6" + marked-terminal "^1.6.2" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone-stats@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + +clone@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0, clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +cloneable-readable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117" + dependencies: + inherits "^2.0.1" + process-nextick-args "^1.0.6" + through2 "^2.0.1" + +coa@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.1.tgz#7f959346cfc8719e3f7233cd6852854a7c67d8a3" + dependencies: + q "^1.1.2" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.3.0: + version "1.8.2" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.8.2.tgz#be868184d7c8631766d54e7078e2672d7c7e3339" + dependencies: + color-name "^1.1.1" + +color-name@^1.0.0, color-name@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + +color-string@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" + dependencies: + color-name "^1.0.0" + +color@^0.11.0: + version "0.11.4" + resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" + dependencies: + clone "^1.0.2" + color-convert "^1.3.0" + color-string "^0.3.0" + +colormin@^1.0.5: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" + dependencies: + color "^0.11.0" + css-color-names "0.0.4" + has "^1.0.1" + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +colors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +commander@2.8.x: + version "2.8.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-with-sourcemaps@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz#f55b3be2aeb47601b10a2d5259ccfb70fd2f1dd6" + dependencies: + source-map "^0.5.1" + +config-chain@~1.1.5: + version "1.1.11" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2" + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +consolidate@^0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/consolidate/-/consolidate-0.14.5.tgz#5a25047bc76f73072667c8cb52c989888f494c63" + dependencies: + bluebird "^3.1.1" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +constants-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-0.0.1.tgz#92577db527ba6c4cf0a4568d84bc031f441e21f2" + +convert-source-map@^1.2.0, convert-source-map@1.X: + version "1.3.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +create-ecdh@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.2.tgz#51210062d7bb7479f6c65bb41a92208b1d61abad" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + ripemd160 "^1.0.0" + sha.js "^2.3.6" + +create-hmac@^1.1.0, create-hmac@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.4.tgz#d3fb4ba253eb8b3f56e39ea2fbcb8af747bd3170" + dependencies: + create-hash "^1.1.0" + inherits "^2.0.1" + +cross-spawn@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +crypto-browserify@^3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.0.tgz#3652a0906ab9b2a7e0c3ce66a408e957a2485522" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + +crypto-browserify@~3.2.6: + version "3.2.8" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.2.8.tgz#b9b11dbe6d9651dd882a01e6cc467df718ecf189" + dependencies: + pbkdf2-compat "2.0.1" + ripemd160 "0.2.0" + sha.js "2.2.6" + +css-color-names@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + +css-loader@^0.23.1: + version "0.23.1" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.23.1.tgz#9fa23f2b5c0965235910ad5ecef3b8a36390fe50" + dependencies: + css-selector-tokenizer "^0.5.1" + cssnano ">=2.6.1 <4" + loader-utils "~0.2.2" + lodash.camelcase "^3.0.1" + object-assign "^4.0.1" + postcss "^5.0.6" + postcss-modules-extract-imports "^1.0.0" + postcss-modules-local-by-default "^1.0.1" + postcss-modules-scope "^1.0.0" + postcss-modules-values "^1.1.0" + source-list-map "^0.1.4" + +css-selector-tokenizer@^0.5.1: + version "0.5.4" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.5.4.tgz#139bafd34a35fd0c1428487049e0699e6f6a2c21" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + +css-selector-tokenizer@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.6.0.tgz#6445f582c7930d241dcc5007a43d6fcb8f073152" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + +css@2.X: + version "2.2.1" + resolved "https://registry.yarnpkg.com/css/-/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc" + dependencies: + inherits "^2.0.1" + source-map "^0.1.38" + source-map-resolve "^0.3.0" + urix "^0.1.0" + +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + +"cssnano@>=2.6.1 <4": + version "3.8.1" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.8.1.tgz#008a482148ee948cf0af2ee6e44bd97c53f886ec" + dependencies: + autoprefixer "^6.3.1" + decamelize "^1.1.2" + defined "^1.0.0" + has "^1.0.1" + object-assign "^4.0.1" + postcss "^5.0.14" + postcss-calc "^5.2.0" + postcss-colormin "^2.1.8" + postcss-convert-values "^2.3.4" + postcss-discard-comments "^2.0.4" + postcss-discard-duplicates "^2.0.1" + postcss-discard-empty "^2.0.1" + postcss-discard-overridden "^0.1.1" + postcss-discard-unused "^2.2.1" + postcss-filter-plugins "^2.0.0" + postcss-merge-idents "^2.1.5" + postcss-merge-longhand "^2.0.1" + postcss-merge-rules "^2.0.3" + postcss-minify-font-values "^1.0.2" + postcss-minify-gradients "^1.0.1" + postcss-minify-params "^1.0.4" + postcss-minify-selectors "^2.0.4" + postcss-normalize-charset "^1.1.0" + postcss-normalize-url "^3.0.7" + postcss-ordered-values "^2.1.0" + postcss-reduce-idents "^2.2.2" + postcss-reduce-initial "^1.0.0" + postcss-reduce-transforms "^1.0.3" + postcss-svgo "^2.1.1" + postcss-unique-selectors "^2.0.2" + postcss-value-parser "^3.2.3" + postcss-zindex "^2.0.1" + +csso@~2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.2.1.tgz#51fbb5347e50e81e6ed51668a48490ae6fe2afe2" + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + +csv-parse@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-1.1.7.tgz#6e4678f7967013ac823929a4303a3ce177115abc" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +d@^0.1.1, d@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" + dependencies: + es5-ext "~0.10.2" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +dateformat@^1.0.11: + version "1.0.12" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" + dependencies: + get-stdin "^4.0.1" + meow "^3.3.0" + +de-indent@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" + +deap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/deap/-/deap-1.0.0.tgz#b148bf82430a27699b7483a03eb6b67585bfc888" + +debug-fabulous@0.0.X: + version "0.0.4" + resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.0.4.tgz#fa071c5d87484685424807421ca4b16b0b1a0763" + dependencies: + debug "2.X" + lazy-debug-legacy "0.0.X" + object-assign "4.1.0" + +debug@^2.2.0, debug@2.X: + version "2.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" + dependencies: + ms "0.7.2" + +debug@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + +defaults@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + +del@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +deprecated@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +detect-file@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63" + dependencies: + fs-exists-sync "^0.1.0" + +detect-newline@2.X: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + +diffie-hellman@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +domain-browser@^1.1.1: + version "1.1.7" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + +duplexer2@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +duplexify@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.0.tgz#1aa773002e1578457e9d9d4a50b0ccaaebcbd604" + dependencies: + end-of-stream "1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +editorconfig@^0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.13.2.tgz#8e57926d9ee69ab6cb999f027c2171467acceb35" + dependencies: + bluebird "^3.0.5" + commander "^2.9.0" + lru-cache "^3.2.0" + sigmund "^1.0.1" + +elliptic@^6.0.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.2.tgz#e4c81e0829cf0a65ab70e998b8232723b5c1bc48" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + inherits "^2.0.1" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +end-of-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.1.0.tgz#e9353258baa9108965efc41cb0ef8ade2f3cfb07" + dependencies: + once "~1.3.0" + +end-of-stream@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf" + dependencies: + once "~1.3.0" + +end-of-stream@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.0.0.tgz#d4596e702734a93e40e9af864319eabd99ff2f0e" + dependencies: + once "~1.3.0" + +enhanced-resolve@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-2.3.0.tgz#a115c32504b6302e85a76269d7a57ccdd962e359" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.3.0" + object-assign "^4.0.1" + tapable "^0.2.3" + +enhanced-resolve@~0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.2.0" + tapable "^0.1.8" + +errno@^0.1.1, errno@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" + dependencies: + is-arrayish "^0.2.1" + +es5-ext@^0.10.7, es5-ext@~0.10.11, es5-ext@~0.10.2: + version "0.10.12" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2: + version "2.0.0" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" + dependencies: + d "^0.1.1" + es5-ext "^0.10.7" + es6-symbol "3" + +es6-symbol@^3.0.2, es6-symbol@~3.1, es6-symbol@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad" + +esprima@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" + +events@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +evp_bytestokey@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53" + dependencies: + create-hash "^1.1.1" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +expand-tilde@^1.2.1, expand-tilde@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" + dependencies: + os-homedir "^1.0.1" + +extend@^3.0.0, extend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +fancy-log@^1.0.0, fancy-log@^1.1.0, fancy-log@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.2.0.tgz#d5a51b53e9ab22ca07d558f2b67ae55fdb5fcbd8" + dependencies: + chalk "^1.1.1" + time-stamp "^1.0.0" + +fastparse@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + +file-loader@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.9.0.tgz#1d2daddd424ce6d1b07cfe3f79731bed3617ab42" + dependencies: + loader-utils "~0.2.5" + +filename-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-index@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +findup-sync@^0.4.0, findup-sync@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12" + dependencies: + detect-file "^0.1.0" + is-glob "^2.0.1" + micromatch "^2.3.7" + resolve-dir "^0.1.0" + +fined@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.0.2.tgz#5b28424b760d7598960b7ef8480dff8ad3660e97" + dependencies: + expand-tilde "^1.2.1" + lodash.assignwith "^4.0.7" + lodash.isempty "^4.2.1" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.pick "^4.2.1" + parse-filepath "^1.0.1" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + +flagged-respawn@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5" + +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + +for-in@^0.1.5: + version "0.1.6" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" + +for-own@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" + dependencies: + for-in "^0.1.5" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +fork-stream@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/fork-stream/-/fork-stream-0.0.4.tgz#db849fce77f6708a5f8f386ae533a0907b54ae70" + +form-data@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.0.15" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.0.15.tgz#fa63f590f3c2ad91275e4972a6cea545fb0aae44" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.29" + +fstream-ignore@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + +gauge@~2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.6.0.tgz#d35301ad18e96902b4751dcbbe40f4218b942a46" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-color "^0.1.7" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gauge@~2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.1.tgz#388473894fe8be5e13ffcdb8b93e4ed0616428c7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-color "^0.1.7" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gaze@^0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f" + dependencies: + globule "~0.1.0" + +gaze@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" + dependencies: + globule "^1.0.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +getpass@^0.1.1: + version "0.1.6" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-stream@^3.1.5: + version "3.1.18" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b" + dependencies: + glob "^4.3.1" + glob2base "^0.0.12" + minimatch "^2.0.1" + ordered-read-streams "^0.1.0" + through2 "^0.6.1" + unique-stream "^1.0.0" + +glob-watcher@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b" + dependencies: + gaze "^0.5.1" + +glob@^4.3.1: + version "4.5.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "^2.0.1" + once "^1.3.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@~7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@~3.1.21: + version "3.1.21" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd" + dependencies: + graceful-fs "~1.2.0" + inherits "1" + minimatch "~0.2.11" + +glob2base@^0.0.12: + version "0.0.12" + resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" + dependencies: + find-index "^0.1.1" + +global-modules@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" + dependencies: + global-prefix "^0.1.4" + is-windows "^0.2.0" + +global-prefix@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.4.tgz#05158db1cde2dd491b455e290eb3ab8bfc45c6e1" + dependencies: + ini "^1.3.4" + is-windows "^0.2.0" + osenv "^0.1.3" + which "^1.2.10" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globule@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.1.0.tgz#c49352e4dc183d85893ee825385eb994bb6df45f" + dependencies: + glob "~7.1.1" + lodash "~4.16.4" + minimatch "~3.0.2" + +globule@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5" + dependencies: + glob "~3.1.21" + lodash "~1.0.1" + minimatch "~0.2.11" + +glogg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" + dependencies: + sparkles "^1.0.0" + +graceful-fs@^3.0.0: + version "3.0.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" + dependencies: + natives "^1.1.0" + +graceful-fs@^4.1.2, graceful-fs@4.X: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +graceful-fs@~1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +growly@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +gulp-autoprefixer@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/gulp-autoprefixer/-/gulp-autoprefixer-3.1.1.tgz#75230051cd0d171343d783b7e9b5d1120eeef9b0" + dependencies: + autoprefixer "^6.0.0" + gulp-util "^3.0.0" + postcss "^5.0.4" + through2 "^2.0.0" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-batch@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/gulp-batch/-/gulp-batch-1.0.5.tgz#c40fc9b2303674897b1216d82e1518b73217da59" + dependencies: + async-done "^1.0.0" + stream-array "^1.0.1" + +gulp-concat@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/gulp-concat/-/gulp-concat-2.6.1.tgz#633d16c95d88504628ad02665663cee5a4793353" + dependencies: + concat-with-sourcemaps "^1.0.0" + through2 "^2.0.0" + vinyl "^2.0.0" + +gulp-if@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/gulp-if/-/gulp-if-2.0.2.tgz#a497b7e7573005041caa2bc8b7dda3c80444d629" + dependencies: + gulp-match "^1.0.3" + ternary-stream "^2.0.1" + through2 "^2.0.1" + +gulp-less@^3.0.5: + version "3.3.0" + resolved "https://registry.yarnpkg.com/gulp-less/-/gulp-less-3.3.0.tgz#d085565da3c810307fde7c7874e86520dc503234" + dependencies: + accord "^0.26.3" + gulp-util "^3.0.7" + less "2.6.x || ^2.7.1" + object-assign "^4.0.1" + through2 "^2.0.0" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-load-plugins@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/gulp-load-plugins/-/gulp-load-plugins-1.4.0.tgz#82fab03715ecf1838a958ec643a4d74274ddfece" + dependencies: + array-unique "^0.2.1" + fancy-log "^1.2.0" + findup-sync "^0.4.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + micromatch "^2.3.8" + resolve "^1.1.7" + +gulp-match@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/gulp-match/-/gulp-match-1.0.3.tgz#91c7c0d7f29becd6606d57d80a7f8776a87aba8e" + dependencies: + minimatch "^3.0.3" + +gulp-notify@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/gulp-notify/-/gulp-notify-2.2.0.tgz#046c8285c292e97eed4e15a009c26cbbe5cef135" + dependencies: + gulp-util "^3.0.2" + lodash.template "^3.0.0" + node-notifier "^4.1.0" + node.extend "^1.1.3" + through2 "^0.6.3" + +gulp-rename@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.2.2.tgz#3ad4428763f05e2764dec1c67d868db275687817" + +gulp-rev-replace@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/gulp-rev-replace/-/gulp-rev-replace-0.4.3.tgz#72b51848f5f093ad4b77b1d2411081eb78acd46e" + dependencies: + gulp-util "^3.0.7" + through2 "^2.0.0" + +gulp-rev@^7.0.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/gulp-rev/-/gulp-rev-7.1.2.tgz#5e17cc229f6b45c74256f88ad3f2d3e9a3305829" + dependencies: + gulp-util "^3.0.0" + modify-filename "^1.1.0" + object-assign "^4.0.1" + rev-hash "^1.0.0" + rev-path "^1.0.0" + sort-keys "^1.0.0" + through2 "^2.0.0" + vinyl-file "^1.1.0" + +gulp-sass@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/gulp-sass/-/gulp-sass-2.3.2.tgz#82b7ab90fe902cdc34c04f180d92f2c34902dd52" + dependencies: + gulp-util "^3.0" + lodash.clonedeep "^4.3.2" + node-sass "^3.4.2" + through2 "^2.0.0" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-shell@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/gulp-shell/-/gulp-shell-0.5.2.tgz#a4959ca0651ad1c7bbfe70b2d0adbbb4e1aea98d" + dependencies: + async "^1.5.0" + gulp-util "^3.0.7" + lodash "^4.0.0" + through2 "^2.0.0" + +gulp-sourcemaps@^1.6.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.9.1.tgz#80ac2d3845d13e68dd962524d8a967a440b0b753" + dependencies: + acorn "4.X" + convert-source-map "1.X" + css "2.X" + debug-fabulous "0.0.X" + detect-newline "2.X" + graceful-fs "4.X" + source-map "0.X" + strip-bom "2.X" + through2 "2.X" + vinyl "1.X" + +gulp-uglify@^1.5.3: + version "1.5.4" + resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-1.5.4.tgz#524788d87666d09f9d0c21fb2177f90039a658c9" + dependencies: + deap "^1.0.0" + fancy-log "^1.0.0" + gulp-util "^3.0.0" + isobject "^2.0.0" + through2 "^2.0.0" + uglify-js "2.6.4" + uglify-save-license "^0.4.1" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-util@*, gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.2, gulp-util@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.7.tgz#78925c4b8f8b49005ac01a011c557e6218941cbb" + dependencies: + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^1.0.11" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulp@^3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4" + dependencies: + archy "^1.0.0" + chalk "^1.0.0" + deprecated "^0.0.1" + gulp-util "^3.0.0" + interpret "^1.0.0" + liftoff "^2.1.0" + minimist "^1.1.0" + orchestrator "^0.3.0" + pretty-hrtime "^1.0.0" + semver "^4.1.0" + tildify "^1.0.0" + v8flags "^2.0.2" + vinyl-fs "^0.3.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-color@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-gulplog@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hash-sum@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-1.0.2.tgz#33b40777754c6432573c120cc3808bbd10d47f04" + +hash.js@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" + dependencies: + inherits "^2.0.1" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +he@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.0.tgz#29319d49beec13a9b1f3c4f9b2a6dde4859bb2a7" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hosted-git-info@^2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" + +html-comment-regex@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" + +http-browserify@^1.3.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/http-browserify/-/http-browserify-1.7.0.tgz#33795ade72df88acfbfd36773cefeda764735b20" + dependencies: + Base64 "~0.2.0" + inherits "~2.0.1" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.0.tgz#b3ffdfe734b2a3d4a9efd58e8654c91fce86eafd" + +https-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" + +humanize@0.0.x: + version "0.0.9" + resolved "https://registry.yarnpkg.com/humanize/-/humanize-0.0.9.tgz#1994ffaecdfe9c441ed2bdac7452b7bb4c9e41a4" + +icss-replace-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.0.2.tgz#cb0b6054eb3af6edc9ab1d62d01933e2d4c8bfa5" + +ieee754@^1.1.4: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + +image-size@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.0.tgz#be7aed1c37b5ac3d9ba1d66a24b4c47ff8397651" + +in-publish@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +indx@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/indx/-/indx-0.2.3.tgz#15dcf56ee9cf65c0234c513c27fbd580e70fbc50" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@^1.3.4, ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +interpret@^0.6.4: + version "0.6.6" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-0.6.6.tgz#fecd7a18e7ce5ca6abfb953e1f86213a49f1625b" + +interpret@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-absolute-url@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.0.0.tgz#9c4b20b0e5c0cbef9a479a367ede6f991679f359" + +is-absolute@^0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb" + dependencies: + is-relative "^0.2.1" + is-windows "^0.2.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.0.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-my-json-valid@^2.12.4: + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-relative@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5" + dependencies: + is-unc-path "^0.1.1" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-svg@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" + dependencies: + html-comment-regex "^1.1.0" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-unc-path@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-0.1.1.tgz#ab2533d77ad733561124c3dc0f5cd8b90054c86b" + dependencies: + unc-path-regex "^0.1.0" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-windows@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" + +is@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/is/-/is-3.2.0.tgz#a362e3daf7df3fd8b7114115d624c5b7e1cb90f7" + +isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isexe@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +jquery@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-2.2.4.tgz#2c89d6889b5eac522a7eea32c14521559c6cbf02" + +js-base64@^2.1.9: + version "2.1.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + +js-beautify@^1.6.3: + version "1.6.4" + resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.6.4.tgz#a9af79699742ac9a1b6fddc1fdbc78bc4d515fc3" + dependencies: + config-chain "~1.1.5" + editorconfig "^0.13.2" + mkdirp "~0.5.0" + nopt "~3.0.1" + +js-yaml@~3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json5@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.0.tgz#9b20715b026cbe3778fd769edccd822d8332a5b2" + +jsonpointer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" + +jsprim@^1.2.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" + dependencies: + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +kind-of@^3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.0.4.tgz#7b8ecf18a4e17f8269d73b501c9f232c96887a74" + dependencies: + is-buffer "^1.0.2" + +laravel-elixir-vue-2: + version "0.2.0" + resolved "https://registry.yarnpkg.com/laravel-elixir-vue-2/-/laravel-elixir-vue-2-0.2.0.tgz#1073a111d41c0c8931ba9103372b30b94e0dd724" + dependencies: + css-loader "^0.23.1" + file-loader "^0.9.0" + sass-loader "^4.0.0" + url-loader "^0.5.7" + vue-loader "^9.3.2" + +laravel-elixir-webpack-official@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/laravel-elixir-webpack-official/-/laravel-elixir-webpack-official-1.0.9.tgz#6a1ef73eb97443b51a5ae790beb1e434ed0a2cf4" + dependencies: + buble "^0.12.3" + buble-loader "^0.2.2" + lodash "^4.15.0" + webpack "2.1.0-beta.15 - 2.1.0-beta.22" + webpack-stream "github:jeroennoten/webpack-stream#patch-1" + +laravel-elixir@^6.0.0-15: + version "6.0.0-15" + resolved "https://registry.yarnpkg.com/laravel-elixir/-/laravel-elixir-6.0.0-15.tgz#cb1dc2f4991c5a212855ee9c33739672b1f36c80" + dependencies: + clean-css "^3.4.12" + cli-table "^0.3.1" + del "^2.2.0" + glob "^7.0.3" + gulp-autoprefixer "^3.1.0" + gulp-batch "^1.0.5" + gulp-concat "^2.6.0" + gulp-if "^2.0.0" + gulp-less "^3.0.5" + gulp-load-plugins "^1.2.2" + gulp-notify "^2.2.0" + gulp-rename "^1.2.2" + gulp-rev "^7.0.0" + gulp-rev-replace "^0.4.3" + gulp-sass "^2.3.1" + gulp-shell "^0.5.2" + gulp-sourcemaps "^1.6.0" + gulp-uglify "^1.5.3" + gulp-util "^3.0.7" + parse-filepath "^1.0.1" + path "^0.12.7" + q "^1.4.1" + require-dir "^0.3.0" + run-sequence "^1.1.5" + underscore "^1.8.3" + vinyl-map2 "^1.2.1" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lazy-debug-legacy@0.0.X: + version "0.0.1" + resolved "https://registry.yarnpkg.com/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz#537716c0776e4cf79e3ed1b621f7658c2911b1b1" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +"less@2.6.x || ^2.7.1": + version "2.7.1" + resolved "https://registry.yarnpkg.com/less/-/less-2.7.1.tgz#6cbfea22b3b830304e9a5fb371d54fa480c9d7cf" + optionalDependencies: + errno "^0.1.1" + graceful-fs "^4.1.2" + image-size "~0.5.0" + mime "^1.2.11" + mkdirp "^0.5.0" + promise "^7.1.1" + source-map "^0.5.3" + +liftoff@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.3.0.tgz#a98f2ff67183d8ba7cfaca10548bd7ff0550b385" + dependencies: + extend "^3.0.0" + findup-sync "^0.4.2" + fined "^1.0.1" + flagged-respawn "^0.3.2" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.mapvalues "^4.4.0" + rechoir "^0.6.2" + resolve "^1.1.7" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +loader-runner@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.2.0.tgz#824c1b699c4e7a2b6501b85902d5b862bf45b3fa" + +loader-utils@^0.2.10, loader-utils@^0.2.11, loader-utils@^0.2.15, loader-utils@^0.2.7, loader-utils@~0.2.2, loader-utils@~0.2.5, loader-utils@0.2.x: + version "0.2.16" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +lodash._arraycopy@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" + +lodash._arrayeach@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e" + +lodash._baseassign@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" + dependencies: + lodash._basecopy "^3.0.0" + lodash.keys "^3.0.0" + +lodash._baseclone@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz#303519bf6393fe7e42f34d8b630ef7794e3542b7" + dependencies: + lodash._arraycopy "^3.0.0" + lodash._arrayeach "^3.0.0" + lodash._baseassign "^3.0.0" + lodash._basefor "^3.0.0" + lodash.isarray "^3.0.0" + lodash.keys "^3.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basefor@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" + +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + +lodash._bindcallback@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" + +lodash._createcompounder@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._createcompounder/-/lodash._createcompounder-3.0.0.tgz#5dd2cb55372d6e70e0e2392fb2304d6631091075" + dependencies: + lodash.deburr "^3.0.0" + lodash.words "^3.0.0" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + +lodash.assign@^4.0.3, lodash.assign@^4.0.6, lodash.assign@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash.assignwith@^4.0.7: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb" + +lodash.camelcase@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-3.0.1.tgz#932c8b87f8a4377897c67197533282f97aeac298" + dependencies: + lodash._createcompounder "^3.0.0" + +lodash.clone@^4.3.2: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" + +lodash.clonedeep@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz#a0a1e40d82a5ea89ff5b147b8444ed63d92827db" + dependencies: + lodash._baseclone "^3.0.0" + lodash._bindcallback "^3.0.0" + +lodash.clonedeep@^4.3.2: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + +lodash.deburr@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.deburr/-/lodash.deburr-3.2.0.tgz#6da8f54334a366a7cf4c4c76ef8d80aa1b365ed5" + dependencies: + lodash._root "^3.0.0" + +lodash.defaults@^4.0.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + +lodash.flatten@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + +lodash.indexof@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/lodash.indexof/-/lodash.indexof-4.0.5.tgz#53714adc2cddd6ed87638f893aa9b6c24e31ef3c" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.isempty@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" + +lodash.isplainobject@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.mapvalues@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + +lodash.merge@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" + +lodash.partialright@^4.1.4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.partialright/-/lodash.partialright-4.2.1.tgz#0130d80e83363264d40074f329b8a3e7a8a1cc4b" + +lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + +lodash.restparam@^3.0.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + +lodash.some@^4.2.2: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + +lodash.template@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + +lodash.uniq@^4.3.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + +lodash.words@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.words/-/lodash.words-3.2.0.tgz#4e2a8649bc08745b17c695b1a3ce8fee596623b3" + dependencies: + lodash._root "^3.0.0" + +lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2, lodash@^4.3.0: + version "4.17.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" + +lodash@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551" + +lodash@~4.16.4: + version "4.16.6" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lru-cache@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" + dependencies: + pseudomap "^1.0.1" + +lru-cache@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.1.tgz#1343955edaf2e37d9b9e7ee7241e27c4b9fb72be" + dependencies: + pseudomap "^1.0.1" + yallist "^2.0.0" + +lru-cache@2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + +macaddress@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" + +magic-string@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.14.0.tgz#57224aef1701caeed273b17a39a956e72b172462" + dependencies: + vlq "^0.2.1" + +map-cache@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +marked-terminal@^1.6.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-1.7.0.tgz#c8c460881c772c7604b64367007ee5f77f125904" + dependencies: + cardinal "^1.0.0" + chalk "^1.1.3" + cli-table "^0.3.1" + lodash.assign "^4.2.0" + node-emoji "^1.4.1" + +marked@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" + +math-expression-evaluator@^1.2.14: + version "1.2.14" + resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.14.tgz#39511771ed9602405fba9affff17eb4d2a3843ab" + dependencies: + lodash.indexof "^4.0.5" + +memory-fs@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.2.0.tgz#f2bb25368bc121e391c2520de92969caee0a0290" + +memory-fs@^0.3.0, memory-fs@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.3.0.tgz#7bcc6b629e3a43e871d7e29aca6ae8a7f15cbb20" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +meow@^3.3.0, meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge-stream@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + dependencies: + readable-stream "^2.0.1" + +micromatch@^2.1.5, micromatch@^2.3.7, micromatch@^2.3.8: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +microplugin@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/microplugin/-/microplugin-0.0.3.tgz#1fc2e1bb7c9e19e82bd84bba9137bbe71250d8cd" + +microtime@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/microtime/-/microtime-2.1.2.tgz#9c955d0781961ab13a1b6f9a82b080f5d7ecd83b" + dependencies: + bindings "1.2.x" + nan "2.4.x" + +miller-rabin@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@~1.25.0: + version "1.25.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.13" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" + dependencies: + mime-db "~1.25.0" + +mime@^1.2.11: + version "1.3.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" + +mime@1.2.x: + version "1.2.11" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.11.tgz#58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10" + +minimalistic-assert@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + +minimatch@^2.0.1: + version "2.0.10" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" + dependencies: + brace-expansion "^1.0.0" + +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimatch@~0.2.11: + version "0.2.14" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + +minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +modify-filename@^1.0.0, modify-filename@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/modify-filename/-/modify-filename-1.1.0.tgz#9a2dec83806fbb2d975f22beec859ca26b393aa1" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +multipipe@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + +nan@^2.3.0, nan@^2.3.2, nan@2.4.x: + version "2.4.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" + +natives@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" + +new-from@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/new-from/-/new-from-0.0.3.tgz#1c4ad13613de3e15d6321b70ed5c23937ea25e67" + dependencies: + readable-stream "~1.1.8" + +next-tick@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + +node-emoji@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.4.1.tgz#c9fa0cf91094335bcb967a6f42b2305c15af2ebc" + dependencies: + string.prototype.codepointat "^0.2.0" + +node-gyp@^3.3.1: + version "3.4.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.4.0.tgz#dda558393b3ecbbe24c9e6b8703c71194c63fa36" + dependencies: + fstream "^1.0.0" + glob "^7.0.3" + graceful-fs "^4.1.2" + minimatch "^3.0.2" + mkdirp "^0.5.0" + nopt "2 || 3" + npmlog "0 || 1 || 2 || 3" + osenv "0" + path-array "^1.0.0" + request "2" + rimraf "2" + semver "2.x || 3.x || 4 || 5" + tar "^2.0.0" + which "1" + +node-libs-browser@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-0.6.0.tgz#244806d44d319e048bc8607b5cc4eaf9a29d2e3c" + dependencies: + assert "^1.1.1" + browserify-zlib "~0.1.4" + buffer "^4.9.0" + console-browserify "^1.1.0" + constants-browserify "0.0.1" + crypto-browserify "~3.2.6" + domain-browser "^1.1.1" + events "^1.0.0" + http-browserify "^1.3.2" + https-browserify "0.0.0" + os-browserify "~0.1.2" + path-browserify "0.0.0" + process "^0.11.0" + punycode "^1.2.4" + querystring-es3 "~0.2.0" + readable-stream "^1.1.13" + stream-browserify "^1.0.0" + string_decoder "~0.10.25" + timers-browserify "^1.0.1" + tty-browserify "0.0.0" + url "~0.10.1" + util "~0.10.3" + vm-browserify "0.0.4" + +node-libs-browser@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-1.1.1.tgz#2a38243abedd7dffcd07a97c9aca5668975a6fea" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.1.4" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "0.0.1" + os-browserify "^0.2.0" + path-browserify "0.0.0" + process "^0.11.0" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.0.5" + stream-browserify "^2.0.1" + stream-http "^2.3.1" + string_decoder "^0.10.25" + timers-browserify "^1.4.2" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-notifier@^4.1.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-4.6.1.tgz#056d14244f3dcc1ceadfe68af9cff0c5473a33f3" + dependencies: + cli-usage "^0.1.1" + growly "^1.2.0" + lodash.clonedeep "^3.0.0" + minimist "^1.1.1" + semver "^5.1.0" + shellwords "^0.1.0" + which "^1.0.5" + +node-pre-gyp@^0.6.29: + version "0.6.31" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.31.tgz#d8a00ddaa301a940615dbcc8caad4024d58f6017" + dependencies: + mkdirp "~0.5.1" + nopt "~3.0.6" + npmlog "^4.0.0" + rc "~1.1.6" + request "^2.75.0" + rimraf "~2.5.4" + semver "~5.3.0" + tar "~2.2.1" + tar-pack "~3.3.0" + +node-sass@^3.4.2: + version "3.13.0" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-3.13.0.tgz#d08b95bdebf40941571bd2c16a9334b980f8924f" + dependencies: + async-foreach "^0.1.3" + chalk "^1.1.1" + cross-spawn "^3.0.0" + gaze "^1.0.0" + get-stdin "^4.0.1" + glob "^7.0.3" + in-publish "^2.0.0" + lodash.assign "^4.2.0" + lodash.clonedeep "^4.3.2" + meow "^3.7.0" + mkdirp "^0.5.1" + nan "^2.3.2" + node-gyp "^3.3.1" + npmlog "^4.0.0" + request "^2.61.0" + sass-graph "^2.1.1" + +node.extend@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-1.1.6.tgz#a7b882c82d6c93a4863a5504bd5de8ec86258b96" + dependencies: + is "^3.1.0" + +nopt@~3.0.1, nopt@~3.0.6, "nopt@2 || 3": + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.3.5" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +normalize-url@^1.4.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.8.0.tgz#a9550b079aa3523c85d78df24eef1959fce359ab" + dependencies: + object-assign "^4.0.1" + prepend-http "^1.0.0" + query-string "^4.1.0" + sort-keys "^1.0.0" + +npmlog@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.1.tgz#d14f503b4cd79710375553004ba96e6662fbc0b8" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.1" + set-blocking "~2.0.0" + +"npmlog@0 || 1 || 2 || 3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-3.1.2.tgz#2d46fa874337af9498a2f12bb43d8d0be4a36873" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.6.0" + set-blocking "~2.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@^1.3.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +once@~1.3.0, once@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +optimist@~0.6.0, optimist@0.6.x: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +orchestrator@^0.3.0: + version "0.3.8" + resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e" + dependencies: + end-of-stream "~0.1.5" + sequencify "~0.0.7" + stream-consume "~0.1.0" + +ordered-read-streams@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126" + +os-browserify@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" + +os-browserify@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.3, osenv@0: + version "0.1.3" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.3.tgz#83cf05c6d6458fc4d5ac6362ea325d92f2754217" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +pako@~0.2.0: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + +parse-asn1@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.0.0.tgz#35060f6d5015d37628c770f4e091a0b5a278bc23" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + +parse-filepath@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73" + dependencies: + is-absolute "^0.2.3" + map-cache "^0.2.0" + path-root "^0.1.1" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +path-array@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-array/-/path-array-1.0.1.tgz#7e2f0f35f07a2015122b868b7eac0eb2c4fec271" + dependencies: + array-index "^1.0.0" + +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + dependencies: + path-root-regex "^0.1.0" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path@^0.12.7: + version "0.12.7" + resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" + dependencies: + process "^0.11.1" + util "^0.10.3" + +pbkdf2-compat@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz#b6e0c8fa99494d94e0511575802a59a5c142f288" + +pbkdf2@^3.0.3: + version "3.0.9" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.9.tgz#f2c4b25a600058b3c3773c086c37dbbee1ffe693" + dependencies: + create-hmac "^1.1.2" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +postcss-calc@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" + dependencies: + postcss "^5.0.2" + postcss-message-helpers "^2.0.0" + reduce-css-calc "^1.2.6" + +postcss-colormin@^2.1.8: + version "2.2.1" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.1.tgz#dc5421b6ae6f779ef6bfd47352b94abe59d0316b" + dependencies: + colormin "^1.0.5" + postcss "^5.0.13" + postcss-value-parser "^3.2.3" + +postcss-convert-values@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.5.0.tgz#570aceb04b3061fb25f6f46bd0329e7ab6263c0b" + dependencies: + postcss "^5.0.11" + postcss-value-parser "^3.1.2" + +postcss-discard-comments@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" + dependencies: + postcss "^5.0.14" + +postcss-discard-duplicates@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.0.2.tgz#02be520e91571ffb10738766a981d5770989bb32" + dependencies: + postcss "^5.0.4" + +postcss-discard-empty@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" + dependencies: + postcss "^5.0.14" + +postcss-discard-overridden@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" + dependencies: + postcss "^5.0.16" + +postcss-discard-unused@^2.2.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" + dependencies: + postcss "^5.0.14" + uniqs "^2.0.0" + +postcss-filter-plugins@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" + dependencies: + postcss "^5.0.4" + uniqid "^4.0.0" + +postcss-merge-idents@^2.1.5: + version "2.1.7" + resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" + dependencies: + has "^1.0.1" + postcss "^5.0.10" + postcss-value-parser "^3.1.1" + +postcss-merge-longhand@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.1.tgz#ff59b5dec6d586ce2cea183138f55c5876fa9cdc" + dependencies: + postcss "^5.0.4" + +postcss-merge-rules@^2.0.3: + version "2.0.10" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.0.10.tgz#54b360be804e7e69a5c7222635247b92a3569e9b" + dependencies: + postcss "^5.0.4" + vendors "^1.0.0" + +postcss-message-helpers@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" + +postcss-minify-font-values@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" + dependencies: + object-assign "^4.0.1" + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-minify-gradients@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" + dependencies: + postcss "^5.0.12" + postcss-value-parser "^3.3.0" + +postcss-minify-params@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.0.5.tgz#82d602643b8616a61fb3634d7ede0289836d67f9" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.2" + postcss-value-parser "^3.0.2" + uniqs "^2.0.0" + +postcss-minify-selectors@^2.0.4: + version "2.0.7" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.0.7.tgz#bfb9248fe14db33770f036572de6b4897c48d81c" + dependencies: + alphanum-sort "^1.0.2" + has "^1.0.1" + postcss "^5.0.14" + postcss-selector-parser "^2.0.0" + +postcss-modules-extract-imports@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.0.1.tgz#8fb3fef9a6dd0420d3f6d4353cf1ff73f2b2a341" + dependencies: + postcss "^5.0.4" + +postcss-modules-local-by-default@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.1.1.tgz#29a10673fa37d19251265ca2ba3150d9040eb4ce" + dependencies: + css-selector-tokenizer "^0.6.0" + postcss "^5.0.4" + +postcss-modules-scope@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.0.2.tgz#ff977395e5e06202d7362290b88b1e8cd049de29" + dependencies: + css-selector-tokenizer "^0.6.0" + postcss "^5.0.4" + +postcss-modules-values@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.2.2.tgz#f0e7d476fe1ed88c5e4c7f97533a3e772ad94ca1" + dependencies: + icss-replace-symbols "^1.0.2" + postcss "^5.0.14" + +postcss-normalize-charset@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" + dependencies: + postcss "^5.0.5" + +postcss-normalize-url@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.7.tgz#6bd90d0a4bc5a1df22c26ea65c53257dc3829f4e" + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^1.4.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + +postcss-ordered-values@^2.1.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.2.tgz#be8b511741fab2dac8e614a2302e9d10267b0771" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.1" + +postcss-reduce-idents@^2.2.2: + version "2.3.1" + resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.3.1.tgz#024e8e219f52773313408573db9645ba62d2d2fe" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-reduce-initial@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.0.tgz#8f739b938289ef2e48936d7101783e4741ca9bbb" + dependencies: + postcss "^5.0.4" + +postcss-reduce-transforms@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" + dependencies: + has "^1.0.1" + postcss "^5.0.8" + postcss-value-parser "^3.0.1" + +postcss-selector-parser@^2.0.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.2.tgz#3d70f5adda130da51c7c0c2fc023f56b1374fe08" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-svgo@^2.1.1: + version "2.1.5" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.5.tgz#46fc0363f01bab6a36a9abb01c229fcc45363094" + dependencies: + is-svg "^2.0.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + svgo "^0.7.0" + +postcss-unique-selectors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss-zindex@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" + dependencies: + has "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.5: + version "5.2.6" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.6.tgz#a252cd67cd52585035f17e9ad12b35137a7bdd9e" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.1.2" + +prepend-http@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-hrtime@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + +process-nextick-args@^1.0.6, process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +process@^0.11.0, process@^0.11.1, process@~0.11.0: + version "0.11.9" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1" + +promise@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" + dependencies: + asap "~2.0.3" + +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +public-encrypt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +q@^1.1.2, q@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" + +qs@~6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + +query-string@^4.1.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.2.3.tgz#9f27273d207a25a8ee4c7b8c74dcd45d556db822" + dependencies: + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +querystring-es3@^0.2.0, querystring-es3@~0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +randomatic@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +randombytes@^2.0.0, randombytes@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec" + +rc@~1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~1.0.4" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@^1.0.27-1, readable-stream@^1.1.13, readable-stream@~1.1.8, readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +"readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~2.0.0, readable-stream@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~2.1.0, readable-stream@~2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +redeyed@~0.4.0: + version "0.4.4" + resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-0.4.4.tgz#37e990a6f2b21b2a11c2e6a48fd4135698cba97f" + dependencies: + esprima "~1.0.4" + +redeyed@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" + dependencies: + esprima "~3.0.0" + +reduce-css-calc@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" + dependencies: + balanced-match "^0.4.2" + math-expression-evaluator "^1.2.14" + reduce-function-call "^1.0.1" + +reduce-function-call@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.1.tgz#fa02e126e695824263cab91d3a5b0fdc1dd27a9a" + dependencies: + balanced-match "~0.1.0" + +regenerate@^1.2.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +regexpu-core@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +replace-ext@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + +request@^2.61.0, request@^2.75.0, request@2: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +require-dir@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/require-dir/-/require-dir-0.3.1.tgz#b5a8e28bae0343bb0d0cc38ab1f531e1931b264a" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +resolve-dir@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" + dependencies: + expand-tilde "^1.2.2" + global-modules "^0.2.3" + +resolve-url@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@^1.1.6, resolve@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +rev-hash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/rev-hash/-/rev-hash-1.0.0.tgz#96993959ea9bfb1c59b13adf02ac2e34bb373603" + +rev-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/rev-path/-/rev-path-1.0.0.tgz#d4ccb436ac3370c4607175ce88eafc5c65c5d653" + dependencies: + modify-filename "^1.0.0" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4, rimraf@2: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + dependencies: + glob "^7.0.5" + +ripemd160@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" + +ripemd160@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-0.2.0.tgz#2bf198bde167cacfa51c0a928e84b68bbe171fce" + +run-sequence@^1.1.5: + version "1.2.2" + resolved "https://registry.yarnpkg.com/run-sequence/-/run-sequence-1.2.2.tgz#5095a0bebe98733b0140bd08dd80ec030ddacdeb" + dependencies: + chalk "*" + gulp-util "*" + +sass-graph@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.1.2.tgz#965104be23e8103cb7e5f710df65935b317da57b" + dependencies: + glob "^7.0.0" + lodash "^4.0.0" + yargs "^4.7.1" + +sass-loader@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-4.0.2.tgz#a616eb770366543e64f547c8630f39c4da75f15d" + dependencies: + async "^2.0.1" + loader-utils "^0.2.15" + object-assign "^4.1.0" + +sax@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" + +selectize-scss@^0.9.2: + version "0.9.2" + resolved "https://registry.yarnpkg.com/selectize-scss/-/selectize-scss-0.9.2.tgz#9b2138cd88bc25049d8bb4a709c3331f183e5c9e" + +selectize@^0.12.4: + version "0.12.4" + resolved "https://registry.yarnpkg.com/selectize/-/selectize-0.12.4.tgz#50c697526b609dea11da153cf7252b98948f4c0e" + dependencies: + microplugin "0.0.3" + sifter "^0.5.1" + +semver@^4.1.0: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +semver@^5.1.0, semver@^5.3.0, semver@~5.3.0, "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5": + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +sequencify@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +sha.js@^2.3.6: + version "2.4.8" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f" + dependencies: + inherits "^2.0.1" + +sha.js@2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.2.6.tgz#17ddeddc5f722fb66501658895461977867315ba" + +shellwords@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" + +sifter@^0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/sifter/-/sifter-0.5.2.tgz#4702e3cee3036903da1f194b29e6dc7a4fb59abe" + dependencies: + async "0.2.x" + cardinal "0.4.x" + csv-parse "^1.1.7" + humanize "0.0.x" + optimist "0.6.x" + optionalDependencies: + microtime "^2.1.0" + +sigmund@^1.0.1, sigmund@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + +signal-exit@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.1.tgz#5a4c884992b63a7acd9badb7894c3ee9cfccad81" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + dependencies: + is-plain-obj "^1.0.0" + +source-list-map@^0.1.4, source-list-map@~0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.6.tgz#e1e6f94f0b40c4d28dcf8f5b8766e0e45636877f" + +source-map-resolve@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761" + dependencies: + atob "~1.1.0" + resolve-url "~0.2.1" + source-map-url "~0.3.0" + urix "~0.1.0" + +source-map-url@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" + +source-map@^0.1.38: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3, source-map@0.X: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.4.1, source-map@0.4.x: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +sparkles@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stream-array@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/stream-array/-/stream-array-1.1.2.tgz#9e5f7345f2137c30ee3b498b9114e80b52bb7eb5" + dependencies: + readable-stream "~2.1.0" + +stream-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-1.0.0.tgz#bf9b4abfb42b274d751479e44e0ff2656b6f1193" + dependencies: + inherits "~2.0.1" + readable-stream "^1.0.27-1" + +stream-browserify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-consume@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" + +stream-exhaust@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.1.tgz#c0c4455e54ce5a179ca8736e73334b4e7fd67553" + +stream-http@^2.3.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.5.0.tgz#585eee513217ed98fe199817e7313b6f772a6802" + dependencies: + builtin-status-codes "^2.0.0" + inherits "^2.0.1" + readable-stream "^2.1.0" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + +string_decoder@^0.10.25, string_decoder@~0.10.25, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string.prototype.codepointat@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/string.prototype.codepointat/-/string.prototype.codepointat-0.2.0.tgz#6b26e9bd3afcaa7be3b4269b526de1b82000ac78" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee" + dependencies: + first-chunk-stream "^1.0.0" + strip-bom "^2.0.0" + +strip-bom@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794" + dependencies: + first-chunk-stream "^1.0.0" + is-utf8 "^0.2.0" + +strip-bom@^2.0.0, strip-bom@2.X: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.0, supports-color@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" + +svgo@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.1.tgz#287320fed972cb097e72c2bb1685f96fe08f8034" + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.2.1" + js-yaml "~3.6.1" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + +tapable@^0.1.8, tapable@~0.1.8: + version "0.1.10" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.1.10.tgz#29c35707c2b70e50d07482b5d202e8ed446dafd4" + +tapable@^0.2.3, tapable@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.4.tgz#a7814605089d4ba896c33c7e3566e13dcd194aa5" + +tar-pack@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" + dependencies: + debug "~2.2.0" + fstream "~1.0.10" + fstream-ignore "~1.0.5" + once "~1.3.3" + readable-stream "~2.1.4" + rimraf "~2.5.1" + tar "~2.2.1" + uid-number "~0.0.6" + +tar@^2.0.0, tar@~2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +ternary-stream@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ternary-stream/-/ternary-stream-2.0.1.tgz#064e489b4b5bf60ba6a6b7bc7f2f5c274ecf8269" + dependencies: + duplexify "^3.5.0" + fork-stream "^0.0.4" + merge-stream "^1.0.0" + through2 "^2.0.1" + +through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +through2@^0.6.1, through2@^0.6.3: + version "0.6.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +through2@^2.0.0, through2@^2.0.1, through2@2.X: + version "2.0.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.1.tgz#384e75314d49f32de12eebb8136b8eb6b5d59da9" + dependencies: + readable-stream "~2.0.0" + xtend "~4.0.0" + +tildify@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" + dependencies: + os-homedir "^1.0.0" + +time-stamp@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" + +timers-browserify@^1.0.1, timers-browserify@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" + dependencies: + process "~0.11.0" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.3.tgz#3da382f670f25ded78d7b3d1792119bca0b7132d" + +uglify-js@^2.7.0, uglify-js@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.4.tgz#a295a0de12b6a650c031c40deb0dc40b14568bd2" + dependencies: + async "~0.2.6" + source-map "~0.5.1" + uglify-to-browserify "~1.0.0" + yargs "~3.10.0" + +uglify-js@~2.6.0, uglify-js@2.6.4: + version "2.6.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.6.4.tgz#65ea2fb3059c9394692f15fed87c2b36c16b9adf" + dependencies: + async "~0.2.6" + source-map "~0.5.1" + uglify-to-browserify "~1.0.0" + yargs "~3.10.0" + +uglify-save-license@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uid-number@~0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +unc-path-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + +underscore@^1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +uniqid@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.0.tgz#33d9679f65022f48988a03fd24e7dcaf8f109eca" + dependencies: + macaddress "^0.2.8" + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + +unique-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" + +urix@^0.1.0, urix@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +url-loader@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.5.7.tgz#67e8779759f8000da74994906680c943a9b0925d" + dependencies: + loader-utils "0.2.x" + mime "1.2.x" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +url@~0.10.1: + version "0.10.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@^0.10.3, util@~0.10.3, util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +uuid@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.0.tgz#6728fc0459c450d796a99c31837569bdf672d728" + +v8flags@^2.0.2: + version "2.0.11" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.11.tgz#bca8f30f0d6d60612cc2c00641e6962d42ae6881" + dependencies: + user-home "^1.1.1" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +vendors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +vinyl-file@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-1.3.0.tgz#aa05634d3a867ba91447bedbb34afcb26f44f6e7" + dependencies: + graceful-fs "^4.1.2" + strip-bom "^2.0.0" + strip-bom-stream "^1.0.0" + vinyl "^1.1.0" + +vinyl-fs@^0.3.0: + version "0.3.14" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6" + dependencies: + defaults "^1.0.0" + glob-stream "^3.1.5" + glob-watcher "^0.0.6" + graceful-fs "^3.0.0" + mkdirp "^0.5.0" + strip-bom "^1.0.0" + through2 "^0.6.1" + vinyl "^0.4.0" + +vinyl-map2@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/vinyl-map2/-/vinyl-map2-1.2.1.tgz#bdf70f96efae6f47015faa7f1453013b3a95893e" + dependencies: + bl "^1.0.0" + new-from "0.0.3" + through2 "^2.0.0" + +vinyl-sourcemaps-apply@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" + dependencies: + source-map "^0.5.1" + +vinyl@^0.4.0: + version "0.4.6" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" + dependencies: + clone "^0.2.0" + clone-stats "^0.0.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^1.1.0, vinyl@1.X: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.0.1.tgz#1c3b4931e7ac4c1efee743f3b91a74c094407bb6" + dependencies: + clone "^1.0.0" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + is-stream "^1.1.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + +vlq@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.1.tgz#14439d711891e682535467f8587c5630e4222a6c" + +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +vue: + version "2.1.3" + resolved "https://registry.yarnpkg.com/vue/-/vue-2.1.3.tgz#20161b8684777754fd9823134b38f13c1e197882" + +vue-hot-reload-api@^2.0.1: + version "2.0.6" + resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.0.6.tgz#817d4bfb30f55428aa1012d029499e07f3147d21" + +vue-loader@^9.3.2: + version "9.9.5" + resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-9.9.5.tgz#0893e3093e90c8fbe852053b2b0f4854a3bf4651" + dependencies: + consolidate "^0.14.0" + hash-sum "^1.0.2" + js-beautify "^1.6.3" + loader-utils "^0.2.10" + lru-cache "^4.0.1" + object-assign "^4.0.0" + postcss "^5.0.10" + postcss-selector-parser "^2.0.0" + source-map "^0.5.6" + vue-hot-reload-api "^2.0.1" + vue-style-loader "^1.0.0" + vue-template-compiler "^2.0.5" + vue-template-es2015-compiler "^1.2.2" + +vue-resource: + version "1.0.3" + resolved "https://registry.yarnpkg.com/vue-resource/-/vue-resource-1.0.3.tgz#8d52d0d8a9ed5f2ae704c68d530c84ceaf97be14" + +vue-style-loader@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-1.0.0.tgz#abeb7bd0f46313083741244d3079d4f14449e049" + dependencies: + loader-utils "^0.2.7" + +vue-template-compiler@^2.0.5: + version "2.1.3" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.1.3.tgz#af252df5848c15980cbf32d88a253db053290949" + dependencies: + de-indent "^1.0.2" + he "^1.1.0" + +vue-template-es2015-compiler@^1.2.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.3.0.tgz#4a0f2a0bbef8b5731f78add8263cd86fe4f643ca" + +watchpack@^0.2.1: + version "0.2.9" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-0.2.9.tgz#62eaa4ab5e5ba35fdfc018275626e3c0f5e3fb0b" + dependencies: + async "^0.9.0" + chokidar "^1.0.0" + graceful-fs "^4.1.2" + +watchpack@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.1.0.tgz#42d44627464a2fadffc9308c0f7562cfde795f24" + dependencies: + async "2.0.0-rc.4" + chokidar "^1.4.3" + graceful-fs "^4.1.2" + +webpack-core@~0.6.0: + version "0.6.8" + resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.8.tgz#edf9135de00a6a3c26dd0f14b208af0aa4af8d0a" + dependencies: + source-list-map "~0.1.0" + source-map "~0.4.1" + +webpack-sources@^0.1.0: + version "0.1.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.3.tgz#15ce2fb79d0a1da727444ba7c757bf164294f310" + dependencies: + source-list-map "~0.1.0" + source-map "~0.5.3" + +"webpack-stream@github:jeroennoten/webpack-stream#patch-1": + version "3.2.0" + resolved "https://codeload.github.com/jeroennoten/webpack-stream/tar.gz/d78a3568e259f9cdbc64c60290639af6ef6d3baf" + dependencies: + gulp-util "^3.0.7" + lodash.clone "^4.3.2" + lodash.some "^4.2.2" + memory-fs "^0.3.0" + through "^2.3.8" + vinyl "^1.1.0" + webpack "^1.12.9" + +webpack@^1.12.9: + version "1.13.3" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-1.13.3.tgz#e79c46fe5a37c5ca70084ba0894c595cdcb42815" + dependencies: + acorn "^3.0.0" + async "^1.3.0" + clone "^1.0.2" + enhanced-resolve "~0.9.0" + interpret "^0.6.4" + loader-utils "^0.2.11" + memory-fs "~0.3.0" + mkdirp "~0.5.0" + node-libs-browser "^0.6.0" + optimist "~0.6.0" + supports-color "^3.1.0" + tapable "~0.1.8" + uglify-js "~2.7.3" + watchpack "^0.2.1" + webpack-core "~0.6.0" + +"webpack@2.1.0-beta.15 - 2.1.0-beta.22": + version "2.1.0-beta.22" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.1.0-beta.22.tgz#b073cf6dbb1993f43bffdde4528ba32f7894d330" + dependencies: + acorn "^3.2.0" + async "^1.3.0" + clone "^1.0.2" + enhanced-resolve "^2.2.0" + interpret "^1.0.0" + loader-runner "^2.1.0" + loader-utils "^0.2.11" + memory-fs "~0.3.0" + mkdirp "~0.5.0" + node-libs-browser "^1.0.0" + object-assign "^4.0.1" + source-map "^0.5.3" + supports-color "^3.1.0" + tapable "~0.2.3" + uglify-js "~2.6.0" + watchpack "^1.0.0" + webpack-sources "^0.1.0" + yargs "^4.7.1" + +when@^3.7.7: + version "3.7.7" + resolved "https://registry.yarnpkg.com/when/-/when-3.7.7.tgz#aba03fc3bb736d6c88b091d013d8a8e590d84718" + +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@^1.0.5, which@^1.2.10, which@^1.2.9, which@1: + version "1.2.12" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" + dependencies: + isexe "^1.1.1" + +wide-align@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + dependencies: + string-width "^1.0.1" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wrap-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.0.0.tgz#7d30f8f873f9a5bbc3a64dabc8d177e071ae426f" + dependencies: + string-width "^1.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +xtend@^4.0.0, "xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4" + +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs@^4.7.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + From b250cbc4d8695c152d9b3918021f826788520779 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 16:36:53 +0100 Subject: [PATCH 126/288] Fix dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 19b9a6344..ffb023d07 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "bootstrap-sass": "^3.3.7", "bootswatch": "^3.3.7", "jquery": "^2.2.4", - "laravel-elixir-vue-2": "^0.2.0", "lodash": "^4.17.2", "selectize": "^0.12.4", "selectize-scss": "^0.9.2", @@ -18,6 +17,7 @@ "devDependencies": { "gulp": "^3.9.1", "laravel-elixir": "^6.0.0-15", + "laravel-elixir-vue-2": "^0.2.0", "laravel-elixir-webpack-official": "^1.0.9" } } From 978ac52cc101fed47ee511ff8038a0d69f94cdc9 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 17:04:41 +0100 Subject: [PATCH 127/288] Upgrade some files --- resources/assets/js/app.js | 6 +++--- resources/assets/js/bootstrap.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 6142ef322..a11bea6b2 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -9,14 +9,14 @@ require('./bootstrap'); /** * Next, we will create a fresh Vue application instance and attach it to - * the body of the page. From here, you may begin adding components to - * the application, or feel free to tweak this setup for your needs. + * the page. Then, you may begin adding components to this application + * or customize the JavaScript scaffolding to fit your unique needs. */ // Vue.component('example', require('./components/Example.vue')); const app = new Vue({ - el: 'body' + el: '#app' }); /** diff --git a/resources/assets/js/bootstrap.js b/resources/assets/js/bootstrap.js index 3f4c5cf5b..a2f3529fc 100644 --- a/resources/assets/js/bootstrap.js +++ b/resources/assets/js/bootstrap.js @@ -26,7 +26,7 @@ require('vue-resource'); */ Vue.http.interceptors.push((request, next) => { - request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken; + request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken); next(); }); From edb24fcf177ac6e4ef63dc9adcd0d6ec6769ebe6 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 17:04:55 +0100 Subject: [PATCH 128/288] Upgrade some dependencies --- composer.json | 8 ++++---- composer.lock | 46 +++++++++++++++++++++++----------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/composer.json b/composer.json index ec39eebd2..3f8affff5 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "laravel/framework": "5.3.*", "laravel/socialite": "^2.0", "laravelcollective/html": "^5.3", - "league/commonmark": "^0.15.1", + "league/commonmark": "^0.15.2", "tijsverkoyen/akismet": "^1.1" }, "require-dev": { @@ -20,9 +20,9 @@ "laravel/homestead": "^3.0", "mockery/mockery": "^0.9.5", "phpspec/phpspec": "^3.1", - "phpunit/phpunit": "^5.3", - "symfony/css-selector": "^3.0", - "symfony/dom-crawler": "^3.0" + "phpunit/phpunit": "^5.6", + "symfony/css-selector": "^3.1", + "symfony/dom-crawler": "^3.1" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index c1449b383..a1bcce2e3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "74cfdbb6263c542424c88a0158be6590", - "content-hash": "1502f5a7a43df7b3668da5d6c86cac12", + "hash": "06eb5b2337978238b0112c7c26aa2339", + "content-hash": "2a1778e1d4699ac45f4be054e77ca772", "packages": [ { "name": "bugsnag/bugsnag", @@ -763,16 +763,16 @@ }, { "name": "laravel/framework", - "version": "v5.3.23", + "version": "v5.3.24", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "5b920baa30fbd4606829d56f3737cac0633a8db7" + "reference": "b603b7cf77ff083c2248f7baa23f3add34c3ff84" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/5b920baa30fbd4606829d56f3737cac0633a8db7", - "reference": "5b920baa30fbd4606829d56f3737cac0633a8db7", + "url": "https://api.github.com/repos/laravel/framework/zipball/b603b7cf77ff083c2248f7baa23f3add34c3ff84", + "reference": "b603b7cf77ff083c2248f7baa23f3add34c3ff84", "shasum": "" }, "require": { @@ -887,7 +887,7 @@ "framework", "laravel" ], - "time": "2016-11-14 15:41:06" + "time": "2016-11-21 14:14:16" }, { "name": "laravel/socialite", @@ -999,16 +999,16 @@ }, { "name": "league/commonmark", - "version": "0.15.1", + "version": "0.15.2", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "20bdba6777e6c63f861711501eec8887e65412fc" + "reference": "c3b08b911e7344e45b87529eabc8b559d48093d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/20bdba6777e6c63f861711501eec8887e65412fc", - "reference": "20bdba6777e6c63f861711501eec8887e65412fc", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c3b08b911e7344e45b87529eabc8b559d48093d4", + "reference": "c3b08b911e7344e45b87529eabc8b559d48093d4", "shasum": "" }, "require": { @@ -1021,7 +1021,7 @@ "require-dev": { "cebe/markdown": "~1.0", "erusev/parsedown": "~1.0", - "jgm/commonmark": "0.26", + "jgm/commonmark": "0.27", "michelf/php-markdown": "~1.4", "mikehaertl/php-shellcommand": "~1.2.0", "phpunit/phpunit": "~4.3|~5.0", @@ -1064,7 +1064,7 @@ "markdown", "parser" ], - "time": "2016-11-08 15:28:32" + "time": "2016-11-22 17:30:29" }, { "name": "league/flysystem", @@ -4580,16 +4580,16 @@ }, { "name": "symfony/css-selector", - "version": "v3.1.6", + "version": "v3.1.7", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "ca809c64072e0fe61c1c7fb3c76cdc32265042ac" + "reference": "a37b3359566415a91cba55a2d95820b3fa1a9658" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/ca809c64072e0fe61c1c7fb3c76cdc32265042ac", - "reference": "ca809c64072e0fe61c1c7fb3c76cdc32265042ac", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/a37b3359566415a91cba55a2d95820b3fa1a9658", + "reference": "a37b3359566415a91cba55a2d95820b3fa1a9658", "shasum": "" }, "require": { @@ -4629,20 +4629,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2016-09-06 11:02:40" + "time": "2016-11-03 08:04:31" }, { "name": "symfony/dom-crawler", - "version": "v3.1.6", + "version": "v3.1.7", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "59eee3c76eb89f21857798620ebdad7a05ad14f4" + "reference": "1eb3b4d216e8db117218dd2bb7d23dfe67bdf518" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/59eee3c76eb89f21857798620ebdad7a05ad14f4", - "reference": "59eee3c76eb89f21857798620ebdad7a05ad14f4", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/1eb3b4d216e8db117218dd2bb7d23dfe67bdf518", + "reference": "1eb3b4d216e8db117218dd2bb7d23dfe67bdf518", "shasum": "" }, "require": { @@ -4685,7 +4685,7 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2016-10-18 15:46:07" + "time": "2016-11-14 16:20:02" }, { "name": "symfony/yaml", From 45d1207bdfcde64502d2969c111559a22800ce9e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 17:05:17 +0100 Subject: [PATCH 129/288] Use endsection instead of stop --- resources/views/auth/login.blade.php | 2 +- resources/views/auth/passwords/email.blade.php | 2 +- resources/views/auth/passwords/reset.blade.php | 2 +- resources/views/auth/register.blade.php | 2 +- resources/views/errors/403.blade.php | 2 +- resources/views/errors/404.blade.php | 2 +- resources/views/forum/overview.blade.php | 2 +- resources/views/forum/threads/create.blade.php | 2 +- resources/views/forum/threads/edit.blade.php | 2 +- resources/views/forum/threads/show.blade.php | 2 +- resources/views/home.blade.php | 2 +- resources/views/layouts/default.blade.php | 2 +- resources/views/layouts/settings.blade.php | 2 +- resources/views/layouts/small.blade.php | 2 +- resources/views/replies/edit.blade.php | 2 +- resources/views/tags/overview.blade.php | 2 +- resources/views/tags/show.blade.php | 2 +- resources/views/users/dashboard.blade.php | 2 +- resources/views/users/profile.blade.php | 2 +- resources/views/users/settings/profile.blade.php | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 64d70f4c9..c42cbbb58 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -28,7 +28,7 @@ Github {!! Form::close() !!} -@stop +@endsection @section('small-content-after')
        diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index 9b6b2a249..1d8c71b13 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -14,4 +14,4 @@ {!! Form::submit('Send Password Reset Link', ['class' => 'btn btn-primary btn-block']) !!} {!! Form::close() !!} -@stop +@endsection diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index 2a6559ce4..d5753aa32 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -25,4 +25,4 @@ {!! Form::submit('Reset Password', ['class' => 'btn btn-primary btn-block']) !!} {!! Form::close() !!} -@stop +@endsection diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index f69fc31cb..aaad50cef 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -46,4 +46,4 @@ {!! Form::submit('Register', ['class' => 'btn btn-primary btn-block']) !!} {!! Form::close() !!} -@stop +@endsection diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php index 85c619dff..cc48e9edf 100644 --- a/resources/views/errors/403.blade.php +++ b/resources/views/errors/403.blade.php @@ -7,4 +7,4 @@

        {{ $title }}

        You're not allow to this page.

        -@stop +@endsection diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php index bb9e0add5..449b39d02 100644 --- a/resources/views/errors/404.blade.php +++ b/resources/views/errors/404.blade.php @@ -7,4 +7,4 @@

        {{ $title }}

        The page you requested cannot be found.

        -@stop +@endsection diff --git a/resources/views/forum/overview.blade.php b/resources/views/forum/overview.blade.php index f39cb5645..bbb2458e5 100644 --- a/resources/views/forum/overview.blade.php +++ b/resources/views/forum/overview.blade.php @@ -30,4 +30,4 @@
        {!! $threads->render() !!}
        -@stop +@endsection diff --git a/resources/views/forum/threads/create.blade.php b/resources/views/forum/threads/create.blade.php index a519ad481..8a76dd154 100644 --- a/resources/views/forum/threads/create.blade.php +++ b/resources/views/forum/threads/create.blade.php @@ -38,4 +38,4 @@ {!! Form::submit('Create Thread', ['class' => 'btn btn-primary btn-block']) !!} Cancel {!! Form::close() !!} -@stop +@endsection diff --git a/resources/views/forum/threads/edit.blade.php b/resources/views/forum/threads/edit.blade.php index 1e09266fa..5f3544998 100644 --- a/resources/views/forum/threads/edit.blade.php +++ b/resources/views/forum/threads/edit.blade.php @@ -33,4 +33,4 @@ {!! Form::submit('Update', ['class' => 'btn btn-primary btn-block']) !!} Cancel {!! Form::close() !!} -@stop +@endsection diff --git a/resources/views/forum/threads/show.blade.php b/resources/views/forum/threads/show.blade.php index 82729ca6f..176307660 100644 --- a/resources/views/forum/threads/show.blade.php +++ b/resources/views/forum/threads/show.blade.php @@ -60,4 +60,4 @@ {!! Form::submit('Reply', ['class' => 'btn btn-primary btn-block']) !!} {!! Form::close() !!} @endif -@stop +@endsection diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index a0259c819..12ce4f2ed 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -7,4 +7,4 @@

        Laravel.io

        The Laravel Community Portal

        -@stop +@endsection diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 06aff3a71..c9ef2cd69 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -6,4 +6,4 @@ @yield('content')
        -@stop +@endsection diff --git a/resources/views/layouts/settings.blade.php b/resources/views/layouts/settings.blade.php index 70139ccbb..4d06ba184 100644 --- a/resources/views/layouts/settings.blade.php +++ b/resources/views/layouts/settings.blade.php @@ -25,4 +25,4 @@
      -@stop +@endsection diff --git a/resources/views/layouts/small.blade.php b/resources/views/layouts/small.blade.php index 787b3c03d..bb7f1140d 100644 --- a/resources/views/layouts/small.blade.php +++ b/resources/views/layouts/small.blade.php @@ -17,4 +17,4 @@
      -@stop +@endsection diff --git a/resources/views/replies/edit.blade.php b/resources/views/replies/edit.blade.php index ae2e10bdd..0603dbf10 100644 --- a/resources/views/replies/edit.blade.php +++ b/resources/views/replies/edit.blade.php @@ -15,4 +15,4 @@ {!! Form::submit('Update', ['class' => 'btn btn-primary btn-block']) !!} Cancel {!! Form::close() !!} -@stop +@endsection diff --git a/resources/views/tags/overview.blade.php b/resources/views/tags/overview.blade.php index 86f0e7d7e..cda9982fc 100644 --- a/resources/views/tags/overview.blade.php +++ b/resources/views/tags/overview.blade.php @@ -9,4 +9,4 @@

      {{ $tag->name() }}

      {{ $tag->description() }}

      @endforeach -@stop +@endsection diff --git a/resources/views/tags/show.blade.php b/resources/views/tags/show.blade.php index 928c7e7a7..521d06ba3 100644 --- a/resources/views/tags/show.blade.php +++ b/resources/views/tags/show.blade.php @@ -11,4 +11,4 @@ @foreach ($tag->threads() as $thread)

      {{ $thread->subject() }}

      @endforeach -@stop +@endsection diff --git a/resources/views/users/dashboard.blade.php b/resources/views/users/dashboard.blade.php index b7c8000dc..a5faf5d13 100644 --- a/resources/views/users/dashboard.blade.php +++ b/resources/views/users/dashboard.blade.php @@ -4,4 +4,4 @@ @section('content')

      Welcome {{ Auth::user()->name() }}!

      -@stop +@endsection diff --git a/resources/views/users/profile.blade.php b/resources/views/users/profile.blade.php index 523a111eb..e41904532 100644 --- a/resources/views/users/profile.blade.php +++ b/resources/views/users/profile.blade.php @@ -8,4 +8,4 @@ @if ($user->githubUsername()) Github @endif -@stop +@endsection diff --git a/resources/views/users/settings/profile.blade.php b/resources/views/users/settings/profile.blade.php index cf43fbe57..45a7d1842 100644 --- a/resources/views/users/settings/profile.blade.php +++ b/resources/views/users/settings/profile.blade.php @@ -49,4 +49,4 @@ {!! Form::close() !!} -@stop +@endsection From cf1a6bc71aec066ff1b8d3a594fdc51bbfe39745 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 17:23:32 +0100 Subject: [PATCH 130/288] Remove recaptcha Couldn't get it to work anymore. Horrible broken. Wasn't helping much anyway after reviewing the statistics. --- .env.example | 3 - .../Controllers/Auth/RegisterController.php | 1 + app/Http/Requests/RegisterRequest.php | 4 -- app/Http/Requests/ThreadRequest.php | 8 +-- composer.json | 1 - composer.lock | 56 +--------------- config/app.php | 2 - config/recaptcha.php | 67 ------------------- resources/lang/en/validation.php | 5 +- resources/views/auth/register.blade.php | 5 -- .../views/forum/threads/create.blade.php | 5 -- 11 files changed, 5 insertions(+), 152 deletions(-) delete mode 100644 config/recaptcha.php diff --git a/.env.example b/.env.example index 41440e658..d234737f7 100644 --- a/.env.example +++ b/.env.example @@ -19,9 +19,6 @@ MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null -RECAPTCHA_PUBLIC_KEY= -RECAPTCHA_PRIVATE_KEY= - GITHUB_ID= GITHUB_SECRET= GITHUB_URL= diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index e69699e60..d744ccfce 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -10,6 +10,7 @@ use App\Users\UserWasRegistered; use Illuminate\Foundation\Auth\RegistersUsers; use Validator; +use Session; class RegisterController extends Controller { diff --git a/app/Http/Requests/RegisterRequest.php b/app/Http/Requests/RegisterRequest.php index efd5bb02e..2031570db 100644 --- a/app/Http/Requests/RegisterRequest.php +++ b/app/Http/Requests/RegisterRequest.php @@ -37,10 +37,6 @@ public function rules() $rules['password'] = 'required|confirmed|min:6'; } - if (! app()->runningUnitTests()) { - $rules['g-recaptcha-response'] = 'required|recaptcha'; - } - return $rules; } diff --git a/app/Http/Requests/ThreadRequest.php b/app/Http/Requests/ThreadRequest.php index 0caf23876..d8beb1303 100644 --- a/app/Http/Requests/ThreadRequest.php +++ b/app/Http/Requests/ThreadRequest.php @@ -17,19 +17,13 @@ public function authorize() public function rules() { - $rules = [ + return [ 'topic' => 'required|exists:topics,id', 'subject' => 'required|not_contain_url|spam', 'body' => 'required|spam', 'tags' => 'array', 'tags.*' => 'exists:tags,id', ]; - - if (! app()->runningUnitTests()) { - $rules['g-recaptcha-response'] = 'required|recaptcha'; - } - - return $rules; } public function author(): User diff --git a/composer.json b/composer.json index 3f8affff5..ea7e46609 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,6 @@ "require": { "php": "^7.0", "bugsnag/bugsnag-laravel": "^2.4", - "greggilbert/recaptcha": "^2.1", "guzzlehttp/guzzle": "^6.2", "laravel/framework": "5.3.*", "laravel/socialite": "^2.0", diff --git a/composer.lock b/composer.lock index a1bcce2e3..3264ef086 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "06eb5b2337978238b0112c7c26aa2339", - "content-hash": "2a1778e1d4699ac45f4be054e77ca772", + "hash": "389f1979cc1e9c7ecbb241900407feb6", + "content-hash": "d4e9a85b588043a20e5d17c9655f6e36", "packages": [ { "name": "bugsnag/bugsnag", @@ -393,58 +393,6 @@ ], "time": "2015-11-06 14:35:42" }, - { - "name": "greggilbert/recaptcha", - "version": "2.1.1", - "source": { - "type": "git", - "url": "https://github.com/greggilbert/recaptcha.git", - "reference": "fb835b2ac089e52e643e97b93b4060330485955d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/greggilbert/recaptcha/zipball/fb835b2ac089e52e643e97b93b4060330485955d", - "reference": "fb835b2ac089e52e643e97b93b4060330485955d", - "shasum": "" - }, - "require": { - "illuminate/support": "~5.1", - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/migrations" - ], - "psr-4": { - "Greggilbert\\Recaptcha\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Greg Gilbert", - "email": "greg@greg-gilbert.com" - } - ], - "description": "reCAPTCHA Validator for Laravel 5", - "homepage": "http://github.com/greggilbert/recaptcha", - "keywords": [ - "captcha", - "laravel", - "laravel5", - "recaptcha" - ], - "time": "2016-02-17 12:41:57" - }, { "name": "guzzlehttp/guzzle", "version": "6.2.2", diff --git a/config/app.php b/config/app.php index b68ba9d7c..807312849 100644 --- a/config/app.php +++ b/config/app.php @@ -168,7 +168,6 @@ */ Bugsnag\BugsnagLaravel\BugsnagServiceProvider::class, Collective\Html\HtmlServiceProvider::class, - Greggilbert\Recaptcha\RecaptchaServiceProvider::class, Laravel\Socialite\SocialiteServiceProvider::class, /* @@ -235,7 +234,6 @@ */ 'Bugsnag' => Bugsnag\BugsnagLaravel\BugsnagFacade::class, 'Form' => Collective\Html\FormFacade::class, - 'Recaptcha' => Greggilbert\Recaptcha\Facades\Recaptcha::class, 'Socialite' => Laravel\Socialite\Facades\Socialite::class, ], diff --git a/config/recaptcha.php b/config/recaptcha.php deleted file mode 100644 index 4d1c6257f..000000000 --- a/config/recaptcha.php +++ /dev/null @@ -1,67 +0,0 @@ - env('RECAPTCHA_PUBLIC_KEY', ''), - 'private_key' => env('RECAPTCHA_PRIVATE_KEY', ''), - - /* - |-------------------------------------------------------------------------- - | Template - |-------------------------------------------------------------------------- - | - | Set a template to use if you don't want to use the standard one. - | - */ - - 'template' => '', - - /* - |-------------------------------------------------------------------------- - | Driver - |-------------------------------------------------------------------------- - | - | Determine how to call out to get response; values are 'curl' or 'native'. - | Only applies to v2. - | - */ - - 'driver' => 'curl', - - /* - |-------------------------------------------------------------------------- - | Options - |-------------------------------------------------------------------------- - | - | Various options for the driver - | - */ - - 'options' => [ - 'curl_timeout' => 1, - ], - - /* - |-------------------------------------------------------------------------- - | Version - |-------------------------------------------------------------------------- - | - | Set which version of ReCaptcha to use. - | - */ - - 'version' => 2, - -]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index d9b3e8c76..75ca63eff 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -83,7 +83,6 @@ // Custom Validation Rules 'not_contain_url' => 'The :attribute field cannot contain an url.', 'passcheck' => 'Your current password is incorrect.', - 'recaptcha' => 'The captcha field is not correct.', 'spam' => 'The :attribute field contains spam.', /* @@ -98,9 +97,7 @@ */ 'custom' => [ - 'g-recaptcha-response' => [ - 'required' => 'The captcha field is required.', - ], + // ], /* diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index aaad50cef..a05921198 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -39,11 +39,6 @@ {!! Form::password('password_confirmation', ['class' => 'form-control', Session::has('githubData') ? null : 'required']) !!} - @formGroup('g-recaptcha-response') - {!! Recaptcha::render(['lang' => App::getLocale()]) !!} - @error('g-recaptcha-response') - @endFormGroup - {!! Form::submit('Register', ['class' => 'btn btn-primary btn-block']) !!} {!! Form::close() !!} @endsection diff --git a/resources/views/forum/threads/create.blade.php b/resources/views/forum/threads/create.blade.php index 8a76dd154..b52965cc7 100644 --- a/resources/views/forum/threads/create.blade.php +++ b/resources/views/forum/threads/create.blade.php @@ -30,11 +30,6 @@ @error('tags') @endFormGroup - @formGroup('g-recaptcha-response') - {!! Recaptcha::render(['lang' => App::getLocale()]) !!} - @error('g-recaptcha-response') - @endFormGroup - {!! Form::submit('Create Thread', ['class' => 'btn btn-primary btn-block']) !!} Cancel {!! Form::close() !!} From fcd4383409253e8c4de1d5bc85d1517f258d4488 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 17:26:20 +0100 Subject: [PATCH 131/288] Improve Github registration flow --- resources/views/auth/register.blade.php | 32 +++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index a05921198..3588238ce 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -4,12 +4,6 @@ @section('small-content') {!! Form::open(['route' => 'register.post']) !!} - @if (session()->has('githubData')) -
      - Password isn't required when registering through Github. -
      - @endif - @formGroup('name') {!! Form::label('name') !!} {!! Form::text('name', session('githubData.name'), ['class' => 'form-control', 'required']) !!} @@ -28,17 +22,25 @@ @error('username') @endFormGroup - @formGroup('password') - {!! Form::label('password') !!} - {!! Form::password('password', ['class' => 'form-control', Session::has('githubData') ? null : 'required']) !!} - @error('password') - @endFormGroup + @if (! session()->has('githubData')) + @formGroup('password') + {!! Form::label('password') !!} + {!! Form::password('password', ['class' => 'form-control', Session::has('githubData') ? null : 'required']) !!} + @error('password') + @endFormGroup -
      - {!! Form::label('password_confirmation') !!} - {!! Form::password('password_confirmation', ['class' => 'form-control', Session::has('githubData') ? null : 'required']) !!} -
      +
      + {!! Form::label('password_confirmation') !!} + {!! Form::password('password_confirmation', ['class' => 'form-control', Session::has('githubData') ? null : 'required']) !!} +
      + @endif {!! Form::submit('Register', ['class' => 'btn btn-primary btn-block']) !!} + + @if (! session()->has('githubData')) + + Github + + @endif {!! Form::close() !!} @endsection From fb32ae76075f33a11a288be785f3a97b81cb5289 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 17:45:31 +0100 Subject: [PATCH 132/288] Improve footer a bit --- resources/assets/sass/app.scss | 1 + resources/assets/sass/footer.scss | 3 +++ resources/views/layouts/base.blade.php | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 resources/assets/sass/footer.scss diff --git a/resources/assets/sass/app.scss b/resources/assets/sass/app.scss index c8096cf82..2339c806d 100644 --- a/resources/assets/sass/app.scss +++ b/resources/assets/sass/app.scss @@ -3,4 +3,5 @@ @import "../../../node_modules/bootswatch/flatly/bootswatch"; @import "../../../node_modules/selectize-scss/src/selectize.bootstrap3"; +@import "footer"; @import "nav"; diff --git a/resources/assets/sass/footer.scss b/resources/assets/sass/footer.scss new file mode 100644 index 000000000..d360403b3 --- /dev/null +++ b/resources/assets/sass/footer.scss @@ -0,0 +1,3 @@ +#footer { + padding-bottom: 20px; +} diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 14d064720..2f36ab3cd 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -17,9 +17,10 @@ @yield('body') -
      + From 041bc4736d88809e0e3fe523a671282f53ce639f Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 18:21:05 +0100 Subject: [PATCH 133/288] Add sponsors to footer --- resources/assets/sass/footer.scss | 37 +++++++++++++++++++++ resources/views/layouts/_footer.blade.php | 9 +++++ resources/views/layouts/_sponsors.blade.php | 36 ++++++++++++++++++++ resources/views/layouts/base.blade.php | 8 +---- 4 files changed, 83 insertions(+), 7 deletions(-) create mode 100644 resources/views/layouts/_footer.blade.php create mode 100644 resources/views/layouts/_sponsors.blade.php diff --git a/resources/assets/sass/footer.scss b/resources/assets/sass/footer.scss index d360403b3..7491b57d1 100644 --- a/resources/assets/sass/footer.scss +++ b/resources/assets/sass/footer.scss @@ -1,3 +1,40 @@ #footer { padding-bottom: 20px; } + +#sponsors { + text-align: center; +} +#sponsors h2 { + margin-bottom: 30px; +} +.sponsors-list div { + margin-bottom: 20px; +} +.sponsors-list div img { + max-width: 50%; +} + +@media (min-width: $screen-sm-min) { + #sponsors h2 { + margin-bottom: 40px; + } + + .sponsors-list { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; + justify-content: center; + + div { + flex: 1 0 33.33333%; + margin-bottom: 35px; + width: 33.33333%; + + img { + max-width: 200px; + } + } + } +} diff --git a/resources/views/layouts/_footer.blade.php b/resources/views/layouts/_footer.blade.php new file mode 100644 index 000000000..2257d9f05 --- /dev/null +++ b/resources/views/layouts/_footer.blade.php @@ -0,0 +1,9 @@ +@include('layouts._sponsors') + + diff --git a/resources/views/layouts/_sponsors.blade.php b/resources/views/layouts/_sponsors.blade.php new file mode 100644 index 000000000..2ba39c77e --- /dev/null +++ b/resources/views/layouts/_sponsors.blade.php @@ -0,0 +1,36 @@ +
      +

      Sponsors

      + +
      +
      + + + +
      +
      + + + +
      +
      + + + +
      +
      + + + +
      +
      + + + +
      +
      + + + +
      +
      +
      diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 2f36ab3cd..59d8832ba 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -17,13 +17,7 @@ @yield('body') - + @include('layouts._footer') From 49c1f6e8a7aa8bccbd9f8e3f0149781757f8fdcf Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 18:22:19 +0100 Subject: [PATCH 134/288] Add hr to sponsors list --- resources/views/layouts/_sponsors.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/layouts/_sponsors.blade.php b/resources/views/layouts/_sponsors.blade.php index 2ba39c77e..5fa33e014 100644 --- a/resources/views/layouts/_sponsors.blade.php +++ b/resources/views/layouts/_sponsors.blade.php @@ -1,4 +1,5 @@
      +

      Sponsors

      From db9983b00111da276d0ef14a683b85b79803d367 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 26 Nov 2016 18:30:43 +0100 Subject: [PATCH 135/288] Add facebook link --- resources/views/layouts/_nav.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/layouts/_nav.blade.php b/resources/views/layouts/_nav.blade.php index 1fb936e5c..73da991a5 100644 --- a/resources/views/layouts/_nav.blade.php +++ b/resources/views/layouts/_nav.blade.php @@ -20,6 +20,7 @@