diff --git a/Gemfile b/Gemfile index bf08a2e..11e7d94 100644 --- a/Gemfile +++ b/Gemfile @@ -1,26 +1,29 @@ -source 'https://rubygems.org' +source "https://rubygems.org" -# Declare your gem's dependencies in swagger_rails.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec +# Allow the rails version to come from an ENV setting so Travis can test multiple versions. +# See http://www.schneems.com/post/50991826838/testing-against-multiple-rails-versions/ +rails_version = ENV['RAILS_VERSION'] || '3.2.22' -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. +gem 'rails', "#{rails_version}" + +case rails_version.split('.').first +when '3' + gem 'strong_parameters' +when '4', '5' + gem 'responders' +end -# To use a debugger -# gem 'debugger', group: [:development, :test] -# gem 'sqlite3' -group :development, :test do - gem 'pry' - gem 'generator_spec' -end +gem 'rswag-api', path: './rswag-api' +gem 'rswag-ui', path: './rswag-ui' + +# To use debugger +# gem 'debugger' group :test do gem 'test-unit' - gem 'database_cleaner' + gem 'rspec-rails' + gem 'generator_spec' + gem 'rswag-specs', path: '~/src/rswag/rswag-specs' end diff --git a/Gemfile.lock b/Gemfile.lock index ef7b173..8ab8788 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,20 @@ PATH - remote: . + remote: ./rswag-api specs: - swagger_rails (1.0.1.pre.beta3) - rack + rswag-api (1.0.0) + rails (>= 3.1, < 5.1) + +PATH + remote: ./rswag-ui + specs: + rswag-ui (1.0.0) + rails (>= 3.1, < 5.1) + +PATH + remote: ~/src/rswag/rswag-specs + specs: + rswag-specs (1.0.0) + json-schema rails (>= 3.1, < 5.1) GEM @@ -35,10 +47,9 @@ GEM activesupport (3.2.22) i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) + addressable (2.4.0) arel (3.0.3) builder (3.0.4) - coderay (1.1.0) - database_cleaner (1.5.3) diff-lcs (1.2.5) erubis (2.7.0) generator_spec (0.9.3) @@ -48,20 +59,17 @@ GEM i18n (0.7.0) journey (1.0.4) json (1.8.3) + json-schema (2.7.0) + addressable (>= 2.4) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - method_source (0.8.2) mime-types (1.25.1) - multi_json (1.11.2) + multi_json (1.12.1) polyglot (0.3.5) - power_assert (0.2.6) - pry (0.10.3) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) + power_assert (0.3.1) rack (1.4.7) - rack-cache (1.5.1) + rack-cache (1.6.1) rack (>= 0.4) rack-ssl (1.3.4) rack @@ -82,34 +90,38 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - rake (10.4.2) + rake (11.3.0) rdoc (3.12.2) json (~> 1.4) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) + rspec-core (3.5.4) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-mocks (3.4.1) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-rails (3.4.1) - actionpack (>= 3.0, < 4.3) - activesupport (>= 3.0, < 4.3) - railties (>= 3.0, < 4.3) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-support (~> 3.4.0) - rspec-support (3.4.1) - slop (3.6.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.2) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-support (3.5.0) sprockets (2.2.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sqlite3 (1.3.11) - test-unit (3.1.5) + strong_parameters (0.2.3) + actionpack (~> 3.0) + activemodel (~> 3.0) + activesupport (~> 3.0) + railties (~> 3.0) + test-unit (3.2.1) power_assert thor (0.19.1) tilt (1.4.1) @@ -122,10 +134,12 @@ PLATFORMS ruby DEPENDENCIES - database_cleaner generator_spec - pry - rspec-rails (~> 3.0) + rails (= 3.2.22) + rspec-rails + rswag-api! + rswag-specs! + rswag-ui! sqlite3 - swagger_rails! + strong_parameters test-unit diff --git a/README.md b/README.md index 93cbc67..90846a2 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,51 @@ -swagger_rails +rswag (formerly swagger_rails) ========= -Generate API documentation, including a slick discovery UI and playground, directly from your rspec integration specs. Use the provided DSL to describe and test API operations in your spec files. Then, you can easily generate corresponding swagger.json files and serve them up with an embedded version of [swagger-ui](https://github.com/swagger-api/swagger-ui). Best of all, it requires minimal coding and maintenance, allowing you to focus on building an awesome API! +[Swagger](http://swagger.io) tooling for Rails API's. Generate beautiful API documentation, including a UI to explore and test operations, directly from your rspec integration tests. + +Rswag extends rspec-rails "request specs" with a Swagger-based DSL for describing and testing API operations. You describe your API operations with a succinct, intuitive syntax, and it automaticaly runs the tests. Once you have green tests, run a rake task to auto-generate corresponding Swagger files and expose them as JSON endpoints. Rswag also provides an embedded version of the awesome [swagger-ui](https://github.com/swagger-api/swagger-ui) that's powered by the exposed JSON. This toolchain makes it seamless to go from integration specs, which you're probably doing in some form already, to living documentation for your API consumers. And that's not all ... -Once you have a Web API that can describe itself in Swagger, you've opened the treasure chest of Swagger-based tools including a client generator that can be targeted to a wide range of popular platforms. See [swagger-codegen](https://github.com/swagger-api/swagger-codegen) for more details. - -__NOTE__: It's early days so please be gentle when reporting issues :) As author of a similar project in the .NET space - [Swashbuckle](https://github.com/domaindrivendev/Swashbuckle), that's become very popular, I think there's real potential here. Please feel free to contribute. I'll be more than happy to consider PR's ... so long as they include tests. +Once you have an API that can describe itself in Swagger, you've opened the treasure chest of Swagger-based tools including a client generator that can be targeted to a wide range of popular platforms. See [swagger-codegen](https://github.com/swagger-api/swagger-codegen) for more details. ## Getting Started ## 1. Add this line to your applications _Gemfile_: ```ruby - gem 'swagger_rails' + gem 'rswag' ``` 2. Run the install generator ```ruby - rails g swagger_rails:install + rails g rswag:install ``` -3. Create an integration spec to describe and test your API +3. Create an integration spec to describe and test your API. ```ruby + # spec/integration/blogs_spec.rb require 'swagger_helper' describe 'Blogs API' do path '/blogs' do - post 'creates a new blog' do - operation_description 'Detailed implementation notes for the create a new blog API endpoint' - consumes 'application/json' - parameter :blog, in: :body, schema: { + post 'Creates a blog' do + tags 'Blogs' + consumes 'application/json', 'application/xml' + parameter name: :blog, in: :body, schema: { type: :object, properties: { - title: { :type => :string }, - content: { :type => :string } + title: { type: :string }, + content: { type: :string } }, required: [ 'title', 'content' ] } - response '200', 'success' do + response '201', 'blog created' do let(:blog) { { title: 'foo', content: 'bar' } } run_test! end @@ -55,100 +56,267 @@ __NOTE__: It's early days so please be gentle when reporting issues :) As author end end end + + path '/blogs/{id}' do + + get 'Retrieves a blog' do + tags 'Blogs' + produces 'application/json', 'application/xml' + parameter name: :id, :in => :path, :type => :string + + response '200', 'blog found' do + schema type: :object, + properties: { + id: { type: :integer }, + title: { type: :string }, + content: { type: :string } + }, + required: [ 'id', 'title', 'content' ] + + let(:id) { Blog.create(title: 'foo', content: 'bar').id } + run_test! + end + + response '404', 'blog not found' do + let(:id) { 'invalid' } + run_test! + end + end + end end ``` -4. Generate the swagger.json file(s) +4. Generate the Swagger JSON file(s) ```ruby - rake swaggerize + rake rswag:specs:swaggerize ``` 5. Spin up your app and check out the awesome, auto-generated docs at _/api-docs_! -## How does it Work? ## +## The rspec DSL ## -There's two separate parts to swagger rails: +### Paths, Operations and Responses ### -1. Tooling to easily generate swagger descriptions directly from your API tests/specs -2. Rails middleware to auto-magically serve a swagger-ui that's powered by those descriptions +If you've used [Swagger](http://swagger.io/specification) before, then the syntax should be very familiar. To describe your API operations, start by specifying a path and then list the supported operations (i.e. HTTP verbs) for that path. Path parameters must be surrounded by curly braces ({}). Within an operation block (see "post" or "get" in the example above), most of the fields supported by the [Swagger "Operation" object](http://swagger.io/specification/#operationObject) are available as methods on the example group. To list (and test) the various responses for an operation, create one or more response blocks. Again, you can reference the [Swagger "Response" object](http://swagger.io/specification/#responseObject) for available fields. -The tooling is designed to fit seamlessly into your development workflow, with the swagger docs and UI being a by-product that you get for free ... well almost free :) You'll need to use the provided rspec DSL. But, it's an intuitive syntax (based on the [swagger-spec](http://swagger.io/specification/)) and, IMO, a very succint and expressive way to write api/integration tests. +Take special note of the __run_test!__ method that's called within each response block. This tells rswag to create and execute a corresponding example. It builds and submits a request based on parameter descriptions and corresponding values that have been provided using the rspec "let" syntax. For example, the "post" description in the example above specifies a 'body' parameter called 'blog'. It also lists 2 different responses. For the success case (i.e. the 201 response), notice how "let" is used to set the blog parameter to a value that matches the provided schema. For the failure case (i.e. the 422 response), notice how it's set to a value that does not match the provided schema. When the test is executed, rswag also validates the actual response code and, where applicable, the response body against the provided [JSON Schema](http://json-schema.org/documentation.html). -Once you've generated the swagger files, the functionality to serve them up, along with the swagger-ui, is provided as a Rails Engine. After running the install generator, you'll see the following line added to _routes.rb_ +If you'd like your specs to be a little more explicit about what's going on here, you can replace the call to __run_test!__ with equivalent "before" and "it" blocks: - ```ruby - mount SwaggerRails::Engine => '/api-docs' - ``` +```ruby +response '201', 'blog created' do + let(:blog) { { title: 'foo', content: 'bar' } } + + before do |example| + submit_request(example.metadata) + end + + it 'returns a valid 201 response' do |example| + assert_response_matches_metadata(example.metadata) + end +end +``` + +### Global Metadata ### + +In addition to paths, operations and responses, Swagger also supports global API metadata. When you install rswag, a file called _swagger_helper.rb_ is added to your spec folder. This is where you define one or more Swagger documents and provide global metadata. Again, the format is based on Swagger so most of the global fields supported by the top level ["Swagger" object](http://swagger.io/specification/#swaggerObject) can be provided with each document definition. As an example, you could define a Swagger document for each version of your API and in each case specify a title, version string and URL basePath: + +```ruby +# spec/swagger_helper.rb +RSpec.configure do |config| + config.swagger_root = Rails.root.to_s + '/swagger' -This will wire up routes for the swagger docs and swagger-ui assets, all prefixed with "/api-docs". For example, if you navigate to "/api-docs/index.html" you'll get the swagger-ui. If you navigate to "/api-docs/v1/swagger.json", you'll get the swagger.json file under your app root at "swagger/v1/swagger.json" - assuming it was generated. + config.swagger_docs = { + 'v1/swagger.json' => { + swagger: '2.0', + info: { + title: 'API V1', + version: 'v1' + }, + basePath: '/api/v1' + }, -If you'd like your swagger resources to appear under a different base path, you can change the Engine mount point from "/api-docs" to something else. + 'v2/swagger.json' => { + swagger: '2.0', + info: { + title: 'API V2', + version: 'v2' + }, + basePath: '/api/v2' + } + } +end +``` -## Multiple Swagger Documents ## +__NOTE__: By default, the paths, operations and responses defined in your spec files will be associated with the first Swagger document in _swagger_helper.rb_. If you're using multiple documents, you'll need to tag the individual specs with their target document name: -By default, the generator will create all operation descriptions in a single swagger.json file. You can customize this by defining additional documents in the swagger_helper (installed under your spec folder) ... +```ruby +# spec/integration/v2/blogs_spec.rb +describe 'Blogs API', swagger_doc: 'v2/swagger.json' do - ```ruby - RSpec.configure do |config| - ... + path '/blogs' do + ... - config.swagger_docs = { - 'v1/swagger.json' => { - swagger: '2.0', - info: { - title: 'API V1', - version: 'v1' + path '/blogs/{id}' do + ... +end +``` + +## Configuration & Customization ## + +The steps described above will get you up and running with minimal setup. However, rswag offers a lot of flexibility to customize as you see fit. Before exploring the various options, you'll need to be aware of it's different components. The following table lists each of them and the files that get added/updated as part of a standard install. + +|Gem|Description|Added/Updated| +|---------|-----------|-------------| +|__rswag-specs__|Swagger-based DSL for rspec & accompanying rake task for generating Swagger files|_spec/swagger_helper.rb_| +|__rswag-api__ |Rails Engine that exposes the Swagger files as JSON endpoints|_config/initializers/rswag-api.rb, config/routes.rb_| +|__rswag-ui__ |Rails Engine that includes [swagger-ui](https://github.com/swagger-api/swagger-ui) and powers it from the Swagger endpoints|_config/initializers/rswag-ui.rb, config/routes.rb_| + +### Output Location for Generated Swagger Files ### + +You can adjust this in the _swagger_helper.rb_ that's installed with __rspec-specs__: + +```ruby +# spec/swagger_helper.rb +RSpec.configure do |config| + config.swagger_root = Rails.root.to_s + '/your-custom-folder-name' + ... +end +``` + +__NOTE__: If you do change this, you'll also need to update the rswag-api.rb initializer (assuming you're using rswag-api). More on this later. + +### Referenced Parameters and Schema Definitions ### + +Swagger allows you to describe JSON structures inline with your operation descriptions OR as referenced globals. For example, you might have a standard response structure for all failed operations. Rather than repeating the schema in every operation spec, you can define it globally and provide a reference to it in each spec: + +```ruby +# spec/swagger_helper.rb +config.swagger_docs = { + 'v1/swagger.json' => { + swagger: '2.0', + info: { + title: 'API V1' + }, + definitions: { + errors_object: { + type: 'object', + properties: { + errors: { '$ref' => '#/definitions/errors_map' } } }, - - 'v2/swagger.json' => { - swagger: '2.0', - info: { - title: 'API V2', - version: 'v2' + errors_map: { + type: 'object', + additionalProperties: { + type: 'array', + items: { type: 'string' } } } } - end - ``` + } +} -And then tagging your spec's with the target swagger_doc: +# spec/integration/blogs_spec.rb +describe 'Blogs API' do - ```ruby - require 'swagger_helper' + path '/blogs' do - describe 'Blogs API V2', swagger_doc: 'v2/swagger.json' do + post 'Creates a blog' do + + response 422, 'invalid request' do + schema '$ref' => '#/definitions/errors_object' + ... +end + +# spec/integration/comments_spec.rb +describe 'Blogs API' do - path '/blogs' do - ... - end - end - end - ``` + path '/blogs/{blog_id}/comments' do -Then, when you run the generator and spin up the swagger-ui, you'll see a select box in the top right allowing your audience to switch between the different API versions. + post 'Creates a comment' do + + response 422, 'invalid request' do + schema '$ref' => '#/definitions/errors_object' + ... +end +``` -## Tweaking the Swagger Document with Request Context ## +### Route Prefix for Swagger JSON Endpoints ### -You can provide global metadata for Swagger documents in the swagger_helper file and this will be included in the resulting Swagger JSON when you run the "swaggerize" rake task. For the most part, this is sufficient. However, you may want to make some changes that require the current request context. This is possible by applying an optional swagger_filter in the swagger_rails initializer (installed into config/initializers): +The functionality to expose Swagger files, such as those generated by rswag-specs, as JSON endpoints is implemented as a Rails Engine. As with any Engine, you can change it's mount prefix in _routes.rb_: - ```ruby - SwaggerRails.configure do |c| - ... +```ruby +TestApp::Application.routes.draw do + ... - c.swagger_filter = lambda { |swagger, env| swagger['host'] = env['HTTP_HOST'] } - end - ``` + mount Rswag::Api::Engine => 'your-custom-prefix' +end +``` -This function will get called prior to serialization of any Swagger file and is passed the rack env for the current request. This provides a lot of flexibilty. For example, you could dynamically assign the "host" property (as shown above) or you could inspect session information or Authoriation header and remove operations based on user permissions. +Assuming a Swagger file exists at '<swagger_root>/v1/swagger.json', this configuration would expose the file as the following JSON endpoint: -## Customizing the UI ## +``` +GET http:///your-custom-prefix/v1/swagger.json +``` + +### Root Location for Swagger Files ### + +You can adjust this in the _rswag-api.rb_ initializer that's installed with __rspec-api__: + +```ruby +Rswag::Api.configure do |c| + c.swagger_root = Rails.root.to_s + '/your-custom-folder-name' + ... +end +``` + +__NOTE__: If you're using rswag-specs to generate Swagger files, you'll want to ensure they both use the same <swagger_root>. The reason for separate settings is to maintain independence between the two gems. For example, you could install rswag-api independently and create your Swagger files manually. + +### Dynamic Values for Swagger JSON ## + +There may be cases where you need to add dynamic values to the Swagger JSON that's returned by rswag-api. For example, you may want to provide an explicit host name. Rather than hardcoding it, you can configure a filter that's executed prior to serializing every Swagger document: + +```ruby +Rswag::Api.configure do |c| + ... + + c.swagger_filter = lambda { |swagger, env| swagger['host'] = env['HTTP_HOST'] } +end +``` + +Note how the filter is passed the rack env for the current request. This provides a lot of flexibilty. For example, you can assign the "host" property (as shown) or you could inspect session information or an Authoriation header and remove operations based on user permissions. + +### Enable Swagger Endpoints for swagger-ui ### + +You can update the _rswag-ui.rb_ initializer, installed with rswag-ui, to specify which Swagger endpoints should be available to power the documentation UI. If you're using rswag-api, these should correspond to the Swagger endpoints it exposes. When the UI is rendered, you'll see these listed in a drop-down to the top right of the page: + +```ruby +Rswag::Ui.configure do |c| + c.swagger_endpoint '/api-docs/v1/swagger.json', 'API V1 Docs' + c.swagger_endpoint '/api-docs/v2/swagger.json', 'API V2 Docs' +end +``` + +### Route Prefix for the swagger-ui ### + +Similar to rswag-api, you can customize the swagger-ui path by changing it's mount prefix in _routes.rb_: + +```ruby +TestApp::Application.routes.draw do + ... + + mount Rswag::Api::Engine => 'api-docs' + mount Rswag::Ui::Engine => 'your-custom-prefix' +end +``` + +### Customizing the swagger-ui ### The swagger-ui provides several options for customizing it's behavior, all of which are documented here https://github.com/swagger-api/swagger-ui#swaggerui. If you need to tweak these or customize the overall look and feel of your swagger-ui, then you'll need to provide your own version of index.html. You can do this with the following generator. ```ruby -rails g swagger_rails:custom_ui +rails g rswag:ui:custom_ui ``` -This will add a local version that you can customize at "app/views/swagger_rails/swagger_ui/index.html.erb" +This will add a local version that you can modify at _app/views/rswag/ui/home/index.html.erb_ diff --git a/README.rdoc b/README.rdoc deleted file mode 100644 index bdf9b56..0000000 --- a/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= SwaggerRails - -This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/app/controllers/swagger_rails/swagger_ui_controller.rb b/app/controllers/swagger_rails/swagger_ui_controller.rb deleted file mode 100644 index 525fa31..0000000 --- a/app/controllers/swagger_rails/swagger_ui_controller.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'json' - -module SwaggerRails - class SwaggerUiController < ApplicationController - - def index - swagger_root = SwaggerRails.config.resolve_swagger_root(request.env) - swagger_root.concat('/') unless swagger_root.end_with?('/') - - swagger_filenames = Dir["#{swagger_root}/**/*.json"] - - @discovery_paths = Hash[ - swagger_filenames.map do |filename| - [ - filename.sub(swagger_root, root_path.chomp('/')), - load_json(filename)["info"]["title"] - ] - end - ] - - render :index, layout: false - end - - private - - def load_json(filename) - JSON.parse(File.read(filename)) - end - end -end diff --git a/config/routes.rb b/config/routes.rb deleted file mode 100644 index 8543722..0000000 --- a/config/routes.rb +++ /dev/null @@ -1,3 +0,0 @@ -SwaggerRails::Engine.routes.draw do - root to: 'swagger_ui#index' -end diff --git a/lib/generators/swagger_rails/custom_ui/custom_ui_generator.rb b/lib/generators/swagger_rails/custom_ui/custom_ui_generator.rb deleted file mode 100644 index 4177abd..0000000 --- a/lib/generators/swagger_rails/custom_ui/custom_ui_generator.rb +++ /dev/null @@ -1,9 +0,0 @@ -module SwaggerRails - class CustomUiGenerator < Rails::Generators::Base - source_root File.expand_path('../files', __FILE__) - - def add_custom_index - copy_file('index.html.erb', 'app/views/swagger_rails/swagger_ui/index.html.erb') - end - end -end diff --git a/lib/generators/swagger_rails/custom_ui/files/index.html.erb b/lib/generators/swagger_rails/custom_ui/files/index.html.erb deleted file mode 100644 index 302d46a..0000000 --- a/lib/generators/swagger_rails/custom_ui/files/index.html.erb +++ /dev/null @@ -1,153 +0,0 @@ - - - - - Swagger UI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-
- - diff --git a/lib/generators/swagger_rails/install/USAGE b/lib/generators/swagger_rails/install/USAGE deleted file mode 100644 index cece75d..0000000 --- a/lib/generators/swagger_rails/install/USAGE +++ /dev/null @@ -1,9 +0,0 @@ -Description: - Adds default files required to use swagger_rails - -Example: - rails generate swagger_rails:install - - This will create: - config/swagger/v1/swagger.json - config/initializers/swagger_rails.rb diff --git a/lib/generators/swagger_rails/install/install_generator.rb b/lib/generators/swagger_rails/install/install_generator.rb deleted file mode 100644 index 9930130..0000000 --- a/lib/generators/swagger_rails/install/install_generator.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'rails/generators' - -module SwaggerRails - - class InstallGenerator < Rails::Generators::Base - source_root File.expand_path('../templates', __FILE__) - - def add_swagger_dir - empty_directory('swagger/v1') - end - - def add_initializer - template('swagger_rails.rb', 'config/initializers/swagger_rails.rb') - end - - def add_rspec_helper - template('swagger_helper.rb', 'spec/swagger_helper.rb') - end - - def add_routes - route("mount SwaggerRails::Engine => '/api-docs'") - end - end -end diff --git a/lib/generators/swagger_rails/install/templates/swagger_helper.rb b/lib/generators/swagger_rails/install/templates/swagger_helper.rb deleted file mode 100644 index 26523b3..0000000 --- a/lib/generators/swagger_rails/install/templates/swagger_helper.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'rails_helper' -require 'swagger_rails/rspec/dsl' - -RSpec.configure do |config| - # NOTE: Should be no need to modify these 3 lines - config.add_setting :swagger_root - config.add_setting :swagger_docs - config.extend SwaggerRails::RSpec::DSL - - # Specify a root folder where Swagger JSON files are generated - # NOTE: If you're using the Swagger JSON middleware to serve API descriptions, you'll need - # to ensure that the same folder is also specified in the swagger_rails initializer - config.swagger_root = Rails.root.to_s + '/swagger' - - # Define one or more Swagger documents and provide global metadata for each one - # When you run the "swaggerize" rake task, the complete Swagger will be generated - # at the provided relative path under swagger_root - # By default, the operations defined in spec files are added to the first - # document below. You can override this behavior by adding a swagger_doc tag to the - # the root example_group in your specs, e.g. describe '...', swagger_doc: 'v2/swagger.json' - config.swagger_docs = { - 'v1/swagger.json' => { - swagger: '2.0', - info: { - title: 'API V1', - version: 'v1' - } - } - } -end diff --git a/lib/swagger_rails.rb b/lib/swagger_rails.rb deleted file mode 100644 index 637bc72..0000000 --- a/lib/swagger_rails.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'swagger_rails/version' -require 'swagger_rails/configuration' - -module SwaggerRails - - def self.configure - yield(config) - end - - def self.config - @config ||= Configuration.new - end -end - -require 'swagger_rails/engine' if defined?(Rails) diff --git a/lib/swagger_rails/configuration.rb b/lib/swagger_rails/configuration.rb deleted file mode 100644 index 8d434e6..0000000 --- a/lib/swagger_rails/configuration.rb +++ /dev/null @@ -1,10 +0,0 @@ -module SwaggerRails - class Configuration - attr_accessor :swagger_root, :swagger_filter - - def resolve_swagger_root(env) - path_params = env['action_dispatch.request.path_parameters'] || {} - path_params[:swagger_root] || swagger_root - end - end -end diff --git a/lib/swagger_rails/engine.rb b/lib/swagger_rails/engine.rb deleted file mode 100644 index 68d95d1..0000000 --- a/lib/swagger_rails/engine.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'swagger_rails/middleware/swagger_json' - -module SwaggerRails - class Engine < ::Rails::Engine - isolate_namespace SwaggerRails - - initializer 'swagger_rails.initialize' do |app| - middleware.use SwaggerJson, SwaggerRails.config - - if app.config.respond_to?(:assets) - app.config.assets.precompile += [ 'swagger-ui/*' ] - end - end - end -end diff --git a/lib/swagger_rails/middleware/swagger_json.rb b/lib/swagger_rails/middleware/swagger_json.rb deleted file mode 100644 index 56e50ed..0000000 --- a/lib/swagger_rails/middleware/swagger_json.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'json' - -module SwaggerRails - class SwaggerJson - - def initialize(app, config) - @app = app - @config = config - end - - def call(env) - path = env['PATH_INFO'] - filename = "#{@config.resolve_swagger_root(env)}/#{path}" - - if env['REQUEST_METHOD'] == 'GET' && File.file?(filename) - swagger = load_json(filename) - @config.swagger_filter.call(swagger, env) unless @config.swagger_filter.nil? - - return [ - '200', - { 'Content-Type' => 'application/json' }, - [ JSON.dump(swagger) ] - ] - end - - return @app.call(env) - end - - private - - def load_json(filename) - JSON.parse(File.read(filename)) - end - end -end diff --git a/lib/swagger_rails/rspec/api_metadata.rb b/lib/swagger_rails/rspec/api_metadata.rb deleted file mode 100644 index e474975..0000000 --- a/lib/swagger_rails/rspec/api_metadata.rb +++ /dev/null @@ -1,46 +0,0 @@ -module SwaggerRails::RSpec - class APIMetadata - - def initialize metadata - @metadata = metadata - end - - def response_example? - @metadata.has_key?(:response_code) - end - - def swagger_doc - @metadata[:swagger_doc] - end - - def swagger_data - { - paths: { - @metadata[:path_template] => { - @metadata[:http_verb] => operation_metadata - } - } - } - end - - private - - - def operation_metadata - { - tags: [find_root_of(@metadata)[:description]], - summary: @metadata[:summary], - description: @metadata[:operation_description], - consumes: @metadata[:consumes], - produces: @metadata[:produces], - parameters: @metadata[:parameters], - responses: { @metadata[:response_code] => @metadata[:response] } - } - end - - def find_root_of(node) - parent = node[:parent_example_group] - parent.nil? ? node : find_root_of(parent) - end - end -end \ No newline at end of file diff --git a/lib/swagger_rails/rspec/dsl.rb b/lib/swagger_rails/rspec/dsl.rb deleted file mode 100644 index 6590f79..0000000 --- a/lib/swagger_rails/rspec/dsl.rb +++ /dev/null @@ -1,83 +0,0 @@ -require 'swagger_rails/test_visitor' - -module SwaggerRails - module RSpec - module DSL - - def path(path_template, &block) - metadata = { - path_template: path_template - } - describe(path_template, metadata, &block) - end - - def operation(http_verb, summary=nil, &block) - metadata = { - http_verb: http_verb, - summary: summary, - parameters: [] - } - describe(http_verb, metadata, &block) - end - - def operation_description(message) - metadata[:operation_description] = message - end - - [ :get, :post, :patch, :put, :delete, :head ].each do |http_verb| - define_method(http_verb) do |summary=nil, &block| - operation(http_verb, summary, &block) - end - end - - def consumes(*mime_types) - metadata[:consumes] = mime_types - end - - def produces(*mime_types) - metadata[:produces] = mime_types - end - - # Accepts parameter objects: - # parameter :petId, in: :path, type: :integer, required: true - # Or references: - # parameter ref: '#/parameters/Pet' - def parameter(name, attributes={}) - metadata[:parameters] << if name.respond_to?(:has_key?) - { '$ref': name.delete(:ref) || name.delete('ref') } - else - { name: name.to_s }.merge(attributes) - end - end - - def response(code, description, &block) - metadata = { - response_code: code, - response: { - description: description - } - } - context(description, metadata, &block) - end - - def run_test! - if metadata.has_key?(:swagger_doc) - swagger_doc = ::RSpec.configuration.swagger_docs[metadata[:swagger_doc]] - else - swagger_doc = ::RSpec.configuration.swagger_docs.values.first - end - - test_visitor = SwaggerRails::TestVisitor.new(swagger_doc) - - before do |example| - test_visitor.submit_request!(self, example.metadata) - end - - it "returns a #{metadata[:response_code]} status" do |example| - test_visitor.assert_response!(self, example.metadata) - end - end - end - end -end - diff --git a/lib/swagger_rails/rspec/formatter.rb b/lib/swagger_rails/rspec/formatter.rb deleted file mode 100644 index 45f657c..0000000 --- a/lib/swagger_rails/rspec/formatter.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'rspec/core/formatters' -require 'swagger_helper' -require 'swagger_rails/rspec/api_metadata' - -module SwaggerRails - module RSpec - class Formatter - ::RSpec::Core::Formatters.register self, - :example_group_finished, - :stop - - def initialize(output) - @output = output - @swagger_root = ::RSpec.configuration.swagger_root - @swagger_docs = ::RSpec.configuration.swagger_docs - - @output.puts 'Generating Swagger Docs ...' - end - - def example_group_finished(notification) - metadata = APIMetadata.new(notification.group.metadata) - return unless metadata.response_example? - - swagger_doc = @swagger_docs[metadata.swagger_doc] || @swagger_docs.values.first - swagger_doc.deep_merge!(metadata.swagger_data) - end - - def stop(notification) - @swagger_docs.each do |url_path, doc| - file_path = File.join(@swagger_root, url_path) - - File.open(file_path, 'w') do |file| - file.write(JSON.pretty_generate(doc)) - end - end - - @output.puts 'Swagger Doc generated' - end - end - end -end diff --git a/lib/swagger_rails/test_visitor.rb b/lib/swagger_rails/test_visitor.rb deleted file mode 100644 index f7e850d..0000000 --- a/lib/swagger_rails/test_visitor.rb +++ /dev/null @@ -1,71 +0,0 @@ -module SwaggerRails - class TestVisitor - - def initialize(swagger_doc) - @swagger_doc = swagger_doc - end - - def submit_request!(test, metadata) - params_data = params_data_for(test, metadata[:parameters]) - - path = build_path(metadata[:path_template], params_data) - body_or_params = build_body_or_params(params_data) - headers = build_headers(params_data, metadata[:consumes], metadata[:produces]) - test.send(metadata[:http_verb], path, { params: body_or_params, headers: headers }) - end - - def assert_response!(test, metadata) - test.assert_response(metadata[:response_code].to_i) - end - - private - - def params_data_for(test, parameters) - parameters.map do |parameter| - parameter = resolve_param_ref(parameter[:$ref]) if parameter.has_key?(:$ref) - - parameter - .slice(:name, :in) - .merge(value: test.send(parameter[:name].to_s.underscore)) - end - end - - def resolve_param_ref ref - raise "Invalid parameter reference: #{ref}" unless %r{#/parameters/(?.+)} =~ ref - - parameter = (@swagger_doc[:parameters][name] || @swagger_doc[:parameters][name.to_sym]) - raise "Unknown parameter reference: #{ref}" unless parameter - - parameter.merge(name: name) - end - - def build_path(path_template, params_data) - path_params_data = params_data.select { |p| p[:in] == :path } - - path_template.dup.tap do |path| - path_params_data.each do |param_data| - path.sub!("\{#{param_data[:name]}\}", param_data[:value].to_s) - end - path.prepend(@swagger_doc[:basePath] || '') - end - end - - def build_body_or_params(params_data) - body_params_data = params_data.select { |p| p[:in] == :body } - return body_params_data.first[:value].to_json if body_params_data.any? - - query_params_data = params_data.select { |p| p[:in] == :query } - Hash[query_params_data.map { |p| [ p[:name], p[:value] ] }] - end - - def build_headers(params_data, consumes, produces) - header_params_data = params_data.select { |p| p[:in] == :header } - headers = Hash[header_params_data.map { |p| [ p[:name], p[:value] ] }] - - headers['ACCEPT'] = produces.join(';') if produces.present? - headers['CONTENT_TYPE'] = consumes.join(';') if consumes.present? - - return headers - end - end -end diff --git a/lib/swagger_rails/version.rb b/lib/swagger_rails/version.rb deleted file mode 100644 index 35672c0..0000000 --- a/lib/swagger_rails/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module SwaggerRails - VERSION = "1.0.1-beta3" -end diff --git a/lib/tasks/swagger_rails_tasks.rake b/lib/tasks/swagger_rails_tasks.rake deleted file mode 100644 index 56c985f..0000000 --- a/lib/tasks/swagger_rails_tasks.rake +++ /dev/null @@ -1,14 +0,0 @@ -# desc "Explaining what the task does" -# task :swagger_rails do -# # Task goes here -# end - -if defined?(RSpec) - require 'rspec/core/rake_task' - - desc 'Generate Swagger JSON files from integration specs' - RSpec::Core::RakeTask.new('swaggerize') do |t| - t.pattern = 'spec/requests/**/*_spec.rb, spec/api/**/*_spec.rb, spec/integration/**/*_spec.rb' - t.rspec_opts = [ '--format SwaggerRails::RSpec::Formatter', '--dry-run', '--order defined' ] - end -end diff --git a/spec/dummy/.rspec b/rswag-api/.rspec similarity index 100% rename from spec/dummy/.rspec rename to rswag-api/.rspec diff --git a/MIT-LICENSE b/rswag-api/MIT-LICENSE similarity index 100% rename from MIT-LICENSE rename to rswag-api/MIT-LICENSE diff --git a/Rakefile b/rswag-api/Rakefile similarity index 66% rename from Rakefile rename to rswag-api/Rakefile index 907ed62..2cbae8a 100644 --- a/Rakefile +++ b/rswag-api/Rakefile @@ -1,16 +1,20 @@ -require 'rails' - +#!/usr/bin/env rake begin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end - -require 'rdoc/task' +begin + require 'rdoc/task' +rescue LoadError + require 'rdoc/rdoc' + require 'rake/rdoctask' + RDoc::Task = Rake::RDocTask +end RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'SwaggerRails' + rdoc.title = 'rswag-specs' rdoc.options << '--line-numbers' rdoc.rdoc_files.include('README.rdoc') rdoc.rdoc_files.include('lib/**/*.rb') @@ -18,9 +22,6 @@ end -load 'rails/tasks/statistics.rake' - - Bundler::GemHelper.install_tasks diff --git a/bin/rails b/rswag-api/bin/rails similarity index 84% rename from bin/rails rename to rswag-api/bin/rails index 4801e85..1ef582f 100755 --- a/bin/rails +++ b/rswag-api/bin/rails @@ -2,7 +2,7 @@ # This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application. ENGINE_ROOT = File.expand_path('../..', __FILE__) -ENGINE_PATH = File.expand_path('../../lib/swagger_rails/engine', __FILE__) +ENGINE_PATH = File.expand_path('../../lib/rswag/api/engine', __FILE__) # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) diff --git a/rswag-api/lib/generators/rswag/api/install/USAGE b/rswag-api/lib/generators/rswag/api/install/USAGE new file mode 100644 index 0000000..87b8bc5 --- /dev/null +++ b/rswag-api/lib/generators/rswag/api/install/USAGE @@ -0,0 +1,8 @@ +Description: + Adds rswag-api initializer for configuration + +Example: + rails generate rswag:api:install + + This will create: + config/initializers/rswag-api.rb diff --git a/rswag-api/lib/generators/rswag/api/install/install_generator.rb b/rswag-api/lib/generators/rswag/api/install/install_generator.rb new file mode 100644 index 0000000..744f2b1 --- /dev/null +++ b/rswag-api/lib/generators/rswag/api/install/install_generator.rb @@ -0,0 +1,18 @@ +require 'rails/generators' + +module Rswag + module Api + + class InstallGenerator < Rails::Generators::Base + source_root File.expand_path('../templates', __FILE__) + + def add_initializer + template('rswag-api.rb', 'config/initializers/rswag-api.rb') + end + + def add_routes + route("mount Rswag::Api::Engine => '/api-docs'") + end + end + end +end diff --git a/lib/generators/swagger_rails/install/templates/swagger_rails.rb b/rswag-api/lib/generators/rswag/api/install/templates/rswag-api.rb similarity index 74% rename from lib/generators/swagger_rails/install/templates/swagger_rails.rb rename to rswag-api/lib/generators/rswag/api/install/templates/rswag-api.rb index aa0d9ec..5f3ddc4 100644 --- a/lib/generators/swagger_rails/install/templates/swagger_rails.rb +++ b/rswag-api/lib/generators/rswag/api/install/templates/rswag-api.rb @@ -1,9 +1,9 @@ -SwaggerRails.configure do |c| +Rswag::Api.configure do |c| # Specify a root folder where Swagger JSON files are located # This is used by the Swagger middleware to serve requests for API descriptions - # NOTE: If you're using the rspec DSL to generate Swagger, you'll need to ensure - # that the same folder is also specified in spec/swagger_helper.rb + # NOTE: If you're using rswag-specs to generate Swagger, you'll need to ensure + # that it's configured to generate files in the same folder c.swagger_root = Rails.root.to_s + '/swagger' # Inject a lamda function to alter the returned Swagger prior to serialization diff --git a/rswag-api/lib/rswag/api.rb b/rswag-api/lib/rswag/api.rb new file mode 100644 index 0000000..553cb15 --- /dev/null +++ b/rswag-api/lib/rswag/api.rb @@ -0,0 +1,15 @@ +require 'rswag/api/version' +require 'rswag/api/configuration' +require 'rswag/api/engine' + +module Rswag + module Api + def self.configure + yield(config) + end + + def self.config + @config ||= Configuration.new + end + end +end diff --git a/rswag-api/lib/rswag/api/configuration.rb b/rswag-api/lib/rswag/api/configuration.rb new file mode 100644 index 0000000..ff56180 --- /dev/null +++ b/rswag-api/lib/rswag/api/configuration.rb @@ -0,0 +1,12 @@ +module Rswag + module Api + class Configuration + attr_accessor :swagger_root, :swagger_filter + + def resolve_swagger_root(env) + path_params = env['action_dispatch.request.path_parameters'] || {} + path_params[:swagger_root] || swagger_root + end + end + end +end diff --git a/rswag-api/lib/rswag/api/engine.rb b/rswag-api/lib/rswag/api/engine.rb new file mode 100644 index 0000000..893cf5f --- /dev/null +++ b/rswag-api/lib/rswag/api/engine.rb @@ -0,0 +1,13 @@ +require 'rswag/api/middleware' + +module Rswag + module Api + class Engine < ::Rails::Engine + isolate_namespace Rswag::Api + + initializer 'rswag-api.initialize' do |app| + middleware.use Rswag::Api::Middleware, Rswag::Api.config + end + end + end +end diff --git a/rswag-api/lib/rswag/api/middleware.rb b/rswag-api/lib/rswag/api/middleware.rb new file mode 100644 index 0000000..118c987 --- /dev/null +++ b/rswag-api/lib/rswag/api/middleware.rb @@ -0,0 +1,37 @@ +require 'json' + +module Rswag + module Api + class Middleware + + def initialize(app, config) + @app = app + @config = config + end + + def call(env) + path = env['PATH_INFO'] + filename = "#{@config.resolve_swagger_root(env)}/#{path}" + + if env['REQUEST_METHOD'] == 'GET' && File.file?(filename) + swagger = load_json(filename) + @config.swagger_filter.call(swagger, env) unless @config.swagger_filter.nil? + + return [ + '200', + { 'Content-Type' => 'application/json' }, + [ JSON.dump(swagger) ] + ] + end + + return @app.call(env) + end + + private + + def load_json(filename) + JSON.parse(File.read(filename)) + end + end + end +end diff --git a/rswag-api/lib/rswag/api/version.rb b/rswag-api/lib/rswag/api/version.rb new file mode 100644 index 0000000..8613ba9 --- /dev/null +++ b/rswag-api/lib/rswag/api/version.rb @@ -0,0 +1,5 @@ +module Rswag + module Api + VERSION = '1.0.0' + end +end diff --git a/rswag-api/rswag-api.gemspec b/rswag-api/rswag-api.gemspec new file mode 100644 index 0000000..6efa326 --- /dev/null +++ b/rswag-api/rswag-api.gemspec @@ -0,0 +1,18 @@ +$:.push File.expand_path("../lib", __FILE__) + +# Maintain your gem's version: +require 'rswag/api/version' + +# Describe your gem and declare its dependencies: +Gem::Specification.new do |s| + s.name = "rswag-api" + s.version = Rswag::Api::VERSION + s.authors = ["Richie Morris"] + s.email = ["domaindrivendev@gmail.com"] + s.homepage = "https://github.com/domaindrivendev/rswag" + s.summary = "A Rails Engine that exposes Swagger files as JSON endpoints" + + s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile" ] + + s.add_dependency "rails", ">= 3.1", "< 5.1" +end diff --git a/spec/generators/swagger_rails/fixtures/spec/.gitkeep b/rswag-api/spec/generators/rswag/api/fixtures/config/initializers/.gitkeep similarity index 100% rename from spec/generators/swagger_rails/fixtures/spec/.gitkeep rename to rswag-api/spec/generators/rswag/api/fixtures/config/initializers/.gitkeep diff --git a/rswag-api/spec/generators/rswag/api/fixtures/config/routes.rb b/rswag-api/spec/generators/rswag/api/fixtures/config/routes.rb new file mode 100644 index 0000000..9d8e33d --- /dev/null +++ b/rswag-api/spec/generators/rswag/api/fixtures/config/routes.rb @@ -0,0 +1,2 @@ +TestApp::Application.routes.draw do +end diff --git a/rswag-api/spec/generators/rswag/api/install_generator_spec.rb b/rswag-api/spec/generators/rswag/api/install_generator_spec.rb new file mode 100644 index 0000000..fe2294d --- /dev/null +++ b/rswag-api/spec/generators/rswag/api/install_generator_spec.rb @@ -0,0 +1,27 @@ +require 'generator_spec' +require 'generators/rswag/api/install/install_generator' + +module Rswag + module Api + + describe InstallGenerator do + include GeneratorSpec::TestCase + destination File.expand_path('../tmp', __FILE__) + + before(:all) do + prepare_destination + fixtures_dir = File.expand_path('../fixtures', __FILE__) + FileUtils.cp_r("#{fixtures_dir}/config", destination_root) + + run_generator + end + + it 'installs the Rails initializer' do + assert_file('config/initializers/rswag-api.rb') + end + + # Don't know how to test this + #it 'wires up routes' + end + end +end diff --git a/spec/dummy/app/assets/images/.keep b/rswag-api/spec/generators/rswag/api/tmp/config/initializers/.gitkeep similarity index 100% rename from spec/dummy/app/assets/images/.keep rename to rswag-api/spec/generators/rswag/api/tmp/config/initializers/.gitkeep diff --git a/spec/dummy/config/initializers/swagger_rails.rb b/rswag-api/spec/generators/rswag/api/tmp/config/initializers/rswag-api.rb similarity index 74% rename from spec/dummy/config/initializers/swagger_rails.rb rename to rswag-api/spec/generators/rswag/api/tmp/config/initializers/rswag-api.rb index aa0d9ec..5f3ddc4 100644 --- a/spec/dummy/config/initializers/swagger_rails.rb +++ b/rswag-api/spec/generators/rswag/api/tmp/config/initializers/rswag-api.rb @@ -1,9 +1,9 @@ -SwaggerRails.configure do |c| +Rswag::Api.configure do |c| # Specify a root folder where Swagger JSON files are located # This is used by the Swagger middleware to serve requests for API descriptions - # NOTE: If you're using the rspec DSL to generate Swagger, you'll need to ensure - # that the same folder is also specified in spec/swagger_helper.rb + # NOTE: If you're using rswag-specs to generate Swagger, you'll need to ensure + # that it's configured to generate files in the same folder c.swagger_root = Rails.root.to_s + '/swagger' # Inject a lamda function to alter the returned Swagger prior to serialization diff --git a/rswag-api/spec/generators/rswag/api/tmp/config/routes.rb b/rswag-api/spec/generators/rswag/api/tmp/config/routes.rb new file mode 100644 index 0000000..4254c4d --- /dev/null +++ b/rswag-api/spec/generators/rswag/api/tmp/config/routes.rb @@ -0,0 +1,4 @@ +TestApp::Application.routes.draw do + mount Rswag::Api::Engine => '/api-docs' + +end diff --git a/rswag-api/spec/rswag/api/fixtures/config/routes.rb b/rswag-api/spec/rswag/api/fixtures/config/routes.rb new file mode 100644 index 0000000..ed6b6ed --- /dev/null +++ b/rswag-api/spec/rswag/api/fixtures/config/routes.rb @@ -0,0 +1,6 @@ +TestApp::Application.routes.draw do + resources :blogs, defaults: { :format => :json } + + mount Rswag::Api::Engine => 'api-docs' + mount Rswag::Ui::Engine => 'api-docs' +end diff --git a/rswag-api/spec/rswag/api/fixtures/swagger/v1/swagger.json b/rswag-api/spec/rswag/api/fixtures/swagger/v1/swagger.json new file mode 100644 index 0000000..11b296d --- /dev/null +++ b/rswag-api/spec/rswag/api/fixtures/swagger/v1/swagger.json @@ -0,0 +1,8 @@ +{ + "swagger": "2.0", + "info": { + "title": "API V1", + "version": "v1" + }, + "paths": {} +} diff --git a/rswag-api/spec/rswag/api/middleware_spec.rb b/rswag-api/spec/rswag/api/middleware_spec.rb new file mode 100644 index 0000000..aaa148b --- /dev/null +++ b/rswag-api/spec/rswag/api/middleware_spec.rb @@ -0,0 +1,82 @@ +require 'rswag/api/middleware' +require 'rswag/api/configuration' + +module Rswag + module Api + + describe Middleware do + let(:app) { double('app') } + let(:swagger_root) { File.expand_path('../fixtures/swagger', __FILE__) } + let(:config) do + Configuration.new.tap { |c| c.swagger_root = swagger_root } + end + + subject { described_class.new(app, config) } + + describe '#call(env)' do + let(:response) { subject.call(env) } + let(:env_defaults) do + { + 'HTTP_HOST' => 'tempuri.org', + 'REQUEST_METHOD' => 'GET', + } + end + + context 'given a path that maps to an existing swagger file' do + let(:env) { env_defaults.merge('PATH_INFO' => 'v1/swagger.json') } + + it 'returns a 200 status' do + expect(response.length).to eql(3) + expect(response.first).to eql('200') + end + + it 'returns contents of the swagger file' do + expect(response.length).to eql(3) + expect(response[1]).to include( 'Content-Type' => 'application/json') + expect(response[2].join).to include('"title":"API V1"') + end + end + + context "given a path that doesn't map to any swagger file" do + let(:env) { env_defaults.merge('PATH_INFO' => 'foobar.json') } + before do + allow(app).to receive(:call).and_return([ '500', {}, [] ]) + end + + it 'delegates to the next middleware' do + expect(response).to include('500') + end + end + + context 'when the env contains a specific swagger_root' do + let(:env) do + env_defaults.merge( + 'PATH_INFO' => 'v1/swagger.json', + 'action_dispatch.request.path_parameters' => { + swagger_root: swagger_root + } + ) + end + + it 'locates files at the provided swagger_root' do + expect(response.length).to eql(3) + expect(response[1]).to include( 'Content-Type' => 'application/json') + expect(response[2].join).to include('"swagger":"2.0"') + end + end + + context 'when a swagger_filter is configured' do + before do + config.swagger_filter = lambda { |swagger, env| swagger['host'] = env['HTTP_HOST'] } + end + let(:env) { env_defaults.merge('PATH_INFO' => 'v1/swagger.json') } + + it 'applies the filter prior to serialization' do + expect(response.length).to eql(3) + expect(response[2].join).to include('"host":"tempuri.org"') + end + end + end + end + end +end diff --git a/spec/dummy/app/controllers/concerns/.keep b/rswag-api/spec/spec_helper.rb similarity index 100% rename from spec/dummy/app/controllers/concerns/.keep rename to rswag-api/spec/spec_helper.rb diff --git a/rswag-specs/.rspec b/rswag-specs/.rspec new file mode 100644 index 0000000..83e16f8 --- /dev/null +++ b/rswag-specs/.rspec @@ -0,0 +1,2 @@ +--color +--require spec_helper diff --git a/rswag-specs/MIT-LICENSE b/rswag-specs/MIT-LICENSE new file mode 100644 index 0000000..f95875d --- /dev/null +++ b/rswag-specs/MIT-LICENSE @@ -0,0 +1,20 @@ +Copyright 2015 domaindrivendev + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/rswag-specs/Rakefile b/rswag-specs/Rakefile new file mode 100644 index 0000000..2cbae8a --- /dev/null +++ b/rswag-specs/Rakefile @@ -0,0 +1,27 @@ +#!/usr/bin/env rake +begin + require 'bundler/setup' +rescue LoadError + puts 'You must `gem install bundler` and `bundle install` to run rake tasks' +end +begin + require 'rdoc/task' +rescue LoadError + require 'rdoc/rdoc' + require 'rake/rdoctask' + RDoc::Task = Rake::RDocTask +end + +RDoc::Task.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'rswag-specs' + rdoc.options << '--line-numbers' + rdoc.rdoc_files.include('README.rdoc') + rdoc.rdoc_files.include('lib/**/*.rb') +end + + + + +Bundler::GemHelper.install_tasks + diff --git a/rswag-specs/lib/generators/rswag/specs/install/USAGE b/rswag-specs/lib/generators/rswag/specs/install/USAGE new file mode 100644 index 0000000..38ec3b4 --- /dev/null +++ b/rswag-specs/lib/generators/rswag/specs/install/USAGE @@ -0,0 +1,8 @@ +Description: + Adds swagger_helper to enable Swagger DSL in integration specs + +Example: + rails generate rswag:specs:install + + This will create: + spec/swagger_helper.rb diff --git a/rswag-specs/lib/generators/rswag/specs/install/install_generator.rb b/rswag-specs/lib/generators/rswag/specs/install/install_generator.rb new file mode 100644 index 0000000..050c57b --- /dev/null +++ b/rswag-specs/lib/generators/rswag/specs/install/install_generator.rb @@ -0,0 +1,14 @@ +require 'rails/generators' + +module Rswag + module Specs + + class InstallGenerator < Rails::Generators::Base + source_root File.expand_path('../templates', __FILE__) + + def add_swagger_helper + template('swagger_helper.rb', 'spec/swagger_helper.rb') + end + end + end +end diff --git a/spec/dummy/spec/swagger_helper.rb b/rswag-specs/lib/generators/rswag/specs/install/templates/swagger_helper.rb similarity index 55% rename from spec/dummy/spec/swagger_helper.rb rename to rswag-specs/lib/generators/rswag/specs/install/templates/swagger_helper.rb index 26523b3..366d13e 100644 --- a/spec/dummy/spec/swagger_helper.rb +++ b/rswag-specs/lib/generators/rswag/specs/install/templates/swagger_helper.rb @@ -1,20 +1,14 @@ require 'rails_helper' -require 'swagger_rails/rspec/dsl' RSpec.configure do |config| - # NOTE: Should be no need to modify these 3 lines - config.add_setting :swagger_root - config.add_setting :swagger_docs - config.extend SwaggerRails::RSpec::DSL - # Specify a root folder where Swagger JSON files are generated - # NOTE: If you're using the Swagger JSON middleware to serve API descriptions, you'll need - # to ensure that the same folder is also specified in the swagger_rails initializer + # NOTE: If you're using the rswag-api to serve API descriptions, you'll need + # to ensure that it's confiugred to server Swagger from the same folder config.swagger_root = Rails.root.to_s + '/swagger' # Define one or more Swagger documents and provide global metadata for each one - # When you run the "swaggerize" rake task, the complete Swagger will be generated - # at the provided relative path under swagger_root + # When you run the 'rswag:specs:to_swagger' rake task, the complete Swagger will + # be generated at the provided relative path under swagger_root # By default, the operations defined in spec files are added to the first # document below. You can override this behavior by adding a swagger_doc tag to the # the root example_group in your specs, e.g. describe '...', swagger_doc: 'v2/swagger.json' @@ -24,7 +18,8 @@ RSpec.configure do |config| info: { title: 'API V1', version: 'v1' - } + }, + paths: {} } } end diff --git a/rswag-specs/lib/rswag/specs.rb b/rswag-specs/lib/rswag/specs.rb new file mode 100644 index 0000000..5d04e97 --- /dev/null +++ b/rswag-specs/lib/rswag/specs.rb @@ -0,0 +1,22 @@ +require 'rspec/core' +require 'rswag/specs/version' +require 'rswag/specs/example_group_helpers' +require 'rswag/specs/example_helpers' +require 'rswag/specs/railtie' if defined?(Rails::Railtie) + +module Rswag + module Specs + + # Extend RSpec with a swagger-based DSL + ::RSpec.configure do |c| + c.add_setting :swagger_root + c.add_setting :swagger_docs + c.extend ExampleGroupHelpers, type: :request + c.include ExampleHelpers, type: :request + end + + # Support Rails 3+ and RSpec 2+ (sigh!) + RAILS_VERSION = Rails::VERSION::MAJOR + RSPEC_VERSION = RSpec::Core::Version::STRING.split('.').first.to_i + end +end diff --git a/rswag-specs/lib/rswag/specs/example_group_helpers.rb b/rswag-specs/lib/rswag/specs/example_group_helpers.rb new file mode 100644 index 0000000..b09420d --- /dev/null +++ b/rswag-specs/lib/rswag/specs/example_group_helpers.rb @@ -0,0 +1,80 @@ +module Rswag + module Specs + module ExampleGroupHelpers + + def path(path, &block) + api_metadata = { path: path} + describe(path, api_metadata, &block) + end + + [ :get, :post, :patch, :put, :delete, :head ].each do |verb| + define_method(verb) do |summary, &block| + api_metadata = { operation: { verb: verb, summary: summary } } + describe(verb, api_metadata, &block) + end + end + + [ :operationId, :deprecated, :security ].each do |attr_name| + define_method(attr_name) do |value| + metadata[:operation][attr_name] = value + end + end + + # NOTE: 'description' requires special treatment because ExampleGroup already + # defines a method with that name. Provide an override that supports the existing + # functionality while also setting the appropriate metadata if applicable + def description(value=nil) + return super() if value.nil? + metadata[:operation][:description] = value + end + + # These are array properties - note the splat operator + [ :tags, :consumes, :produces, :schemes ].each do |attr_name| + define_method(attr_name) do |*value| + metadata[:operation][attr_name] = value + end + end + + def parameter(attributes) + attributes[:required] = true if attributes[:in].to_sym == :path + metadata[:operation][:parameters] ||= [] + metadata[:operation][:parameters] << attributes + end + + def response(code, description, &block) + api_metadata = { response: { code: code, description: description } } + context(description, api_metadata, &block) + end + + def schema(value) + metadata[:response][:schema] = value + end + + def header(name, attributes) + metadata[:response][:headers] ||= {} + metadata[:response][:headers][name] = attributes + end + + def run_test! + # NOTE: rspec 2.x support + if RSPEC_VERSION < 3 + before do + submit_request(example.metadata) + end + + it "returns a #{metadata[:response][:code]} response" do + assert_response_matches_metadata(example.metadata) + end + else + before do |example| + submit_request(example.metadata) + end + + it "returns a #{metadata[:response][:code]} response" do |example| + assert_response_matches_metadata(example.metadata) + end + end + end + end + end +end diff --git a/rswag-specs/lib/rswag/specs/example_helpers.rb b/rswag-specs/lib/rswag/specs/example_helpers.rb new file mode 100644 index 0000000..dbfd302 --- /dev/null +++ b/rswag-specs/lib/rswag/specs/example_helpers.rb @@ -0,0 +1,43 @@ +require 'rswag/specs/request_factory' +require 'rswag/specs/response_validator' + +module Rswag + module Specs + module ExampleHelpers + + def submit_request(api_metadata) + factory = RequestFactory.new(api_metadata, global_metadata(api_metadata[:swagger_doc])) + + if RAILS_VERSION < 5 + send( + api_metadata[:operation][:verb], + factory.build_fullpath(self), + factory.build_body(self), + factory.build_headers(self) + ) + else + send( + api_metadata[:operation][:verb], + factory.build_fullpath(self), + { + params: factory.build_body(self), + headers: factory.build_headers(self) + } + ) + end + end + + def assert_response_matches_metadata(api_metadata) + validator = ResponseValidator.new(api_metadata, global_metadata(api_metadata[:swagger_doc])) + validator.validate!(response) + end + + private + + def global_metadata(swagger_doc) + swagger_docs = ::RSpec.configuration.swagger_docs + swagger_doc.nil? ? swagger_docs.values.first : swagger_docs[swagger_doc] + end + end + end +end diff --git a/rswag-specs/lib/rswag/specs/railtie.rb b/rswag-specs/lib/rswag/specs/railtie.rb new file mode 100644 index 0000000..8deec2b --- /dev/null +++ b/rswag-specs/lib/rswag/specs/railtie.rb @@ -0,0 +1,10 @@ +module Rswag + module Specs + class Railtie < ::Rails::Railtie + + rake_tasks do + load File.expand_path('../../../tasks/rswag-specs_tasks.rake', __FILE__) + end + end + end +end diff --git a/rswag-specs/lib/rswag/specs/request_factory.rb b/rswag-specs/lib/rswag/specs/request_factory.rb new file mode 100644 index 0000000..50dcc2a --- /dev/null +++ b/rswag-specs/lib/rswag/specs/request_factory.rb @@ -0,0 +1,70 @@ +require 'active_support/core_ext/hash/slice' +require 'json' + +module Rswag + module Specs + class RequestFactory + + def initialize(api_metadata, global_metadata) + @api_metadata = api_metadata + @global_metadata = global_metadata + end + + def build_fullpath(example) + @api_metadata[:path].dup.tap do |t| + parameters_in(:path).each { |p| t.gsub!("{#{p[:name]}}", example.send(p[:name]).to_s) } + t.concat(build_query(example)) + t.prepend(@global_metadata[:basePath] || '') + end + end + + def build_query(example) + query_string = parameters_in(:query) + .map { |p| "#{p[:name]}=#{example.send(p[:name])}" } + .join('&') + + query_string.empty? ? '' : "?#{query_string}" + end + + def build_body(example) + body_parameter = parameters_in(:body).first + body_parameter.nil? ? '' : example.send(body_parameter[:name]).to_json + end + + def build_headers(example) + headers = Hash[ parameters_in(:header).map { |p| [ p[:name], example.send(p[:name]).to_s ] } ] + headers.tap do |h| + produces = @api_metadata[:operation][:produces] || @global_metadata[:produces] + consumes = @api_metadata[:operation][:consumes] || @global_metadata[:consumes] + h['ACCEPT'] = produces.join(';') unless produces.nil? + h['CONTENT_TYPE'] = consumes.join(';') unless consumes.nil? + end + end + + private + + def parameters_in(location) + (@api_metadata[:operation][:parameters] || []) + .map { |p| p['$ref'] ? resolve_parameter(p['$ref']) : p } # resolve any references + .concat(resolve_api_key_parameters) + .select { |p| p[:in] == location } + end + + def resolve_parameter(ref) + defined_params = @global_metadata[:parameters] + key = ref.sub('#/parameters/', '') + raise "Referenced parameter '#{ref}' must be defined" unless defined_params && defined_params[key] + defined_params[key] + end + + def resolve_api_key_parameters + @api_key_params ||= begin + global_requirements = (@global_metadata[:security] || {}) + requirements = global_requirements.merge(@api_metadata[:operation][:security] || {}) + definitions = (@global_metadata[:securityDefinitions] || {}).slice(*requirements.keys) + definitions.values.select { |d| d[:type] == :apiKey } + end + end + end + end +end diff --git a/rswag-specs/lib/rswag/specs/response_validator.rb b/rswag-specs/lib/rswag/specs/response_validator.rb new file mode 100644 index 0000000..febedbf --- /dev/null +++ b/rswag-specs/lib/rswag/specs/response_validator.rb @@ -0,0 +1,38 @@ +require 'json-schema' + +module Rswag + module Specs + class ResponseValidator + + def initialize(api_metadata, global_metadata) + @api_metadata = api_metadata + @global_metadata = global_metadata + end + + def validate!(response) + validate_code!(response.code) + validate_body!(response.body) + end + + private + + def validate_code!(code) + if code.to_s != @api_metadata[:response][:code].to_s + raise UnexpectedResponse, "Expected response code '#{code}' to match '#{@api_metadata[:response][:code]}'" + end + end + + def validate_body!(body) + schema = @api_metadata[:response][:schema] + return if schema.nil? + begin + JSON::Validator.validate!(schema.merge(@global_metadata), body) + rescue JSON::Schema::ValidationError => ex + raise UnexpectedResponse, "Expected response body to match schema: #{ex.message}" + end + end + end + + class UnexpectedResponse < StandardError; end + end +end diff --git a/rswag-specs/lib/rswag/specs/swagger_formatter.rb b/rswag-specs/lib/rswag/specs/swagger_formatter.rb new file mode 100644 index 0000000..2df6262 --- /dev/null +++ b/rswag-specs/lib/rswag/specs/swagger_formatter.rb @@ -0,0 +1,79 @@ +require 'active_support/core_ext/hash/deep_merge' +require 'rspec/core/formatters/base_text_formatter' +require 'swagger_helper' + +module Rswag + module Specs + class SwaggerFormatter + + # NOTE: rspec 2.x support + if RSPEC_VERSION > 2 + ::RSpec::Core::Formatters.register self, :example_group_finished, :stop + end + + def initialize(output) + @output = output + @swagger_root = ::RSpec.configuration.swagger_root + raise ConfigurationError, 'Missing swagger_root. See swagger_helper.rb' if @swagger_root.nil? + @swagger_docs = ::RSpec.configuration.swagger_docs || [] + raise ConfigurationError, 'Missing swagger_docs. See swagger_helper.rb' if @swagger_docs.empty? + + @output.puts 'Generating Swagger docs ...' + end + + def example_group_finished(notification) + # NOTE: rspec 2.x support + if RSPEC_VERSION > 2 + metadata = notification.group.metadata + else + metadata = notification.metadata + end + + return unless metadata.has_key?(:response) + swagger_doc = get_swagger_doc(metadata[:swagger_doc]) + swagger_doc.deep_merge!(metadata_to_swagger(metadata)) + end + + def stop(notification=nil) + @swagger_docs.each do |url_path, doc| + file_path = File.join(@swagger_root, url_path) + dirname = File.dirname(file_path) + FileUtils.mkdir_p dirname unless File.exists?(dirname) + + File.open(file_path, 'w') do |file| + file.write(JSON.pretty_generate(doc)) + end + + @output.puts "Swagger doc generated at #{file_path}" + end + end + + private + + def get_swagger_doc(tag) + return @swagger_docs.values.first if tag.nil? + raise ConfigurationError, "Unknown swagger_doc '#{tag}'" unless @swagger_docs.has_key?(tag) + @swagger_docs[tag] + end + + def metadata_to_swagger(metadata) + response_code = metadata[:response][:code] + response = metadata[:response].reject { |k,v| k == :code } + verb = metadata[:operation][:verb] + operation = metadata[:operation] + .reject { |k,v| k == :verb } + .merge(responses: { response_code => response }) + + { + paths: { + metadata[:path] => { + verb => operation + } + } + } + end + end + + class ConfigurationError < StandardError; end + end +end diff --git a/rswag-specs/lib/rswag/specs/version.rb b/rswag-specs/lib/rswag/specs/version.rb new file mode 100644 index 0000000..9bdc1b5 --- /dev/null +++ b/rswag-specs/lib/rswag/specs/version.rb @@ -0,0 +1,5 @@ +module Rswag + module Specs + VERSION = '1.0.0' + end +end diff --git a/rswag-specs/lib/tasks/rswag-specs_tasks.rake b/rswag-specs/lib/tasks/rswag-specs_tasks.rake new file mode 100644 index 0000000..646af02 --- /dev/null +++ b/rswag-specs/lib/tasks/rswag-specs_tasks.rake @@ -0,0 +1,18 @@ +require 'rspec/core/rake_task' + +namespace :rswag do + namespace :specs do + + desc 'Generate Swagger JSON files from integration specs' + RSpec::Core::RakeTask.new('swaggerize') do |t| + t.pattern = 'spec/requests/**/*_spec.rb, spec/api/**/*_spec.rb, spec/integration/**/*_spec.rb' + + # NOTE: rspec 2.x support + if Rswag::Specs::RSPEC_VERSION > 2 + t.rspec_opts = [ '--format Rswag::Specs::SwaggerFormatter', '--dry-run', '--order defined' ] + else + t.rspec_opts = [ '--format Rswag::Specs::SwaggerFormatter', '--order defined' ] + end + end + end +end diff --git a/rswag-specs/rswag-specs.gemspec b/rswag-specs/rswag-specs.gemspec new file mode 100644 index 0000000..ab80fb3 --- /dev/null +++ b/rswag-specs/rswag-specs.gemspec @@ -0,0 +1,20 @@ +$:.push File.expand_path("../lib", __FILE__) + +# Maintain your gem's version: +require 'rswag/specs/version' + +# Describe your gem and declare its dependencies: +Gem::Specification.new do |s| + s.name = "rswag-specs" + s.version = Rswag::Specs::VERSION + s.authors = ["Richie Morris"] + s.email = ["domaindrivendev@gmail.com"] + s.homepage = "https://github.com/domaindrivendev/rswag" + s.summary = "A Swagger-based DSL for rspec-rails & accompanying rake task for generating Swagger files" + + s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile" ] + + s.add_dependency "rails", ">= 3.1", "< 5.1" + s.add_dependency 'json-schema' + s.add_development_dependency 'rspec-rails' +end diff --git a/spec/dummy/app/mailers/.keep b/rswag-specs/spec/generators/rswag/specs/fixtures/spec/.gitkeep similarity index 100% rename from spec/dummy/app/mailers/.keep rename to rswag-specs/spec/generators/rswag/specs/fixtures/spec/.gitkeep diff --git a/rswag-specs/spec/generators/rswag/specs/install_generator_spec.rb b/rswag-specs/spec/generators/rswag/specs/install_generator_spec.rb new file mode 100644 index 0000000..39dc6fe --- /dev/null +++ b/rswag-specs/spec/generators/rswag/specs/install_generator_spec.rb @@ -0,0 +1,24 @@ +require 'generator_spec' +require 'generators/rswag/specs/install/install_generator' + +module Rswag + module Specs + + describe InstallGenerator do + include GeneratorSpec::TestCase + destination File.expand_path('../tmp', __FILE__) + + before(:all) do + prepare_destination + fixtures_dir = File.expand_path('../fixtures', __FILE__) + FileUtils.cp_r("#{fixtures_dir}/spec", destination_root) + + run_generator + end + + it 'installs the swagger_helper for rspec' do + assert_file('spec/swagger_helper.rb') + end + end + end +end diff --git a/spec/dummy/app/models/.keep b/rswag-specs/spec/generators/rswag/specs/tmp/spec/.gitkeep similarity index 100% rename from spec/dummy/app/models/.keep rename to rswag-specs/spec/generators/rswag/specs/tmp/spec/.gitkeep diff --git a/spec/swagger_helper.rb b/rswag-specs/spec/generators/rswag/specs/tmp/spec/swagger_helper.rb similarity index 55% rename from spec/swagger_helper.rb rename to rswag-specs/spec/generators/rswag/specs/tmp/spec/swagger_helper.rb index 26523b3..366d13e 100644 --- a/spec/swagger_helper.rb +++ b/rswag-specs/spec/generators/rswag/specs/tmp/spec/swagger_helper.rb @@ -1,20 +1,14 @@ require 'rails_helper' -require 'swagger_rails/rspec/dsl' RSpec.configure do |config| - # NOTE: Should be no need to modify these 3 lines - config.add_setting :swagger_root - config.add_setting :swagger_docs - config.extend SwaggerRails::RSpec::DSL - # Specify a root folder where Swagger JSON files are generated - # NOTE: If you're using the Swagger JSON middleware to serve API descriptions, you'll need - # to ensure that the same folder is also specified in the swagger_rails initializer + # NOTE: If you're using the rswag-api to serve API descriptions, you'll need + # to ensure that it's confiugred to server Swagger from the same folder config.swagger_root = Rails.root.to_s + '/swagger' # Define one or more Swagger documents and provide global metadata for each one - # When you run the "swaggerize" rake task, the complete Swagger will be generated - # at the provided relative path under swagger_root + # When you run the 'rswag:specs:to_swagger' rake task, the complete Swagger will + # be generated at the provided relative path under swagger_root # By default, the operations defined in spec files are added to the first # document below. You can override this behavior by adding a swagger_doc tag to the # the root example_group in your specs, e.g. describe '...', swagger_doc: 'v2/swagger.json' @@ -24,7 +18,8 @@ RSpec.configure do |config| info: { title: 'API V1', version: 'v1' - } + }, + paths: {} } } end diff --git a/rswag-specs/spec/rswag/specs/example_group_helpers_spec.rb b/rswag-specs/spec/rswag/specs/example_group_helpers_spec.rb new file mode 100644 index 0000000..e8eecdf --- /dev/null +++ b/rswag-specs/spec/rswag/specs/example_group_helpers_spec.rb @@ -0,0 +1,143 @@ +require 'rswag/specs/example_group_helpers' + +module Rswag + module Specs + + describe ExampleGroupHelpers do + subject { double('example_group') } + let(:api_metadata) { {} } + before do + subject.extend ExampleGroupHelpers + allow(subject).to receive(:describe) + allow(subject).to receive(:context) + allow(subject).to receive(:metadata).and_return(api_metadata) + end + + describe '#path(path)' do + before { subject.path('/blogs') } + + it "delegates to 'describe' with 'path' metadata" do + expect(subject).to have_received(:describe).with( + '/blogs', path: '/blogs' + ) + end + end + + describe '#get|post|patch|put|delete|head(verb, summary)' do + before { subject.post('Creates a blog') } + + it "delegates to 'describe' with 'operation' metadata" do + expect(subject).to have_received(:describe).with( + :post, operation: { verb: :post, summary: 'Creates a blog' } + ) + end + end + + describe '#tags|description|operationId|consumes|produces|schemes|deprecated(value)' do + let(:api_metadata) { { operation: {} } } + before do + subject.tags('Blogs', 'Admin') + subject.description('Some description') + subject.operationId('createBlog') + subject.consumes('application/json', 'application/xml') + subject.produces('application/json', 'application/xml') + subject.schemes('http', 'https') + subject.deprecated(true) + end + + it "adds to the 'operation' metadata" do + expect(api_metadata[:operation]).to match( + tags: [ 'Blogs', 'Admin' ], + description: 'Some description', + operationId: 'createBlog', + consumes: [ 'application/json', 'application/xml' ], + produces: [ 'application/json', 'application/xml' ], + schemes: [ 'http', 'https' ], + deprecated: true + ) + end + end + + describe '#tags|description|operationId|consumes|produces|schemes|deprecated|security(value)' do + let(:api_metadata) { { operation: {} } } + before do + subject.tags('Blogs', 'Admin') + subject.description('Some description') + subject.operationId('createBlog') + subject.consumes('application/json', 'application/xml') + subject.produces('application/json', 'application/xml') + subject.schemes('http', 'https') + subject.deprecated(true) + subject.security(api_key: []) + end + + it "adds to the 'operation' metadata" do + expect(api_metadata[:operation]).to match( + tags: [ 'Blogs', 'Admin' ], + description: 'Some description', + operationId: 'createBlog', + consumes: [ 'application/json', 'application/xml' ], + produces: [ 'application/json', 'application/xml' ], + schemes: [ 'http', 'https' ], + deprecated: true, + security: { api_key: [] } + ) + end + end + + describe '#parameter(attributes)' do + let(:api_metadata) { { operation: {} } } + + context 'always' do + before { subject.parameter(name: :blog, in: :body, schema: { type: 'object' }) } + + it "adds to the 'operation parameters' metadata" do + expect(api_metadata[:operation][:parameters]).to match( + [ name: :blog, in: :body, schema: { type: 'object' } ] + ) + end + end + + context "'path' parameter" do + before { subject.parameter(name: :id, in: :path) } + + it "automatically sets the 'required' flag" do + expect(api_metadata[:operation][:parameters]).to match( + [ name: :id, in: :path, required: true ] + ) + end + end + end + + describe '#response(code, description)' do + before { subject.response('201', 'success') } + + it "delegates to 'context' with 'response' metadata" do + expect(subject).to have_received(:context).with( + 'success', response: { code: '201', description: 'success' } + ) + end + end + + describe '#schema(value)' do + let(:api_metadata) { { response: {} } } + before { subject.schema(type: 'object') } + + it "adds to the 'response' metadata" do + expect(api_metadata[:response][:schema]).to match(type: 'object') + end + end + + describe '#header(name, attributes)' do + let(:api_metadata) { { response: {} } } + before { subject.header('Date', type: 'string') } + + it "adds to the 'response headers' metadata" do + expect(api_metadata[:response][:headers]).to match( + 'Date' => { type: 'string' } + ) + end + end + end + end +end diff --git a/rswag-specs/spec/rswag/specs/example_helpers_spec.rb b/rswag-specs/spec/rswag/specs/example_helpers_spec.rb new file mode 100644 index 0000000..4c02a1f --- /dev/null +++ b/rswag-specs/spec/rswag/specs/example_helpers_spec.rb @@ -0,0 +1,66 @@ +require 'rswag/specs/example_helpers' + +module Rswag + module Specs + + describe ExampleHelpers do + let(:api_metadata) do + { + path: '/blogs/{blog_id}/comments/{id}', + operation: { + verb: :put, + summary: 'Updates a blog', + parameters: [ + { name: :blog_id, in: :path, type: 'integer' }, + { name: 'id', in: :path, type: 'integer' }, + { name: 'q1', in: :query, type: 'string' }, + { name: :blog, in: :body, schema: { type: 'object' } } + ], + security: { + api_key: [] + } + } + } + end + let(:global_metadata) do + { + securityDefinitions: { + api_key: { + type: :apiKey, + name: 'api_key', + in: :query + } + } + } + end + + subject { double('example') } + + before do + subject.extend ExampleHelpers + allow(subject).to receive(:blog_id).and_return(1) + allow(subject).to receive(:id).and_return(2) + allow(subject).to receive(:q1).and_return('foo') + allow(subject).to receive(:api_key).and_return('fookey') + allow(subject).to receive(:blog).and_return(text: 'Some comment') + allow(subject).to receive(:global_metadata).and_return(global_metadata) + allow(subject).to receive(:put) + end + + describe '#submit_request(api_metadata)' do + before do + stub_const('Rails::VERSION::MAJOR', 3) + subject.submit_request(api_metadata) + end + + it "submits a request built from metadata and 'let' values" do + expect(subject).to have_received(:put).with( + '/blogs/1/comments/2?q1=foo&api_key=fookey', + "{\"text\":\"Some comment\"}", + {} + ) + end + end + end + end +end diff --git a/rswag-specs/spec/rswag/specs/request_factory_spec.rb b/rswag-specs/spec/rswag/specs/request_factory_spec.rb new file mode 100644 index 0000000..61a9f1f --- /dev/null +++ b/rswag-specs/spec/rswag/specs/request_factory_spec.rb @@ -0,0 +1,171 @@ +require 'rswag/specs/request_factory' + +module Rswag + module Specs + + describe RequestFactory do + let(:api_metadata) do + { + path: '/blogs/{blog_id}/comments/{id}', + operation: { + verb: :put, + summary: 'Updates a blog', + parameters: [ + { name: :blog_id, in: :path, type: 'integer' }, + { name: 'id', in: :path, type: 'integer' } + ] + } + } + end + let(:global_metadata) { {} } + + subject { RequestFactory.new(api_metadata, global_metadata) } + + let(:example) { double('example') } + before do + allow(example).to receive(:blog_id).and_return(1) + allow(example).to receive(:id).and_return('2') + end + + describe '#build_fullpath(example)' do + let(:path) { subject.build_fullpath(example) } + + context 'always' do + it "builds a path using metadata and example values" do + expect(path).to eq('/blogs/1/comments/2') + end + end + + context "'query' parameters" do + before do + api_metadata[:operation][:parameters] << { name: 'q1', in: :query, type: 'string' } + api_metadata[:operation][:parameters] << { name: 'q2', in: :query, type: 'string' } + allow(example).to receive(:q1).and_return('foo') + allow(example).to receive(:q2).and_return('bar') + end + + it "appends a query string using metadata and example values" do + expect(path).to eq('/blogs/1/comments/2?q1=foo&q2=bar') + end + end + + context "global definition for 'api_key in query'" do + before do + global_metadata[:securityDefinitions] = { api_key: { type: :apiKey, name: 'api_key', in: :query } } + allow(example).to receive(:api_key).and_return('fookey') + end + + context 'global requirement' do + before { global_metadata[:security] = { api_key: [] } } + + it "appends the api_key using metadata and example value" do + expect(path).to eq('/blogs/1/comments/2?api_key=fookey') + end + end + + context 'operation-specific requirement' do + before { api_metadata[:operation][:security] = { api_key: [] } } + + it "appends the api_key using metadata and example value" do + expect(path).to eq('/blogs/1/comments/2?api_key=fookey') + end + end + end + + context 'global basePath' do + before { global_metadata[:basePath] = '/foobar' } + + it 'prepends the basePath' do + expect(path).to eq('/foobar/blogs/1/comments/2') + end + end + end + + describe '#build_body(example)' do + let(:body) { subject.build_body(example) } + + context "no 'body' parameter" do + it "returns ''" do + expect(body).to eq('') + end + end + + context "'body' parameter" do + before do + api_metadata[:operation][:parameters] << { name: 'comment', in: :body, schema: { type: 'object' } } + allow(example).to receive(:comment).and_return(text: 'Some comment') + end + + it 'returns the example value as a json string' do + expect(body).to eq("{\"text\":\"Some comment\"}") + end + end + + context "referenced 'body' parameter" do + before do + api_metadata[:operation][:parameters] << { '$ref' => '#/parameters/comment' } + global_metadata[:parameters] = { + 'comment' => { name: 'comment', in: :body, schema: { type: 'object' } } + } + allow(example).to receive(:comment).and_return(text: 'Some comment') + end + + it 'returns the example value as a json string' do + expect(body).to eq("{\"text\":\"Some comment\"}") + end + end + end + + describe '#build_headers' do + let(:headers) { subject.build_headers(example) } + + context "no 'header' params" do + it 'returns an empty hash' do + expect(headers).to eq({}) + end + end + + context "'header' params" do + before do + api_metadata[:operation][:parameters] << { name: 'Api-Key', in: :header, type: 'string' } + allow(example).to receive(:'Api-Key').and_return('foobar') + end + + it 'returns a hash of names with example values' do + expect(headers).to eq({ 'Api-Key' => 'foobar' }) + end + end + + context 'consumes & produces' do + before do + api_metadata[:operation][:consumes] = [ 'application/json', 'application/xml' ] + api_metadata[:operation][:produces] = [ 'application/json', 'application/xml' ] + end + + it "includes corresponding 'Accept' & 'Content-Type' headers" do + expect(headers).to match( + 'ACCEPT' => 'application/json;application/xml', + 'CONTENT_TYPE' => 'application/json;application/xml' + ) + end + end + + context 'global consumes & produces' do + let(:global_metadata) do + { + consumes: [ 'application/json', 'application/xml' ], + produces: [ 'application/json', 'application/xml' ] + } + end + + it "includes corresponding 'Accept' & 'Content-Type' headers" do + expect(headers).to match( + 'ACCEPT' => 'application/json;application/xml', + 'CONTENT_TYPE' => 'application/json;application/xml' + ) + end + end + end + end + end +end diff --git a/rswag-specs/spec/rswag/specs/response_validator_spec.rb b/rswag-specs/spec/rswag/specs/response_validator_spec.rb new file mode 100644 index 0000000..fcafea8 --- /dev/null +++ b/rswag-specs/spec/rswag/specs/response_validator_spec.rb @@ -0,0 +1,72 @@ +require 'rswag/specs/response_validator' + +module Rswag + module Specs + + describe ResponseValidator do + let(:api_metadata) { { response: { code: 200 } } } + let(:global_metadata) { {} } + + subject { ResponseValidator.new(api_metadata, global_metadata) } + + describe '#validate!(response)' do + let(:call) { subject.validate!(response) } + + context "no 'schema' provided" do + context 'response code matches' do + let(:response) { OpenStruct.new(code: 200, body: '') } + it { expect { call }.to_not raise_error } + end + + context 'response code does not match' do + let(:response) { OpenStruct.new(code: 201, body: '') } + it { expect { call }.to raise_error UnexpectedResponse } + end + end + + context "'schema' provided" do + before do + api_metadata[:response][:schema] = { + type: 'object', + properties: { text: { type: 'string' } }, + required: [ 'text' ] + } + end + + context 'response code & body matches' do + let(:response) { OpenStruct.new(code: 200, body: "{\"text\":\"Some comment\"}") } + it { expect { call }.to_not raise_error } + end + + context 'response code matches & body does not' do + let(:response) { OpenStruct.new(code: 200, body: "{\"foo\":\"Some comment\"}") } + it { expect { call }.to raise_error UnexpectedResponse } + end + end + + context "referenced 'schema' provided" do + before do + api_metadata[:response][:schema] = { '$ref' => '#/definitions/author' } + global_metadata[:definitions] = { + author: { + type: 'object', + properties: { name: { type: 'string' } }, + required: [ 'name' ] + } + } + end + + context 'response code & body matches' do + let(:response) { OpenStruct.new(code: 200, body: "{\"name\":\"Some name\"}") } + it { expect { call }.to_not raise_error } + end + + context 'response code matches & body does not' do + let(:response) { OpenStruct.new(code: 200, body: "{\"foo\":\"Some name\"}") } + it { expect { call }.to raise_error UnexpectedResponse } + end + end + end + end + end +end diff --git a/rswag-specs/spec/rswag/specs/swagger_formatter_spec.rb b/rswag-specs/spec/rswag/specs/swagger_formatter_spec.rb new file mode 100644 index 0000000..56f3964 --- /dev/null +++ b/rswag-specs/spec/rswag/specs/swagger_formatter_spec.rb @@ -0,0 +1,125 @@ +require 'rswag/specs/swagger_formatter' +require 'ostruct' + +module Rswag + module Specs + + describe SwaggerFormatter do + # Mock infrastructure - output, RSpec.configuration etc. + let(:output) { double('output').as_null_object } + let(:swagger_root) { File.expand_path('../tmp', __FILE__) } + let(:swagger_docs) do + { + 'v1/swagger.json' => { info: { version: 'v1' } } + } + end + let(:config) { OpenStruct.new(swagger_root: swagger_root, swagger_docs: swagger_docs) } + before { allow(RSpec).to receive(:configuration).and_return(config) } + + subject { described_class.new(output) } + + describe '::new(output)' do + context 'swagger_root not configured' do + let(:swagger_root) { nil } + it { expect { subject }.to raise_error ConfigurationError } + end + + context 'swagger_docs not configured' do + let(:swagger_docs) { nil } + it { expect { subject }.to raise_error ConfigurationError } + end + end + + describe '#example_group_finished(notification)' do + # Mock notification parameter + let(:api_metadata) do + { + path: '/blogs', + operation: { verb: :post, summary: 'Creates a blog' }, + response: { code: '201', description: 'blog created' } + } + end + let(:notification) { OpenStruct.new(group: OpenStruct.new(metadata: api_metadata)) } + + let(:call) { subject.example_group_finished(notification) } + + context 'single swagger_doc' do + before { call } + + it 'converts metadata to swagger and merges into the doc' do + expect(swagger_docs.values.first).to match( + info: { version: 'v1' }, + paths: { + '/blogs' => { + post: { + summary: 'Creates a blog', + responses: { + '201' => { description: 'blog created' } + } + } + } + } + ) + end + end + + context 'multiple swagger_docs' do + let(:swagger_docs) do + { + 'v1/swagger.json' => {}, + 'v2/swagger.json' => {} + } + end + + context "no 'swagger_doc' tag" do + before { call } + + it 'merges into the first doc' do + expect(swagger_docs.values.first).to have_key(:paths) + end + end + + context "matching 'swagger_doc' tag" do + before do + api_metadata[:swagger_doc] = 'v2/swagger.json' + call + end + + it 'merges into the matched doc' do + expect(swagger_docs.values.last).to have_key(:paths) + end + end + + context "non matching 'swagger_doc' tag" do + before { api_metadata[:swagger_doc] = 'foobar' } + it { expect { call }.to raise_error ConfigurationError } + end + end + end + + describe '#stop' do + let(:notification) { double('notification') } + let(:swagger_docs) do + { + 'v1/swagger.json' => { info: { version: 'v1' } }, + 'v2/swagger.json' => { info: { version: 'v2' } }, + } + end + + before do + FileUtils.rm_r(swagger_root) if File.exists?(swagger_root) + subject.stop(notification) + end + + it 'writes the swagger_doc(s) to file' do + expect(File).to exist("#{swagger_root}/v1/swagger.json") + expect(File).to exist("#{swagger_root}/v2/swagger.json") + end + + after do + FileUtils.rm_r(swagger_root) if File.exists?(swagger_root) + end + end + end + end +end diff --git a/rswag-specs/spec/spec_helper.rb b/rswag-specs/spec/spec_helper.rb new file mode 100644 index 0000000..63504e1 --- /dev/null +++ b/rswag-specs/spec/spec_helper.rb @@ -0,0 +1,7 @@ +module Rails + module VERSION + MAJOR = 3 + end +end + +require 'rswag/specs' diff --git a/rswag-specs/spec/swagger_helper.rb b/rswag-specs/spec/swagger_helper.rb new file mode 100644 index 0000000..330a7a4 --- /dev/null +++ b/rswag-specs/spec/swagger_helper.rb @@ -0,0 +1,2 @@ +# NOTE: For the specs in this gem, all configuration is completely mocked out +# The file just needs to be present because it gets required by the swagger_formatter diff --git a/rswag-ui/.rspec b/rswag-ui/.rspec new file mode 100644 index 0000000..83e16f8 --- /dev/null +++ b/rswag-ui/.rspec @@ -0,0 +1,2 @@ +--color +--require spec_helper diff --git a/rswag-ui/MIT-LICENSE b/rswag-ui/MIT-LICENSE new file mode 100644 index 0000000..f95875d --- /dev/null +++ b/rswag-ui/MIT-LICENSE @@ -0,0 +1,20 @@ +Copyright 2015 domaindrivendev + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/rswag-ui/Rakefile b/rswag-ui/Rakefile new file mode 100644 index 0000000..2cbae8a --- /dev/null +++ b/rswag-ui/Rakefile @@ -0,0 +1,27 @@ +#!/usr/bin/env rake +begin + require 'bundler/setup' +rescue LoadError + puts 'You must `gem install bundler` and `bundle install` to run rake tasks' +end +begin + require 'rdoc/task' +rescue LoadError + require 'rdoc/rdoc' + require 'rake/rdoctask' + RDoc::Task = Rake::RDocTask +end + +RDoc::Task.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'rswag-specs' + rdoc.options << '--line-numbers' + rdoc.rdoc_files.include('README.rdoc') + rdoc.rdoc_files.include('lib/**/*.rb') +end + + + + +Bundler::GemHelper.install_tasks + diff --git a/rswag-ui/app/controllers/rswag/ui/home_controller.rb b/rswag-ui/app/controllers/rswag/ui/home_controller.rb new file mode 100644 index 0000000..f55a945 --- /dev/null +++ b/rswag-ui/app/controllers/rswag/ui/home_controller.rb @@ -0,0 +1,11 @@ +module Rswag + module Ui + class HomeController < ActionController::Base + + def index + @swagger_endpoints = Rswag::Ui.config.swagger_endpoints + render :index, layout: false + end + end + end +end diff --git a/app/views/swagger_rails/swagger_ui/index.html.erb b/rswag-ui/app/views/rswag/ui/home/index.html.erb similarity index 52% rename from app/views/swagger_rails/swagger_ui/index.html.erb rename to rswag-ui/app/views/rswag/ui/home/index.html.erb index 491bffa..d829bb2 100644 --- a/app/views/swagger_rails/swagger_ui/index.html.erb +++ b/rswag-ui/app/views/rswag/ui/home/index.html.erb @@ -10,15 +10,19 @@ + + - - + + - - + + + + @@ -29,75 +33,43 @@ - - +
+
+ + + diff --git a/rswag-ui/bin/rails b/rswag-ui/bin/rails new file mode 100755 index 0000000..1ef582f --- /dev/null +++ b/rswag-ui/bin/rails @@ -0,0 +1,12 @@ +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application. + +ENGINE_ROOT = File.expand_path('../..', __FILE__) +ENGINE_PATH = File.expand_path('../../lib/rswag/api/engine', __FILE__) + +# Set up gems listed in the Gemfile. +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) + +require 'rails/all' +require 'rails/engine/commands' diff --git a/rswag-ui/config/routes.rb b/rswag-ui/config/routes.rb new file mode 100644 index 0000000..813a0c1 --- /dev/null +++ b/rswag-ui/config/routes.rb @@ -0,0 +1,3 @@ +Rswag::Ui::Engine.routes.draw do + root to: 'home#index' +end diff --git a/lib/generators/swagger_rails/custom_ui/USAGE b/rswag-ui/lib/generators/rswag/ui/custom/USAGE similarity index 54% rename from lib/generators/swagger_rails/custom_ui/USAGE rename to rswag-ui/lib/generators/rswag/ui/custom/USAGE index 472b6d9..170beed 100644 --- a/lib/generators/swagger_rails/custom_ui/USAGE +++ b/rswag-ui/lib/generators/rswag/ui/custom/USAGE @@ -2,7 +2,7 @@ Description: Adds a local version of index.html.erb for customizing the swagger-ui Example: - rails generate swagger_rails:custom_ui + rails generate rswag:ui:custom This will create: - app/views/swagger_rails/swagger_ui/index.html.erb + app/views/rswag/ui/home/index.html.erb diff --git a/rswag-ui/lib/generators/rswag/ui/custom/custom_generator.rb b/rswag-ui/lib/generators/rswag/ui/custom/custom_generator.rb new file mode 100644 index 0000000..6d16382 --- /dev/null +++ b/rswag-ui/lib/generators/rswag/ui/custom/custom_generator.rb @@ -0,0 +1,13 @@ +require 'rails/generators' + +module Rswag + module Ui + class CustomGenerator < Rails::Generators::Base + source_root File.expand_path('../../../../../../app/views/rswag/ui/home', __FILE__) + + def add_custom_index + copy_file('index.html.erb', 'app/views/rswag/ui/home/index.html.erb') + end + end + end +end diff --git a/rswag-ui/lib/generators/rswag/ui/install/USAGE b/rswag-ui/lib/generators/rswag/ui/install/USAGE new file mode 100644 index 0000000..87b8bc5 --- /dev/null +++ b/rswag-ui/lib/generators/rswag/ui/install/USAGE @@ -0,0 +1,8 @@ +Description: + Adds rswag-api initializer for configuration + +Example: + rails generate rswag:api:install + + This will create: + config/initializers/rswag-api.rb diff --git a/rswag-ui/lib/generators/rswag/ui/install/install_generator.rb b/rswag-ui/lib/generators/rswag/ui/install/install_generator.rb new file mode 100644 index 0000000..f6f5b19 --- /dev/null +++ b/rswag-ui/lib/generators/rswag/ui/install/install_generator.rb @@ -0,0 +1,18 @@ +require 'rails/generators' + +module Rswag + module Ui + + class InstallGenerator < Rails::Generators::Base + source_root File.expand_path('../templates', __FILE__) + + def add_initializer + template('rswag-ui.rb', 'config/initializers/rswag-ui.rb') + end + + def add_routes + route("mount Rswag::Ui::Engine => '/api-docs'") + end + end + end +end diff --git a/rswag-ui/lib/generators/rswag/ui/install/templates/rswag-ui.rb b/rswag-ui/lib/generators/rswag/ui/install/templates/rswag-ui.rb new file mode 100644 index 0000000..0805940 --- /dev/null +++ b/rswag-ui/lib/generators/rswag/ui/install/templates/rswag-ui.rb @@ -0,0 +1,9 @@ +Rswag::Ui.configure do |c| + + # List the Swagger endpoints that you want to be documented through the swagger-ui + # The first parameter is the path (absolute or relative to the UI host) to the corresponding + # JSON endpoint and the second is a title that will be displayed in the document selector + # NOTE: If you're using rspec-api to expose Swagger files (under swagger_root) as JSON endpoints, + # then the list below should correspond to the relative paths for those endpoints + c.swagger_endpoint '/api-docs/v1/swagger.json', 'API V1 Docs' +end diff --git a/rswag-ui/lib/rswag/ui.rb b/rswag-ui/lib/rswag/ui.rb new file mode 100644 index 0000000..bdbcf25 --- /dev/null +++ b/rswag-ui/lib/rswag/ui.rb @@ -0,0 +1,15 @@ +require 'rswag/ui/version' +require 'rswag/ui/configuration' +require 'rswag/ui/engine' + +module Rswag + module Ui + def self.configure + yield(config) + end + + def self.config + @config ||= Configuration.new + end + end +end diff --git a/rswag-ui/lib/rswag/ui/configuration.rb b/rswag-ui/lib/rswag/ui/configuration.rb new file mode 100644 index 0000000..5b1a518 --- /dev/null +++ b/rswag-ui/lib/rswag/ui/configuration.rb @@ -0,0 +1,17 @@ +require 'ostruct' + +module Rswag + module Ui + class Configuration + attr_reader :swagger_endpoints + + def initialize + @swagger_endpoints = [] + end + + def swagger_endpoint(path, title) + @swagger_endpoints << OpenStruct.new(path: path, title: title) + end + end + end +end diff --git a/rswag-ui/lib/rswag/ui/engine.rb b/rswag-ui/lib/rswag/ui/engine.rb new file mode 100644 index 0000000..9e35902 --- /dev/null +++ b/rswag-ui/lib/rswag/ui/engine.rb @@ -0,0 +1,13 @@ +module Rswag + module Ui + class Engine < ::Rails::Engine + isolate_namespace Rswag::Ui + + initializer 'rswag-ui.initialize' do |app| + if app.config.respond_to?(:assets) + app.config.assets.precompile += [ 'swagger-ui/*' ] + end + end + end + end +end diff --git a/rswag-ui/lib/rswag/ui/version.rb b/rswag-ui/lib/rswag/ui/version.rb new file mode 100644 index 0000000..fa210ef --- /dev/null +++ b/rswag-ui/lib/rswag/ui/version.rb @@ -0,0 +1,5 @@ +module Rswag + module Ui + VERSION = '1.0.0' + end +end diff --git a/rswag-ui/rswag-ui.gemspec b/rswag-ui/rswag-ui.gemspec new file mode 100644 index 0000000..7f06dd9 --- /dev/null +++ b/rswag-ui/rswag-ui.gemspec @@ -0,0 +1,18 @@ +$:.push File.expand_path("../lib", __FILE__) + +# Maintain your gem's version: +require 'rswag/ui/version' + +# Describe your gem and declare its dependencies: +Gem::Specification.new do |s| + s.name = "rswag-ui" + s.version = Rswag::Ui::VERSION + s.authors = ["Richie Morris"] + s.email = ["domaindrivendev@gmail.com"] + s.homepage = "https://github.com/domaindrivendev/rswag" + s.summary = "A Rails Engine that includes swagger-ui and powers it from configured Swagger endpoints" + + s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile" ] + + s.add_dependency "rails", ">= 3.1", "< 5.1" +end diff --git a/rswag-ui/spec/generators/rswag/ui/custom_generator_spec.rb b/rswag-ui/spec/generators/rswag/ui/custom_generator_spec.rb new file mode 100644 index 0000000..72d0289 --- /dev/null +++ b/rswag-ui/spec/generators/rswag/ui/custom_generator_spec.rb @@ -0,0 +1,21 @@ +require 'generator_spec' +require 'generators/rswag/ui/custom/custom_generator' + +module Rswag + module Ui + + describe CustomGenerator do + include GeneratorSpec::TestCase + destination File.expand_path('../tmp', __FILE__) + + before(:all) do + prepare_destination + run_generator + end + + it 'creates a local version of index.html.erb' do + assert_file('app/views/rswag/ui/home/index.html.erb') + end + end + end +end diff --git a/spec/dummy/app/models/concerns/.keep b/rswag-ui/spec/generators/rswag/ui/fixtures/config/initializers/.gitkeep similarity index 100% rename from spec/dummy/app/models/concerns/.keep rename to rswag-ui/spec/generators/rswag/ui/fixtures/config/initializers/.gitkeep diff --git a/rswag-ui/spec/generators/rswag/ui/fixtures/config/routes.rb b/rswag-ui/spec/generators/rswag/ui/fixtures/config/routes.rb new file mode 100644 index 0000000..9d8e33d --- /dev/null +++ b/rswag-ui/spec/generators/rswag/ui/fixtures/config/routes.rb @@ -0,0 +1,2 @@ +TestApp::Application.routes.draw do +end diff --git a/rswag-ui/spec/generators/rswag/ui/install_generator_spec.rb b/rswag-ui/spec/generators/rswag/ui/install_generator_spec.rb new file mode 100644 index 0000000..2015459 --- /dev/null +++ b/rswag-ui/spec/generators/rswag/ui/install_generator_spec.rb @@ -0,0 +1,27 @@ +require 'generator_spec' +require 'generators/rswag/ui/install/install_generator' + +module Rswag + module Ui + + describe InstallGenerator do + include GeneratorSpec::TestCase + destination File.expand_path('../tmp', __FILE__) + + before(:all) do + prepare_destination + fixtures_dir = File.expand_path('../fixtures', __FILE__) + FileUtils.cp_r("#{fixtures_dir}/config", destination_root) + + run_generator + end + + it 'installs the Rails initializer' do + assert_file('config/initializers/rswag-ui.rb') + end + + # Don't know how to test this + #it 'wires up routes' + end + end +end diff --git a/spec/dummy/lib/assets/.keep b/rswag-ui/spec/generators/rswag/ui/tmp/config/initializers/.gitkeep similarity index 100% rename from spec/dummy/lib/assets/.keep rename to rswag-ui/spec/generators/rswag/ui/tmp/config/initializers/.gitkeep diff --git a/rswag-ui/spec/generators/rswag/ui/tmp/config/initializers/rswag-ui.rb b/rswag-ui/spec/generators/rswag/ui/tmp/config/initializers/rswag-ui.rb new file mode 100644 index 0000000..0805940 --- /dev/null +++ b/rswag-ui/spec/generators/rswag/ui/tmp/config/initializers/rswag-ui.rb @@ -0,0 +1,9 @@ +Rswag::Ui.configure do |c| + + # List the Swagger endpoints that you want to be documented through the swagger-ui + # The first parameter is the path (absolute or relative to the UI host) to the corresponding + # JSON endpoint and the second is a title that will be displayed in the document selector + # NOTE: If you're using rspec-api to expose Swagger files (under swagger_root) as JSON endpoints, + # then the list below should correspond to the relative paths for those endpoints + c.swagger_endpoint '/api-docs/v1/swagger.json', 'API V1 Docs' +end diff --git a/rswag-ui/spec/generators/rswag/ui/tmp/config/routes.rb b/rswag-ui/spec/generators/rswag/ui/tmp/config/routes.rb new file mode 100644 index 0000000..316f8ac --- /dev/null +++ b/rswag-ui/spec/generators/rswag/ui/tmp/config/routes.rb @@ -0,0 +1,4 @@ +TestApp::Application.routes.draw do + mount Rswag::Ui::Engine => '/api-docs' + +end diff --git a/spec/dummy/log/.keep b/rswag-ui/spec/spec_helper.rb similarity index 100% rename from spec/dummy/log/.keep rename to rswag-ui/spec/spec_helper.rb diff --git a/vendor/assets/components/swagger-ui/css/print.css b/rswag-ui/vendor/assets/components/swagger-ui/css/print.css similarity index 88% rename from vendor/assets/components/swagger-ui/css/print.css rename to rswag-ui/vendor/assets/components/swagger-ui/css/print.css index cd3aa8b..f9cb043 100644 --- a/vendor/assets/components/swagger-ui/css/print.css +++ b/rswag-ui/vendor/assets/components/swagger-ui/css/print.css @@ -82,7 +82,7 @@ .swagger-section pre .vhdl .attribute, .swagger-section pre .clojure .attribute, .swagger-section pre .coffeescript .property { - color: #8888ff; + color: #88F; } .swagger-section pre .keyword, .swagger-section pre .id, @@ -120,12 +120,75 @@ .swagger-section pre .xml .cdata { opacity: 0.5; } +.swagger-section .hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} +.swagger-section .hljs, +.swagger-section .hljs-subst { + color: #444; +} +.swagger-section .hljs-keyword, +.swagger-section .hljs-attribute, +.swagger-section .hljs-selector-tag, +.swagger-section .hljs-meta-keyword, +.swagger-section .hljs-doctag, +.swagger-section .hljs-name { + font-weight: bold; +} +.swagger-section .hljs-built_in, +.swagger-section .hljs-literal, +.swagger-section .hljs-bullet, +.swagger-section .hljs-code, +.swagger-section .hljs-addition { + color: #1F811F; +} +.swagger-section .hljs-regexp, +.swagger-section .hljs-symbol, +.swagger-section .hljs-variable, +.swagger-section .hljs-template-variable, +.swagger-section .hljs-link, +.swagger-section .hljs-selector-attr, +.swagger-section .hljs-selector-pseudo { + color: #BC6060; +} +.swagger-section .hljs-type, +.swagger-section .hljs-string, +.swagger-section .hljs-number, +.swagger-section .hljs-selector-id, +.swagger-section .hljs-selector-class, +.swagger-section .hljs-quote, +.swagger-section .hljs-template-tag, +.swagger-section .hljs-deletion { + color: #880000; +} +.swagger-section .hljs-title, +.swagger-section .hljs-section { + color: #880000; + font-weight: bold; +} +.swagger-section .hljs-comment { + color: #888888; +} +.swagger-section .hljs-meta { + color: #2B6EA1; +} +.swagger-section .hljs-emphasis { + font-style: italic; +} +.swagger-section .hljs-strong { + font-weight: bold; +} .swagger-section .swagger-ui-wrap { line-height: 1; font-family: "Droid Sans", sans-serif; + min-width: 760px; max-width: 960px; margin-left: auto; margin-right: auto; + /* JSONEditor specific styling */ } .swagger-section .swagger-ui-wrap b, .swagger-section .swagger-ui-wrap strong { @@ -364,6 +427,7 @@ } .swagger-section .swagger-ui-wrap .model-signature ul.signature-nav { display: block; + min-width: 230px; margin: 0; padding: 0; } @@ -458,6 +522,17 @@ .swagger-section .swagger-ui-wrap .required { font-weight: bold; } +.swagger-section .swagger-ui-wrap .editor_holder { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap .editor_holder label { + font-weight: normal!important; + /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */ +} +.swagger-section .swagger-ui-wrap .editor_holder label.required { + font-weight: bold!important; +} .swagger-section .swagger-ui-wrap input.parameter { width: 300px; border: 1px solid #aaa; @@ -592,6 +667,7 @@ } .swagger-section .swagger-ui-wrap .markdown pre code { line-height: 1.6em; + overflow: auto; } .swagger-section .swagger-ui-wrap div.gist { margin: 20px 0 25px 0 !important; @@ -712,6 +788,9 @@ color: black; text-decoration: none; } +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated { + text-decoration: line-through; +} .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { text-decoration: underline; } @@ -753,6 +832,11 @@ .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { text-decoration: none; } +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a .markdown p { + color: inherit; + padding: 0; + line-height: inherit; +} .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access { color: black; } @@ -807,6 +891,9 @@ outline: 2px solid black; outline-color: #cc0000; } +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] { + max-width: 300px; +} .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; padding: 10px; @@ -1100,18 +1187,122 @@ } .swagger-section .oauth_submit { text-align: center; + display: inline-block; +} +.swagger-section .authorize-wrapper { + margin: 15px 0 10px; +} +.swagger-section .authorize-wrapper_operation { + float: right; +} +.swagger-section .authorize__btn:hover { + text-decoration: underline; + cursor: pointer; +} +.swagger-section .authorize__btn_operation:hover .authorize-scopes { + display: block; +} +.swagger-section .authorize-scopes { + position: absolute; + margin-top: 20px; + background: #FFF; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + max-width: 300px; + line-height: 30px; + color: black; + padding: 5px; +} +.swagger-section .authorize-scopes .authorize__scope { + text-decoration: none; +} +.swagger-section .authorize__btn_operation { + height: 18px; + vertical-align: middle; + display: inline-block; + background: url(../images/explorer_icons.png) no-repeat; +} +.swagger-section .authorize__btn_operation_login { + background-position: 0 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section .authorize__btn_operation_logout { + background-position: -30px 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section #auth_container { + color: #fff; + display: inline-block; + border: none; + padding: 5px; + width: 87px; + height: 13px; +} +.swagger-section #auth_container .authorize__btn { + color: #fff; +} +.swagger-section .auth_container { + padding: 0 0 10px; + margin-bottom: 5px; + border-bottom: solid 1px #CCC; + font-size: 0.9em; +} +.swagger-section .auth_container .auth__title { + color: #547f00; + font-size: 1.2em; +} +.swagger-section .auth_container .basic_auth__label { + display: inline-block; + width: 60px; +} +.swagger-section .auth_container .auth__description { + color: #999999; + margin-bottom: 5px; +} +.swagger-section .auth_container .auth__button { + margin-top: 10px; + height: 30px; +} +.swagger-section .auth_container .key_auth__field { + margin: 5px 0; +} +.swagger-section .auth_container .key_auth__label { + display: inline-block; + width: 60px; } .swagger-section .api-popup-dialog { - z-index: 10000; position: absolute; + display: none; +} +.swagger-section .api-popup-dialog-wrapper { + z-index: 1000; width: 500px; background: #FFF; padding: 20px; border: 1px solid #ccc; border-radius: 5px; - display: none; font-size: 13px; color: #777; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.swagger-section .api-popup-dialog-shadow { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0.2; + background-color: gray; + z-index: 900; } .swagger-section .api-popup-dialog .api-popup-title { font-size: 24px; @@ -1121,14 +1312,18 @@ font-size: 24px; padding: 10px 0; } -.swagger-section .api-popup-dialog p.error-msg { +.swagger-section .api-popup-dialog .error-msg { padding-left: 5px; padding-bottom: 5px; } -.swagger-section .api-popup-dialog button.api-popup-authbtn { +.swagger-section .api-popup-dialog .api-popup-content { + max-height: 500px; + overflow-y: auto; +} +.swagger-section .api-popup-dialog .api-popup-authbtn { height: 30px; } -.swagger-section .api-popup-dialog button.api-popup-cancel { +.swagger-section .api-popup-dialog .api-popup-cancel { height: 30px; } .swagger-section .api-popup-scopes { @@ -1138,14 +1333,14 @@ padding: 5px 0; line-height: 20px; } -.swagger-section .api-popup-scopes .api-scope-desc { - padding-left: 20px; - font-style: italic; -} .swagger-section .api-popup-scopes li input { position: relative; top: 2px; } +.swagger-section .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} .swagger-section .api-popup-actions { padding-top: 10px; } diff --git a/vendor/assets/components/swagger-ui/css/reset.css b/rswag-ui/vendor/assets/components/swagger-ui/css/reset.css similarity index 100% rename from vendor/assets/components/swagger-ui/css/reset.css rename to rswag-ui/vendor/assets/components/swagger-ui/css/reset.css diff --git a/vendor/assets/components/swagger-ui/css/screen.css b/rswag-ui/vendor/assets/components/swagger-ui/css/screen.css similarity index 87% rename from vendor/assets/components/swagger-ui/css/screen.css rename to rswag-ui/vendor/assets/components/swagger-ui/css/screen.css index 436cc28..39ff583 100644 --- a/vendor/assets/components/swagger-ui/css/screen.css +++ b/rswag-ui/vendor/assets/components/swagger-ui/css/screen.css @@ -82,7 +82,7 @@ .swagger-section pre .vhdl .attribute, .swagger-section pre .clojure .attribute, .swagger-section pre .coffeescript .property { - color: #8888ff; + color: #88F; } .swagger-section pre .keyword, .swagger-section pre .id, @@ -120,12 +120,75 @@ .swagger-section pre .xml .cdata { opacity: 0.5; } +.swagger-section .hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} +.swagger-section .hljs, +.swagger-section .hljs-subst { + color: #444; +} +.swagger-section .hljs-keyword, +.swagger-section .hljs-attribute, +.swagger-section .hljs-selector-tag, +.swagger-section .hljs-meta-keyword, +.swagger-section .hljs-doctag, +.swagger-section .hljs-name { + font-weight: bold; +} +.swagger-section .hljs-built_in, +.swagger-section .hljs-literal, +.swagger-section .hljs-bullet, +.swagger-section .hljs-code, +.swagger-section .hljs-addition { + color: #1F811F; +} +.swagger-section .hljs-regexp, +.swagger-section .hljs-symbol, +.swagger-section .hljs-variable, +.swagger-section .hljs-template-variable, +.swagger-section .hljs-link, +.swagger-section .hljs-selector-attr, +.swagger-section .hljs-selector-pseudo { + color: #BC6060; +} +.swagger-section .hljs-type, +.swagger-section .hljs-string, +.swagger-section .hljs-number, +.swagger-section .hljs-selector-id, +.swagger-section .hljs-selector-class, +.swagger-section .hljs-quote, +.swagger-section .hljs-template-tag, +.swagger-section .hljs-deletion { + color: #880000; +} +.swagger-section .hljs-title, +.swagger-section .hljs-section { + color: #880000; + font-weight: bold; +} +.swagger-section .hljs-comment { + color: #888888; +} +.swagger-section .hljs-meta { + color: #2B6EA1; +} +.swagger-section .hljs-emphasis { + font-style: italic; +} +.swagger-section .hljs-strong { + font-weight: bold; +} .swagger-section .swagger-ui-wrap { line-height: 1; font-family: "Droid Sans", sans-serif; + min-width: 760px; max-width: 960px; margin-left: auto; margin-right: auto; + /* JSONEditor specific styling */ } .swagger-section .swagger-ui-wrap b, .swagger-section .swagger-ui-wrap strong { @@ -364,6 +427,7 @@ } .swagger-section .swagger-ui-wrap .model-signature ul.signature-nav { display: block; + min-width: 230px; margin: 0; padding: 0; } @@ -458,6 +522,17 @@ .swagger-section .swagger-ui-wrap .required { font-weight: bold; } +.swagger-section .swagger-ui-wrap .editor_holder { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap .editor_holder label { + font-weight: normal!important; + /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */ +} +.swagger-section .swagger-ui-wrap .editor_holder label.required { + font-weight: bold!important; +} .swagger-section .swagger-ui-wrap input.parameter { width: 300px; border: 1px solid #aaa; @@ -592,6 +667,7 @@ } .swagger-section .swagger-ui-wrap .markdown pre code { line-height: 1.6em; + overflow: auto; } .swagger-section .swagger-ui-wrap div.gist { margin: 20px 0 25px 0 !important; @@ -712,6 +788,9 @@ color: black; text-decoration: none; } +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated { + text-decoration: line-through; +} .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { text-decoration: underline; } @@ -753,6 +832,11 @@ .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { text-decoration: none; } +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a .markdown p { + color: inherit; + padding: 0; + line-height: inherit; +} .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access { color: black; } @@ -807,6 +891,9 @@ outline: 2px solid black; outline-color: #cc0000; } +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] { + max-width: 300px; +} .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; padding: 10px; @@ -1100,18 +1187,122 @@ } .swagger-section .oauth_submit { text-align: center; + display: inline-block; +} +.swagger-section .authorize-wrapper { + margin: 15px 0 10px; +} +.swagger-section .authorize-wrapper_operation { + float: right; +} +.swagger-section .authorize__btn:hover { + text-decoration: underline; + cursor: pointer; +} +.swagger-section .authorize__btn_operation:hover .authorize-scopes { + display: block; +} +.swagger-section .authorize-scopes { + position: absolute; + margin-top: 20px; + background: #FFF; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + max-width: 300px; + line-height: 30px; + color: black; + padding: 5px; +} +.swagger-section .authorize-scopes .authorize__scope { + text-decoration: none; +} +.swagger-section .authorize__btn_operation { + height: 18px; + vertical-align: middle; + display: inline-block; + background: url(../images/explorer_icons.png) no-repeat; +} +.swagger-section .authorize__btn_operation_login { + background-position: 0 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section .authorize__btn_operation_logout { + background-position: -30px 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section #auth_container { + color: #fff; + display: inline-block; + border: none; + padding: 5px; + width: 87px; + height: 13px; +} +.swagger-section #auth_container .authorize__btn { + color: #fff; +} +.swagger-section .auth_container { + padding: 0 0 10px; + margin-bottom: 5px; + border-bottom: solid 1px #CCC; + font-size: 0.9em; +} +.swagger-section .auth_container .auth__title { + color: #547f00; + font-size: 1.2em; +} +.swagger-section .auth_container .basic_auth__label { + display: inline-block; + width: 60px; +} +.swagger-section .auth_container .auth__description { + color: #999999; + margin-bottom: 5px; +} +.swagger-section .auth_container .auth__button { + margin-top: 10px; + height: 30px; +} +.swagger-section .auth_container .key_auth__field { + margin: 5px 0; +} +.swagger-section .auth_container .key_auth__label { + display: inline-block; + width: 60px; } .swagger-section .api-popup-dialog { - z-index: 10000; position: absolute; + display: none; +} +.swagger-section .api-popup-dialog-wrapper { + z-index: 1000; width: 500px; background: #FFF; padding: 20px; border: 1px solid #ccc; border-radius: 5px; - display: none; font-size: 13px; color: #777; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.swagger-section .api-popup-dialog-shadow { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0.2; + background-color: gray; + z-index: 900; } .swagger-section .api-popup-dialog .api-popup-title { font-size: 24px; @@ -1121,14 +1312,18 @@ font-size: 24px; padding: 10px 0; } -.swagger-section .api-popup-dialog p.error-msg { +.swagger-section .api-popup-dialog .error-msg { padding-left: 5px; padding-bottom: 5px; } -.swagger-section .api-popup-dialog button.api-popup-authbtn { +.swagger-section .api-popup-dialog .api-popup-content { + max-height: 500px; + overflow-y: auto; +} +.swagger-section .api-popup-dialog .api-popup-authbtn { height: 30px; } -.swagger-section .api-popup-dialog button.api-popup-cancel { +.swagger-section .api-popup-dialog .api-popup-cancel { height: 30px; } .swagger-section .api-popup-scopes { @@ -1138,14 +1333,14 @@ padding: 5px 0; line-height: 20px; } -.swagger-section .api-popup-scopes .api-scope-desc { - padding-left: 20px; - font-style: italic; -} .swagger-section .api-popup-scopes li input { position: relative; top: 2px; } +.swagger-section .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} .swagger-section .api-popup-actions { padding-top: 10px; } @@ -1217,34 +1412,33 @@ } .swagger-section #header { background-color: #89bf04; - padding: 14px; + padding: 9px 14px 19px 14px; + height: 23px; + min-width: 775px; } -.swagger-section #header a#logo { - font-size: 1.5em; - font-weight: bold; - text-decoration: none; - background: transparent url(../images/logo_small.png) no-repeat left center; - padding: 20px 0 20px 40px; - color: white; +.swagger-section #input_baseUrl { + width: 400px; } -.swagger-section #header form#api_selector { +.swagger-section #api_selector { display: block; clear: none; float: right; } -.swagger-section #header form#api_selector .input { - display: block; +.swagger-section #api_selector .input { + display: inline-block; clear: none; - float: left; margin: 0 10px 0 0; } -.swagger-section #header form#api_selector .input input#input_apiKey { +.swagger-section #api_selector input { + font-size: 0.9em; + padding: 3px; + margin: 0; +} +.swagger-section #input_apiKey { width: 200px; } -.swagger-section #header form#api_selector .input input#input_baseUrl { - width: 400px; -} -.swagger-section #header form#api_selector .input a#explore { +.swagger-section #explore, +.swagger-section #auth_container .authorize__btn { display: block; text-decoration: none; font-weight: bold; @@ -1259,13 +1453,24 @@ -khtml-border-radius: 4px; border-radius: 4px; } -.swagger-section #header form#api_selector .input a#explore:hover { +.swagger-section #explore:hover, +.swagger-section #auth_container .authorize__btn:hover { background-color: #547f00; } -.swagger-section #header form#api_selector .input input { - font-size: 0.9em; - padding: 3px; - margin: 0; +.swagger-section #header #logo { + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + color: white; +} +.swagger-section #header #logo .logo__img { + display: block; + float: left; + margin-top: 2px; +} +.swagger-section #header #logo .logo__title { + display: inline-block; + padding: 5px 0 0 10px; } .swagger-section #content_message { margin: 10px 15px; @@ -1277,3 +1482,13 @@ text-align: center; padding-top: 10px; } +.swagger-section .swagger-collapse:before { + content: "-"; +} +.swagger-section .swagger-expand:before { + content: "+"; +} +.swagger-section .error { + outline-color: #cc0000; + background-color: #f2dede; +} diff --git a/vendor/assets/components/swagger-ui/css/style.css b/rswag-ui/vendor/assets/components/swagger-ui/css/style.css similarity index 100% rename from vendor/assets/components/swagger-ui/css/style.css rename to rswag-ui/vendor/assets/components/swagger-ui/css/style.css diff --git a/rswag-ui/vendor/assets/components/swagger-ui/css/typography.css b/rswag-ui/vendor/assets/components/swagger-ui/css/typography.css new file mode 100644 index 0000000..efb785f --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/css/typography.css @@ -0,0 +1,14 @@ +/* Google Font's Droid Sans */ +@font-face { + font-family: 'Droid Sans'; + font-style: normal; + font-weight: 400; + src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf'), format('truetype'); +} +/* Google Font's Droid Sans Bold */ +@font-face { + font-family: 'Droid Sans'; + font-style: normal; + font-weight: 700; + src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf'), format('truetype'); +} diff --git a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.ttf b/rswag-ui/vendor/assets/components/swagger-ui/fonts/DroidSans-Bold.ttf similarity index 86% rename from vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.ttf rename to rswag-ui/vendor/assets/components/swagger-ui/fonts/DroidSans-Bold.ttf index 15896c4..036c4d1 100644 Binary files a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.ttf and b/rswag-ui/vendor/assets/components/swagger-ui/fonts/DroidSans-Bold.ttf differ diff --git a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.ttf b/rswag-ui/vendor/assets/components/swagger-ui/fonts/DroidSans.ttf similarity index 86% rename from vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.ttf rename to rswag-ui/vendor/assets/components/swagger-ui/fonts/DroidSans.ttf index fb8cea6..e517a0c 100644 Binary files a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.ttf and b/rswag-ui/vendor/assets/components/swagger-ui/fonts/DroidSans.ttf differ diff --git a/rswag-ui/vendor/assets/components/swagger-ui/images/collapse.gif b/rswag-ui/vendor/assets/components/swagger-ui/images/collapse.gif new file mode 100644 index 0000000..8843e8c Binary files /dev/null and b/rswag-ui/vendor/assets/components/swagger-ui/images/collapse.gif differ diff --git a/rswag-ui/vendor/assets/components/swagger-ui/images/expand.gif b/rswag-ui/vendor/assets/components/swagger-ui/images/expand.gif new file mode 100644 index 0000000..477bf13 Binary files /dev/null and b/rswag-ui/vendor/assets/components/swagger-ui/images/expand.gif differ diff --git a/rswag-ui/vendor/assets/components/swagger-ui/images/explorer_icons.png b/rswag-ui/vendor/assets/components/swagger-ui/images/explorer_icons.png new file mode 100644 index 0000000..be43b27 Binary files /dev/null and b/rswag-ui/vendor/assets/components/swagger-ui/images/explorer_icons.png differ diff --git a/rswag-ui/vendor/assets/components/swagger-ui/images/favicon-16x16.png b/rswag-ui/vendor/assets/components/swagger-ui/images/favicon-16x16.png new file mode 100755 index 0000000..0f7e13b Binary files /dev/null and b/rswag-ui/vendor/assets/components/swagger-ui/images/favicon-16x16.png differ diff --git a/rswag-ui/vendor/assets/components/swagger-ui/images/favicon-32x32.png b/rswag-ui/vendor/assets/components/swagger-ui/images/favicon-32x32.png new file mode 100755 index 0000000..b0a3352 Binary files /dev/null and b/rswag-ui/vendor/assets/components/swagger-ui/images/favicon-32x32.png differ diff --git a/vendor/assets/components/swagger-ui/images/favicon.ico b/rswag-ui/vendor/assets/components/swagger-ui/images/favicon.ico similarity index 100% rename from vendor/assets/components/swagger-ui/images/favicon.ico rename to rswag-ui/vendor/assets/components/swagger-ui/images/favicon.ico diff --git a/rswag-ui/vendor/assets/components/swagger-ui/images/logo_small.png b/rswag-ui/vendor/assets/components/swagger-ui/images/logo_small.png new file mode 100644 index 0000000..ce3908e Binary files /dev/null and b/rswag-ui/vendor/assets/components/swagger-ui/images/logo_small.png differ diff --git a/rswag-ui/vendor/assets/components/swagger-ui/images/pet_store_api.png b/rswag-ui/vendor/assets/components/swagger-ui/images/pet_store_api.png new file mode 100644 index 0000000..1192ad8 Binary files /dev/null and b/rswag-ui/vendor/assets/components/swagger-ui/images/pet_store_api.png differ diff --git a/vendor/assets/components/swagger-ui/images/throbber.gif b/rswag-ui/vendor/assets/components/swagger-ui/images/throbber.gif similarity index 100% rename from vendor/assets/components/swagger-ui/images/throbber.gif rename to rswag-ui/vendor/assets/components/swagger-ui/images/throbber.gif diff --git a/rswag-ui/vendor/assets/components/swagger-ui/images/wordnik_api.png b/rswag-ui/vendor/assets/components/swagger-ui/images/wordnik_api.png new file mode 100644 index 0000000..dc0ddab Binary files /dev/null and b/rswag-ui/vendor/assets/components/swagger-ui/images/wordnik_api.png differ diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lang/ca.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/ca.js new file mode 100644 index 0000000..f8c815a --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/ca.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Advertència: Obsolet", + "Implementation Notes":"Notes d'implementació", + "Response Class":"Classe de la Resposta", + "Status":"Estatus", + "Parameters":"Paràmetres", + "Parameter":"Paràmetre", + "Value":"Valor", + "Description":"Descripció", + "Parameter Type":"Tipus del Paràmetre", + "Data Type":"Tipus de la Dada", + "Response Messages":"Missatges de la Resposta", + "HTTP Status Code":"Codi d'Estatus HTTP", + "Reason":"Raó", + "Response Model":"Model de la Resposta", + "Request URL":"URL de la Sol·licitud", + "Response Body":"Cos de la Resposta", + "Response Code":"Codi de la Resposta", + "Response Headers":"Capçaleres de la Resposta", + "Hide Response":"Amagar Resposta", + "Try it out!":"Prova-ho!", + "Show/Hide":"Mostrar/Amagar", + "List Operations":"Llista Operacions", + "Expand Operations":"Expandir Operacions", + "Raw":"Cru", + "can't parse JSON. Raw result":"no puc analitzar el JSON. Resultat cru", + "Example Value":"Valor d'Exemple", + "Model Schema":"Esquema del Model", + "Model":"Model", + "apply":"aplicar", + "Username":"Nom d'usuari", + "Password":"Contrasenya", + "Terms of service":"Termes del servei", + "Created by":"Creat per", + "See more at":"Veure més en", + "Contact the developer":"Contactar amb el desenvolupador", + "api version":"versió de la api", + "Response Content Type":"Tipus de Contingut de la Resposta", + "fetching resource":"recollint recurs", + "fetching resource list":"recollins llista de recursos", + "Explore":"Explorant", + "Show Swagger Petstore Example Apis":"Mostrar API d'Exemple Swagger Petstore", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"No es pot llegir del servidor. Potser no teniu la configuració de control d'accés apropiada.", + "Please specify the protocol for":"Si us plau, especifiqueu el protocol per a", + "Can't read swagger JSON from":"No es pot llegir el JSON de swagger des de", + "Finished Loading Resource Information. Rendering Swagger UI":"Finalitzada la càrrega del recurs informatiu. Renderitzant Swagger UI", + "Unable to read api":"No es pot llegir l'api", + "from path":"des de la ruta", + "server returned":"el servidor ha retornat" +}); diff --git a/vendor/assets/components/swagger-ui/lang/en.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/en.js similarity index 92% rename from vendor/assets/components/swagger-ui/lang/en.js rename to rswag-ui/vendor/assets/components/swagger-ui/lang/en.js index 776a8b7..9183136 100644 --- a/vendor/assets/components/swagger-ui/lang/en.js +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/en.js @@ -28,8 +28,10 @@ window.SwaggerTranslator.learn({ "Expand Operations":"Expand Operations", "Raw":"Raw", "can't parse JSON. Raw result":"can't parse JSON. Raw result", + "Example Value":"Example Value", "Model Schema":"Model Schema", "Model":"Model", + "Click to set as parameter value":"Click to set as parameter value", "apply":"apply", "Username":"Username", "Password":"Password", @@ -39,6 +41,7 @@ window.SwaggerTranslator.learn({ "Contact the developer":"Contact the developer", "api version":"api version", "Response Content Type":"Response Content Type", + "Parameter content type:":"Parameter content type:", "fetching resource":"fetching resource", "fetching resource list":"fetching resource list", "Explore":"Explore", diff --git a/vendor/assets/components/swagger-ui/lang/es.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/es.js similarity index 98% rename from vendor/assets/components/swagger-ui/lang/es.js rename to rswag-ui/vendor/assets/components/swagger-ui/lang/es.js index a8dff60..13fa015 100644 --- a/vendor/assets/components/swagger-ui/lang/es.js +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/es.js @@ -27,6 +27,7 @@ window.SwaggerTranslator.learn({ "Expand Operations":"Expandir Operaciones", "Raw":"Crudo", "can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo", + "Example Value":"Valor de Ejemplo", "Model Schema":"Esquema del Modelo", "Model":"Modelo", "apply":"aplicar", diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lang/fr.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/fr.js new file mode 100644 index 0000000..388dff1 --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/fr.js @@ -0,0 +1,54 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Avertissement : Obsolète", + "Implementation Notes":"Notes d'implémentation", + "Response Class":"Classe de la réponse", + "Status":"Statut", + "Parameters":"Paramètres", + "Parameter":"Paramètre", + "Value":"Valeur", + "Description":"Description", + "Parameter Type":"Type du paramètre", + "Data Type":"Type de données", + "Response Messages":"Messages de la réponse", + "HTTP Status Code":"Code de statut HTTP", + "Reason":"Raison", + "Response Model":"Modèle de réponse", + "Request URL":"URL appelée", + "Response Body":"Corps de la réponse", + "Response Code":"Code de la réponse", + "Response Headers":"En-têtes de la réponse", + "Hide Response":"Cacher la réponse", + "Headers":"En-têtes", + "Try it out!":"Testez !", + "Show/Hide":"Afficher/Masquer", + "List Operations":"Liste des opérations", + "Expand Operations":"Développer les opérations", + "Raw":"Brut", + "can't parse JSON. Raw result":"impossible de décoder le JSON. Résultat brut", + "Example Value":"Exemple la valeur", + "Model Schema":"Définition du modèle", + "Model":"Modèle", + "apply":"appliquer", + "Username":"Nom d'utilisateur", + "Password":"Mot de passe", + "Terms of service":"Conditions de service", + "Created by":"Créé par", + "See more at":"Voir plus sur", + "Contact the developer":"Contacter le développeur", + "api version":"version de l'api", + "Response Content Type":"Content Type de la réponse", + "fetching resource":"récupération de la ressource", + "fetching resource list":"récupération de la liste de ressources", + "Explore":"Explorer", + "Show Swagger Petstore Example Apis":"Montrer les Apis de l'exemple Petstore de Swagger", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Impossible de lire à partir du serveur. Il se peut que les réglages access-control-origin ne soient pas appropriés.", + "Please specify the protocol for":"Veuillez spécifier un protocole pour", + "Can't read swagger JSON from":"Impossible de lire le JSON swagger à partir de", + "Finished Loading Resource Information. Rendering Swagger UI":"Chargement des informations terminé. Affichage de Swagger UI", + "Unable to read api":"Impossible de lire l'api", + "from path":"à partir du chemin", + "server returned":"réponse du serveur" +}); diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lang/geo.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/geo.js new file mode 100644 index 0000000..609c20d --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/geo.js @@ -0,0 +1,56 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"ყურáƒáƒ“ღებáƒ: áƒáƒ¦áƒáƒ  გáƒáƒ›áƒáƒ˜áƒ§áƒ”ნებáƒ", + "Implementation Notes":"იმპლემენტáƒáƒªáƒ˜áƒ˜áƒ¡ áƒáƒ¦áƒ¬áƒ”რáƒ", + "Response Class":"რესპáƒáƒœáƒ¡ კლáƒáƒ¡áƒ˜", + "Status":"სტáƒáƒ¢áƒ£áƒ¡áƒ˜", + "Parameters":"პáƒáƒ áƒáƒ›áƒ”ტრები", + "Parameter":"პáƒáƒ áƒáƒ›áƒ”ტრი", + "Value":"მნიშვნელáƒáƒ‘áƒ", + "Description":"áƒáƒ¦áƒ¬áƒ”რáƒ", + "Parameter Type":"პáƒáƒ áƒáƒ›áƒ”ტრის ტიპი", + "Data Type":"მáƒáƒœáƒáƒªáƒ”მის ტიპი", + "Response Messages":"პáƒáƒ¡áƒ£áƒ®áƒ˜", + "HTTP Status Code":"HTTP სტáƒáƒ¢áƒ£áƒ¡áƒ˜", + "Reason":"მიზეზი", + "Response Model":"რესპáƒáƒœáƒ¡ მáƒáƒ“ელი", + "Request URL":"მáƒáƒ—ხáƒáƒ•ნის URL", + "Response Body":"პáƒáƒ¡áƒ£áƒ®áƒ˜áƒ¡ სხეული", + "Response Code":"პáƒáƒ¡áƒ£áƒ®áƒ˜áƒ¡ კáƒáƒ“ი", + "Response Headers":"პáƒáƒ¡áƒ£áƒ®áƒ˜áƒ¡ ჰედერები", + "Hide Response":"დáƒáƒ›áƒáƒšáƒ” პáƒáƒ¡áƒ£áƒ®áƒ˜", + "Headers":"ჰედერები", + "Try it out!":"ცáƒáƒ“ე !", + "Show/Hide":"გáƒáƒ›áƒáƒ©áƒ”ნáƒ/დáƒáƒ›áƒáƒšáƒ•áƒ", + "List Operations":"áƒáƒžáƒ”რáƒáƒªáƒ˜áƒ”ბის სიáƒ", + "Expand Operations":"áƒáƒžáƒ”რáƒáƒªáƒ˜áƒ”ბი ვრცლáƒáƒ“", + "Raw":"ნედლი", + "can't parse JSON. Raw result":"JSON-ის დáƒáƒ›áƒ£áƒ¨áƒáƒ•ებრვერ მáƒáƒ®áƒ”რხდáƒ. ნედლი პáƒáƒ¡áƒ£áƒ®áƒ˜", + "Example Value":"მáƒáƒ’áƒáƒšáƒ˜áƒ—ი", + "Model Schema":"მáƒáƒ“ელის სტრუქტურáƒ", + "Model":"მáƒáƒ“ელი", + "Click to set as parameter value":"პáƒáƒ áƒáƒ›áƒ”ტრისთვის მნიშვნელáƒáƒ‘ის მისáƒáƒœáƒ˜áƒ­áƒ”ბლáƒáƒ“, დáƒáƒáƒ™áƒšáƒ˜áƒ™áƒ”", + "apply":"გáƒáƒ›áƒáƒ§áƒ”ნებáƒ", + "Username":"მáƒáƒ®áƒ›áƒáƒ áƒ”ბელი", + "Password":"პáƒáƒ áƒáƒšáƒ˜", + "Terms of service":"მáƒáƒ›áƒ¡áƒáƒ®áƒ£áƒ áƒ”ბის პირáƒáƒ‘ები", + "Created by":"შექმნáƒ", + "See more at":"ნáƒáƒ®áƒ” ვრცლáƒáƒ“", + "Contact the developer":"დáƒáƒ£áƒ™áƒáƒ•შირდი დეველáƒáƒžáƒ”რს", + "api version":"api ვერსიáƒ", + "Response Content Type":"პáƒáƒ¡áƒ£áƒ®áƒ˜áƒ¡ კáƒáƒœáƒ¢áƒ”ნტის ტიპი", + "Parameter content type:":"პáƒáƒ áƒáƒ›áƒ”ტრის კáƒáƒœáƒ¢áƒ”ნტის ტიპი:", + "fetching resource":"რესურსების მიღებáƒ", + "fetching resource list":"რესურსების სიის მიღებáƒ", + "Explore":"ნáƒáƒ®áƒ•áƒ", + "Show Swagger Petstore Example Apis":"ნáƒáƒ®áƒ” Swagger Petstore სáƒáƒ›áƒáƒ’áƒáƒšáƒ˜áƒ—რApi", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"სერვერთáƒáƒœ დáƒáƒ™áƒáƒ•შირებრვერ ხერხდებáƒ. შეáƒáƒ›áƒáƒ¬áƒ›áƒ”თ access-control-origin.", + "Please specify the protocol for":"მიუთითეთ პრáƒáƒ¢áƒáƒ™áƒáƒšáƒ˜", + "Can't read swagger JSON from":"swagger JSON წáƒáƒ™áƒ˜áƒ—ხვრვერ მáƒáƒ®áƒ”რხდáƒ", + "Finished Loading Resource Information. Rendering Swagger UI":"რესურსების ჩáƒáƒ¢áƒ•ირთვრსრულდებáƒ. Swagger UI რენდერდებáƒ", + "Unable to read api":"api წáƒáƒ™áƒ˜áƒ—ხვრვერ მáƒáƒ®áƒ”რხდáƒ", + "from path":"მისáƒáƒ›áƒáƒ áƒ—იდáƒáƒœ", + "server returned":"სერვერმრდáƒáƒáƒ‘რუნáƒ" +}); diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lang/it.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/it.js new file mode 100644 index 0000000..8529c2a --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/it.js @@ -0,0 +1,52 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Attenzione: Deprecato", + "Implementation Notes":"Note di implementazione", + "Response Class":"Classe della risposta", + "Status":"Stato", + "Parameters":"Parametri", + "Parameter":"Parametro", + "Value":"Valore", + "Description":"Descrizione", + "Parameter Type":"Tipo di parametro", + "Data Type":"Tipo di dato", + "Response Messages":"Messaggi della risposta", + "HTTP Status Code":"Codice stato HTTP", + "Reason":"Motivo", + "Response Model":"Modello di risposta", + "Request URL":"URL della richiesta", + "Response Body":"Corpo della risposta", + "Response Code":"Oggetto della risposta", + "Response Headers":"Intestazioni della risposta", + "Hide Response":"Nascondi risposta", + "Try it out!":"Provalo!", + "Show/Hide":"Mostra/Nascondi", + "List Operations":"Mostra operazioni", + "Expand Operations":"Espandi operazioni", + "Raw":"Grezzo (raw)", + "can't parse JSON. Raw result":"non è possibile parsare il JSON. Risultato grezzo (raw).", + "Model Schema":"Schema del modello", + "Model":"Modello", + "apply":"applica", + "Username":"Nome utente", + "Password":"Password", + "Terms of service":"Condizioni del servizio", + "Created by":"Creato da", + "See more at":"Informazioni aggiuntive:", + "Contact the developer":"Contatta lo sviluppatore", + "api version":"versione api", + "Response Content Type":"Tipo di contenuto (content type) della risposta", + "fetching resource":"recuperando la risorsa", + "fetching resource list":"recuperando lista risorse", + "Explore":"Esplora", + "Show Swagger Petstore Example Apis":"Mostra le api di esempio di Swagger Petstore", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Non è possibile leggere dal server. Potrebbe non avere le impostazioni di controllo accesso origine (access-control-origin) appropriate.", + "Please specify the protocol for":"Si prega di specificare il protocollo per", + "Can't read swagger JSON from":"Impossibile leggere JSON swagger da:", + "Finished Loading Resource Information. Rendering Swagger UI":"Lettura informazioni risorse termianta. Swagger UI viene mostrata", + "Unable to read api":"Impossibile leggere la api", + "from path":"da cartella", + "server returned":"il server ha restituito" +}); diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lang/ja.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/ja.js new file mode 100755 index 0000000..3207bfc --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/ja.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"警告: 廃止予定", + "Implementation Notes":"実装メモ", + "Response Class":"レスãƒãƒ³ã‚¹ã‚¯ãƒ©ã‚¹", + "Status":"ステータス", + "Parameters":"パラメータ群", + "Parameter":"パラメータ", + "Value":"値", + "Description":"説明", + "Parameter Type":"パラメータタイプ", + "Data Type":"データタイプ", + "Response Messages":"レスãƒãƒ³ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸", + "HTTP Status Code":"HTTPステータスコード", + "Reason":"ç†ç”±", + "Response Model":"レスãƒãƒ³ã‚¹ãƒ¢ãƒ‡ãƒ«", + "Request URL":"リクエストURL", + "Response Body":"レスãƒãƒ³ã‚¹ãƒœãƒ‡ã‚£", + "Response Code":"レスãƒãƒ³ã‚¹ã‚³ãƒ¼ãƒ‰", + "Response Headers":"レスãƒãƒ³ã‚¹ãƒ˜ãƒƒãƒ€", + "Hide Response":"レスãƒãƒ³ã‚¹ã‚’éš ã™", + "Headers":"ヘッダ", + "Try it out!":"実際ã«å®Ÿè¡Œ!", + "Show/Hide":"表示/éžè¡¨ç¤º", + "List Operations":"æ“作一覧", + "Expand Operations":"æ“作ã®å±•é–‹", + "Raw":"Raw", + "can't parse JSON. Raw result":"JSONã¸è§£é‡ˆã§ãã¾ã›ã‚“. 未加工ã®çµæžœ", + "Model Schema":"モデルスキーマ", + "Model":"モデル", + "apply":"実行", + "Username":"ユーザå", + "Password":"パスワード", + "Terms of service":"サービス利用è¦ç´„", + "Created by":"Created by", + "See more at":"See more at", + "Contact the developer":"開発者ã«é€£çµ¡", + "api version":"APIãƒãƒ¼ã‚¸ãƒ§ãƒ³", + "Response Content Type":"レスãƒãƒ³ã‚¹ コンテンツタイプ", + "fetching resource":"リソースã®å–å¾—", + "fetching resource list":"リソース一覧ã®å–å¾—", + "Explore":"Explore", + "Show Swagger Petstore Example Apis":"SwaggerペットストアAPIã®è¡¨ç¤º", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"サーãƒã‹ã‚‰èª­ã¿è¾¼ã‚ã¾ã›ã‚“. é©åˆ‡ãªaccess-control-origin設定をæŒã£ã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚りã¾ã™.", + "Please specify the protocol for":"プロトコルを指定ã—ã¦ãã ã•ã„", + "Can't read swagger JSON from":"次ã‹ã‚‰swagger JSONを読ã¿è¾¼ã‚ã¾ã›ã‚“", + "Finished Loading Resource Information. Rendering Swagger UI":"リソース情報ã®èª­ã¿è¾¼ã¿ãŒå®Œäº†ã—ã¾ã—ãŸ. Swagger UIã‚’æç”»ã—ã¦ã„ã¾ã™", + "Unable to read api":"APIを読ã¿è¾¼ã‚ã¾ã›ã‚“", + "from path":"次ã®ãƒ‘スã‹ã‚‰", + "server returned":"サーãƒã‹ã‚‰ã®è¿”ç­”" +}); diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lang/ko-kr.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/ko-kr.js new file mode 100644 index 0000000..03c7626 --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/ko-kr.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"경고:í기예정ë¨", + "Implementation Notes":"구현 노트", + "Response Class":"ì‘답 í´ëž˜ìФ", + "Status":"ìƒíƒœ", + "Parameters":"매개변수들", + "Parameter":"매개변수", + "Value":"ê°’", + "Description":"설명", + "Parameter Type":"매개변수 타입", + "Data Type":"ë°ì´í„° 타입", + "Response Messages":"ì‘답 메세지", + "HTTP Status Code":"HTTP ìƒíƒœ 코드", + "Reason":"ì›ì¸", + "Response Model":"ì‘답 모ë¸", + "Request URL":"요청 URL", + "Response Body":"ì‘답 본문", + "Response Code":"ì‘답 코드", + "Response Headers":"ì‘답 í—¤ë”", + "Hide Response":"ì‘답 숨기기", + "Headers":"í—¤ë”", + "Try it out!":"ì¨ë³´ê¸°ï¼", + "Show/Hide":"ë³´ì´ê¸°/숨기기", + "List Operations":"ëª©ë¡ ìž‘ì—…", + "Expand Operations":"ì „ê°œ 작업", + "Raw":"ì›ë³¸", + "can't parse JSON. Raw result":"JSONì„ íŒŒì‹±í• ìˆ˜ ì—†ìŒ. ì›ë³¸ê²°ê³¼:", + "Model Schema":"ëª¨ë¸ ìŠ¤í‚¤ë§ˆ", + "Model":"모ë¸", + "apply":"ì ìš©", + "Username":"ì‚¬ìš©ìž ì´ë¦„", + "Password":"암호", + "Terms of service":"ì´ìš©ì•½ê´€", + "Created by":"작성ìž", + "See more at":"추가정보:", + "Contact the developer":"개발ìžì—게 문ì˜", + "api version":"api버전", + "Response Content Type":"ì‘답Content Type", + "fetching resource":"리소스 가져오기", + "fetching resource list":"리소스 ëª©ë¡ ê°€ì ¸ì˜¤ê¸°", + "Explore":"íƒìƒ‰", + "Show Swagger Petstore Example Apis":"Swagger Petstore 예제 보기", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"서버로부터 ì½ì–´ë“¤ì¼ìˆ˜ 없습니다. access-control-origin ì„¤ì •ì´ ì˜¬ë°”ë¥´ì§€ 않ì„수 있습니다.", + "Please specify the protocol for":"다ìŒì„ 위한 í”„ë¡œí† ì½œì„ ì •í•˜ì„¸ìš”", + "Can't read swagger JSON from":"swagger JSON ì„ ë‹¤ìŒìœ¼ë¡œ 부터 ì½ì„수 없습니다", + "Finished Loading Resource Information. Rendering Swagger UI":"리소스 ì •ë³´ 불러오기 완료. Swagger UI ëžœë”ë§", + "Unable to read api":"api를 ì½ì„ 수 없습니다.", + "from path":"ë‹¤ìŒ ê²½ë¡œë¡œ 부터", + "server returned":"서버 ì‘답함." +}); diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lang/pl.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/pl.js new file mode 100644 index 0000000..ce41e91 --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/pl.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Uwaga: Wycofane", + "Implementation Notes":"Uwagi Implementacji", + "Response Class":"Klasa Odpowiedzi", + "Status":"Status", + "Parameters":"Parametry", + "Parameter":"Parametr", + "Value":"Wartość", + "Description":"Opis", + "Parameter Type":"Typ Parametru", + "Data Type":"Typ Danych", + "Response Messages":"WiadomoÅ›ci Odpowiedzi", + "HTTP Status Code":"Kod Statusu HTTP", + "Reason":"Przyczyna", + "Response Model":"Model Odpowiedzi", + "Request URL":"URL WywoÅ‚ania", + "Response Body":"Treść Odpowiedzi", + "Response Code":"Kod Odpowiedzi", + "Response Headers":"Nagłówki Odpowiedzi", + "Hide Response":"Ukryj Odpowiedź", + "Headers":"Nagłówki", + "Try it out!":"Wypróbuj!", + "Show/Hide":"Pokaż/Ukryj", + "List Operations":"Lista Operacji", + "Expand Operations":"RozwiÅ„ Operacje", + "Raw":"Nieprzetworzone", + "can't parse JSON. Raw result":"nie można przetworzyć pliku JSON. Nieprzetworzone dane", + "Model Schema":"Schemat Modelu", + "Model":"Model", + "apply":"użyj", + "Username":"Nazwa użytkownika", + "Password":"HasÅ‚o", + "Terms of service":"Warunki używania", + "Created by":"Utworzone przez", + "See more at":"Zobacz wiÄ™cej na", + "Contact the developer":"Kontakt z deweloperem", + "api version":"wersja api", + "Response Content Type":"Typ Zasobu Odpowiedzi", + "fetching resource":"Å‚adowanie zasobu", + "fetching resource list":"Å‚adowanie listy zasobów", + "Explore":"Eksploruj", + "Show Swagger Petstore Example Apis":"Pokaż PrzykÅ‚adowe Api Swagger Petstore", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Brak połączenia z serwerem. Może on nie mieć odpowiednich ustawieÅ„ access-control-origin.", + "Please specify the protocol for":"ProszÄ™ podać protokół dla", + "Can't read swagger JSON from":"Nie można odczytać swagger JSON z", + "Finished Loading Resource Information. Rendering Swagger UI":"UkoÅ„czono Åadowanie Informacji o Zasobie. Renderowanie Swagger UI", + "Unable to read api":"Nie można odczytać api", + "from path":"ze Å›cieżki", + "server returned":"serwer zwróciÅ‚" +}); diff --git a/vendor/assets/components/swagger-ui/lang/pt.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/pt.js similarity index 100% rename from vendor/assets/components/swagger-ui/lang/pt.js rename to rswag-ui/vendor/assets/components/swagger-ui/lang/pt.js diff --git a/vendor/assets/components/swagger-ui/lang/ru.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/ru.js similarity index 78% rename from vendor/assets/components/swagger-ui/lang/ru.js rename to rswag-ui/vendor/assets/components/swagger-ui/lang/ru.js index 065100f..592744e 100644 --- a/vendor/assets/components/swagger-ui/lang/ru.js +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/ru.js @@ -2,7 +2,7 @@ /* jshint quotmark: double */ window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Ворнинг: Депрекейтед", + "Warning: Deprecated":"Предупреждение: УÑтарело", "Implementation Notes":"Заметки", "Response Class":"Пример ответа", "Status":"СтатуÑ", @@ -20,6 +20,7 @@ window.SwaggerTranslator.learn({ "Response Code":"HTTP код ответа", "Response Headers":"Заголовки ответа", "Hide Response":"СпрÑтать ответ", + "Headers":"Заголовки", "Response Messages":"Что может прийти в ответ", "Try it out!":"Попробовать!", "Show/Hide":"Показать/Скрыть", @@ -27,8 +28,10 @@ window.SwaggerTranslator.learn({ "Expand Operations":"Операции подробно", "Raw":"Ð’ Ñыром виде", "can't parse JSON. Raw result":"Ðе удаетÑÑ Ñ€Ð°ÑпарÑить ответ:", + "Example Value":"Пример", "Model Schema":"Структура", "Model":"ОпиÑание", + "Click to set as parameter value":"Ðажмите, чтобы иÑпльзовать в качеÑтве Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°", "apply":"применить", "Username":"Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ", "Password":"Пароль", @@ -38,12 +41,13 @@ window.SwaggerTranslator.learn({ "Contact the developer":"СвÑзатьÑÑ Ñ Ñ€Ð°Ð·Ñ€Ð°Ð±Ð¾Ñ‚Ñ‡Ð¸ÐºÐ¾Ð¼", "api version":"ВерÑÐ¸Ñ API", "Response Content Type":"Content Type ответа", + "Parameter content type:":"Content Type параметра:", "fetching resource":"Получение реÑурÑа", "fetching resource list":"Получение реÑурÑов", - "Explore":"Поехали", + "Explore":"Показать", "Show Swagger Petstore Example Apis":"Показать примеры ÐПИ", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Ðе удаетÑÑ Ð¿Ð¾Ð»ÑƒÑ‡Ð¸Ñ‚ÑŒ ответ от Ñервера. Возможно, какаÑ-то лажа Ñ Ð½Ð°Ñтройками доÑтупа", - "Please specify the protocol for":"ПожалуйÑта, укажите протогол длÑ", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Ðе удаетÑÑ Ð¿Ð¾Ð»ÑƒÑ‡Ð¸Ñ‚ÑŒ ответ от Ñервера. Возможно, проблема Ñ Ð½Ð°Ñтройками доÑтупа", + "Please specify the protocol for":"ПожалуйÑта, укажите протокол длÑ", "Can't read swagger JSON from":"Ðе получаетÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚ÑŒ swagger json из", "Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о реÑурÑах завершена. Рендерим", "Unable to read api":"Ðе удалоÑÑŒ прочитать api", diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lang/tr.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/tr.js new file mode 100644 index 0000000..16426a9 --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/tr.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Uyarı: Deprecated", + "Implementation Notes":"GerçekleÅŸtirim Notları", + "Response Class":"Dönen Sınıf", + "Status":"Statü", + "Parameters":"Parametreler", + "Parameter":"Parametre", + "Value":"DeÄŸer", + "Description":"Açıklama", + "Parameter Type":"Parametre Tipi", + "Data Type":"Veri Tipi", + "Response Messages":"Dönüş Mesajı", + "HTTP Status Code":"HTTP Statü Kodu", + "Reason":"Gerekçe", + "Response Model":"Dönüş Modeli", + "Request URL":"İstek URL", + "Response Body":"Dönüş İçeriÄŸi", + "Response Code":"Dönüş Kodu", + "Response Headers":"Dönüş Üst Bilgileri", + "Hide Response":"Dönüşü Gizle", + "Headers":"Üst Bilgiler", + "Try it out!":"Dene!", + "Show/Hide":"Göster/Gizle", + "List Operations":"Operasyonları Listele", + "Expand Operations":"Operasyonları Aç", + "Raw":"Ham", + "can't parse JSON. Raw result":"JSON çözümlenemiyor. Ham sonuç", + "Model Schema":"Model Åžema", + "Model":"Model", + "apply":"uygula", + "Username":"Kullanıcı Adı", + "Password":"Parola", + "Terms of service":"Servis ÅŸartları", + "Created by":"OluÅŸturan", + "See more at":"Daha fazlası için", + "Contact the developer":"GeliÅŸtirici ile İletiÅŸime Geçin", + "api version":"api versiyon", + "Response Content Type":"Dönüş İçerik Tipi", + "fetching resource":"kaynak getiriliyor", + "fetching resource list":"kaynak listesi getiriliyor", + "Explore":"KeÅŸfet", + "Show Swagger Petstore Example Apis":"Swagger Petstore Örnek Api'yi Gör", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Sunucudan okuma yapılamıyor. Sunucu access-control-origin ayarlarınızı kontrol edin.", + "Please specify the protocol for":"Lütfen istenen adres için protokol belirtiniz", + "Can't read swagger JSON from":"Swagger JSON bu kaynaktan okunamıyor", + "Finished Loading Resource Information. Rendering Swagger UI":"Kaynak baglantısı tamamlandı. Swagger UI gösterime hazırlanıyor", + "Unable to read api":"api okunamadı", + "from path":"yoldan", + "server returned":"sunucuya dönüldü" +}); diff --git a/vendor/assets/components/swagger-ui/lang/translator.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/translator.js similarity index 95% rename from vendor/assets/components/swagger-ui/lang/translator.js rename to rswag-ui/vendor/assets/components/swagger-ui/lang/translator.js index 591f6d4..ffb879f 100644 --- a/vendor/assets/components/swagger-ui/lang/translator.js +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/translator.js @@ -7,7 +7,7 @@ * after . * For example - * - * If you wish to translate some new texsts you should do two things: + * If you wish to translate some new texts you should do two things: * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. * 2. Mark that text it templates this way New Phrase or . * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lang/zh-cn.js b/rswag-ui/vendor/assets/components/swagger-ui/lang/zh-cn.js new file mode 100644 index 0000000..570319b --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lang/zh-cn.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"警告:已过时", + "Implementation Notes":"实现备注", + "Response Class":"å“应类", + "Status":"状æ€", + "Parameters":"傿•°", + "Parameter":"傿•°", + "Value":"值", + "Description":"æè¿°", + "Parameter Type":"傿•°ç±»åž‹", + "Data Type":"æ•°æ®ç±»åž‹", + "Response Messages":"å“应消æ¯", + "HTTP Status Code":"HTTP状æ€ç ", + "Reason":"原因", + "Response Model":"å“应模型", + "Request URL":"请求URL", + "Response Body":"å“应体", + "Response Code":"å“应ç ", + "Response Headers":"å“应头", + "Hide Response":"éšè—å“应", + "Headers":"头", + "Try it out!":"试一下ï¼", + "Show/Hide":"显示/éšè—", + "List Operations":"显示æ“作", + "Expand Operations":"展开æ“作", + "Raw":"原始", + "can't parse JSON. Raw result":"无法解æžJSON. 原始结果", + "Model Schema":"模型架构", + "Model":"模型", + "apply":"应用", + "Username":"用户å", + "Password":"密ç ", + "Terms of service":"æœåŠ¡æ¡æ¬¾", + "Created by":"创建者", + "See more at":"查看更多:", + "Contact the developer":"è”系开å‘者", + "api version":"api版本", + "Response Content Type":"å“应Content Type", + "fetching resource":"正在获å–资æº", + "fetching resource list":"正在获å–资æºåˆ—表", + "Explore":"æµè§ˆ", + "Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"无法从æœåŠ¡å™¨è¯»å–。å¯èƒ½æ²¡æœ‰æ­£ç¡®è®¾ç½®access-control-origin。", + "Please specify the protocol for":"请指定å议:", + "Can't read swagger JSON from":"无法读å–swagger JSON于", + "Finished Loading Resource Information. Rendering Swagger UI":"已加载资æºä¿¡æ¯ã€‚正在渲染Swagger UI", + "Unable to read api":"无法读å–api", + "from path":"从路径", + "server returned":"æœåŠ¡å™¨è¿”å›ž" +}); diff --git a/vendor/assets/components/swagger-ui/lib/backbone-min.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/backbone-min.js similarity index 100% rename from vendor/assets/components/swagger-ui/lib/backbone-min.js rename to rswag-ui/vendor/assets/components/swagger-ui/lib/backbone-min.js diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lib/es5-shim.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/es5-shim.js new file mode 100644 index 0000000..f94b433 --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lib/es5-shim.js @@ -0,0 +1,2065 @@ +/*! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2015 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ + +// vim: ts=4 sts=4 sw=4 expandtab + +// Add semicolon to prevent IIFE from being passed as argument to concatenated code. +; + +// UMD (Universal Module Definition) +// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js +(function (root, factory) { + 'use strict'; + + /* global define, exports, module */ + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.returnExports = factory(); + } +}(this, function () { + /** + * Brings an environment as close to ECMAScript 5 compliance + * as is possible with the facilities of erstwhile engines. + * + * Annotated ES5: http://es5.github.com/ (specific links below) + * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/ + */ + + // Shortcut to an often accessed properties, in order to avoid multiple + // dereference that costs universally. This also holds a reference to known-good + // functions. + var $Array = Array; + var ArrayPrototype = $Array.prototype; + var $Object = Object; + var ObjectPrototype = $Object.prototype; + var $Function = Function; + var FunctionPrototype = $Function.prototype; + var $String = String; + var StringPrototype = $String.prototype; + var $Number = Number; + var NumberPrototype = $Number.prototype; + var array_slice = ArrayPrototype.slice; + var array_splice = ArrayPrototype.splice; + var array_push = ArrayPrototype.push; + var array_unshift = ArrayPrototype.unshift; + var array_concat = ArrayPrototype.concat; + var array_join = ArrayPrototype.join; + var call = FunctionPrototype.call; + var apply = FunctionPrototype.apply; + var max = Math.max; + var min = Math.min; + + // Having a toString local variable name breaks in Opera so use to_string. + var to_string = ObjectPrototype.toString; + + /* global Symbol */ + /* eslint-disable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, constructorRegex = /^\s*class /, isES6ClassFn = function isES6ClassFn(value) { try { var fnStr = fnToStr.call(value); var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' '); return constructorRegex.test(spaceStripped); } catch (e) { return false; /* not a function */ } }, tryFunctionObject = function tryFunctionObject(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]', isCallable = function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; }; + + var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { regexExec.call(value); return true; } catch (e) { return false; } }, regexClass = '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 'object') { return false; } return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; }; + var isString; /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, tryStringObject = function tryStringObject(value) { try { strValue.call(value); return true; } catch (e) { return false; } }, stringClass = '[object String]'; isString = function isString(value) { if (typeof value === 'string') { return true; } if (typeof value !== 'object') { return false; } return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; }; + /* eslint-enable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + + /* inlined from http://npmjs.com/define-properties */ + var supportsDescriptors = $Object.defineProperty && (function () { + try { + var obj = {}; + $Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); + for (var _ in obj) { // jscs:ignore disallowUnusedVariables + return false; + } + return obj.x === obj; + } catch (e) { /* this is ES3 */ + return false; + } + }()); + var defineProperties = (function (has) { + // Define configurable, writable, and non-enumerable props + // if they don't exist. + var defineProperty; + if (supportsDescriptors) { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && (name in object)) { + return; + } + $Object.defineProperty(object, name, { + configurable: true, + enumerable: false, + writable: true, + value: method + }); + }; + } else { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && (name in object)) { + return; + } + object[name] = method; + }; + } + return function defineProperties(object, map, forceAssign) { + for (var name in map) { + if (has.call(map, name)) { + defineProperty(object, name, map[name], forceAssign); + } + } + }; + }(ObjectPrototype.hasOwnProperty)); + + // + // Util + // ====== + // + + /* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */ + var isPrimitive = function isPrimitive(input) { + var type = typeof input; + return input === null || (type !== 'object' && type !== 'function'); + }; + + var isActualNaN = $Number.isNaN || function isActualNaN(x) { + return x !== x; + }; + + var ES = { + // ES5 9.4 + // http://es5.github.com/#x9.4 + // http://jsperf.com/to-integer + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */ + ToInteger: function ToInteger(num) { + var n = +num; + if (isActualNaN(n)) { + n = 0; + } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */ + ToPrimitive: function ToPrimitive(input) { + var val, valueOf, toStr; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (isCallable(valueOf)) { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toStr = input.toString; + if (isCallable(toStr)) { + val = toStr.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); + }, + + // ES5 9.9 + // http://es5.github.com/#x9.9 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */ + ToObject: function (o) { + if (o == null) { // this matches both null and undefined + throw new TypeError("can't convert " + o + ' to object'); + } + return $Object(o); + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */ + ToUint32: function ToUint32(x) { + return x >>> 0; + } + }; + + // + // Function + // ======== + // + + // ES-5 15.3.4.5 + // http://es5.github.com/#x15.3.4.5 + + var Empty = function Empty() {}; + + defineProperties(FunctionPrototype, { + bind: function bind(that) { // .length is 1 + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + if (!isCallable(target)) { + throw new TypeError('Function.prototype.bind called on incompatible ' + target); + } + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + // XXX slicedArgs will stand in for "A" if used + var args = array_slice.call(arguments, 1); // for normal call + // 4. Let F be a new native ECMAScript object. + // 11. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 12. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 13. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 14. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + var bound; + var binder = function () { + + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs, the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Construct]] internal + // method of target providing args as the arguments. + + var result = apply.call( + target, + this, + array_concat.call(args, array_slice.call(arguments)) + ); + if ($Object(result) === result) { + return result; + } + return this; + + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs, the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Call]] internal method + // of target providing boundThis as the this value and + // providing args as the arguments. + + // equiv: target.call(this, ...boundArgs, ...args) + return apply.call( + target, + that, + array_concat.call(args, array_slice.call(arguments)) + ); + + } + + }; + + // 15. If the [[Class]] internal property of Target is "Function", then + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is + // larger. + // 16. Else set the length own property of F to 0. + + var boundLength = max(0, target.length - args.length); + + // 17. Set the attributes of the length own property of F to the values + // specified in 15.3.5.1. + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + array_push.call(boundArgs, '$' + i); + } + + // XXX Build a dynamic function with desired amount of arguments is the only + // way to set the length property of a function. + // In environments where Content Security Policies enabled (Chrome extensions, + // for ex.) all use of eval or Function costructor throws an exception. + // However in all of these environments Function.prototype.bind exists + // and so this code will never be executed. + bound = $Function('binder', 'return function (' + array_join.call(boundArgs, ',') + '){ return binder.apply(this, arguments); }')(binder); + + if (target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + // Clean up dangling references. + Empty.prototype = null; + } + + // TODO + // 18. Set the [[Extensible]] internal property of F to true. + + // TODO + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). + // 20. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and + // false. + // 21. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, + // and false. + + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property or the [[Code]], [[FormalParameters]], and + // [[Scope]] internal properties. + // XXX can't delete prototype in pure-js. + + // 22. Return F. + return bound; + } + }); + + // _Please note: Shortcuts are defined after `Function.prototype.bind` as we + // use it in defining shortcuts. + var owns = call.bind(ObjectPrototype.hasOwnProperty); + var toStr = call.bind(ObjectPrototype.toString); + var arraySlice = call.bind(array_slice); + var arraySliceApply = apply.bind(array_slice); + var strSlice = call.bind(StringPrototype.slice); + var strSplit = call.bind(StringPrototype.split); + var strIndexOf = call.bind(StringPrototype.indexOf); + var pushCall = call.bind(array_push); + var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable); + var arraySort = call.bind(ArrayPrototype.sort); + + // + // Array + // ===== + // + + var isArray = $Array.isArray || function isArray(obj) { + return toStr(obj) === '[object Array]'; + }; + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.13 + // Return len+argCount. + // [bugfix, ielt8] + // IE < 8 bug: [].unshift(0) === undefined but should be "1" + var hasUnshiftReturnValueBug = [].unshift(0) !== 1; + defineProperties(ArrayPrototype, { + unshift: function () { + array_unshift.apply(this, arguments); + return this.length; + } + }, hasUnshiftReturnValueBug); + + // ES5 15.4.3.2 + // http://es5.github.com/#x15.4.3.2 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray + defineProperties($Array, { isArray: isArray }); + + // The IsCallable() check in the Array functions + // has been replaced with a strict check on the + // internal class of the object to trap cases where + // the provided function was actually a regular + // expression literal, which in V8 and + // JavaScriptCore is a typeof "function". Only in + // V8 are regular expression literals permitted as + // reduce parameters, so it is desirable in the + // general case for the shim to match the more + // strict and common behavior of rejecting regular + // expressions. + + // ES5 15.4.4.18 + // http://es5.github.com/#x15.4.4.18 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach + + // Check failure of by-index access of string characters (IE < 9) + // and failure of `0 in boxedString` (Rhino) + var boxedString = $Object('a'); + var splitString = boxedString[0] !== 'a' || !(0 in boxedString); + + var properlyBoxesContext = function properlyBoxed(method) { + // Check node 0.6.21 bug where third parameter is not boxed + var properlyBoxesNonStrict = true; + var properlyBoxesStrict = true; + var threwException = false; + if (method) { + try { + method.call('foo', function (_, __, context) { + if (typeof context !== 'object') { + properlyBoxesNonStrict = false; + } + }); + + method.call([1], function () { + 'use strict'; + + properlyBoxesStrict = typeof this === 'string'; + }, 'x'); + } catch (e) { + threwException = true; + } + } + return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict; + }; + + defineProperties(ArrayPrototype, { + forEach: function forEach(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var i = -1; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.forEach callback must be a function'); + } + + while (++i < length) { + if (i in self) { + // Invoke the callback function with call, passing arguments: + // context, property value, property key, thisArg object + if (typeof T === 'undefined') { + callbackfn(self[i], i, object); + } else { + callbackfn.call(T, self[i], i, object); + } + } + } + } + }, !properlyBoxesContext(ArrayPrototype.forEach)); + + // ES5 15.4.4.19 + // http://es5.github.com/#x15.4.4.19 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map + defineProperties(ArrayPrototype, { + map: function map(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = $Array(length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.map callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + if (typeof T === 'undefined') { + result[i] = callbackfn(self[i], i, object); + } else { + result[i] = callbackfn.call(T, self[i], i, object); + } + } + } + return result; + } + }, !properlyBoxesContext(ArrayPrototype.map)); + + // ES5 15.4.4.20 + // http://es5.github.com/#x15.4.4.20 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter + defineProperties(ArrayPrototype, { + filter: function filter(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = []; + var value; + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.filter callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if (typeof T === 'undefined' ? callbackfn(value, i, object) : callbackfn.call(T, value, i, object)) { + pushCall(result, value); + } + } + } + return result; + } + }, !properlyBoxesContext(ArrayPrototype.filter)); + + // ES5 15.4.4.16 + // http://es5.github.com/#x15.4.4.16 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every + defineProperties(ArrayPrototype, { + every: function every(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.every callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self && !(typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) { + return false; + } + } + return true; + } + }, !properlyBoxesContext(ArrayPrototype.every)); + + // ES5 15.4.4.17 + // http://es5.github.com/#x15.4.4.17 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some + defineProperties(ArrayPrototype, { + some: function some(callbackfn/*, thisArg */) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.some callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self && (typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) { + return true; + } + } + return false; + } + }, !properlyBoxesContext(ArrayPrototype.some)); + + // ES5 15.4.4.21 + // http://es5.github.com/#x15.4.4.21 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce + var reduceCoercesToObject = false; + if (ArrayPrototype.reduce) { + reduceCoercesToObject = typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties(ArrayPrototype, { + reduce: function reduce(callbackfn/*, initialValue*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduce callback must be a function'); + } + + // no value to return if no initial value and an empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduce of empty array with no initial value'); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + + // if array contains no values, no initial value to return + if (++i >= length) { + throw new TypeError('reduce of empty array with no initial value'); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } + + return result; + } + }, !reduceCoercesToObject); + + // ES5 15.4.4.22 + // http://es5.github.com/#x15.4.4.22 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight + var reduceRightCoercesToObject = false; + if (ArrayPrototype.reduceRight) { + reduceRightCoercesToObject = typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties(ArrayPrototype, { + reduceRight: function reduceRight(callbackfn/*, initial*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduceRight callback must be a function'); + } + + // no value to return if no initial value, empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + + var result; + var i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + + // if array contains no values, no initial value to return + if (--i < 0) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + } while (true); + } + + if (i < 0) { + return result; + } + + do { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } while (i--); + + return result; + } + }, !reduceRightCoercesToObject); + + // ES5 15.4.4.14 + // http://es5.github.com/#x15.4.4.14 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf + var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1; + defineProperties(ArrayPrototype, { + indexOf: function indexOf(searchElement/*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = ES.ToInteger(arguments[1]); + } + + // handle negative indices + i = i >= 0 ? i : max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === searchElement) { + return i; + } + } + return -1; + } + }, hasFirefox2IndexOfBug); + + // ES5 15.4.4.15 + // http://es5.github.com/#x15.4.4.15 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf + var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1; + defineProperties(ArrayPrototype, { + lastIndexOf: function lastIndexOf(searchElement/*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = min(i, ES.ToInteger(arguments[1])); + } + // handle negative indices + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && searchElement === self[i]) { + return i; + } + } + return -1; + } + }, hasFirefox2LastIndexOfBug); + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.12 + var spliceNoopReturnsEmptyArray = (function () { + var a = [1, 2]; + var result = a.splice(); + return a.length === 2 && isArray(result) && result.length === 0; + }()); + defineProperties(ArrayPrototype, { + // Safari 5.0 bug where .splice() returns undefined + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } else { + return array_splice.apply(this, arguments); + } + } + }, !spliceNoopReturnsEmptyArray); + + var spliceWorksWithEmptyObject = (function () { + var obj = {}; + ArrayPrototype.splice.call(obj, 0, 0, 1); + return obj.length === 1; + }()); + defineProperties(ArrayPrototype, { + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } + var args = arguments; + this.length = max(ES.ToInteger(this.length), 0); + if (arguments.length > 0 && typeof deleteCount !== 'number') { + args = arraySlice(arguments); + if (args.length < 2) { + pushCall(args, this.length - start); + } else { + args[1] = ES.ToInteger(deleteCount); + } + } + return array_splice.apply(this, args); + } + }, !spliceWorksWithEmptyObject); + var spliceWorksWithLargeSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Safari 7/8 breaks with sparse arrays of size 1e5 or greater + var arr = new $Array(1e5); + // note: the index MUST be 8 or larger or the test will false pass + arr[8] = 'x'; + arr.splice(1, 1); + // note: this test must be defined *after* the indexOf shim + // per https://github.com/es-shims/es5-shim/issues/313 + return arr.indexOf('x') === 7; + }()); + var spliceWorksWithSmallSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Opera 12.15 breaks on this, no idea why. + var n = 256; + var arr = []; + arr[n] = 'a'; + arr.splice(n + 1, 0, 'b'); + return arr[n] === 'a'; + }()); + defineProperties(ArrayPrototype, { + splice: function splice(start, deleteCount) { + var O = ES.ToObject(this); + var A = []; + var len = ES.ToUint32(O.length); + var relativeStart = ES.ToInteger(start); + var actualStart = relativeStart < 0 ? max((len + relativeStart), 0) : min(relativeStart, len); + var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart); + + var k = 0; + var from; + while (k < actualDeleteCount) { + from = $String(actualStart + k); + if (owns(O, from)) { + A[k] = O[from]; + } + k += 1; + } + + var items = arraySlice(arguments, 2); + var itemCount = items.length; + var to; + if (itemCount < actualDeleteCount) { + k = actualStart; + var maxK = len - actualDeleteCount; + while (k < maxK) { + from = $String(k + actualDeleteCount); + to = $String(k + itemCount); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k += 1; + } + k = len; + var minK = len - actualDeleteCount + itemCount; + while (k > minK) { + delete O[k - 1]; + k -= 1; + } + } else if (itemCount > actualDeleteCount) { + k = len - actualDeleteCount; + while (k > actualStart) { + from = $String(k + actualDeleteCount - 1); + to = $String(k + itemCount - 1); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k -= 1; + } + } + k = actualStart; + for (var i = 0; i < items.length; ++i) { + O[k] = items[i]; + k += 1; + } + O.length = len - actualDeleteCount + itemCount; + + return A; + } + }, !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays); + + var originalJoin = ArrayPrototype.join; + var hasStringJoinBug; + try { + hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3'; + } catch (e) { + hasStringJoinBug = true; + } + if (hasStringJoinBug) { + defineProperties(ArrayPrototype, { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep); + } + }, hasStringJoinBug); + } + + var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2'; + if (hasJoinUndefinedBug) { + defineProperties(ArrayPrototype, { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(this, sep); + } + }, hasJoinUndefinedBug); + } + + var pushShim = function push(item) { + var O = ES.ToObject(this); + var n = ES.ToUint32(O.length); + var i = 0; + while (i < arguments.length) { + O[n + i] = arguments[i]; + i += 1; + } + O.length = n + i; + return n + i; + }; + + var pushIsNotGeneric = (function () { + var obj = {}; + var result = Array.prototype.push.call(obj, undefined); + return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0); + }()); + defineProperties(ArrayPrototype, { + push: function push(item) { + if (isArray(this)) { + return array_push.apply(this, arguments); + } + return pushShim.apply(this, arguments); + } + }, pushIsNotGeneric); + + // This fixes a very weird bug in Opera 10.6 when pushing `undefined + var pushUndefinedIsWeird = (function () { + var arr = []; + var result = arr.push(undefined); + return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0); + }()); + defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird); + + // ES5 15.2.3.14 + // http://es5.github.io/#x15.4.4.10 + // Fix boxed string bug + defineProperties(ArrayPrototype, { + slice: function (start, end) { + var arr = isString(this) ? strSplit(this, '') : this; + return arraySliceApply(arr, arguments); + } + }, splitString); + + var sortIgnoresNonFunctions = (function () { + try { + [1, 2].sort(null); + [1, 2].sort({}); + return true; + } catch (e) {} + return false; + }()); + var sortThrowsOnRegex = (function () { + // this is a problem in Firefox 4, in which `typeof /a/ === 'function'` + try { + [1, 2].sort(/a/); + return false; + } catch (e) {} + return true; + }()); + var sortIgnoresUndefined = (function () { + // applies in IE 8, for one. + try { + [1, 2].sort(undefined); + return true; + } catch (e) {} + return false; + }()); + defineProperties(ArrayPrototype, { + sort: function sort(compareFn) { + if (typeof compareFn === 'undefined') { + return arraySort(this); + } + if (!isCallable(compareFn)) { + throw new TypeError('Array.prototype.sort callback must be a function'); + } + return arraySort(this, compareFn); + } + }, sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex); + + // + // Object + // ====== + // + + // ES5 15.2.3.14 + // http://es5.github.com/#x15.2.3.14 + + // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + var hasDontEnumBug = !isEnum({ 'toString': null }, 'toString'); + var hasProtoEnumBug = isEnum(function () {}, 'prototype'); + var hasStringEnumBug = !owns('x', '0'); + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var blacklistedKeys = { + $window: true, + $console: true, + $parent: true, + $self: true, + $frame: true, + $frames: true, + $frameElement: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $external: true + }; + var hasAutomationEqualityBug = (function () { + /* globals window */ + if (typeof window === 'undefined') { + return false; + } + for (var k in window) { + try { + if (!blacklistedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') { + equalsConstructorPrototype(window[k]); + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (object) { + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(object); + } + try { + return equalsConstructorPrototype(object); + } catch (e) { + return false; + } + }; + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var dontEnumsLength = dontEnums.length; + + // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js + // can be replaced with require('is-arguments') if we ever use a build process instead + var isStandardArguments = function isArguments(value) { + return toStr(value) === '[object Arguments]'; + }; + var isLegacyArguments = function isArguments(value) { + return value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + !isArray(value) && + isCallable(value.callee); + }; + var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments; + + defineProperties($Object, { + keys: function keys(object) { + var isFn = isCallable(object); + var isArgs = isArguments(object); + var isObject = object !== null && typeof object === 'object'; + var isStr = isObject && isString(object); + + if (!isObject && !isFn && !isArgs) { + throw new TypeError('Object.keys called on a non-object'); + } + + var theKeys = []; + var skipProto = hasProtoEnumBug && isFn; + if ((isStr && hasStringEnumBug) || isArgs) { + for (var i = 0; i < object.length; ++i) { + pushCall(theKeys, $String(i)); + } + } + + if (!isArgs) { + for (var name in object) { + if (!(skipProto && name === 'prototype') && owns(object, name)) { + pushCall(theKeys, $String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var j = 0; j < dontEnumsLength; j++) { + var dontEnum = dontEnums[j]; + if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) { + pushCall(theKeys, dontEnum); + } + } + } + return theKeys; + } + }); + + var keysWorksWithArguments = $Object.keys && (function () { + // Safari 5.0 bug + return $Object.keys(arguments).length === 2; + }(1, 2)); + var keysHasArgumentsLengthBug = $Object.keys && (function () { + var argKeys = $Object.keys(arguments); + return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1; + }(1)); + var originalKeys = $Object.keys; + defineProperties($Object, { + keys: function keys(object) { + if (isArguments(object)) { + return originalKeys(arraySlice(object)); + } else { + return originalKeys(object); + } + } + }, !keysWorksWithArguments || keysHasArgumentsLengthBug); + + // + // Date + // ==== + // + + var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0; + var aNegativeTestDate = new Date(-1509842289600292); + var aPositiveTestDate = new Date(1449662400000); + var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT'; + var hasToDateStringFormatBug; + var hasToStringFormatBug; + var timeZoneOffset = aNegativeTestDate.getTimezoneOffset(); + if (timeZoneOffset < -720) { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875'; + hasToStringFormatBug = !(/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString()); + } else { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875'; + hasToStringFormatBug = !(/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString()); + } + + var originalGetFullYear = call.bind(Date.prototype.getFullYear); + var originalGetMonth = call.bind(Date.prototype.getMonth); + var originalGetDate = call.bind(Date.prototype.getDate); + var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear); + var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth); + var originalGetUTCDate = call.bind(Date.prototype.getUTCDate); + var originalGetUTCDay = call.bind(Date.prototype.getUTCDay); + var originalGetUTCHours = call.bind(Date.prototype.getUTCHours); + var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes); + var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds); + var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds); + var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + var daysInMonth = function daysInMonth(month, year) { + return originalGetDate(new Date(year, month, 0)); + }; + + defineProperties(Date.prototype, { + getFullYear: function getFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + if (year < 0 && originalGetMonth(this) > 11) { + return year + 1; + } + return year; + }, + getMonth: function getMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getDate: function getDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + var date = originalGetDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return (days - date) + 1; + } + return date; + }, + getUTCFullYear: function getUTCFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + if (year < 0 && originalGetUTCMonth(this) > 11) { + return year + 1; + } + return year; + }, + getUTCMonth: function getUTCMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getUTCDate: function getUTCDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + var date = originalGetUTCDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return (days - date) + 1; + } + return date; + } + }, hasNegativeMonthYearBug); + + defineProperties(Date.prototype, { + toUTCString: function toUTCString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = originalGetUTCDay(this); + var date = originalGetUTCDate(this); + var month = originalGetUTCMonth(this); + var year = originalGetUTCFullYear(this); + var hour = originalGetUTCHours(this); + var minute = originalGetUTCMinutes(this); + var second = originalGetUTCSeconds(this); + return dayName[day] + ', ' + + (date < 10 ? '0' + date : date) + ' ' + + monthName[month] + ' ' + + year + ' ' + + (hour < 10 ? '0' + hour : hour) + ':' + + (minute < 10 ? '0' + minute : minute) + ':' + + (second < 10 ? '0' + second : second) + ' GMT'; + } + }, hasNegativeMonthYearBug || hasToUTCStringFormatBug); + + // Opera 12 has `,` + defineProperties(Date.prototype, { + toDateString: function toDateString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + return dayName[day] + ' ' + + monthName[month] + ' ' + + (date < 10 ? '0' + date : date) + ' ' + + year; + } + }, hasNegativeMonthYearBug || hasToDateStringFormatBug); + + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + if (hasNegativeMonthYearBug || hasToStringFormatBug) { + Date.prototype.toString = function toString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + var hour = this.getHours(); + var minute = this.getMinutes(); + var second = this.getSeconds(); + var timezoneOffset = this.getTimezoneOffset(); + var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60); + var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60); + return dayName[day] + ' ' + + monthName[month] + ' ' + + (date < 10 ? '0' + date : date) + ' ' + + year + ' ' + + (hour < 10 ? '0' + hour : hour) + ':' + + (minute < 10 ? '0' + minute : minute) + ':' + + (second < 10 ? '0' + second : second) + ' GMT' + + (timezoneOffset > 0 ? '-' : '+') + + (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) + + (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset); + }; + if (supportsDescriptors) { + $Object.defineProperty(Date.prototype, 'toString', { + configurable: true, + enumerable: false, + writable: true + }); + } + } + + // ES5 15.9.5.43 + // http://es5.github.com/#x15.9.5.43 + // This function returns a String value represent the instance in time + // represented by this Date object. The format of the String is the Date Time + // string format defined in 15.9.1.15. All fields are present in the String. + // The time zone is always UTC, denoted by the suffix Z. If the time value of + // this object is not a finite Number a RangeError exception is thrown. + var negativeDate = -62198755200000; + var negativeYearString = '-000001'; + var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1; + var hasSafari51DateBug = Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z'; + + var getTime = call.bind(Date.prototype.getTime); + + defineProperties(Date.prototype, { + toISOString: function toISOString() { + if (!isFinite(this) || !isFinite(getTime(this))) { + // Adope Photoshop requires the second check. + throw new RangeError('Date.prototype.toISOString called on non-finite value.'); + } + + var year = originalGetUTCFullYear(this); + + var month = originalGetUTCMonth(this); + // see https://github.com/es-shims/es5-shim/issues/111 + year += Math.floor(month / 12); + month = (month % 12 + 12) % 12; + + // the date time string format is specified in 15.9.1.15. + var result = [month + 1, originalGetUTCDate(this), originalGetUTCHours(this), originalGetUTCMinutes(this), originalGetUTCSeconds(this)]; + year = ( + (year < 0 ? '-' : (year > 9999 ? '+' : '')) + + strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6) + ); + + for (var i = 0; i < result.length; ++i) { + // pad months, days, hours, minutes, and seconds to have two digits. + result[i] = strSlice('00' + result[i], -2); + } + // pad milliseconds to have three digits. + return ( + year + '-' + arraySlice(result, 0, 2).join('-') + + 'T' + arraySlice(result, 2).join(':') + '.' + + strSlice('000' + originalGetUTCMilliseconds(this), -3) + 'Z' + ); + } + }, hasNegativeDateBug || hasSafari51DateBug); + + // ES5 15.9.5.44 + // http://es5.github.com/#x15.9.5.44 + // This function provides a String representation of a Date object for use by + // JSON.stringify (15.12.3). + var dateToJSONIsSupported = (function () { + try { + return Date.prototype.toJSON && + new Date(NaN).toJSON() === null && + new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 && + Date.prototype.toJSON.call({ // generic + toISOString: function () { return true; } + }); + } catch (e) { + return false; + } + }()); + if (!dateToJSONIsSupported) { + Date.prototype.toJSON = function toJSON(key) { + // When the toJSON method is called with argument key, the following + // steps are taken: + + // 1. Let O be the result of calling ToObject, giving it the this + // value as its argument. + // 2. Let tv be ES.ToPrimitive(O, hint Number). + var O = $Object(this); + var tv = ES.ToPrimitive(O); + // 3. If tv is a Number and is not finite, return null. + if (typeof tv === 'number' && !isFinite(tv)) { + return null; + } + // 4. Let toISO be the result of calling the [[Get]] internal method of + // O with argument "toISOString". + var toISO = O.toISOString; + // 5. If IsCallable(toISO) is false, throw a TypeError exception. + if (!isCallable(toISO)) { + throw new TypeError('toISOString property is not callable'); + } + // 6. Return the result of calling the [[Call]] internal method of + // toISO with O as the this value and an empty argument list. + return toISO.call(O); + + // NOTE 1 The argument is ignored. + + // NOTE 2 The toJSON function is intentionally generic; it does not + // require that its this value be a Date object. Therefore, it can be + // transferred to other kinds of objects for use as a method. However, + // it does require that any such object have a toISOString method. An + // object is free to use the argument key to filter its + // stringification. + }; + } + + // ES5 15.9.4.2 + // http://es5.github.com/#x15.9.4.2 + // based on work shared by Daniel Friesen (dantman) + // http://gist.github.com/303249 + var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15; + var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || !isNaN(Date.parse('2012-12-31T23:59:60.000Z')); + var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z')); + if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) { + // XXX global assignment won't work in embeddings that use + // an alternate object for the context. + /* global Date: true */ + /* eslint-disable no-undef */ + var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1; + var hasSafariSignedIntBug = isActualNaN(new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime()); + /* eslint-disable no-implicit-globals */ + Date = (function (NativeDate) { + /* eslint-enable no-implicit-globals */ + /* eslint-enable no-undef */ + // Date.length === 7 + var DateShim = function Date(Y, M, D, h, m, s, ms) { + var length = arguments.length; + var date; + if (this instanceof NativeDate) { + var seconds = s; + var millis = ms; + if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + seconds += sToShift; + millis -= sToShift * 1e3; + } + date = length === 1 && $String(Y) === Y ? // isString(Y) + // We explicitly pass it through parse: + new NativeDate(DateShim.parse(Y)) : + // We have to manually make calls depending on argument + // length here + length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis) : + length >= 6 ? new NativeDate(Y, M, D, h, m, seconds) : + length >= 5 ? new NativeDate(Y, M, D, h, m) : + length >= 4 ? new NativeDate(Y, M, D, h) : + length >= 3 ? new NativeDate(Y, M, D) : + length >= 2 ? new NativeDate(Y, M) : + length >= 1 ? new NativeDate(Y instanceof NativeDate ? +Y : Y) : + new NativeDate(); + } else { + date = NativeDate.apply(this, arguments); + } + if (!isPrimitive(date)) { + // Prevent mixups with unfixed Date object + defineProperties(date, { constructor: DateShim }, true); + } + return date; + }; + + // 15.9.1.15 Date Time String Format. + var isoDateExpression = new RegExp('^' + + '(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign + + // 6-digit extended year + '(?:-(\\d{2})' + // optional month capture + '(?:-(\\d{2})' + // optional day capture + '(?:' + // capture hours:minutes:seconds.milliseconds + 'T(\\d{2})' + // hours capture + ':(\\d{2})' + // minutes capture + '(?:' + // optional :seconds.milliseconds + ':(\\d{2})' + // seconds capture + '(?:(\\.\\d{1,}))?' + // milliseconds capture + ')?' + + '(' + // capture UTC offset component + 'Z|' + // UTC capture + '(?:' + // offset specifier +/-hours:minutes + '([-+])' + // sign capture + '(\\d{2})' + // hours offset capture + ':(\\d{2})' + // minutes offset capture + ')' + + ')?)?)?)?' + + '$'); + + var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + + var dayFromMonth = function dayFromMonth(year, month) { + var t = month > 1 ? 1 : 0; + return ( + months[month] + + Math.floor((year - 1969 + t) / 4) - + Math.floor((year - 1901 + t) / 100) + + Math.floor((year - 1601 + t) / 400) + + 365 * (year - 1970) + ); + }; + + var toUTC = function toUTC(t) { + var s = 0; + var ms = t; + if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + s += sToShift; + ms -= sToShift * 1e3; + } + return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms)); + }; + + // Copy any custom methods a 3rd party library may have added + for (var key in NativeDate) { + if (owns(NativeDate, key)) { + DateShim[key] = NativeDate[key]; + } + } + + // Copy "native" methods explicitly; they may be non-enumerable + defineProperties(DateShim, { + now: NativeDate.now, + UTC: NativeDate.UTC + }, true); + DateShim.prototype = NativeDate.prototype; + defineProperties(DateShim.prototype, { + constructor: DateShim + }, true); + + // Upgrade Date.parse to handle simplified ISO 8601 strings + var parseShim = function parse(string) { + var match = isoDateExpression.exec(string); + if (match) { + // parse months, days, hours, minutes, seconds, and milliseconds + // provide default values if necessary + // parse the UTC offset component + var year = $Number(match[1]), + month = $Number(match[2] || 1) - 1, + day = $Number(match[3] || 1) - 1, + hour = $Number(match[4] || 0), + minute = $Number(match[5] || 0), + second = $Number(match[6] || 0), + millisecond = Math.floor($Number(match[7] || 0) * 1000), + // When time zone is missed, local offset should be used + // (ES 5.1 bug) + // see https://bugs.ecmascript.org/show_bug.cgi?id=112 + isLocalTime = Boolean(match[4] && !match[8]), + signOffset = match[9] === '-' ? 1 : -1, + hourOffset = $Number(match[10] || 0), + minuteOffset = $Number(match[11] || 0), + result; + var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0; + if ( + hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) && + minute < 60 && second < 60 && millisecond < 1000 && + month > -1 && month < 12 && hourOffset < 24 && + minuteOffset < 60 && // detect invalid offsets + day > -1 && + day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month)) + ) { + result = ( + (dayFromMonth(year, month) + day) * 24 + + hour + + hourOffset * signOffset + ) * 60; + result = ( + (result + minute + minuteOffset * signOffset) * 60 + + second + ) * 1000 + millisecond; + if (isLocalTime) { + result = toUTC(result); + } + if (-8.64e15 <= result && result <= 8.64e15) { + return result; + } + } + return NaN; + } + return NativeDate.parse.apply(this, arguments); + }; + defineProperties(DateShim, { parse: parseShim }); + + return DateShim; + }(Date)); + /* global Date: false */ + } + + // ES5 15.9.4.4 + // http://es5.github.com/#x15.9.4.4 + if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; + } + + // + // Number + // ====== + // + + // ES5.1 15.7.4.5 + // http://es5.github.com/#x15.7.4.5 + var hasToFixedBugs = NumberPrototype.toFixed && ( + (0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128).toFixed(0) !== '1000000000000000128' + ); + + var toFixedHelpers = { + base: 1e7, + size: 6, + data: [0, 0, 0, 0, 0, 0], + multiply: function multiply(n, c) { + var i = -1; + var c2 = c; + while (++i < toFixedHelpers.size) { + c2 += n * toFixedHelpers.data[i]; + toFixedHelpers.data[i] = c2 % toFixedHelpers.base; + c2 = Math.floor(c2 / toFixedHelpers.base); + } + }, + divide: function divide(n) { + var i = toFixedHelpers.size; + var c = 0; + while (--i >= 0) { + c += toFixedHelpers.data[i]; + toFixedHelpers.data[i] = Math.floor(c / n); + c = (c % n) * toFixedHelpers.base; + } + }, + numToString: function numToString() { + var i = toFixedHelpers.size; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) { + var t = $String(toFixedHelpers.data[i]); + if (s === '') { + s = t; + } else { + s += strSlice('0000000', 0, 7 - t.length) + t; + } + } + } + return s; + }, + pow: function pow(x, n, acc) { + return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc))); + }, + log: function log(x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + } + }; + + var toFixedShim = function toFixed(fractionDigits) { + var f, x, s, m, e, z, j, k; + + // Test for NaN and round fractionDigits down + f = $Number(fractionDigits); + f = isActualNaN(f) ? 0 : Math.floor(f); + + if (f < 0 || f > 20) { + throw new RangeError('Number.toFixed called with invalid number of decimals'); + } + + x = $Number(this); + + if (isActualNaN(x)) { + return 'NaN'; + } + + // If it is too big or small, return the string value of the number + if (x <= -1e21 || x >= 1e21) { + return $String(x); + } + + s = ''; + + if (x < 0) { + s = '-'; + x = -x; + } + + m = '0'; + + if (x > 1e-21) { + // 1e-21 < x < 1e21 + // -70 < log2(x) < 70 + e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69; + z = (e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1)); + z *= 0x10000000000000; // Math.pow(2, 52); + e = 52 - e; + + // -18 < e < 122 + // x = z / 2 ^ e + if (e > 0) { + toFixedHelpers.multiply(0, z); + j = f; + + while (j >= 7) { + toFixedHelpers.multiply(1e7, 0); + j -= 7; + } + + toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0); + j = e - 1; + + while (j >= 23) { + toFixedHelpers.divide(1 << 23); + j -= 23; + } + + toFixedHelpers.divide(1 << j); + toFixedHelpers.multiply(1, 1); + toFixedHelpers.divide(2); + m = toFixedHelpers.numToString(); + } else { + toFixedHelpers.multiply(0, z); + toFixedHelpers.multiply(1 << (-e), 0); + m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f); + } + } + + if (f > 0) { + k = m.length; + + if (k <= f) { + m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m; + } else { + m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f); + } + } else { + m = s + m; + } + + return m; + }; + defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs); + + var hasToPrecisionUndefinedBug = (function () { + try { + return 1.0.toPrecision(undefined) === '1'; + } catch (e) { + return true; + } + }()); + var originalToPrecision = NumberPrototype.toPrecision; + defineProperties(NumberPrototype, { + toPrecision: function toPrecision(precision) { + return typeof precision === 'undefined' ? originalToPrecision.call(this) : originalToPrecision.call(this, precision); + } + }, hasToPrecisionUndefinedBug); + + // + // String + // ====== + // + + // ES5 15.5.4.14 + // http://es5.github.com/#x15.5.4.14 + + // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] + // Many browsers do not split properly with regular expressions or they + // do not perform the split correctly under obscure conditions. + // See http://blog.stevenlevithan.com/archives/cross-browser-split + // I've tested in many browsers and this seems to cover the deviant ones: + // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] + // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] + // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not + // [undefined, "t", undefined, "e", ...] + // ''.split(/.?/) should be [], not [""] + // '.'.split(/()()/) should be ["."], not ["", "", "."] + + if ( + 'ab'.split(/(?:ab)*/).length !== 2 || + '.'.split(/(.?)(.?)/).length !== 4 || + 'tesst'.split(/(s)*/)[1] === 't' || + 'test'.split(/(?:)/, -1).length !== 4 || + ''.split(/.?/).length || + '.'.split(/()()/).length > 1 + ) { + (function () { + var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group + var maxSafe32BitInt = Math.pow(2, 32) - 1; + + StringPrototype.split = function (separator, limit) { + var string = String(this); + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + + // If `separator` is not a regex, use native split + if (!isRegex(separator)) { + return strSplit(this, separator, limit); + } + + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + // in ES6 + (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6 + lastLastIndex = 0, + // Make `global` and avoid `lastIndex` issues by working with a copy + separator2, match, lastIndex, lastLength; + var separatorCopy = new RegExp(separator.source, flags + 'g'); + if (!compliantExecNpcg) { + // Doesn't need flags gy, but they don't hurt + separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + } + /* Values for `limit`, per the spec: + * If undefined: 4294967295 // maxSafe32BitInt + * If 0, Infinity, or NaN: 0 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; + * If negative number: 4294967296 - Math.floor(Math.abs(limit)) + * If other: Type-convert, then use the above rules + */ + var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit); + match = separatorCopy.exec(string); + while (match) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0].length; + if (lastIndex > lastLastIndex) { + pushCall(output, strSlice(string, lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1) { + /* eslint-disable no-loop-func */ + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (typeof arguments[i] === 'undefined') { + match[i] = void 0; + } + } + }); + /* eslint-enable no-loop-func */ + } + if (match.length > 1 && match.index < string.length) { + array_push.apply(output, arraySlice(match, 1)); + } + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= splitLimit) { + break; + } + } + if (separatorCopy.lastIndex === match.index) { + separatorCopy.lastIndex++; // Avoid an infinite loop + } + match = separatorCopy.exec(string); + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) { + pushCall(output, ''); + } + } else { + pushCall(output, strSlice(string, lastLastIndex)); + } + return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output; + }; + }()); + + // [bugfix, chrome] + // If separator is undefined, then the result array contains just one String, + // which is the this value (converted to a String). If limit is not undefined, + // then the output array is truncated so that it contains no more than limit + // elements. + // "0".split(undefined, 0) -> [] + } else if ('0'.split(void 0, 0).length) { + StringPrototype.split = function split(separator, limit) { + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + return strSplit(this, separator, limit); + }; + } + + var str_replace = StringPrototype.replace; + var replaceReportsGroupsCorrectly = (function () { + var groups = []; + 'x'.replace(/x(.)?/g, function (match, group) { + pushCall(groups, group); + }); + return groups.length === 1 && typeof groups[0] === 'undefined'; + }()); + + if (!replaceReportsGroupsCorrectly) { + StringPrototype.replace = function replace(searchValue, replaceValue) { + var isFn = isCallable(replaceValue); + var hasCapturingGroups = isRegex(searchValue) && (/\)[*?]/).test(searchValue.source); + if (!isFn || !hasCapturingGroups) { + return str_replace.call(this, searchValue, replaceValue); + } else { + var wrappedReplaceValue = function (match) { + var length = arguments.length; + var originalLastIndex = searchValue.lastIndex; + searchValue.lastIndex = 0; + var args = searchValue.exec(match) || []; + searchValue.lastIndex = originalLastIndex; + pushCall(args, arguments[length - 2], arguments[length - 1]); + return replaceValue.apply(this, args); + }; + return str_replace.call(this, searchValue, wrappedReplaceValue); + } + }; + } + + // ECMA-262, 3rd B.2.3 + // Not an ECMAScript standard, although ECMAScript 3rd Edition has a + // non-normative section suggesting uniform semantics and it should be + // normalized across all browsers + // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE + var string_substr = StringPrototype.substr; + var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b'; + defineProperties(StringPrototype, { + substr: function substr(start, length) { + var normalizedStart = start; + if (start < 0) { + normalizedStart = max(this.length + start, 0); + } + return string_substr.call(this, normalizedStart, length); + } + }, hasNegativeSubstrBug); + + // ES5 15.5.4.20 + // whitespace from: http://es5.github.io/#x15.5.4.20 + var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + + '\u2029\uFEFF'; + var zeroWidth = '\u200b'; + var wsRegexChars = '[' + ws + ']'; + var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*'); + var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$'); + var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim()); + defineProperties(StringPrototype, { + // http://blog.stevenlevithan.com/archives/faster-trim-javascript + // http://perfectionkills.com/whitespace-deviations/ + trim: function trim() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, ''); + } + }, hasTrimWhitespaceBug); + var trim = call.bind(String.prototype.trim); + + var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcã‚ã„'.lastIndexOf('ã‚ã„', 2) !== -1; + defineProperties(StringPrototype, { + lastIndexOf: function lastIndexOf(searchString) { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var S = $String(this); + var searchStr = $String(searchString); + var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN; + var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos); + var start = min(max(pos, 0), S.length); + var searchLen = searchStr.length; + var k = start + searchLen; + while (k > 0) { + k = max(0, k - searchLen); + var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr); + if (index !== -1) { + return k + index; + } + } + return -1; + } + }, hasLastIndexBug); + + var originalLastIndexOf = StringPrototype.lastIndexOf; + defineProperties(StringPrototype, { + lastIndexOf: function lastIndexOf(searchString) { + return originalLastIndexOf.apply(this, arguments); + } + }, StringPrototype.lastIndexOf.length !== 1); + + // ES-5 15.1.2.2 + /* eslint-disable radix */ + if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) { + /* eslint-enable radix */ + /* global parseInt: true */ + parseInt = (function (origParseInt) { + var hexRegex = /^[\-+]?0[xX]/; + return function parseInt(str, radix) { + var string = trim(String(str)); + var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10); + return origParseInt(string, defaultedRadix); + }; + }(parseInt)); + } + + // https://es5.github.io/#x15.1.2.3 + if (1 / parseFloat('-0') !== -Infinity) { + /* global parseFloat: true */ + parseFloat = (function (origParseFloat) { + return function parseFloat(string) { + var inputString = trim(String(string)); + var result = origParseFloat(inputString); + return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result; + }; + }(parseFloat)); + } + + if (String(new RangeError('test')) !== 'RangeError: test') { + var errorToStringShim = function toString() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var name = this.name; + if (typeof name === 'undefined') { + name = 'Error'; + } else if (typeof name !== 'string') { + name = $String(name); + } + var msg = this.message; + if (typeof msg === 'undefined') { + msg = ''; + } else if (typeof msg !== 'string') { + msg = $String(msg); + } + if (!name) { + return msg; + } + if (!msg) { + return name; + } + return name + ': ' + msg; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + Error.prototype.toString = errorToStringShim; + } + + if (supportsDescriptors) { + var ensureNonEnumerable = function (obj, prop) { + if (isEnum(obj, prop)) { + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (desc.configurable) { + desc.enumerable = false; + Object.defineProperty(obj, prop, desc); + } + } + }; + ensureNonEnumerable(Error.prototype, 'message'); + if (Error.prototype.message !== '') { + Error.prototype.message = ''; + } + ensureNonEnumerable(Error.prototype, 'name'); + } + + if (String(/a/mig) !== '/a/gim') { + var regexToString = function toString() { + var str = '/' + this.source + '/'; + if (this.global) { + str += 'g'; + } + if (this.ignoreCase) { + str += 'i'; + } + if (this.multiline) { + str += 'm'; + } + return str; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + RegExp.prototype.toString = regexToString; + } +})); diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lib/handlebars-4.0.5.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/handlebars-4.0.5.js new file mode 100644 index 0000000..182c1be --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lib/handlebars-4.0.5.js @@ -0,0 +1,4608 @@ +/*! + + handlebars v4.0.5 + +Copyright (C) 2011-2015 by Yehuda Katz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +@license +*/ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["Handlebars"] = factory(); + else + root["Handlebars"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _handlebarsRuntime = __webpack_require__(2); + + var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); + + // Compiler imports + + var _handlebarsCompilerAst = __webpack_require__(21); + + var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); + + var _handlebarsCompilerBase = __webpack_require__(22); + + var _handlebarsCompilerCompiler = __webpack_require__(27); + + var _handlebarsCompilerJavascriptCompiler = __webpack_require__(28); + + var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); + + var _handlebarsCompilerVisitor = __webpack_require__(25); + + var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); + + var _handlebarsNoConflict = __webpack_require__(20); + + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + + var _create = _handlebarsRuntime2['default'].create; + function create() { + var hb = _create(); + + hb.compile = function (input, options) { + return _handlebarsCompilerCompiler.compile(input, options, hb); + }; + hb.precompile = function (input, options) { + return _handlebarsCompilerCompiler.precompile(input, options, hb); + }; + + hb.AST = _handlebarsCompilerAst2['default']; + hb.Compiler = _handlebarsCompilerCompiler.Compiler; + hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default']; + hb.Parser = _handlebarsCompilerBase.parser; + hb.parse = _handlebarsCompilerBase.parse; + + return hb; + } + + var inst = create(); + inst.create = create; + + _handlebarsNoConflict2['default'](inst); + + inst.Visitor = _handlebarsCompilerVisitor2['default']; + + inst['default'] = inst; + + exports['default'] = inst; + module.exports = exports['default']; + +/***/ }, +/* 1 */ +/***/ function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + }; + + exports.__esModule = true; + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(3)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _handlebarsBase = __webpack_require__(4); + + var base = _interopRequireWildcard(_handlebarsBase); + + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) + + var _handlebarsSafeString = __webpack_require__(18); + + var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + + var _handlebarsException = __webpack_require__(6); + + var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + + var _handlebarsUtils = __webpack_require__(5); + + var Utils = _interopRequireWildcard(_handlebarsUtils); + + var _handlebarsRuntime = __webpack_require__(19); + + var runtime = _interopRequireWildcard(_handlebarsRuntime); + + var _handlebarsNoConflict = __webpack_require__(20); + + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + function create() { + var hb = new base.HandlebarsEnvironment(); + + Utils.extend(hb, base); + hb.SafeString = _handlebarsSafeString2['default']; + hb.Exception = _handlebarsException2['default']; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + + hb.VM = runtime; + hb.template = function (spec) { + return runtime.template(spec, hb); + }; + + return hb; + } + + var inst = create(); + inst.create = create; + + _handlebarsNoConflict2['default'](inst); + + inst['default'] = inst; + + exports['default'] = inst; + module.exports = exports['default']; + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj["default"] = obj; + return newObj; + } + }; + + exports.__esModule = true; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.HandlebarsEnvironment = HandlebarsEnvironment; + + var _utils = __webpack_require__(5); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _helpers = __webpack_require__(7); + + var _decorators = __webpack_require__(15); + + var _logger = __webpack_require__(17); + + var _logger2 = _interopRequireDefault(_logger); + + var VERSION = '4.0.5'; + exports.VERSION = VERSION; + var COMPILER_REVISION = 7; + + exports.COMPILER_REVISION = COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0' + }; + + exports.REVISION_CHANGES = REVISION_CHANGES; + var objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + } + }; + + var log = _logger2['default'].log; + + exports.log = log; + exports.createFrame = _utils.createFrame; + exports.logger = _logger2['default']; + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports.extend = extend; + exports.indexOf = indexOf; + exports.escapeExpression = escapeExpression; + exports.isEmpty = isEmpty; + exports.createFrame = createFrame; + exports.blockParams = blockParams; + exports.appendContextPath = appendContextPath; + var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' + }; + + var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + + function escapeChar(chr) { + return escape[chr]; + } + + function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; + } + + var toString = Object.prototype.toString; + + exports.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + /* eslint-disable func-style */ + var isFunction = function isFunction(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; + } + exports.isFunction = isFunction; + + /* eslint-enable func-style */ + + /* istanbul ignore next */ + var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; + }; + + exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. + + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + + function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + + function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; + } + + function blockParams(params, ids) { + params.path = ids; + return params; + } + + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; + } + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + + function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + column = undefined; + if (loc) { + line = loc.start.line; + column = loc.start.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + if (loc) { + this.lineNumber = line; + this.column = column; + } + } + + Exception.prototype = new Error(); + + exports['default'] = Exception; + module.exports = exports['default']; + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.registerDefaultHelpers = registerDefaultHelpers; + + var _helpersBlockHelperMissing = __webpack_require__(8); + + var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + + var _helpersEach = __webpack_require__(9); + + var _helpersEach2 = _interopRequireDefault(_helpersEach); + + var _helpersHelperMissing = __webpack_require__(10); + + var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + + var _helpersIf = __webpack_require__(11); + + var _helpersIf2 = _interopRequireDefault(_helpersIf); + + var _helpersLog = __webpack_require__(12); + + var _helpersLog2 = _interopRequireDefault(_helpersLog); + + var _helpersLookup = __webpack_require__(13); + + var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + + var _helpersWith = __webpack_require__(14); + + var _helpersWith2 = _interopRequireDefault(_helpersWith); + + function registerDefaultHelpers(instance) { + _helpersBlockHelperMissing2['default'](instance); + _helpersEach2['default'](instance); + _helpersHelperMissing2['default'](instance); + _helpersIf2['default'](instance); + _helpersLog2['default'](instance); + _helpersLookup2['default'](instance); + _helpersWith2['default'](instance); + } + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + exports['default'] = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _exception2['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else { + var priorKey = undefined; + + for (var key in context) { + if (context.hasOwnProperty(key)) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + } + } + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + exports['default'] = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 13 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('lookup', function (obj, field) { + return obj && obj[field]; + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + exports['default'] = function (instance) { + instance.registerHelper('with', function (context, options) { + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 15 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.registerDefaultDecorators = registerDefaultDecorators; + + var _decoratorsInline = __webpack_require__(16); + + var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + + function registerDefaultDecorators(instance) { + _decoratorsInline2['default'](instance); + } + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + exports['default'] = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + if (!console[method]) { + // eslint-disable-line no-console + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } + }; + + exports['default'] = logger; + module.exports = exports['default']; + +/***/ }, +/* 18 */ +/***/ function(module, exports) { + + // Build out our basic SafeString type + 'use strict'; + + exports.__esModule = true; + function SafeString(string) { + this.string = string; + } + + SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; + }; + + exports['default'] = SafeString; + module.exports = exports['default']; + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(3)['default']; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.checkRevision = checkRevision; + exports.template = template; + exports.wrapProgram = wrapProgram; + exports.resolvePartial = resolvePartial; + exports.invokePartial = invokePartial; + exports.noop = noop; + + var _utils = __webpack_require__(5); + + var Utils = _interopRequireWildcard(_utils); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _base = __webpack_require__(4); + + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } + } + + function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _exception2['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = Utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + + partial = env.VM.resolvePartial.call(this, partial, context, options); + var result = env.VM.invokePartial.call(this, partial, context, options); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, options); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name) { + if (!(name in obj)) { + throw new _exception2['default']('"' + name + '" not defined in ' + obj); + } + return obj[name]; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + merge: function merge(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = Utils.extend({}, common, param); + } + + return obj; + }, + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = container.merge(options.decorators, env.decorators); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _exception2['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _exception2['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context !== depths[0]) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + + function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; + } + + function invokePartial(partial, context, options) { + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + options.data = _base.createFrame(options.data); + partialBlock = options.data['partial-block'] = options.fn; + + if (partialBlock.partials) { + options.partials = Utils.extend({}, options.partials, partialBlock.partials); + } + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _exception2['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } + } + + function noop() { + return ''; + } + + function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; + } + +/***/ }, +/* 20 */ +/***/ function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/* global window */ + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (Handlebars) { + /* istanbul ignore next */ + var root = typeof global !== 'undefined' ? global : window, + $Handlebars = root.Handlebars; + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (root.Handlebars === Handlebars) { + root.Handlebars = $Handlebars; + } + return Handlebars; + }; + }; + + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 21 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + var AST = { + // Public API used to evaluate derived attributes regarding AST nodes + helpers: { + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + helperExpression: function helperExpression(node) { + return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); + }, + + scopedId: function scopedId(path) { + return (/^\.|this\b/.test(path.original) + ); + }, + + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + simpleId: function simpleId(path) { + return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; + } + } + }; + + // Must be exported as an object rather than the root of the module as the jison lexer + // must modify the object to operate properly. + exports['default'] = AST; + module.exports = exports['default']; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + var _interopRequireWildcard = __webpack_require__(3)['default']; + + exports.__esModule = true; + exports.parse = parse; + + var _parser = __webpack_require__(23); + + var _parser2 = _interopRequireDefault(_parser); + + var _whitespaceControl = __webpack_require__(24); + + var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); + + var _helpers = __webpack_require__(26); + + var Helpers = _interopRequireWildcard(_helpers); + + var _utils = __webpack_require__(5); + + exports.parser = _parser2['default']; + + var yy = {}; + _utils.extend(yy, Helpers); + + function parse(input, options) { + // Just return if an already-compiled AST was passed in. + if (input.type === 'Program') { + return input; + } + + _parser2['default'].yy = yy; + + // Altering the shared object here, but this is ok as parser is a sync operation + yy.locInfo = function (locInfo) { + return new yy.SourceLocation(options && options.srcName, locInfo); + }; + + var strip = new _whitespaceControl2['default'](options); + return strip.accept(_parser2['default'].parse(input)); + } + +/***/ }, +/* 23 */ +/***/ function(module, exports) { + + /* istanbul ignore next */ + /* Jison generated parser */ + "use strict"; + + var handlebars = (function () { + var parser = { trace: function trace() {}, + yy: {}, + symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, + productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$ + /**/) { + + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + break; + case 2: + this.$ = yy.prepareProgram($$[$0]); + break; + case 3: + this.$ = $$[$0]; + break; + case 4: + this.$ = $$[$0]; + break; + case 5: + this.$ = $$[$0]; + break; + case 6: + this.$ = $$[$0]; + break; + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = $$[$0]; + break; + case 9: + this.$ = { + type: 'CommentStatement', + value: yy.stripComment($$[$0]), + strip: yy.stripFlags($$[$0], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 10: + this.$ = { + type: 'ContentStatement', + original: $$[$0], + value: $$[$0], + loc: yy.locInfo(this._$) + }; + + break; + case 11: + this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 12: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; + break; + case 13: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); + break; + case 14: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); + break; + case 15: + this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 16: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 17: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 18: + this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; + break; + case 19: + var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), + program = yy.prepareProgram([inverse], $$[$0 - 1].loc); + program.chained = true; + + this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; + + break; + case 20: + this.$ = $$[$0]; + break; + case 21: + this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; + break; + case 22: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 23: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 24: + this.$ = { + type: 'PartialStatement', + name: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + indent: '', + strip: yy.stripFlags($$[$0 - 4], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 25: + this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 26: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; + break; + case 27: + this.$ = $$[$0]; + break; + case 28: + this.$ = $$[$0]; + break; + case 29: + this.$ = { + type: 'SubExpression', + path: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + loc: yy.locInfo(this._$) + }; + + break; + case 30: + this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 31: + this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 32: + this.$ = yy.id($$[$0 - 1]); + break; + case 33: + this.$ = $$[$0]; + break; + case 34: + this.$ = $$[$0]; + break; + case 35: + this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 36: + this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; + break; + case 37: + this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; + break; + case 38: + this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; + break; + case 39: + this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; + break; + case 40: + this.$ = $$[$0]; + break; + case 41: + this.$ = $$[$0]; + break; + case 42: + this.$ = yy.preparePath(true, $$[$0], this._$); + break; + case 43: + this.$ = yy.preparePath(false, $$[$0], this._$); + break; + case 44: + $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; + break; + case 45: + this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; + break; + case 46: + this.$ = []; + break; + case 47: + $$[$0 - 1].push($$[$0]); + break; + case 48: + this.$ = [$$[$0]]; + break; + case 49: + $$[$0 - 1].push($$[$0]); + break; + case 50: + this.$ = []; + break; + case 51: + $$[$0 - 1].push($$[$0]); + break; + case 58: + this.$ = []; + break; + case 59: + $$[$0 - 1].push($$[$0]); + break; + case 64: + this.$ = []; + break; + case 65: + $$[$0 - 1].push($$[$0]); + break; + case 70: + this.$ = []; + break; + case 71: + $$[$0 - 1].push($$[$0]); + break; + case 78: + this.$ = []; + break; + case 79: + $$[$0 - 1].push($$[$0]); + break; + case 82: + this.$ = []; + break; + case 83: + $$[$0 - 1].push($$[$0]); + break; + case 86: + this.$ = []; + break; + case 87: + $$[$0 - 1].push($$[$0]); + break; + case 90: + this.$ = []; + break; + case 91: + $$[$0 - 1].push($$[$0]); + break; + case 94: + this.$ = []; + break; + case 95: + $$[$0 - 1].push($$[$0]); + break; + case 98: + this.$ = [$$[$0]]; + break; + case 99: + $$[$0 - 1].push($$[$0]); + break; + case 100: + this.$ = [$$[$0]]; + break; + case 101: + $$[$0 - 1].push($$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], + defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] }, + parseError: function parseError(str, hash) { + throw new Error(str); + }, + parse: function parse(input) { + var self = this, + stack = [0], + vstack = [null], + lstack = [], + table = this.table, + yytext = "", + yylineno = 0, + yyleng = 0, + recovering = 0, + TERROR = 2, + EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, + preErrorSymbol, + state, + action, + a, + r, + yyval = {}, + p, + len, + newState, + expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + /* Jison generated lexer */ + var lexer = (function () { + var lexer = { EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + setInput: function setInput(input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; + if (this.options.ranges) this.yylloc.range = [0, 0]; + this.offset = 0; + return this; + }, + input: function input() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, + unput: function unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + + if (lines.length - 1) this.yylineno -= lines.length - 1; + var r = this.yylloc.range; + + this.yylloc = { first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, + more: function more() { + this._more = true; + return this; + }, + less: function less(n) { + this.unput(this.match.slice(n)); + }, + pastInput: function pastInput() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); + }, + upcomingInput: function upcomingInput() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, + showPosition: function showPosition() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + next: function next() { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, match, tempMatch, index, col, lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = { first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) this.done = false; + if (token) return token;else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); + } + }, + lex: function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + popState: function popState() { + return this.conditionStack.pop(); + }, + _currentRules: function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + }, + topState: function topState() { + return this.conditionStack[this.conditionStack.length - 2]; + }, + pushState: function begin(condition) { + this.begin(condition); + } }; + lexer.options = {}; + lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START + /**/) { + + function strip(start, end) { + return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end); + } + + var YYSTATE = YY_START; + switch ($avoiding_name_collisions) { + case 0: + if (yy_.yytext.slice(-2) === "\\\\") { + strip(0, 1); + this.begin("mu"); + } else if (yy_.yytext.slice(-1) === "\\") { + strip(0, 1); + this.begin("emu"); + } else { + this.begin("mu"); + } + if (yy_.yytext) return 15; + + break; + case 1: + return 15; + break; + case 2: + this.popState(); + return 15; + + break; + case 3: + this.begin('raw');return 15; + break; + case 4: + this.popState(); + // Should be using `this.topState()` below, but it currently + // returns the second top instead of the first top. Opened an + // issue about it at https://github.com/zaach/jison/issues/291 + if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { + return 15; + } else { + yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9); + return 'END_RAW_BLOCK'; + } + + break; + case 5: + return 15; + break; + case 6: + this.popState(); + return 14; + + break; + case 7: + return 65; + break; + case 8: + return 68; + break; + case 9: + return 19; + break; + case 10: + this.popState(); + this.begin('raw'); + return 23; + + break; + case 11: + return 55; + break; + case 12: + return 60; + break; + case 13: + return 29; + break; + case 14: + return 47; + break; + case 15: + this.popState();return 44; + break; + case 16: + this.popState();return 44; + break; + case 17: + return 34; + break; + case 18: + return 39; + break; + case 19: + return 51; + break; + case 20: + return 48; + break; + case 21: + this.unput(yy_.yytext); + this.popState(); + this.begin('com'); + + break; + case 22: + this.popState(); + return 14; + + break; + case 23: + return 48; + break; + case 24: + return 73; + break; + case 25: + return 72; + break; + case 26: + return 72; + break; + case 27: + return 87; + break; + case 28: + // ignore whitespace + break; + case 29: + this.popState();return 54; + break; + case 30: + this.popState();return 33; + break; + case 31: + yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; + break; + case 32: + yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; + break; + case 33: + return 85; + break; + case 34: + return 82; + break; + case 35: + return 82; + break; + case 36: + return 83; + break; + case 37: + return 84; + break; + case 38: + return 81; + break; + case 39: + return 75; + break; + case 40: + return 77; + break; + case 41: + return 72; + break; + case 42: + yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; + break; + case 43: + return 'INVALID'; + break; + case 44: + return 5; + break; + } + }; + lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; + lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; + return lexer; + })(); + parser.lexer = lexer; + function Parser() { + this.yy = {}; + }Parser.prototype = parser;parser.Parser = Parser; + return new Parser(); + })();exports.__esModule = true; + exports['default'] = handlebars; + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _visitor = __webpack_require__(25); + + var _visitor2 = _interopRequireDefault(_visitor); + + function WhitespaceControl() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + this.options = options; + } + WhitespaceControl.prototype = new _visitor2['default'](); + + WhitespaceControl.prototype.Program = function (program) { + var doStandalone = !this.options.ignoreStandalone; + + var isRoot = !this.isRootSeen; + this.isRootSeen = true; + + var body = program.body; + for (var i = 0, l = body.length; i < l; i++) { + var current = body[i], + strip = this.accept(current); + + if (!strip) { + continue; + } + + var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), + _isNextWhitespace = isNextWhitespace(body, i, isRoot), + openStandalone = strip.openStandalone && _isPrevWhitespace, + closeStandalone = strip.closeStandalone && _isNextWhitespace, + inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + + if (strip.close) { + omitRight(body, i, true); + } + if (strip.open) { + omitLeft(body, i, true); + } + + if (doStandalone && inlineStandalone) { + omitRight(body, i); + + if (omitLeft(body, i)) { + // If we are on a standalone node, save the indent info for partials + if (current.type === 'PartialStatement') { + // Pull out the whitespace from the final line + current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; + } + } + } + if (doStandalone && openStandalone) { + omitRight((current.program || current.inverse).body); + + // Strip out the previous content node if it's whitespace only + omitLeft(body, i); + } + if (doStandalone && closeStandalone) { + // Always strip the next node + omitRight(body, i); + + omitLeft((current.inverse || current.program).body); + } + } + + return program; + }; + + WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { + this.accept(block.program); + this.accept(block.inverse); + + // Find the inverse program that is involed with whitespace stripping. + var program = block.program || block.inverse, + inverse = block.program && block.inverse, + firstInverse = inverse, + lastInverse = inverse; + + if (inverse && inverse.chained) { + firstInverse = inverse.body[0].program; + + // Walk the inverse chain to find the last inverse that is actually in the chain. + while (lastInverse.chained) { + lastInverse = lastInverse.body[lastInverse.body.length - 1].program; + } + } + + var strip = { + open: block.openStrip.open, + close: block.closeStrip.close, + + // Determine the standalone candiacy. Basically flag our content as being possibly standalone + // so our parent can determine if we actually are standalone + openStandalone: isNextWhitespace(program.body), + closeStandalone: isPrevWhitespace((firstInverse || program).body) + }; + + if (block.openStrip.close) { + omitRight(program.body, null, true); + } + + if (inverse) { + var inverseStrip = block.inverseStrip; + + if (inverseStrip.open) { + omitLeft(program.body, null, true); + } + + if (inverseStrip.close) { + omitRight(firstInverse.body, null, true); + } + if (block.closeStrip.open) { + omitLeft(lastInverse.body, null, true); + } + + // Find standalone else statments + if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { + omitLeft(program.body); + omitRight(firstInverse.body); + } + } else if (block.closeStrip.open) { + omitLeft(program.body, null, true); + } + + return strip; + }; + + WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { + return mustache.strip; + }; + + WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { + /* istanbul ignore next */ + var strip = node.strip || {}; + return { + inlineStandalone: true, + open: strip.open, + close: strip.close + }; + }; + + function isPrevWhitespace(body, i, isRoot) { + if (i === undefined) { + i = body.length; + } + + // Nodes that end with newlines are considered whitespace (but are special + // cased for strip operations) + var prev = body[i - 1], + sibling = body[i - 2]; + if (!prev) { + return isRoot; + } + + if (prev.type === 'ContentStatement') { + return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); + } + } + function isNextWhitespace(body, i, isRoot) { + if (i === undefined) { + i = -1; + } + + var next = body[i + 1], + sibling = body[i + 2]; + if (!next) { + return isRoot; + } + + if (next.type === 'ContentStatement') { + return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); + } + } + + // Marks the node to the right of the position as omitted. + // I.e. {{foo}}' ' will mark the ' ' node as omitted. + // + // If i is undefined, then the first child will be marked as such. + // + // If mulitple is truthy then all whitespace will be stripped out until non-whitespace + // content is met. + function omitRight(body, i, multiple) { + var current = body[i == null ? 0 : i + 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { + return; + } + + var original = current.value; + current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); + current.rightStripped = current.value !== original; + } + + // Marks the node to the left of the position as omitted. + // I.e. ' '{{foo}} will mark the ' ' node as omitted. + // + // If i is undefined then the last child will be marked as such. + // + // If mulitple is truthy then all whitespace will be stripped out until non-whitespace + // content is met. + function omitLeft(body, i, multiple) { + var current = body[i == null ? body.length - 1 : i - 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { + return; + } + + // We omit the last node if it's whitespace only and not preceeded by a non-content node. + var original = current.value; + current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); + current.leftStripped = current.value !== original; + return current.leftStripped; + } + + exports['default'] = WhitespaceControl; + module.exports = exports['default']; + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + function Visitor() { + this.parents = []; + } + + Visitor.prototype = { + constructor: Visitor, + mutating: false, + + // Visits a given value. If mutating, will replace the value if necessary. + acceptKey: function acceptKey(node, name) { + var value = this.accept(node[name]); + if (this.mutating) { + // Hacky sanity check: This may have a few false positives for type for the helper + // methods but will generally do the right thing without a lot of overhead. + if (value && !Visitor.prototype[value.type]) { + throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); + } + node[name] = value; + } + }, + + // Performs an accept operation with added sanity check to ensure + // required keys are not removed. + acceptRequired: function acceptRequired(node, name) { + this.acceptKey(node, name); + + if (!node[name]) { + throw new _exception2['default'](node.type + ' requires ' + name); + } + }, + + // Traverses a given array. If mutating, empty respnses will be removed + // for child elements. + acceptArray: function acceptArray(array) { + for (var i = 0, l = array.length; i < l; i++) { + this.acceptKey(array, i); + + if (!array[i]) { + array.splice(i, 1); + i--; + l--; + } + } + }, + + accept: function accept(object) { + if (!object) { + return; + } + + /* istanbul ignore next: Sanity code */ + if (!this[object.type]) { + throw new _exception2['default']('Unknown type: ' + object.type, object); + } + + if (this.current) { + this.parents.unshift(this.current); + } + this.current = object; + + var ret = this[object.type](object); + + this.current = this.parents.shift(); + + if (!this.mutating || ret) { + return ret; + } else if (ret !== false) { + return object; + } + }, + + Program: function Program(program) { + this.acceptArray(program.body); + }, + + MustacheStatement: visitSubExpression, + Decorator: visitSubExpression, + + BlockStatement: visitBlock, + DecoratorBlock: visitBlock, + + PartialStatement: visitPartial, + PartialBlockStatement: function PartialBlockStatement(partial) { + visitPartial.call(this, partial); + + this.acceptKey(partial, 'program'); + }, + + ContentStatement: function ContentStatement() /* content */{}, + CommentStatement: function CommentStatement() /* comment */{}, + + SubExpression: visitSubExpression, + + PathExpression: function PathExpression() /* path */{}, + + StringLiteral: function StringLiteral() /* string */{}, + NumberLiteral: function NumberLiteral() /* number */{}, + BooleanLiteral: function BooleanLiteral() /* bool */{}, + UndefinedLiteral: function UndefinedLiteral() /* literal */{}, + NullLiteral: function NullLiteral() /* literal */{}, + + Hash: function Hash(hash) { + this.acceptArray(hash.pairs); + }, + HashPair: function HashPair(pair) { + this.acceptRequired(pair, 'value'); + } + }; + + function visitSubExpression(mustache) { + this.acceptRequired(mustache, 'path'); + this.acceptArray(mustache.params); + this.acceptKey(mustache, 'hash'); + } + function visitBlock(block) { + visitSubExpression.call(this, block); + + this.acceptKey(block, 'program'); + this.acceptKey(block, 'inverse'); + } + function visitPartial(partial) { + this.acceptRequired(partial, 'name'); + this.acceptArray(partial.params); + this.acceptKey(partial, 'hash'); + } + + exports['default'] = Visitor; + module.exports = exports['default']; + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.SourceLocation = SourceLocation; + exports.id = id; + exports.stripFlags = stripFlags; + exports.stripComment = stripComment; + exports.preparePath = preparePath; + exports.prepareMustache = prepareMustache; + exports.prepareRawBlock = prepareRawBlock; + exports.prepareBlock = prepareBlock; + exports.prepareProgram = prepareProgram; + exports.preparePartialBlock = preparePartialBlock; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + function validateClose(open, close) { + close = close.path ? close.path.original : close; + + if (open.path.original !== close) { + var errorNode = { loc: open.path.loc }; + + throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode); + } + } + + function SourceLocation(source, locInfo) { + this.source = source; + this.start = { + line: locInfo.first_line, + column: locInfo.first_column + }; + this.end = { + line: locInfo.last_line, + column: locInfo.last_column + }; + } + + function id(token) { + if (/^\[.*\]$/.test(token)) { + return token.substr(1, token.length - 2); + } else { + return token; + } + } + + function stripFlags(open, close) { + return { + open: open.charAt(2) === '~', + close: close.charAt(close.length - 3) === '~' + }; + } + + function stripComment(comment) { + return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, ''); + } + + function preparePath(data, parts, loc) { + loc = this.locInfo(loc); + + var original = data ? '@' : '', + dig = [], + depth = 0, + depthString = ''; + + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i].part, + + // If we have [] syntax then we do not treat path references as operators, + // i.e. foo.[this] resolves to approximately context.foo['this'] + isLiteral = parts[i].original !== part; + original += (parts[i].separator || '') + part; + + if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { + if (dig.length > 0) { + throw new _exception2['default']('Invalid path: ' + original, { loc: loc }); + } else if (part === '..') { + depth++; + depthString += '../'; + } + } else { + dig.push(part); + } + } + + return { + type: 'PathExpression', + data: data, + depth: depth, + parts: dig, + original: original, + loc: loc + }; + } + + function prepareMustache(path, params, hash, open, strip, locInfo) { + // Must use charAt to support IE pre-10 + var escapeFlag = open.charAt(3) || open.charAt(2), + escaped = escapeFlag !== '{' && escapeFlag !== '&'; + + var decorator = /\*/.test(open); + return { + type: decorator ? 'Decorator' : 'MustacheStatement', + path: path, + params: params, + hash: hash, + escaped: escaped, + strip: strip, + loc: this.locInfo(locInfo) + }; + } + + function prepareRawBlock(openRawBlock, contents, close, locInfo) { + validateClose(openRawBlock, close); + + locInfo = this.locInfo(locInfo); + var program = { + type: 'Program', + body: contents, + strip: {}, + loc: locInfo + }; + + return { + type: 'BlockStatement', + path: openRawBlock.path, + params: openRawBlock.params, + hash: openRawBlock.hash, + program: program, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: locInfo + }; + } + + function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { + if (close && close.path) { + validateClose(openBlock, close); + } + + var decorator = /\*/.test(openBlock.open); + + program.blockParams = openBlock.blockParams; + + var inverse = undefined, + inverseStrip = undefined; + + if (inverseAndProgram) { + if (decorator) { + throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram); + } + + if (inverseAndProgram.chain) { + inverseAndProgram.program.body[0].closeStrip = close.strip; + } + + inverseStrip = inverseAndProgram.strip; + inverse = inverseAndProgram.program; + } + + if (inverted) { + inverted = inverse; + inverse = program; + program = inverted; + } + + return { + type: decorator ? 'DecoratorBlock' : 'BlockStatement', + path: openBlock.path, + params: openBlock.params, + hash: openBlock.hash, + program: program, + inverse: inverse, + openStrip: openBlock.strip, + inverseStrip: inverseStrip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + + function prepareProgram(statements, loc) { + if (!loc && statements.length) { + var firstLoc = statements[0].loc, + lastLoc = statements[statements.length - 1].loc; + + /* istanbul ignore else */ + if (firstLoc && lastLoc) { + loc = { + source: firstLoc.source, + start: { + line: firstLoc.start.line, + column: firstLoc.start.column + }, + end: { + line: lastLoc.end.line, + column: lastLoc.end.column + } + }; + } + } + + return { + type: 'Program', + body: statements, + strip: {}, + loc: loc + }; + } + + function preparePartialBlock(open, program, close, locInfo) { + validateClose(open, close); + + return { + type: 'PartialBlockStatement', + name: open.path, + params: open.params, + hash: open.hash, + program: program, + openStrip: open.strip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + /* eslint-disable new-cap */ + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + exports.Compiler = Compiler; + exports.precompile = precompile; + exports.compile = compile; + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _utils = __webpack_require__(5); + + var _ast = __webpack_require__(21); + + var _ast2 = _interopRequireDefault(_ast); + + var slice = [].slice; + + function Compiler() {} + + // the foundHelper register will disambiguate helper lookup from finding a + // function in a context. This is necessary for mustache compatibility, which + // requires that context functions in blocks are evaluated by blockHelperMissing, + // and then proceed as if the resulting value was provided to blockHelperMissing. + + Compiler.prototype = { + compiler: Compiler, + + equals: function equals(other) { + var len = this.opcodes.length; + if (other.opcodes.length !== len) { + return false; + } + + for (var i = 0; i < len; i++) { + var opcode = this.opcodes[i], + otherOpcode = other.opcodes[i]; + if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { + return false; + } + } + + // We know that length is the same between the two arrays because they are directly tied + // to the opcode behavior above. + len = this.children.length; + for (var i = 0; i < len; i++) { + if (!this.children[i].equals(other.children[i])) { + return false; + } + } + + return true; + }, + + guid: 0, + + compile: function compile(program, options) { + this.sourceNode = []; + this.opcodes = []; + this.children = []; + this.options = options; + this.stringParams = options.stringParams; + this.trackIds = options.trackIds; + + options.blockParams = options.blockParams || []; + + // These changes will propagate to the other compiler components + var knownHelpers = options.knownHelpers; + options.knownHelpers = { + 'helperMissing': true, + 'blockHelperMissing': true, + 'each': true, + 'if': true, + 'unless': true, + 'with': true, + 'log': true, + 'lookup': true + }; + if (knownHelpers) { + for (var _name in knownHelpers) { + /* istanbul ignore else */ + if (_name in knownHelpers) { + options.knownHelpers[_name] = knownHelpers[_name]; + } + } + } + + return this.accept(program); + }, + + compileProgram: function compileProgram(program) { + var childCompiler = new this.compiler(), + // eslint-disable-line new-cap + result = childCompiler.compile(program, this.options), + guid = this.guid++; + + this.usePartial = this.usePartial || result.usePartial; + + this.children[guid] = result; + this.useDepths = this.useDepths || result.useDepths; + + return guid; + }, + + accept: function accept(node) { + /* istanbul ignore next: Sanity code */ + if (!this[node.type]) { + throw new _exception2['default']('Unknown type: ' + node.type, node); + } + + this.sourceNode.unshift(node); + var ret = this[node.type](node); + this.sourceNode.shift(); + return ret; + }, + + Program: function Program(program) { + this.options.blockParams.unshift(program.blockParams); + + var body = program.body, + bodyLength = body.length; + for (var i = 0; i < bodyLength; i++) { + this.accept(body[i]); + } + + this.options.blockParams.shift(); + + this.isSimple = bodyLength === 1; + this.blockParams = program.blockParams ? program.blockParams.length : 0; + + return this; + }, + + BlockStatement: function BlockStatement(block) { + transformLiteralToPath(block); + + var program = block.program, + inverse = block.inverse; + + program = program && this.compileProgram(program); + inverse = inverse && this.compileProgram(inverse); + + var type = this.classifySexpr(block); + + if (type === 'helper') { + this.helperSexpr(block, program, inverse); + } else if (type === 'simple') { + this.simpleSexpr(block); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('blockValue', block.path.original); + } else { + this.ambiguousSexpr(block, program, inverse); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('ambiguousBlockValue'); + } + + this.opcode('append'); + }, + + DecoratorBlock: function DecoratorBlock(decorator) { + var program = decorator.program && this.compileProgram(decorator.program); + var params = this.setupFullMustacheParams(decorator, program, undefined), + path = decorator.path; + + this.useDecorators = true; + this.opcode('registerDecorator', params.length, path.original); + }, + + PartialStatement: function PartialStatement(partial) { + this.usePartial = true; + + var program = partial.program; + if (program) { + program = this.compileProgram(partial.program); + } + + var params = partial.params; + if (params.length > 1) { + throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); + } else if (!params.length) { + if (this.options.explicitPartialContext) { + this.opcode('pushLiteral', 'undefined'); + } else { + params.push({ type: 'PathExpression', parts: [], depth: 0 }); + } + } + + var partialName = partial.name.original, + isDynamic = partial.name.type === 'SubExpression'; + if (isDynamic) { + this.accept(partial.name); + } + + this.setupFullMustacheParams(partial, program, undefined, true); + + var indent = partial.indent || ''; + if (this.options.preventIndent && indent) { + this.opcode('appendContent', indent); + indent = ''; + } + + this.opcode('invokePartial', isDynamic, partialName, indent); + this.opcode('append'); + }, + PartialBlockStatement: function PartialBlockStatement(partialBlock) { + this.PartialStatement(partialBlock); + }, + + MustacheStatement: function MustacheStatement(mustache) { + this.SubExpression(mustache); + + if (mustache.escaped && !this.options.noEscape) { + this.opcode('appendEscaped'); + } else { + this.opcode('append'); + } + }, + Decorator: function Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + + ContentStatement: function ContentStatement(content) { + if (content.value) { + this.opcode('appendContent', content.value); + } + }, + + CommentStatement: function CommentStatement() {}, + + SubExpression: function SubExpression(sexpr) { + transformLiteralToPath(sexpr); + var type = this.classifySexpr(sexpr); + + if (type === 'simple') { + this.simpleSexpr(sexpr); + } else if (type === 'helper') { + this.helperSexpr(sexpr); + } else { + this.ambiguousSexpr(sexpr); + } + }, + ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { + var path = sexpr.path, + name = path.parts[0], + isBlock = program != null || inverse != null; + + this.opcode('getContext', path.depth); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + path.strict = true; + this.accept(path); + + this.opcode('invokeAmbiguous', name, isBlock); + }, + + simpleSexpr: function simpleSexpr(sexpr) { + var path = sexpr.path; + path.strict = true; + this.accept(path); + this.opcode('resolvePossibleLambda'); + }, + + helperSexpr: function helperSexpr(sexpr, program, inverse) { + var params = this.setupFullMustacheParams(sexpr, program, inverse), + path = sexpr.path, + name = path.parts[0]; + + if (this.options.knownHelpers[name]) { + this.opcode('invokeKnownHelper', params.length, name); + } else if (this.options.knownHelpersOnly) { + throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); + } else { + path.strict = true; + path.falsy = true; + + this.accept(path); + this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path)); + } + }, + + PathExpression: function PathExpression(path) { + this.addDepth(path.depth); + this.opcode('getContext', path.depth); + + var name = path.parts[0], + scoped = _ast2['default'].helpers.scopedId(path), + blockParamId = !path.depth && !scoped && this.blockParamIndex(name); + + if (blockParamId) { + this.opcode('lookupBlockParam', blockParamId, path.parts); + } else if (!name) { + // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` + this.opcode('pushContext'); + } else if (path.data) { + this.options.data = true; + this.opcode('lookupData', path.depth, path.parts, path.strict); + } else { + this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); + } + }, + + StringLiteral: function StringLiteral(string) { + this.opcode('pushString', string.value); + }, + + NumberLiteral: function NumberLiteral(number) { + this.opcode('pushLiteral', number.value); + }, + + BooleanLiteral: function BooleanLiteral(bool) { + this.opcode('pushLiteral', bool.value); + }, + + UndefinedLiteral: function UndefinedLiteral() { + this.opcode('pushLiteral', 'undefined'); + }, + + NullLiteral: function NullLiteral() { + this.opcode('pushLiteral', 'null'); + }, + + Hash: function Hash(hash) { + var pairs = hash.pairs, + i = 0, + l = pairs.length; + + this.opcode('pushHash'); + + for (; i < l; i++) { + this.pushParam(pairs[i].value); + } + while (i--) { + this.opcode('assignToHash', pairs[i].key); + } + this.opcode('popHash'); + }, + + // HELPERS + opcode: function opcode(name) { + this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc }); + }, + + addDepth: function addDepth(depth) { + if (!depth) { + return; + } + + this.useDepths = true; + }, + + classifySexpr: function classifySexpr(sexpr) { + var isSimple = _ast2['default'].helpers.simpleId(sexpr.path); + + var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); + + // a mustache is an eligible helper if: + // * its id is simple (a single part, not `this` or `..`) + var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr); + + // if a mustache is an eligible helper but not a definite + // helper, it is ambiguous, and will be resolved in a later + // pass or at runtime. + var isEligible = !isBlockParam && (isHelper || isSimple); + + // if ambiguous, we can possibly resolve the ambiguity now + // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. + if (isEligible && !isHelper) { + var _name2 = sexpr.path.parts[0], + options = this.options; + + if (options.knownHelpers[_name2]) { + isHelper = true; + } else if (options.knownHelpersOnly) { + isEligible = false; + } + } + + if (isHelper) { + return 'helper'; + } else if (isEligible) { + return 'ambiguous'; + } else { + return 'simple'; + } + }, + + pushParams: function pushParams(params) { + for (var i = 0, l = params.length; i < l; i++) { + this.pushParam(params[i]); + } + }, + + pushParam: function pushParam(val) { + var value = val.value != null ? val.value : val.original || ''; + + if (this.stringParams) { + if (value.replace) { + value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); + } + + if (val.depth) { + this.addDepth(val.depth); + } + this.opcode('getContext', val.depth || 0); + this.opcode('pushStringParam', value, val.type); + + if (val.type === 'SubExpression') { + // SubExpressions get evaluated and passed in + // in string params mode. + this.accept(val); + } + } else { + if (this.trackIds) { + var blockParamIndex = undefined; + if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) { + blockParamIndex = this.blockParamIndex(val.parts[0]); + } + if (blockParamIndex) { + var blockParamChild = val.parts.slice(1).join('.'); + this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); + } else { + value = val.original || value; + if (value.replace) { + value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); + } + + this.opcode('pushId', val.type, value); + } + } + this.accept(val); + } + }, + + setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { + var params = sexpr.params; + this.pushParams(params); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + if (sexpr.hash) { + this.accept(sexpr.hash); + } else { + this.opcode('emptyHash', omitEmpty); + } + + return params; + }, + + blockParamIndex: function blockParamIndex(name) { + for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { + var blockParams = this.options.blockParams[depth], + param = blockParams && _utils.indexOf(blockParams, name); + if (blockParams && param >= 0) { + return [depth, param]; + } + } + } + }; + + function precompile(input, options, env) { + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); + } + + options = options || {}; + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options); + return new env.JavaScriptCompiler().compile(environment, options); + } + + function compile(input, options, env) { + if (options === undefined) options = {}; + + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); + } + + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var compiled = undefined; + + function compileInput() { + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options), + templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); + return env.template(templateSpec); + } + + // Template is only compiled on first use and cached after that point. + function ret(context, execOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled.call(this, context, execOptions); + } + ret._setup = function (setupOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._setup(setupOptions); + }; + ret._child = function (i, data, blockParams, depths) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._child(i, data, blockParams, depths); + }; + return ret; + } + + function argEquals(a, b) { + if (a === b) { + return true; + } + + if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (!argEquals(a[i], b[i])) { + return false; + } + } + return true; + } + } + + function transformLiteralToPath(sexpr) { + if (!sexpr.path.parts) { + var literal = sexpr.path; + // Casting to string here to make false and 0 literal values play nicely with the rest + // of the system. + sexpr.path = { + type: 'PathExpression', + data: false, + depth: 0, + parts: [literal.original + ''], + original: literal.original + '', + loc: literal.loc + }; + } + } + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(1)['default']; + + exports.__esModule = true; + + var _base = __webpack_require__(4); + + var _exception = __webpack_require__(6); + + var _exception2 = _interopRequireDefault(_exception); + + var _utils = __webpack_require__(5); + + var _codeGen = __webpack_require__(29); + + var _codeGen2 = _interopRequireDefault(_codeGen); + + function Literal(value) { + this.value = value; + } + + function JavaScriptCompiler() {} + + JavaScriptCompiler.prototype = { + // PUBLIC API: You can override these methods in a subclass to provide + // alternative compiled forms for name lookup and buffering semantics + nameLookup: function nameLookup(parent, name /* , type*/) { + if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { + return [parent, '.', name]; + } else { + return [parent, '[', JSON.stringify(name), ']']; + } + }, + depthedLookup: function depthedLookup(name) { + return [this.aliasable('container.lookup'), '(depths, "', name, '")']; + }, + + compilerInfo: function compilerInfo() { + var revision = _base.COMPILER_REVISION, + versions = _base.REVISION_CHANGES[revision]; + return [revision, versions]; + }, + + appendToBuffer: function appendToBuffer(source, location, explicit) { + // Force a source as this simplifies the merge logic. + if (!_utils.isArray(source)) { + source = [source]; + } + source = this.source.wrap(source, location); + + if (this.environment.isSimple) { + return ['return ', source, ';']; + } else if (explicit) { + // This is a case where the buffer operation occurs as a child of another + // construct, generally braces. We have to explicitly output these buffer + // operations to ensure that the emitted code goes in the correct location. + return ['buffer += ', source, ';']; + } else { + source.appendToBuffer = true; + return source; + } + }, + + initializeBuffer: function initializeBuffer() { + return this.quotedString(''); + }, + // END PUBLIC API + + compile: function compile(environment, options, context, asObject) { + this.environment = environment; + this.options = options; + this.stringParams = this.options.stringParams; + this.trackIds = this.options.trackIds; + this.precompile = !asObject; + + this.name = this.environment.name; + this.isChild = !!context; + this.context = context || { + decorators: [], + programs: [], + environments: [] + }; + + this.preamble(); + + this.stackSlot = 0; + this.stackVars = []; + this.aliases = {}; + this.registers = { list: [] }; + this.hashes = []; + this.compileStack = []; + this.inlineStack = []; + this.blockParams = []; + + this.compileChildren(environment, options); + + this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; + this.useBlockParams = this.useBlockParams || environment.useBlockParams; + + var opcodes = environment.opcodes, + opcode = undefined, + firstLoc = undefined, + i = undefined, + l = undefined; + + for (i = 0, l = opcodes.length; i < l; i++) { + opcode = opcodes[i]; + + this.source.currentLocation = opcode.loc; + firstLoc = firstLoc || opcode.loc; + this[opcode.opcode].apply(this, opcode.args); + } + + // Flush any trailing content that might be pending. + this.source.currentLocation = firstLoc; + this.pushSource(''); + + /* istanbul ignore next */ + if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { + throw new _exception2['default']('Compile completed with content left on stack'); + } + + if (!this.decorators.isEmpty()) { + this.useDecorators = true; + + this.decorators.prepend('var decorators = container.decorators;\n'); + this.decorators.push('return fn;'); + + if (asObject) { + this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); + } else { + this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); + this.decorators.push('}\n'); + this.decorators = this.decorators.merge(); + } + } else { + this.decorators = undefined; + } + + var fn = this.createFunctionContext(asObject); + if (!this.isChild) { + var ret = { + compiler: this.compilerInfo(), + main: fn + }; + + if (this.decorators) { + ret.main_d = this.decorators; // eslint-disable-line camelcase + ret.useDecorators = true; + } + + var _context = this.context; + var programs = _context.programs; + var decorators = _context.decorators; + + for (i = 0, l = programs.length; i < l; i++) { + if (programs[i]) { + ret[i] = programs[i]; + if (decorators[i]) { + ret[i + '_d'] = decorators[i]; + ret.useDecorators = true; + } + } + } + + if (this.environment.usePartial) { + ret.usePartial = true; + } + if (this.options.data) { + ret.useData = true; + } + if (this.useDepths) { + ret.useDepths = true; + } + if (this.useBlockParams) { + ret.useBlockParams = true; + } + if (this.options.compat) { + ret.compat = true; + } + + if (!asObject) { + ret.compiler = JSON.stringify(ret.compiler); + + this.source.currentLocation = { start: { line: 1, column: 0 } }; + ret = this.objectLiteral(ret); + + if (options.srcName) { + ret = ret.toStringWithSourceMap({ file: options.destName }); + ret.map = ret.map && ret.map.toString(); + } else { + ret = ret.toString(); + } + } else { + ret.compilerOptions = this.options; + } + + return ret; + } else { + return fn; + } + }, + + preamble: function preamble() { + // track the last context pushed into place to allow skipping the + // getContext opcode when it would be a noop + this.lastContext = 0; + this.source = new _codeGen2['default'](this.options.srcName); + this.decorators = new _codeGen2['default'](this.options.srcName); + }, + + createFunctionContext: function createFunctionContext(asObject) { + var varDeclarations = ''; + + var locals = this.stackVars.concat(this.registers.list); + if (locals.length > 0) { + varDeclarations += ', ' + locals.join(', '); + } + + // Generate minimizer alias mappings + // + // When using true SourceNodes, this will update all references to the given alias + // as the source nodes are reused in situ. For the non-source node compilation mode, + // aliases will not be used, but this case is already being run on the client and + // we aren't concern about minimizing the template size. + var aliasCount = 0; + for (var alias in this.aliases) { + // eslint-disable-line guard-for-in + var node = this.aliases[alias]; + + if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) { + varDeclarations += ', alias' + ++aliasCount + '=' + alias; + node.children[0] = 'alias' + aliasCount; + } + } + + var params = ['container', 'depth0', 'helpers', 'partials', 'data']; + + if (this.useBlockParams || this.useDepths) { + params.push('blockParams'); + } + if (this.useDepths) { + params.push('depths'); + } + + // Perform a second pass over the output to merge content when possible + var source = this.mergeSource(varDeclarations); + + if (asObject) { + params.push(source); + + return Function.apply(this, params); + } else { + return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); + } + }, + mergeSource: function mergeSource(varDeclarations) { + var isSimple = this.environment.isSimple, + appendOnly = !this.forceBuffer, + appendFirst = undefined, + sourceSeen = undefined, + bufferStart = undefined, + bufferEnd = undefined; + this.source.each(function (line) { + if (line.appendToBuffer) { + if (bufferStart) { + line.prepend(' + '); + } else { + bufferStart = line; + } + bufferEnd = line; + } else { + if (bufferStart) { + if (!sourceSeen) { + appendFirst = true; + } else { + bufferStart.prepend('buffer += '); + } + bufferEnd.add(';'); + bufferStart = bufferEnd = undefined; + } + + sourceSeen = true; + if (!isSimple) { + appendOnly = false; + } + } + }); + + if (appendOnly) { + if (bufferStart) { + bufferStart.prepend('return '); + bufferEnd.add(';'); + } else if (!sourceSeen) { + this.source.push('return "";'); + } + } else { + varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); + + if (bufferStart) { + bufferStart.prepend('return buffer + '); + bufferEnd.add(';'); + } else { + this.source.push('return buffer;'); + } + } + + if (varDeclarations) { + this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); + } + + return this.source.merge(); + }, + + // [blockValue] + // + // On stack, before: hash, inverse, program, value + // On stack, after: return value of blockHelperMissing + // + // The purpose of this opcode is to take a block of the form + // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and + // replace it on the stack with the result of properly + // invoking blockHelperMissing. + blockValue: function blockValue(name) { + var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs(name, 0, params); + + var blockName = this.popStack(); + params.splice(1, 0, blockName); + + this.push(this.source.functionCall(blockHelperMissing, 'call', params)); + }, + + // [ambiguousBlockValue] + // + // On stack, before: hash, inverse, program, value + // Compiler value, before: lastHelper=value of last found helper, if any + // On stack, after, if no lastHelper: same as [blockValue] + // On stack, after, if lastHelper: value + ambiguousBlockValue: function ambiguousBlockValue() { + // We're being a bit cheeky and reusing the options value from the prior exec + var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs('', 0, params, true); + + this.flushInline(); + + var current = this.topStack(); + params.splice(1, 0, current); + + this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); + }, + + // [appendContent] + // + // On stack, before: ... + // On stack, after: ... + // + // Appends the string value of `content` to the current buffer + appendContent: function appendContent(content) { + if (this.pendingContent) { + content = this.pendingContent + content; + } else { + this.pendingLocation = this.source.currentLocation; + } + + this.pendingContent = content; + }, + + // [append] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Coerces `value` to a String and appends it to the current buffer. + // + // If `value` is truthy, or 0, it is coerced into a string and appended + // Otherwise, the empty string is appended + append: function append() { + if (this.isInline()) { + this.replaceStack(function (current) { + return [' != null ? ', current, ' : ""']; + }); + + this.pushSource(this.appendToBuffer(this.popStack())); + } else { + var local = this.popStack(); + this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); + if (this.environment.isSimple) { + this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); + } + } + }, + + // [appendEscaped] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Escape `value` and append it to the buffer + appendEscaped: function appendEscaped() { + this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); + }, + + // [getContext] + // + // On stack, before: ... + // On stack, after: ... + // Compiler value, after: lastContext=depth + // + // Set the value of the `lastContext` compiler value to the depth + getContext: function getContext(depth) { + this.lastContext = depth; + }, + + // [pushContext] + // + // On stack, before: ... + // On stack, after: currentContext, ... + // + // Pushes the value of the current context onto the stack. + pushContext: function pushContext() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, + + // [lookupOnContext] + // + // On stack, before: ... + // On stack, after: currentContext[name], ... + // + // Looks up the value of `name` on the current context and pushes + // it onto the stack. + lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { + var i = 0; + + if (!scoped && this.options.compat && !this.lastContext) { + // The depthed query is expected to handle the undefined logic for the root level that + // is implemented below, so we evaluate that directly in compat mode + this.push(this.depthedLookup(parts[i++])); + } else { + this.pushContext(); + } + + this.resolvePath('context', parts, i, falsy, strict); + }, + + // [lookupBlockParam] + // + // On stack, before: ... + // On stack, after: blockParam[name], ... + // + // Looks up the value of `parts` on the given block param and pushes + // it onto the stack. + lookupBlockParam: function lookupBlockParam(blockParamId, parts) { + this.useBlockParams = true; + + this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); + this.resolvePath('context', parts, 1); + }, + + // [lookupData] + // + // On stack, before: ... + // On stack, after: data, ... + // + // Push the data lookup operator + lookupData: function lookupData(depth, parts, strict) { + if (!depth) { + this.pushStackLiteral('data'); + } else { + this.pushStackLiteral('container.data(data, ' + depth + ')'); + } + + this.resolvePath('data', parts, 0, true, strict); + }, + + resolvePath: function resolvePath(type, parts, i, falsy, strict) { + // istanbul ignore next + + var _this = this; + + if (this.options.strict || this.options.assumeObjects) { + this.push(strictLookup(this.options.strict && strict, this, parts, type)); + return; + } + + var len = parts.length; + for (; i < len; i++) { + /* eslint-disable no-loop-func */ + this.replaceStack(function (current) { + var lookup = _this.nameLookup(current, parts[i], type); + // We want to ensure that zero and false are handled properly if the context (falsy flag) + // needs to have the special handling for these values. + if (!falsy) { + return [' != null ? ', lookup, ' : ', current]; + } else { + // Otherwise we can use generic falsy handling + return [' && ', lookup]; + } + }); + /* eslint-enable no-loop-func */ + } + }, + + // [resolvePossibleLambda] + // + // On stack, before: value, ... + // On stack, after: resolved value, ... + // + // If the `value` is a lambda, replace it on the stack by + // the return value of the lambda + resolvePossibleLambda: function resolvePossibleLambda() { + this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); + }, + + // [pushStringParam] + // + // On stack, before: ... + // On stack, after: string, currentContext, ... + // + // This opcode is designed for use in string mode, which + // provides the string value of a parameter along with its + // depth rather than resolving it immediately. + pushStringParam: function pushStringParam(string, type) { + this.pushContext(); + this.pushString(type); + + // If it's a subexpression, the string result + // will be pushed after this opcode. + if (type !== 'SubExpression') { + if (typeof string === 'string') { + this.pushString(string); + } else { + this.pushStackLiteral(string); + } + } + }, + + emptyHash: function emptyHash(omitEmpty) { + if (this.trackIds) { + this.push('{}'); // hashIds + } + if (this.stringParams) { + this.push('{}'); // hashContexts + this.push('{}'); // hashTypes + } + this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); + }, + pushHash: function pushHash() { + if (this.hash) { + this.hashes.push(this.hash); + } + this.hash = { values: [], types: [], contexts: [], ids: [] }; + }, + popHash: function popHash() { + var hash = this.hash; + this.hash = this.hashes.pop(); + + if (this.trackIds) { + this.push(this.objectLiteral(hash.ids)); + } + if (this.stringParams) { + this.push(this.objectLiteral(hash.contexts)); + this.push(this.objectLiteral(hash.types)); + } + + this.push(this.objectLiteral(hash.values)); + }, + + // [pushString] + // + // On stack, before: ... + // On stack, after: quotedString(string), ... + // + // Push a quoted version of `string` onto the stack + pushString: function pushString(string) { + this.pushStackLiteral(this.quotedString(string)); + }, + + // [pushLiteral] + // + // On stack, before: ... + // On stack, after: value, ... + // + // Pushes a value onto the stack. This operation prevents + // the compiler from creating a temporary variable to hold + // it. + pushLiteral: function pushLiteral(value) { + this.pushStackLiteral(value); + }, + + // [pushProgram] + // + // On stack, before: ... + // On stack, after: program(guid), ... + // + // Push a program expression onto the stack. This takes + // a compile-time guid and converts it into a runtime-accessible + // expression. + pushProgram: function pushProgram(guid) { + if (guid != null) { + this.pushStackLiteral(this.programExpression(guid)); + } else { + this.pushStackLiteral(null); + } + }, + + // [registerDecorator] + // + // On stack, before: hash, program, params..., ... + // On stack, after: ... + // + // Pops off the decorator's parameters, invokes the decorator, + // and inserts the decorator into the decorators list. + registerDecorator: function registerDecorator(paramSize, name) { + var foundDecorator = this.nameLookup('decorators', name, 'decorator'), + options = this.setupHelperArgs(name, paramSize); + + this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); + }, + + // [invokeHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // Pops off the helper's parameters, invokes the helper, + // and pushes the helper's return value onto the stack. + // + // If the helper is not found, `helperMissing` is called. + invokeHelper: function invokeHelper(paramSize, name, isSimple) { + var nonHelper = this.popStack(), + helper = this.setupHelper(paramSize, name), + simple = isSimple ? [helper.name, ' || '] : ''; + + var lookup = ['('].concat(simple, nonHelper); + if (!this.options.strict) { + lookup.push(' || ', this.aliasable('helpers.helperMissing')); + } + lookup.push(')'); + + this.push(this.source.functionCall(lookup, 'call', helper.callParams)); + }, + + // [invokeKnownHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // This operation is used when the helper is known to exist, + // so a `helperMissing` fallback is not required. + invokeKnownHelper: function invokeKnownHelper(paramSize, name) { + var helper = this.setupHelper(paramSize, name); + this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); + }, + + // [invokeAmbiguous] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of disambiguation + // + // This operation is used when an expression like `{{foo}}` + // is provided, but we don't know at compile-time whether it + // is a helper or a path. + // + // This operation emits more code than the other options, + // and can be avoided by passing the `knownHelpers` and + // `knownHelpersOnly` flags at compile-time. + invokeAmbiguous: function invokeAmbiguous(name, helperCall) { + this.useRegister('helper'); + + var nonHelper = this.popStack(); + + this.emptyHash(); + var helper = this.setupHelper(0, name, helperCall); + + var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); + + var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; + if (!this.options.strict) { + lookup[0] = '(helper = '; + lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing')); + } + + this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); + }, + + // [invokePartial] + // + // On stack, before: context, ... + // On stack after: result of partial invocation + // + // This operation pops off a context, invokes a partial with that context, + // and pushes the result of the invocation back. + invokePartial: function invokePartial(isDynamic, name, indent) { + var params = [], + options = this.setupParams(name, 1, params); + + if (isDynamic) { + name = this.popStack(); + delete options.name; + } + + if (indent) { + options.indent = JSON.stringify(indent); + } + options.helpers = 'helpers'; + options.partials = 'partials'; + options.decorators = 'container.decorators'; + + if (!isDynamic) { + params.unshift(this.nameLookup('partials', name, 'partial')); + } else { + params.unshift(name); + } + + if (this.options.compat) { + options.depths = 'depths'; + } + options = this.objectLiteral(options); + params.push(options); + + this.push(this.source.functionCall('container.invokePartial', '', params)); + }, + + // [assignToHash] + // + // On stack, before: value, ..., hash, ... + // On stack, after: ..., hash, ... + // + // Pops a value off the stack and assigns it to the current hash + assignToHash: function assignToHash(key) { + var value = this.popStack(), + context = undefined, + type = undefined, + id = undefined; + + if (this.trackIds) { + id = this.popStack(); + } + if (this.stringParams) { + type = this.popStack(); + context = this.popStack(); + } + + var hash = this.hash; + if (context) { + hash.contexts[key] = context; + } + if (type) { + hash.types[key] = type; + } + if (id) { + hash.ids[key] = id; + } + hash.values[key] = value; + }, + + pushId: function pushId(type, name, child) { + if (type === 'BlockParam') { + this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); + } else if (type === 'PathExpression') { + this.pushString(name); + } else if (type === 'SubExpression') { + this.pushStackLiteral('true'); + } else { + this.pushStackLiteral('null'); + } + }, + + // HELPERS + + compiler: JavaScriptCompiler, + + compileChildren: function compileChildren(environment, options) { + var children = environment.children, + child = undefined, + compiler = undefined; + + for (var i = 0, l = children.length; i < l; i++) { + child = children[i]; + compiler = new this.compiler(); // eslint-disable-line new-cap + + var index = this.matchExistingProgram(child); + + if (index == null) { + this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children + index = this.context.programs.length; + child.index = index; + child.name = 'program' + index; + this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); + this.context.decorators[index] = compiler.decorators; + this.context.environments[index] = child; + + this.useDepths = this.useDepths || compiler.useDepths; + this.useBlockParams = this.useBlockParams || compiler.useBlockParams; + } else { + child.index = index; + child.name = 'program' + index; + + this.useDepths = this.useDepths || child.useDepths; + this.useBlockParams = this.useBlockParams || child.useBlockParams; + } + } + }, + matchExistingProgram: function matchExistingProgram(child) { + for (var i = 0, len = this.context.environments.length; i < len; i++) { + var environment = this.context.environments[i]; + if (environment && environment.equals(child)) { + return i; + } + } + }, + + programExpression: function programExpression(guid) { + var child = this.environment.children[guid], + programParams = [child.index, 'data', child.blockParams]; + + if (this.useBlockParams || this.useDepths) { + programParams.push('blockParams'); + } + if (this.useDepths) { + programParams.push('depths'); + } + + return 'container.program(' + programParams.join(', ') + ')'; + }, + + useRegister: function useRegister(name) { + if (!this.registers[name]) { + this.registers[name] = true; + this.registers.list.push(name); + } + }, + + push: function push(expr) { + if (!(expr instanceof Literal)) { + expr = this.source.wrap(expr); + } + + this.inlineStack.push(expr); + return expr; + }, + + pushStackLiteral: function pushStackLiteral(item) { + this.push(new Literal(item)); + }, + + pushSource: function pushSource(source) { + if (this.pendingContent) { + this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); + this.pendingContent = undefined; + } + + if (source) { + this.source.push(source); + } + }, + + replaceStack: function replaceStack(callback) { + var prefix = ['('], + stack = undefined, + createdStack = undefined, + usedLiteral = undefined; + + /* istanbul ignore next */ + if (!this.isInline()) { + throw new _exception2['default']('replaceStack on non-inline'); + } + + // We want to merge the inline statement into the replacement statement via ',' + var top = this.popStack(true); + + if (top instanceof Literal) { + // Literals do not need to be inlined + stack = [top.value]; + prefix = ['(', stack]; + usedLiteral = true; + } else { + // Get or create the current stack name for use by the inline + createdStack = true; + var _name = this.incrStack(); + + prefix = ['((', this.push(_name), ' = ', top, ')']; + stack = this.topStack(); + } + + var item = callback.call(this, stack); + + if (!usedLiteral) { + this.popStack(); + } + if (createdStack) { + this.stackSlot--; + } + this.push(prefix.concat(item, ')')); + }, + + incrStack: function incrStack() { + this.stackSlot++; + if (this.stackSlot > this.stackVars.length) { + this.stackVars.push('stack' + this.stackSlot); + } + return this.topStackName(); + }, + topStackName: function topStackName() { + return 'stack' + this.stackSlot; + }, + flushInline: function flushInline() { + var inlineStack = this.inlineStack; + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + /* istanbul ignore if */ + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + var stack = this.incrStack(); + this.pushSource([stack, ' = ', entry, ';']); + this.compileStack.push(stack); + } + } + }, + isInline: function isInline() { + return this.inlineStack.length; + }, + + popStack: function popStack(wrapped) { + var inline = this.isInline(), + item = (inline ? this.inlineStack : this.compileStack).pop(); + + if (!wrapped && item instanceof Literal) { + return item.value; + } else { + if (!inline) { + /* istanbul ignore next */ + if (!this.stackSlot) { + throw new _exception2['default']('Invalid stack pop'); + } + this.stackSlot--; + } + return item; + } + }, + + topStack: function topStack() { + var stack = this.isInline() ? this.inlineStack : this.compileStack, + item = stack[stack.length - 1]; + + /* istanbul ignore if */ + if (item instanceof Literal) { + return item.value; + } else { + return item; + } + }, + + contextName: function contextName(context) { + if (this.useDepths && context) { + return 'depths[' + context + ']'; + } else { + return 'depth' + context; + } + }, + + quotedString: function quotedString(str) { + return this.source.quotedString(str); + }, + + objectLiteral: function objectLiteral(obj) { + return this.source.objectLiteral(obj); + }, + + aliasable: function aliasable(name) { + var ret = this.aliases[name]; + if (ret) { + ret.referenceCount++; + return ret; + } + + ret = this.aliases[name] = this.source.wrap(name); + ret.aliasable = true; + ret.referenceCount = 1; + + return ret; + }, + + setupHelper: function setupHelper(paramSize, name, blockHelper) { + var params = [], + paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); + var foundHelper = this.nameLookup('helpers', name, 'helper'), + callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : {}'); + + return { + params: params, + paramsInit: paramsInit, + name: foundHelper, + callParams: [callContext].concat(params) + }; + }, + + setupParams: function setupParams(helper, paramSize, params) { + var options = {}, + contexts = [], + types = [], + ids = [], + objectArgs = !params, + param = undefined; + + if (objectArgs) { + params = []; + } + + options.name = this.quotedString(helper); + options.hash = this.popStack(); + + if (this.trackIds) { + options.hashIds = this.popStack(); + } + if (this.stringParams) { + options.hashTypes = this.popStack(); + options.hashContexts = this.popStack(); + } + + var inverse = this.popStack(), + program = this.popStack(); + + // Avoid setting fn and inverse if neither are set. This allows + // helpers to do a check for `if (options.fn)` + if (program || inverse) { + options.fn = program || 'container.noop'; + options.inverse = inverse || 'container.noop'; + } + + // The parameters go on to the stack in order (making sure that they are evaluated in order) + // so we need to pop them off the stack in reverse order + var i = paramSize; + while (i--) { + param = this.popStack(); + params[i] = param; + + if (this.trackIds) { + ids[i] = this.popStack(); + } + if (this.stringParams) { + types[i] = this.popStack(); + contexts[i] = this.popStack(); + } + } + + if (objectArgs) { + options.args = this.source.generateArray(params); + } + + if (this.trackIds) { + options.ids = this.source.generateArray(ids); + } + if (this.stringParams) { + options.types = this.source.generateArray(types); + options.contexts = this.source.generateArray(contexts); + } + + if (this.options.data) { + options.data = 'data'; + } + if (this.useBlockParams) { + options.blockParams = 'blockParams'; + } + return options; + }, + + setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { + var options = this.setupParams(helper, paramSize, params); + options = this.objectLiteral(options); + if (useRegister) { + this.useRegister('options'); + params.push('options'); + return ['options=', options]; + } else if (params) { + params.push(options); + return ''; + } else { + return options; + } + } + }; + + (function () { + var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); + + var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; + + for (var i = 0, l = reservedWords.length; i < l; i++) { + compilerWords[reservedWords[i]] = true; + } + })(); + + JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { + return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); + }; + + function strictLookup(requireTerminal, compiler, parts, type) { + var stack = compiler.popStack(), + i = 0, + len = parts.length; + if (requireTerminal) { + len--; + } + + for (; i < len; i++) { + stack = compiler.nameLookup(stack, parts[i], type); + } + + if (requireTerminal) { + return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')']; + } else { + return stack; + } + } + + exports['default'] = JavaScriptCompiler; + module.exports = exports['default']; + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + /* global define */ + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(5); + + var SourceNode = undefined; + + try { + /* istanbul ignore next */ + if (false) { + // We don't support this in AMD environments. For these environments, we asusme that + // they are running on the browser and thus have no need for the source-map library. + var SourceMap = require('source-map'); + SourceNode = SourceMap.SourceNode; + } + } catch (err) {} + /* NOP */ + + /* istanbul ignore if: tested but not covered in istanbul due to dist build */ + if (!SourceNode) { + SourceNode = function (line, column, srcFile, chunks) { + this.src = ''; + if (chunks) { + this.add(chunks); + } + }; + /* istanbul ignore next */ + SourceNode.prototype = { + add: function add(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src += chunks; + }, + prepend: function prepend(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src = chunks + this.src; + }, + toStringWithSourceMap: function toStringWithSourceMap() { + return { code: this.toString() }; + }, + toString: function toString() { + return this.src; + } + }; + } + + function castChunk(chunk, codeGen, loc) { + if (_utils.isArray(chunk)) { + var ret = []; + + for (var i = 0, len = chunk.length; i < len; i++) { + ret.push(codeGen.wrap(chunk[i], loc)); + } + return ret; + } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { + // Handle primitives that the SourceNode will throw up on + return chunk + ''; + } + return chunk; + } + + function CodeGen(srcFile) { + this.srcFile = srcFile; + this.source = []; + } + + CodeGen.prototype = { + isEmpty: function isEmpty() { + return !this.source.length; + }, + prepend: function prepend(source, loc) { + this.source.unshift(this.wrap(source, loc)); + }, + push: function push(source, loc) { + this.source.push(this.wrap(source, loc)); + }, + + merge: function merge() { + var source = this.empty(); + this.each(function (line) { + source.add([' ', line, '\n']); + }); + return source; + }, + + each: function each(iter) { + for (var i = 0, len = this.source.length; i < len; i++) { + iter(this.source[i]); + } + }, + + empty: function empty() { + var loc = this.currentLocation || { start: {} }; + return new SourceNode(loc.start.line, loc.start.column, this.srcFile); + }, + wrap: function wrap(chunk) { + var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; + + if (chunk instanceof SourceNode) { + return chunk; + } + + chunk = castChunk(chunk, this, loc); + + return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); + }, + + functionCall: function functionCall(fn, type, params) { + params = this.generateList(params); + return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); + }, + + quotedString: function quotedString(str) { + return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 + .replace(/\u2029/g, '\\u2029') + '"'; + }, + + objectLiteral: function objectLiteral(obj) { + var pairs = []; + + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + var value = castChunk(obj[key], this); + if (value !== 'undefined') { + pairs.push([this.quotedString(key), ':', value]); + } + } + } + + var ret = this.generateList(pairs); + ret.prepend('{'); + ret.add('}'); + return ret; + }, + + generateList: function generateList(entries) { + var ret = this.empty(); + + for (var i = 0, len = entries.length; i < len; i++) { + if (i) { + ret.add(','); + } + + ret.add(castChunk(entries[i], this)); + } + + return ret; + }, + + generateArray: function generateArray(entries) { + var ret = this.generateList(entries); + ret.prepend('['); + ret.add(']'); + + return ret; + } + }; + + exports['default'] = CodeGen; + module.exports = exports['default']; + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack.js new file mode 100644 index 0000000..928386d --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack.js @@ -0,0 +1,2 @@ +/*! highlight.js v9.1.0 | BSD3 License | git.io/hljslicense */ +!function(e){"undefined"!=typeof exports?e(exports):(self.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return self.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&").replace(//gm,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function i(e){var n,t,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/i.exec(i))return E(t[1])?t[1]:"no-highlight";for(i=i.split(/\s+/),n=0,r=i.length;r>n;n++)if(E(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset"}function u(e){l+=""}function c(e){("start"==e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);f.reverse().forEach(o)}else"start"==g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\b\w+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){for(var t=0;t";return i+=e+'">',i+n+o}function p(){if(!L.k)return n(M);var e="",t=0;L.lR.lastIndex=0;for(var r=L.lR.exec(M);r;){e+=n(M.substr(t,r.index-t));var a=g(L,r);a?(B+=a[1],e+=h(a[0],n(r[0]))):e+=n(r[0]),t=L.lR.lastIndex,r=L.lR.exec(M)}return e+n(M.substr(t))}function d(){var e="string"==typeof L.sL;if(e&&!R[L.sL])return n(M);var t=e?l(L.sL,M,!0,y[L.sL]):f(M,L.sL.length?L.sL:void 0);return L.r>0&&(B+=t.r),e&&(y[L.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){return void 0!==L.sL?d():p()}function v(e,t){var r=e.cN?h(e.cN,"",!0):"";e.rB?(k+=r,M=""):e.eB?(k+=n(t)+r,M=""):(k+=r,M=t),L=Object.create(e,{parent:{value:L}})}function m(e,t){if(M+=e,void 0===t)return k+=b(),0;var r=o(t,L);if(r)return k+=b(),v(r,t),r.rB?0:t.length;var a=u(L,t);if(a){var i=L;i.rE||i.eE||(M+=t),k+=b();do L.cN&&(k+=""),B+=L.r,L=L.parent;while(L!=a.parent);return i.eE&&(k+=n(t)),M="",a.starts&&v(a.starts,""),i.rE?0:t.length}if(c(t,L))throw new Error('Illegal lexeme "'+t+'" for mode "'+(L.cN||"")+'"');return M+=t,t.length||1}var N=E(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,L=i||N,y={},k="";for(w=L;w!=N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var M="",B=0;try{for(var C,j,I=0;;){if(L.t.lastIndex=I,C=L.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),w=L;w.parent;w=w.parent)w.cN&&(k+="");return{r:B,value:k,language:e,top:L}}catch(O){if(-1!=O.message.indexOf("Illegal"))return{r:0,value:n(t)};throw O}}function f(e,t){t=t||x.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(E(n)){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return x.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,x.tabReplace)})),x.useBR&&(e=e.replace(/\n/g,"
")),e}function h(e,n,t){var r=n?w[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n=i(e);if(!a(n)){var t;x.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):t=e;var r=t.textContent,o=n?l(n,r,!0):f(r),s=u(t);if(s.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=o.value,o.value=c(s,u(p),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=h(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){x=o(x,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){w[e]=n})}function N(){return Object.keys(R)}function E(e){return e=(e||"").toLowerCase(),R[e]||R[w[e]]}var x={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},R={},w={};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=E,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e});hljs.registerLanguage("json",function(e){var t={literal:"true false null"},i=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:i,k:t},s={b:"{",e:"}",c:[{cN:"attr",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:r}],i:"\\S"},n={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return i.splice(i.length,0,s,n),{c:i,k:t,i:"\\S"}});hljs.registerLanguage("xml",function(s){var t="[A-Za-z0-9\\._:-]+",e={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php"},r={eW:!0,i:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[r],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[r],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},e,{cN:"meta",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},r]}]}});hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\s*\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}}); \ No newline at end of file diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack_extended.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack_extended.js new file mode 100644 index 0000000..571c740 --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack_extended.js @@ -0,0 +1,34 @@ +'use strict'; + +(function () { + var configure, highlightBlock; + + configure = hljs.configure; + // "extending" hljs.configure method + hljs.configure = function _configure (options) { + var size = options.highlightSizeThreshold; + + // added highlightSizeThreshold option to set maximum size + // of processed string. Set to null if not a number + hljs.highlightSizeThreshold = size === +size ? size : null; + + configure.call(this, options); + }; + + highlightBlock = hljs.highlightBlock; + + // "extending" hljs.highlightBlock method + hljs.highlightBlock = function _highlightBlock (el) { + var innerHTML = el.innerHTML; + var size = hljs.highlightSizeThreshold; + + // check if highlightSizeThreshold is not set or element innerHTML + // is less than set option highlightSizeThreshold + if (size == null || size > innerHTML.length) { + // proceed with hljs.highlightBlock + highlightBlock.call(hljs, el); + } + }; + +})(); + diff --git a/vendor/assets/components/swagger-ui/lib/jquery-1.8.0.min.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery-1.8.0.min.js similarity index 100% rename from vendor/assets/components/swagger-ui/lib/jquery-1.8.0.min.js rename to rswag-ui/vendor/assets/components/swagger-ui/lib/jquery-1.8.0.min.js diff --git a/vendor/assets/components/swagger-ui/lib/jquery.ba-bbq.min.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.ba-bbq.min.js similarity index 100% rename from vendor/assets/components/swagger-ui/lib/jquery.ba-bbq.min.js rename to rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.ba-bbq.min.js diff --git a/vendor/assets/components/swagger-ui/lib/jquery.slideto.min.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.slideto.min.js similarity index 100% rename from vendor/assets/components/swagger-ui/lib/jquery.slideto.min.js rename to rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.slideto.min.js diff --git a/vendor/assets/components/swagger-ui/lib/jquery.wiggle.min.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.wiggle.min.js similarity index 100% rename from vendor/assets/components/swagger-ui/lib/jquery.wiggle.min.js rename to rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.wiggle.min.js diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lib/js-yaml.min.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/js-yaml.min.js new file mode 100644 index 0000000..c3d07ad --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lib/js-yaml.min.js @@ -0,0 +1,3 @@ +/* js-yaml 3.4.6 https://github.com/nodeca/js-yaml */ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.jsyaml=t()}}(function(){var t;return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n?n:e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;an;n+=1)r=o[n],t[r]=e[r];return t}function s(t,e){var n,i="";for(n=0;e>n;n+=1)i+=t;return i}function c(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}e.exports.isNothing=i,e.exports.isObject=r,e.exports.toArray=o,e.exports.repeat=s,e.exports.isNegativeZero=c,e.exports.extend=a},{}],3:[function(t,e,n){"use strict";function i(t,e){var n,i,r,o,a,s,c;if(null===e)return{};for(n={},i=Object.keys(e),r=0,o=i.length;o>r;r+=1)a=i[r],s=String(e[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),c=t.compiledTypeMap[a],c&&E.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}function r(t){var e,n,i;if(e=t.toString(16).toUpperCase(),255>=t)n="x",i=2;else if(65535>=t)n="u",i=4;else{if(!(4294967295>=t))throw new O("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+j.repeat("0",i-e.length)+e}function o(t){this.schema=t.schema||S,this.indent=Math.max(1,t.indent||2),this.skipInvalid=t.skipInvalid||!1,this.flowLevel=j.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=i(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function a(t,e){for(var n,i=j.repeat(" ",e),r=0,o=-1,a="",s=t.length;s>r;)o=t.indexOf("\n",r),-1===o?(n=t.slice(r),r=s):(n=t.slice(r,o+1),r=o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function s(t,e){return"\n"+j.repeat(" ",t.indent*e)}function c(t,e){var n,i,r;for(n=0,i=t.implicitTypes.length;i>n;n+=1)if(r=t.implicitTypes[n],r.resolve(e))return!0;return!1}function u(t){this.source=t,this.result="",this.checkpoint=0}function l(t,e,n,i){var r,o,s,l,f,m,g,y,v,x,A,b,w,k,C,j,O,S,_,I,E;if(0===e.length)return void(t.dump="''");if(-1!==et.indexOf(e))return void(t.dump="'"+e+"'");for(r=!0,o=e.length?e.charCodeAt(0):0,s=M===o||M===e.charCodeAt(e.length-1),(K===o||W===o||G===o||z===o)&&(r=!1),s?(r=!1,l=!1,f=!1):(l=!i,f=!i),m=!0,g=new u(e),y=!1,v=0,x=0,A=t.indent*n,b=t.lineWidth,-1===b&&(b=9007199254740991),40>A?b-=A:b=40,k=0;k0&&(O=e.charCodeAt(k-1),O===M&&(f=!1,l=!1)),l&&(S=k-v,v=k,S>x&&(x=S))),w!==D&&(m=!1),g.takeUpTo(k),g.escapeChar())}if(r&&c(t,e)&&(r=!1),_="",(l||f)&&(I=0,e.charCodeAt(e.length-1)===N&&(I+=1,e.charCodeAt(e.length-2)===N&&(I+=1)),0===I?_="-":2===I&&(_="+")),f&&b>x&&(l=!1),y||(f=!1),r)t.dump=e;else if(m)t.dump="'"+e+"'";else if(l)E=p(e,b),t.dump=">"+_+"\n"+a(E,A);else if(f)_||(e=e.replace(/\n$/,"")),t.dump="|"+_+"\n"+a(e,A);else{if(!g)throw new Error("Failed to dump scalar value");g.finish(),t.dump='"'+g.result+'"'}}function p(t,e){var n,i="",r=0,o=t.length,a=/\n+$/.exec(t);for(a&&(o=a.index+1);o>r;)n=t.indexOf("\n",r),n>o||-1===n?(i&&(i+="\n\n"),i+=f(t.slice(r,o),e),r=o):(i&&(i+="\n\n"),i+=f(t.slice(r,n),e),r=n+1);return a&&"\n"!==a[0]&&(i+=a[0]),i}function f(t,e){if(""===t)return t;for(var n,i,r,o=/[^\s] [^\s]/g,a="",s=0,c=0,u=o.exec(t);u;)n=u.index,n-c>e&&(i=s!==c?s:n,a&&(a+="\n"),r=t.slice(c,i),a+=r,c=i+1),s=n+1,u=o.exec(t);return a&&(a+="\n"),a+=c!==s&&t.length-c>e?t.slice(c,s)+"\n"+t.slice(s+1):t.slice(c)}function h(t){return F!==t&&N!==t&&T!==t&&B!==t&&V!==t&&Z!==t&&J!==t&&X!==t&&U!==t&&Y!==t&&$!==t&&L!==t&&Q!==t&&R!==t&&P!==t&&D!==t&&q!==t&&H!==t&&!tt[t]&&!d(t)}function d(t){return!(t>=32&&126>=t||133===t||t>=160&&55295>=t||t>=57344&&65533>=t||t>=65536&&1114111>=t)}function m(t,e,n){var i,r,o="",a=t.tag;for(i=0,r=n.length;r>i;i+=1)A(t,e,n[i],!1,!1)&&(0!==i&&(o+=", "),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function g(t,e,n,i){var r,o,a="",c=t.tag;for(r=0,o=n.length;o>r;r+=1)A(t,e+1,n[r],!0,!0)&&(i&&0===r||(a+=s(t,e)),a+="- "+t.dump);t.tag=c,t.dump=a||"[]"}function y(t,e,n){var i,r,o,a,s,c="",u=t.tag,l=Object.keys(n);for(i=0,r=l.length;r>i;i+=1)s="",0!==i&&(s+=", "),o=l[i],a=n[o],A(t,e,o,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+": ",A(t,e,a,!1,!1)&&(s+=t.dump,c+=s));t.tag=u,t.dump="{"+c+"}"}function v(t,e,n,i){var r,o,a,c,u,l,p="",f=t.tag,h=Object.keys(n);if(t.sortKeys===!0)h.sort();else if("function"==typeof t.sortKeys)h.sort(t.sortKeys);else if(t.sortKeys)throw new O("sortKeys must be a boolean or a function");for(r=0,o=h.length;o>r;r+=1)l="",i&&0===r||(l+=s(t,e)),a=h[r],c=n[a],A(t,e+1,a,!0,!0,!0)&&(u=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024,u&&(l+=t.dump&&N===t.dump.charCodeAt(0)?"?":"? "),l+=t.dump,u&&(l+=s(t,e)),A(t,e+1,c,!0,u)&&(l+=t.dump&&N===t.dump.charCodeAt(0)?":":": ",l+=t.dump,p+=l));t.tag=f,t.dump=p||"{}"}function x(t,e,n){var i,r,o,a,s,c;for(r=n?t.explicitTypes:t.implicitTypes,o=0,a=r.length;a>o;o+=1)if(s=r[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(t.tag=n?s.tag:"?",s.represent){if(c=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===I.call(s.represent))i=s.represent(e,c);else{if(!E.call(s.represent,c))throw new O("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');i=s.represent[c](e,c)}t.dump=i}return!0}return!1}function A(t,e,n,i,r,o){t.tag=null,t.dump=n,x(t,n,!1)||x(t,n,!0);var a=I.call(t.dump);i&&(i=0>t.flowLevel||t.flowLevel>e);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(s=t.duplicates.indexOf(n),c=-1!==s),(null!==t.tag&&"?"!==t.tag||c||2!==t.indent&&e>0)&&(r=!1),c&&t.usedDuplicates[s])t.dump="*ref_"+s;else{if(u&&c&&!t.usedDuplicates[s]&&(t.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(t.dump).length?(v(t,e,t.dump,r),c&&(t.dump="&ref_"+s+t.dump)):(y(t,e,t.dump),c&&(t.dump="&ref_"+s+" "+t.dump));else if("[object Array]"===a)i&&0!==t.dump.length?(g(t,e,t.dump,r),c&&(t.dump="&ref_"+s+t.dump)):(m(t,e,t.dump),c&&(t.dump="&ref_"+s+" "+t.dump));else{if("[object String]"!==a){if(t.skipInvalid)return!1;throw new O("unacceptable kind of an object to dump "+a)}"?"!==t.tag&&l(t,t.dump,e,o)}null!==t.tag&&"?"!==t.tag&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function b(t,e){var n,i,r=[],o=[];for(w(t,r,o),n=0,i=o.length;i>n;n+=1)e.duplicates.push(r[o[n]]);e.usedDuplicates=new Array(i)}function w(t,e,n){var i,r,o;if(null!==t&&"object"==typeof t)if(r=e.indexOf(t),-1!==r)-1===n.indexOf(r)&&n.push(r);else if(e.push(t),Array.isArray(t))for(r=0,o=t.length;o>r;r+=1)w(t[r],e,n);else for(i=Object.keys(t),r=0,o=i.length;o>r;r+=1)w(t[i[r]],e,n)}function k(t,e){e=e||{};var n=new o(e);return b(t,n),A(n,0,t,!0,!0)?n.dump+"\n":""}function C(t,e){return k(t,j.extend({schema:_},e))}var j=t("./common"),O=t("./exception"),S=t("./schema/default_full"),_=t("./schema/default_safe"),I=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=9,N=10,T=13,M=32,L=33,D=34,U=35,q=37,Y=38,P=39,$=42,B=44,K=45,H=58,R=62,W=63,G=64,V=91,Z=93,z=96,J=123,Q=124,X=125,tt={};tt[0]="\\0",tt[7]="\\a",tt[8]="\\b",tt[9]="\\t",tt[10]="\\n",tt[11]="\\v",tt[12]="\\f",tt[13]="\\r",tt[27]="\\e",tt[34]='\\"',tt[92]="\\\\",tt[133]="\\N",tt[160]="\\_",tt[8232]="\\L",tt[8233]="\\P";var et=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];u.prototype.takeUpTo=function(t){var e;if(t checkpoint"),e.position=t,e.checkpoint=this.checkpoint,e;return this.result+=this.source.slice(this.checkpoint,t),this.checkpoint=t,this},u.prototype.escapeChar=function(){var t,e;return t=this.source.charCodeAt(this.checkpoint),e=tt[t]||r(t),this.result+=e,this.checkpoint+=1,this},u.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},e.exports.dump=k,e.exports.safeDump=C},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(t,e,n){"use strict";function i(t,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}var r=t("inherit");r(i,Error),i.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},e.exports=i},{inherit:31}],5:[function(t,e,n){"use strict";function i(t){return 10===t||13===t}function r(t){return 9===t||32===t}function o(t){return 9===t||32===t||10===t||13===t}function a(t){return 44===t||91===t||93===t||123===t||125===t}function s(t){var e;return t>=48&&57>=t?t-48:(e=32|t,e>=97&&102>=e?e-97+10:-1)}function c(t){return 120===t?2:117===t?4:85===t?8:0}function u(t){return t>=48&&57>=t?t-48:-1}function l(t){return 48===t?"\x00":97===t?"":98===t?"\b":116===t?" ":9===t?" ":110===t?"\n":118===t?" ":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function p(t){return 65535>=t?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function f(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||H,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(t,e){return new $(e,new B(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function d(t,e){throw h(t,e)}function m(t,e){t.onWarning&&t.onWarning.call(null,h(t,e))}function g(t,e,n,i){var r,o,a,s;if(n>e){if(s=t.input.slice(e,n),i)for(r=0,o=s.length;o>r;r+=1)a=s.charCodeAt(r),9===a||a>=32&&1114111>=a||d(t,"expected valid JSON character");else X.test(s)&&d(t,"the stream contains non-printable characters");t.result+=s}}function y(t,e,n){var i,r,o,a;for(P.isObject(n)||d(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),o=0,a=i.length;a>o;o+=1)r=i[o],R.call(e,r)||(e[r]=n[r])}function v(t,e,n,i,r){var o,a;if(i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(r))for(o=0,a=r.length;a>o;o+=1)y(t,e,r[o]);else y(t,e,r);else e[i]=r;return e}function x(t){var e;e=t.input.charCodeAt(t.position),10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):d(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function A(t,e,n){for(var o=0,a=t.input.charCodeAt(t.position);0!==a;){for(;r(a);)a=t.input.charCodeAt(++t.position);if(e&&35===a)do a=t.input.charCodeAt(++t.position);while(10!==a&&13!==a&&0!==a);if(!i(a))break;for(x(t),a=t.input.charCodeAt(t.position),o++,t.lineIndent=0;32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position)}return-1!==n&&0!==o&&t.lineIndent1&&(t.result+=P.repeat("\n",e-1))}function k(t,e,n){var s,c,u,l,p,f,h,d,m,y=t.kind,v=t.result;if(m=t.input.charCodeAt(t.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(c=t.input.charCodeAt(t.position+1),o(c)||n&&a(c)))return!1;for(t.kind="scalar",t.result="",u=l=t.position,p=!1;0!==m;){if(58===m){if(c=t.input.charCodeAt(t.position+1),o(c)||n&&a(c))break}else if(35===m){if(s=t.input.charCodeAt(t.position-1),o(s))break}else{if(t.position===t.lineStart&&b(t)||n&&a(m))break;if(i(m)){if(f=t.line,h=t.lineStart,d=t.lineIndent,A(t,!1,-1),t.lineIndent>=e){p=!0,m=t.input.charCodeAt(t.position);continue}t.position=l,t.line=f,t.lineStart=h,t.lineIndent=d;break}}p&&(g(t,u,l,!1),w(t,t.line-f),u=l=t.position,p=!1),r(m)||(l=t.position+1),m=t.input.charCodeAt(++t.position)}return g(t,u,l,!1),t.result?!0:(t.kind=y,t.result=v,!1)}function C(t,e){var n,r,o;if(n=t.input.charCodeAt(t.position),39!==n)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(g(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),39!==n)return!0;r=o=t.position,t.position++}else i(n)?(g(t,r,o,!0),w(t,A(t,!1,e)),r=o=t.position):t.position===t.lineStart&&b(t)?d(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);d(t,"unexpected end of the stream within a single quoted scalar")}function j(t,e){var n,r,o,a,u,l;if(l=t.input.charCodeAt(t.position),34!==l)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(l=t.input.charCodeAt(t.position));){if(34===l)return g(t,n,t.position,!0),t.position++,!0;if(92===l){if(g(t,n,t.position,!0),l=t.input.charCodeAt(++t.position),i(l))A(t,!1,e);else if(256>l&&rt[l])t.result+=ot[l],t.position++;else if((u=c(l))>0){for(o=u,a=0;o>0;o--)l=t.input.charCodeAt(++t.position),(u=s(l))>=0?a=(a<<4)+u:d(t,"expected hexadecimal character");t.result+=p(a),t.position++}else d(t,"unknown escape sequence");n=r=t.position}else i(l)?(g(t,n,r,!0),w(t,A(t,!1,e)),n=r=t.position):t.position===t.lineStart&&b(t)?d(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}d(t,"unexpected end of the stream within a double quoted scalar")}function O(t,e){var n,i,r,a,s,c,u,l,p,f,h,m=!0,g=t.tag,y=t.anchor;if(h=t.input.charCodeAt(t.position),91===h)a=93,u=!1,i=[];else{if(123!==h)return!1;a=125,u=!0,i={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=i),h=t.input.charCodeAt(++t.position);0!==h;){if(A(t,!0,e),h=t.input.charCodeAt(t.position),h===a)return t.position++,t.tag=g,t.anchor=y,t.kind=u?"mapping":"sequence",t.result=i,!0;m||d(t,"missed comma between flow collection entries"),p=l=f=null,s=c=!1,63===h&&(r=t.input.charCodeAt(t.position+1),o(r)&&(s=c=!0,t.position++,A(t,!0,e))),n=t.line,T(t,e,W,!1,!0),p=t.tag,l=t.result,A(t,!0,e),h=t.input.charCodeAt(t.position),!c&&t.line!==n||58!==h||(s=!0,h=t.input.charCodeAt(++t.position),A(t,!0,e),T(t,e,W,!1,!0),f=t.result),u?v(t,i,p,l,f):i.push(s?v(t,null,p,l,f):l),A(t,!0,e),h=t.input.charCodeAt(t.position),44===h?(m=!0,h=t.input.charCodeAt(++t.position)):m=!1}d(t,"unexpected end of the stream within a flow collection")}function S(t,e){var n,o,a,s,c=z,l=!1,p=e,f=0,h=!1;if(s=t.input.charCodeAt(t.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(t.kind="scalar",t.result="";0!==s;)if(s=t.input.charCodeAt(++t.position),43===s||45===s)z===c?c=43===s?Q:J:d(t,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?d(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?d(t,"repeat of an indentation width identifier"):(p=e+a-1,l=!0)}if(r(s)){do s=t.input.charCodeAt(++t.position);while(r(s));if(35===s)do s=t.input.charCodeAt(++t.position);while(!i(s)&&0!==s)}for(;0!==s;){for(x(t),t.lineIndent=0,s=t.input.charCodeAt(t.position);(!l||t.lineIndentp&&(p=t.lineIndent),i(s))f++;else{if(t.lineIndente)&&0!==r)d(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(T(t,e,Z,!0,a)&&(g?h=t.result:m=t.result),g||(v(t,p,f,h,m),f=h=m=null),A(t,!0,-1),c=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==c)d(t,"bad indentation of a mapping entry");else if(t.lineIndente?h=1:t.lineIndent===e?h=0:t.lineIndente?h=1:t.lineIndent===e?h=0:t.lineIndentc;c+=1)if(l=t.implicitTypes[c],l.resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else R.call(t.typeMap,t.tag)?(l=t.typeMap[t.tag],null!==t.result&&l.kind!==t.kind&&d(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result)?(t.result=l.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):d(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):d(t,"unknown tag !<"+t.tag+">");return null!==t.tag||null!==t.anchor||g}function M(t){var e,n,a,s,c=t.position,u=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(s=t.input.charCodeAt(t.position))&&(A(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==s));){for(u=!0,s=t.input.charCodeAt(++t.position),e=t.position;0!==s&&!o(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(e,t.position),a=[],n.length<1&&d(t,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=t.input.charCodeAt(++t.position);if(35===s){do s=t.input.charCodeAt(++t.position);while(0!==s&&!i(s));break}if(i(s))break;for(e=t.position;0!==s&&!o(s);)s=t.input.charCodeAt(++t.position);a.push(t.input.slice(e,t.position))}0!==s&&x(t),R.call(st,n)?st[n](t,n,a):m(t,'unknown document directive "'+n+'"')}return A(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,A(t,!0,-1)):u&&d(t,"directives end mark is expected"),T(t,t.lineIndent-1,Z,!1,!0),A(t,!0,-1),t.checkLineBreaks&&tt.test(t.input.slice(c,t.position))&&m(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&b(t)?void(46===t.input.charCodeAt(t.position)&&(t.position+=3,A(t,!0,-1))):void(t.positioni;i+=1)e(o[i])}function U(t,e){var n=L(t,e);if(0===n.length)return void 0;if(1===n.length)return n[0];throw new $("expected a single document in the stream, but found more")}function q(t,e,n){D(t,e,P.extend({schema:K},n))}function Y(t,e){return U(t,P.extend({schema:K},e))}for(var P=t("./common"),$=t("./exception"),B=t("./mark"),K=t("./schema/default_safe"),H=t("./schema/default_full"),R=Object.prototype.hasOwnProperty,W=1,G=2,V=3,Z=4,z=1,J=2,Q=3,X=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tt=/[\x85\u2028\u2029]/,et=/[,\[\]\{\}]/,nt=/^(?:!|!!|![a-z\-]+!)$/i,it=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,rt=new Array(256),ot=new Array(256),at=0;256>at;at++)rt[at]=l(at)?1:0,ot[at]=l(at);var st={YAML:function(t,e,n){var i,r,o;null!==t.version&&d(t,"duplication of %YAML directive"),1!==n.length&&d(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&d(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&d(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=2>o,1!==o&&2!==o&&m(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&d(t,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],nt.test(i)||d(t,"ill-formed tag handle (first argument) of the TAG directive"),R.call(t.tagMap,i)&&d(t,'there is a previously declared suffix for "'+i+'" tag handle'),it.test(r)||d(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=r}};e.exports.loadAll=D,e.exports.load=U,e.exports.safeLoadAll=q,e.exports.safeLoad=Y},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(t,e,n){"use strict";function i(t,e,n,i,r){this.name=t,this.buffer=e,this.position=n,this.line=i,this.column=r}var r=t("./common");i.prototype.getSnippet=function(t,e){var n,i,o,a,s;if(!this.buffer)return null;for(t=t||4,e=e||75,n="",i=this.position;i>0&&-1==="\x00\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>e/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;ae/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",t)+n+s+o+"\n"+r.repeat(" ",t+this.position-i+n.length)+"^"},i.prototype.toString=function(t){var e,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet(),e&&(n+=":\n"+e)),n},e.exports=i},{"./common":2}],7:[function(t,e,n){"use strict";function i(t,e,n){var r=[];return t.include.forEach(function(t){n=i(t,e,n)}),t[e].forEach(function(t){n.forEach(function(e,n){e.tag===t.tag&&r.push(n)}),n.push(t)}),n.filter(function(t,e){return-1===r.indexOf(e)})}function r(){function t(t){i[t.tag]=t}var e,n,i={};for(e=0,n=arguments.length;n>e;e+=1)arguments[e].forEach(t);return i}function o(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&"scalar"!==t.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=r(this.compiledImplicit,this.compiledExplicit)}var a=t("./common"),s=t("./exception"),c=t("./type");o.DEFAULT=null,o.create=function(){var t,e;switch(arguments.length){case 1:t=o.DEFAULT,e=arguments[0];break;case 2:t=arguments[0],e=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(t=a.toArray(t),e=a.toArray(e),!t.every(function(t){return t instanceof o}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every(function(t){return t instanceof c}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:t,explicit:e})},e.exports=o},{"./common":2,"./exception":4,"./type":13}],8:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./json")]})},{"../schema":7,"./json":12}],9:[function(t,e,n){"use strict";var i=t("../schema");e.exports=i.DEFAULT=new i({include:[t("./default_safe")],explicit:[t("../type/js/undefined"),t("../type/js/regexp"),t("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./core")],implicit:[t("../type/timestamp"),t("../type/merge")],explicit:[t("../type/binary"),t("../type/omap"),t("../type/pairs"),t("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({explicit:[t("../type/str"),t("../type/seq"),t("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./failsafe")],implicit:[t("../type/null"),t("../type/bool"),t("../type/int"),t("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(t,e,n){"use strict";function i(t){var e={};return null!==t&&Object.keys(t).forEach(function(n){t[n].forEach(function(t){e[String(t)]=n})}),e}function r(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===a.indexOf(e))throw new o('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=i(e.styleAliases||null),-1===s.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var o=t("./exception"),a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];e.exports=r},{"./exception":4}],14:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;var e,n,i=0,r=t.length,o=u;for(n=0;r>n;n++)if(e=o.indexOf(t.charAt(n)),!(e>64)){if(0>e)return!1;i+=6}return i%8===0}function r(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,o=u,a=0,c=[];for(e=0;r>e;e++)e%4===0&&e&&(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)),a=a<<6|o.indexOf(i.charAt(e));return n=r%4*6,0===n?(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)):18===n?(c.push(a>>10&255),c.push(a>>2&255)):12===n&&c.push(a>>4&255),s?new s(c):c}function o(t){var e,n,i="",r=0,o=t.length,a=u;for(e=0;o>e;e++)e%3===0&&e&&(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+t[e];return n=o%3,0===n?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}function a(t){return s&&s.isBuffer(t)}var s=t("buffer").Buffer,c=t("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new c("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i, +construct:r,predicate:a,represent:o})},{"../type":13,buffer:30}],15:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function r(t){return"true"===t||"True"===t||"TRUE"===t}function o(t){return"[object Boolean]"===Object.prototype.toString.call(t)}var a=t("../type");e.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(t,e,n){"use strict";function i(t){return null===t?!1:u.test(t)?!0:!1}function r(t){var e,n,i,r;return e=t.replace(/_/g,"").toLowerCase(),n="-"===e[0]?-1:1,r=[],0<="+-".indexOf(e[0])&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:0<=e.indexOf(":")?(e.split(":").forEach(function(t){r.unshift(parseFloat(t,10))}),e=0,i=1,r.forEach(function(t){e+=t*i,i*=60}),n*e):n*parseFloat(e,10)}function o(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(t))return"-0.0";return n=t.toString(10),l.test(n)?n.replace("e",".e"):n}function a(t){return"[object Number]"===Object.prototype.toString.call(t)&&(0!==t%1||s.isNegativeZero(t))}var s=t("../common"),c=t("../type"),u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;e.exports=new c("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(t,e,n){"use strict";function i(t){return t>=48&&57>=t||t>=65&&70>=t||t>=97&&102>=t}function r(t){return t>=48&&55>=t}function o(t){return t>=48&&57>=t}function a(t){if(null===t)return!1;var e,n=t.length,a=0,s=!1;if(!n)return!1;if(e=t[a],("-"===e||"+"===e)&&(e=t[++a]),"0"===e){if(a+1===n)return!0;if(e=t[++a],"b"===e){for(a++;n>a;a++)if(e=t[a],"_"!==e){if("0"!==e&&"1"!==e)return!1;s=!0}return s}if("x"===e){for(a++;n>a;a++)if(e=t[a],"_"!==e){if(!i(t.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(e=t[a],"_"!==e){if(!r(t.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(e=t[a],"_"!==e){if(":"===e)break;if(!o(t.charCodeAt(a)))return!1;s=!0}return s?":"!==e?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(a)):!1}function s(t){var e,n,i=t,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),e=i[0],("-"===e||"+"===e)&&("-"===e&&(r=-1),i=i.slice(1),e=i[0]),"0"===i?0:"0"===e?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(t){o.unshift(parseInt(t,10))}),i=0,n=1,o.forEach(function(t){i+=t*n,n*=60}),r*i):r*parseInt(i,10)}function c(t){return"[object Number]"===Object.prototype.toString.call(t)&&0===t%1&&!u.isNegativeZero(t)}var u=t("../common"),l=t("../type");e.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:s,predicate:c,represent:{binary:function(t){return"0b"+t.toString(2)},octal:function(t){return"0"+t.toString(8)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return"0x"+t.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;try{var e="("+t+")",n=s.parse(e,{range:!0});return"Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"FunctionExpression"!==n.body[0].expression.type?!1:!0}catch(i){return!1}}function r(t){var e,n="("+t+")",i=s.parse(n,{range:!0}),r=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(t){r.push(t.name)}),e=i.body[0].expression.body.range,new Function(r,n.slice(e[0]+1,e[1]-1))}function o(t){return t.toString()}function a(t){return"[object Function]"===Object.prototype.toString.call(t)}var s;try{s=t("esprima")}catch(c){"undefined"!=typeof window&&(s=window.esprima)}var u=t("../../type");e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13,esprima:"esprima"}],19:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;if(0===t.length)return!1;var e=t,n=/\/([gim]*)$/.exec(t),i="";if("/"===e[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==e[e.length-i.length-1])return!1;e=e.slice(1,e.length-i.length-1)}try{return!0}catch(r){return!1}}function r(t){var e=t,n=/\/([gim]*)$/.exec(t),i="";return"/"===e[0]&&(n&&(i=n[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function o(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function a(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var s=t("../../type");e.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],20:[function(t,e,n){"use strict";function i(){return!0}function r(){return void 0}function o(){return""}function a(t){return"undefined"==typeof t}var s=t("../../type");e.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],21:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},{"../type":13}],22:[function(t,e,n){"use strict";function i(t){return"<<"===t||null===t}var r=t("../type");e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":13}],23:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function r(){return null}function o(t){return null===t}var a=t("../type");e.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n,i,r,o,c=[],u=t;for(e=0,n=u.length;n>e;e+=1){if(i=u[e],o=!1,"[object Object]"!==s.call(i))return!1;for(r in i)if(a.call(i,r)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==c.indexOf(r))return!1;c.push(r)}return!0}function r(t){return null!==t?t:[]}var o=t("../type"),a=Object.prototype.hasOwnProperty,s=Object.prototype.toString;e.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],25:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n,i,r,o,s=t;for(o=new Array(s.length),e=0,n=s.length;n>e;e+=1){if(i=s[e],"[object Object]"!==a.call(i))return!1;if(r=Object.keys(i),1!==r.length)return!1;o[e]=[r[0],i[r[0]]]}return!0}function r(t){if(null===t)return[];var e,n,i,r,o,a=t;for(o=new Array(a.length),e=0,n=a.length;n>e;e+=1)i=a[e],r=Object.keys(i),o[e]=[r[0],i[r[0]]];return o}var o=t("../type"),a=Object.prototype.toString;e.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],26:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},{"../type":13}],27:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n=t;for(e in n)if(a.call(n,e)&&null!==n[e])return!1;return!0}function r(t){return null!==t?t:{}}var o=t("../type"),a=Object.prototype.hasOwnProperty;e.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:r})},{"../type":13}],28:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})},{"../type":13}],29:[function(t,e,n){"use strict";function i(t){return null===t?!1:null===s.exec(t)?!1:!0}function r(t){var e,n,i,r,o,a,c,u,l,p,f=0,h=null;if(e=s.exec(t),null===e)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(o=+e[4],a=+e[5],c=+e[6],e[7]){for(f=e[7].slice(0,3);f.length<3;)f+="0";f=+f}return e[9]&&(u=+e[10],l=+(e[11]||0),h=6e4*(60*u+l),"-"===e[9]&&(h=-h)),p=new Date(Date.UTC(n,i,r,o,a,c,f)),h&&p.setTime(p.getTime()-h),p}function o(t){return t.toISOString()}var a=t("../type"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");e.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:r,instanceOf:Date,represent:o})},{"../type":13}],30:[function(t,e,n){},{}],31:[function(t,e,n){e.exports=t("./lib/inherit")},{"./lib/inherit":32}],32:[function(e,n,i){!function(e){function r(t){var e=f(t);if(v)for(var n,i=0;n=b[i++];)t.hasOwnProperty(n)&&e.push(n);return e}function o(t,e,n){for(var i,o,a=r(n),s=0,u=a.length;u>s;)"__self"!==(i=a[s++])&&(o=n[i],g(o)&&(!c||o.toString().indexOf(".__base")>-1)?e[i]=function(n,i){var r=t[n]?t[n]:"__constructor"===n?e.__self.__parent:y;return function(){var t=this.__base;this.__base=r;var e=i.apply(this,arguments);return this.__base=t,e}}(i,o):e[i]=o)}function a(t,e){for(var n,i=1;n=t[i++];)e?g(n)?s.self(e,n.prototype,n):s.self(e,n):e=g(n)?s(t[0],n.prototype,n):s(t[0],n);return e||t[0]}function s(){var t=arguments,e=m(t[0]),n=e||g(t[0]),i=n?e?a(t[0]):t[0]:u,r=t[n?1:0]||{},s=t[n?2:1],c=r.__constructor||n&&i.prototype.__constructor?function(){return this.__constructor.apply(this,arguments)}:n?function(){return i.apply(this,arguments)}:function(){};if(!n)return c.prototype=r,c.prototype.__self=c.prototype.constructor=c,h(c,s);h(c,i),c.__parent=i;var l=i.prototype,f=c.prototype=p(l);return f.__self=f.constructor=c,r&&o(l,f,r),s&&o(i,c,s),c}var c=function(){"_"}.toString().indexOf("_")>-1,u=function(){},l=Object.prototype.hasOwnProperty,p=Object.create||function(t){var e=function(){};return e.prototype=t,new e},f=Object.keys||function(t){var e=[];for(var n in t)l.call(t,n)&&e.push(n);return e},h=function(t,e){for(var n in e)l.call(e,n)&&(t[n]=e[n]);return t},d=Object.prototype.toString,m=Array.isArray||function(t){return"[object Array]"===d.call(t)},g=function(t){return"[object Function]"===d.call(t)},y=function(){},v=!0,x={toString:""};for(var A in x)x.hasOwnProperty(A)&&(v=!1);var b=v?["toString","valueOf"]:null;s.self=function(){var t=arguments,e=m(t[0]),n=e?a(t[0],t[0][0]):t[0],i=t[1],r=t[2],s=n.prototype;return i&&o(s,s,i),r&&o(n,n,r),n};var w=!0;"object"==typeof i&&(n.exports=s,w=!1),"object"==typeof modules&&(modules.define("inherit",function(t){t(s)}),w=!1),"function"==typeof t&&(t(function(t,e,n){n.exports=s}),w=!1),w&&(e.inherit=s)}(this)},{}],"/":[function(t,e,n){"use strict";var i=t("./lib/js-yaml.js");e.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")}); diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lib/jsoneditor.min.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/jsoneditor.min.js new file mode 100644 index 0000000..343397f --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lib/jsoneditor.min.js @@ -0,0 +1,11 @@ +/*! JSON Editor v0.7.22 - JSON Schema -> HTML Editor + * By Jeremy Dorn - https://github.com/jdorn/json-editor/ + * Released under the MIT license + * + * Date: 2015-08-12 + */ +!function(){var a;!function(){var b=!1,c=/xyz/.test(function(){window.postMessage("xyz")})?/\b_super\b/:/.*/;return a=function(){},a.extend=function(a){function d(){!b&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;b=!0;var f=new this;b=!1;for(var g in a)f[g]="function"==typeof a[g]&&"function"==typeof e[g]&&c.test(a[g])?function(a,b){return function(){var c=this._super;this._super=e[a];var d=b.apply(this,arguments);return this._super=c,d}}(g,a[g]):a[g];return d.prototype=f,d.prototype.constructor=d,d.extend=arguments.callee,d},a}(),function(){function a(a,b){b=b||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail),c}a.prototype=window.Event.prototype,window.CustomEvent=a}(),function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c0&&a.length-1 in a){for(c=0;c=g&&!h&&(h=!0,b())})}},d.send()}}),g||b()},expandRefs:function(a){for(a=c({},a);a.$ref;){var b=a.$ref;delete a.$ref,this.refs[b]||(b=decodeURIComponent(b)),a=this.extendSchemas(a,this.refs[b])}return a},expandSchema:function(a){var b,e=this,f=c({},a);if("object"==typeof a.type&&(Array.isArray(a.type)?d(a.type,function(b,c){"object"==typeof c&&(a.type[b]=e.expandSchema(c))}):a.type=e.expandSchema(a.type)),"object"==typeof a.disallow&&(Array.isArray(a.disallow)?d(a.disallow,function(b,c){"object"==typeof c&&(a.disallow[b]=e.expandSchema(c))}):a.disallow=e.expandSchema(a.disallow)),a.anyOf&&d(a.anyOf,function(b,c){a.anyOf[b]=e.expandSchema(c)}),a.dependencies&&d(a.dependencies,function(b,c){"object"!=typeof c||Array.isArray(c)||(a.dependencies[b]=e.expandSchema(c))}),a.not&&(a.not=this.expandSchema(a.not)),a.allOf){for(b=0;b=a.maximum?k.push({path:e,property:"maximum",message:this.translate("error_maximum_excl",[a.maximum])}):!a.exclusiveMaximum&&b>a.maximum&&k.push({path:e,property:"maximum",message:this.translate("error_maximum_incl",[a.maximum])})),a.hasOwnProperty("minimum")&&(a.exclusiveMinimum&&b<=a.minimum?k.push({path:e,property:"minimum",message:this.translate("error_minimum_excl",[a.minimum])}):!a.exclusiveMinimum&&ba.maxLength&&k.push({path:e,property:"maxLength",message:this.translate("error_maxLength",[a.maxLength])}),a.minLength&&(b+"").lengtha.maxItems&&k.push({path:e,property:"maxItems",message:this.translate("error_maxItems",[a.maxItems])}),a.minItems&&b.lengtha.maxProperties&&k.push({path:e,property:"maxProperties",message:this.translate("error_maxProperties",[a.maxProperties])})}if(a.minProperties){g=0;for(h in b)b.hasOwnProperty(h)&&g++;g=0){b=this.theme.getBlockLinkHolder(),c=this.theme.getBlockLink(),c.setAttribute("target","_blank");var h=document.createElement(e);h.setAttribute("controls","controls"),this.theme.createMediaLink(b,c,h),this.link_watchers.push(function(b){var d=f(b);c.setAttribute("href",d),c.textContent=a.rel||d,h.setAttribute("src",d)})}else b=this.theme.getBlockLink(),b.setAttribute("target","_blank"),b.textContent=a.rel,this.link_watchers.push(function(c){var d=f(c);b.setAttribute("href",d),b.textContent=a.rel||d});return b},refreshWatchedFieldValues:function(){if(this.watched_values){var a={},b=!1,c=this;if(this.watched){var d,e;for(var f in this.watched)this.watched.hasOwnProperty(f)&&(e=c.jsoneditor.getEditor(this.watched[f]),d=e?e.getValue():null,c.watched_values[f]!==d&&(b=!0),a[f]=d)}return a.self=this.getValue(),this.watched_values.self!==a.self&&(b=!0),this.watched_values=a,b}},getWatchedFieldValues:function(){return this.watched_values},updateHeaderText:function(){if(this.header)if(this.header.children.length){for(var a=0;a-1:this.jsoneditor.options.required_by_default?!0:!1},getDisplayText:function(a){var b=[],c={};d(a,function(a,b){b.title&&(c[b.title]=c[b.title]||0,c[b.title]++),b.description&&(c[b.description]=c[b.description]||0,c[b.description]++),b.format&&(c[b.format]=c[b.format]||0,c[b.format]++),b.type&&(c[b.type]=c[b.type]||0,c[b.type]++)}),d(a,function(a,d){var e;e="string"==typeof d?d:d.title&&c[d.title]<=1?d.title:d.format&&c[d.format]<=1?d.format:d.type&&c[d.type]<=1?d.type:d.description&&c[d.description]<=1?d.descripton:d.title?d.title:d.format?d.format:d.type?d.type:d.description?d.description:JSON.stringify(d).length<50?JSON.stringify(d):"type",b.push(e)});var e={};return d(b,function(a,d){e[d]=e[d]||0,e[d]++,c[d]>1&&(b[a]=d+" "+e[d])}),b},getOption:function(a){try{throw"getOption is deprecated"}catch(b){window.console.error(b)}return this.options[a]},showValidationErrors:function(a){}}),f.defaults.editors["null"]=f.AbstractEditor.extend({getValue:function(){return null},setValue:function(){this.onChange()},getNumColumns:function(){return 2}}),f.defaults.editors.string=f.AbstractEditor.extend({register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},setValue:function(a,b,c){if((!this.template||c)&&(null===a||"undefined"==typeof a?a="":"object"==typeof a?a=JSON.stringify(a):"string"!=typeof a&&(a=""+a),a!==this.serialized)){var d=this.sanitize(a);if(this.input.value!==d){this.input.value=d,this.sceditor_instance?this.sceditor_instance.val(d):this.epiceditor?this.epiceditor.importFile(null,d):this.ace_editor&&this.ace_editor.setValue(d);var e=c||this.getValue()!==a;this.refreshValue(),b?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(e)}}},getNumColumns:function(){var a,b=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return a="textarea"===this.input_type?6:["text","email"].indexOf(this.input_type)>=0?4:2,Math.min(12,Math.max(b,a))},build:function(){var a=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if("textarea"===this.format)this.input_type="textarea",this.input=this.theme.getTextareaInput();else if("range"===this.format){this.input_type="range";var b=this.schema.minimum||0,c=this.schema.maximum||Math.max(100,b+1),d=1;this.schema.multipleOf&&(b%this.schema.multipleOf&&(b=Math.ceil(b/this.schema.multipleOf)*this.schema.multipleOf),c%this.schema.multipleOf&&(c=Math.floor(c/this.schema.multipleOf)*this.schema.multipleOf),d=this.schema.multipleOf),this.input=this.theme.getRangeInput(b,c,d)}else["actionscript","batchfile","bbcode","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","markdown","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","r","ruby","sass","scala","scss","smarty","sql","stylus","svg","twig","vbscript","xml","yaml"].indexOf(this.format)>=0?(this.input_type=this.format,this.source_code=!0,this.input=this.theme.getTextareaInput()):(this.input_type=this.format,this.input=this.theme.getFormInputField(this.input_type));else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);"undefined"!=typeof this.schema.maxLength&&this.input.setAttribute("maxlength",this.schema.maxLength),"undefined"!=typeof this.schema.pattern?this.input.setAttribute("pattern",this.schema.pattern):"undefined"!=typeof this.schema.minLength&&this.input.setAttribute("pattern",".{"+this.schema.minLength+",}"),this.options.compact?this.container.className+=" compact":this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),a.schema.template)return void(this.value=a.value);var c=this.value,d=a.sanitize(c);c!==d&&(this.value=d),a.is_dirty=!0,a.refreshValue(),a.onChange(!0)}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(a){if(a){var b,c=a.offsetHeight;if(a.offsetHeight100);)b++,c++,a.style.height=c+"px";else{for(b=0;a.offsetHeight>=a.scrollHeight+3&&!(b>100);)b++,c--,a.style.height=c+"px";a.style.height=c+1+"px"}}},this.input.addEventListener("keyup",function(b){a.adjust_height(this)}),this.input.addEventListener("change",function(b){a.adjust_height(this)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.control=this.theme.getFormControl(this.label,this.input,this.description),this.container.appendChild(this.control),window.requestAnimationFrame(function(){a.input.parentNode&&a.afterInputReady(),a.adjust_height&&a.adjust_height(a.input)}),this.schema.template?(this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()):this.refreshValue()},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},afterInputReady:function(){var a,b=this;if(this.source_code)if(this.options.wysiwyg&&["html","bbcode"].indexOf(this.input_type)>=0&&window.jQuery&&window.jQuery.fn&&window.jQuery.fn.sceditor)a=c({},{plugins:"html"===b.input_type?"xhtml":"bbcode",emoticonsEnabled:!1,width:"100%",height:300},f.plugins.sceditor,b.options.sceditor_options||{}),window.jQuery(b.input).sceditor(a),b.sceditor_instance=window.jQuery(b.input).sceditor("instance"),b.sceditor_instance.blur(function(){var a=window.jQuery("
"+b.sceditor_instance.val()+"
");window.jQuery("#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf",a).remove(),b.input.value=a.html(),b.value=b.input.value,b.is_dirty=!0,b.onChange(!0)});else if("markdown"===this.input_type&&window.EpicEditor)this.epiceditor_container=document.createElement("div"),this.input.parentNode.insertBefore(this.epiceditor_container,this.input),this.input.style.display="none",a=c({},f.plugins.epiceditor,{container:this.epiceditor_container,clientSideStorage:!1}),this.epiceditor=new window.EpicEditor(a).load(),this.epiceditor.importFile(null,this.getValue()),this.epiceditor.on("update",function(){var a=b.epiceditor.exportFile();b.input.value=a,b.value=a,b.is_dirty=!0,b.onChange(!0); +});else if(window.ace){var d=this.input_type;("cpp"===d||"c++"===d||"c"===d)&&(d="c_cpp"),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.ace_container.style.height="400px",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor=window.ace.edit(this.ace_container),this.ace_editor.setValue(this.getValue()),f.plugins.ace.theme&&this.ace_editor.setTheme("ace/theme/"+f.plugins.ace.theme),d=window.ace.require("ace/mode/"+d),d&&this.ace_editor.getSession().setMode(new d.Mode),this.ace_editor.on("change",function(){var a=b.ace_editor.getValue();b.input.value=a,b.refreshValue(),b.is_dirty=!0,b.onChange(!0)})}b.theme.afterInputReady(b.input)},refreshValue:function(){this.value=this.input.value,"string"!=typeof this.value&&(this.value=""),this.serialized=this.value},destroy:function(){this.sceditor_instance?this.sceditor_instance.destroy():this.epiceditor?this.epiceditor.unload():this.ace_editor&&this.ace_editor.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this._super()},sanitize:function(a){return a},onWatchedFieldChange:function(){var a;this.template&&(a=this.getWatchedFieldValues(),this.setValue(this.template(a),!1,!0)),this._super()},showValidationErrors:function(a){var b=this;if("always"===this.jsoneditor.options.show_errors);else if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return;this.previous_error_setting=this.jsoneditor.options.show_errors;var c=[];d(a,function(a,d){d.path===b.path&&c.push(d.message)}),c.length?this.theme.addInputError(this.input,c.join(". ")+"."):this.theme.removeInputError(this.input)}}),f.defaults.editors.number=f.defaults.editors.string.extend({sanitize:function(a){return(a+"").replace(/[^0-9\.\-eE]/g,"")},getNumColumns:function(){return 2},getValue:function(){return 1*this.value}}),f.defaults.editors.integer=f.defaults.editors.number.extend({sanitize:function(a){return a+="",a.replace(/[^0-9\-]/g,"")},getNumColumns:function(){return 2}}),f.defaults.editors.object=f.AbstractEditor.extend({getDefault:function(){return c({},this.schema["default"]||{})},getChildEditors:function(){return this.editors},register:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].register()},unregister:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].unregister()},getNumColumns:function(){return Math.max(Math.min(12,this.maxwidth),3)},enable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].enable()},disable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].disable()},layoutEditors:function(){var a,b,c=this;if(this.row_container){this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(a,b){var d=c.editors[a].schema.propertyOrder,e=c.editors[b].schema.propertyOrder;return"number"!=typeof d&&(d=1e3),"number"!=typeof e&&(e=1e3),d-e});var e;if("grid"===this.format){var f=[];for(d(this.property_order,function(a,b){var d=c.editors[b];if(!d.property_removed){for(var e=!1,g=d.options.hidden?0:d.options.grid_columns||d.getNumColumns(),h=d.options.hidden?0:d.container.offsetHeight,i=0;ih)&&(e=i);e===!1&&(f.push({width:0,minh:999999,maxh:0,editors:[]}),e=f.length-1),f[e].editors.push({key:b,width:g,height:h}),f[e].width+=g,f[e].minh=Math.min(f[e].minh,h),f[e].maxh=Math.max(f[e].maxh,h)}}),a=0;af[a].editors[g].width&&(g=b),f[a].editors[b].width*=12/f[a].width,f[a].editors[b].width=Math.floor(f[a].editors[b].width),h+=f[a].editors[b].width;12>h&&(f[a].editors[g].width+=12-h),f[a].width=12}if(this.layout===JSON.stringify(f))return!1;for(this.layout=JSON.stringify(f),e=document.createElement("div"),a=0;a=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={};for(a in this.cached_editors)this.cached_editors.hasOwnProperty(a)&&(this.addPropertyCheckbox(a),this.isRequired(this.cached_editors[a])&&a in this.editors&&(this.addproperty_checkboxes[a].disabled=!0),"undefined"!=typeof this.schema.minProperties&&d<=this.schema.minProperties?(this.addproperty_checkboxes[a].disabled=this.addproperty_checkboxes[a].checked,this.addproperty_checkboxes[a].checked||(e=!0)):a in this.editors?(e=!0,c=!0):b||this.schema.properties.hasOwnProperty(a)?(this.addproperty_checkboxes[a].disabled=!1,e=!0):this.addproperty_checkboxes[a].disabled=!0);this.canHaveAdditionalProperties()&&(e=!0);for(a in this.schema.properties)this.schema.properties.hasOwnProperty(a)&&(this.cached_editors[a]||(e=!0,this.addPropertyCheckbox(a)));e?this.canHaveAdditionalProperties()?b?this.addproperty_add.disabled=!1:this.addproperty_add.disabled=!0:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_controls.style.display="none")},isRequired:function(a){return"boolean"==typeof a.schema.required?a.schema.required:Array.isArray(this.schema.required)?this.schema.required.indexOf(a.key)>-1:this.jsoneditor.options.required_by_default?!0:!1},setValue:function(a,b){var c=this;a=a||{},("object"!=typeof a||Array.isArray(a))&&(a={}),d(this.cached_editors,function(d,e){"undefined"!=typeof a[d]?(c.addObjectProperty(d),e.setValue(a[d],b)):b||c.isRequired(e)?e.setValue(e.getDefault(),b):c.removeObjectProperty(d)}),d(a,function(a,d){c.cached_editors[a]||(c.addObjectProperty(a),c.editors[a]&&c.editors[a].setValue(d,b))}),this.refreshValue(),this.layoutEditors(),this.onChange()},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";this.options.table_row&&(c.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),d(this.editors,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.array=f.AbstractEditor.extend({getDefault:function(){return this.schema["default"]||[]},register:function(){if(this._super(),this.rows)for(var a=0;a=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?c({},this.schema.additionalItems):void 0:c({},this.schema.items[a]):this.schema.items?c({},this.schema.items):{}},getItemInfo:function(a){var b=this.getItemSchema(a);this.item_info=this.item_info||{};var c=JSON.stringify(b);return"undefined"!=typeof this.item_info[c]?this.item_info[c]:(b=this.jsoneditor.expandRefs(b),this.item_info[c]={title:b.title||"item","default":b["default"],width:12,child_editors:b.properties||b.items},this.item_info[c])},getElementEditor:function(a){var b=this.getItemInfo(a),c=this.getItemSchema(a);c=this.jsoneditor.expandRefs(c),c.title=b.title+" "+(a+1);var d,e=this.jsoneditor.getEditorClass(c);d=this.tabs_holder?this.theme.getTabContent():b.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(d);var f=this.jsoneditor.createEditor(e,{jsoneditor:this.jsoneditor,schema:c,container:d,path:this.path+"."+a,parent:this,required:!0});return f.preBuild(),f.build(),f.postBuild(),f.title_controls||(f.array_controls=this.theme.getButtonHolder(),d.appendChild(f.array_controls)),f},destroy:function(){this.empty(!0),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.row_holder&&this.row_holder.parentNode&&this.row_holder.parentNode.removeChild(this.row_holder),this.controls&&this.controls.parentNode&&this.controls.parentNode.removeChild(this.controls),this.panel&&this.panel.parentNode&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,this._super()},empty:function(a){if(this.rows){var b=this;d(this.rows,function(c,d){a&&(d.tab&&d.tab.parentNode&&d.tab.parentNode.removeChild(d.tab),b.destroyRow(d,!0),b.row_cache[c]=null),b.rows[c]=null}),b.rows=[],a&&(b.row_cache=[])}},destroyRow:function(a,b){var c=a.container;b?(a.destroy(),c.parentNode&&c.parentNode.removeChild(c),a.tab&&a.tab.parentNode&&a.tab.parentNode.removeChild(a.tab)):(a.tab&&(a.tab.style.display="none"),c.style.display="none",a.unregister())},getMax:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0},refreshTabs:function(a){var b=this;d(this.rows,function(c,d){d.tab&&(a?d.tab_text.textContent=d.getHeaderText():d.tab===b.active_tab?(b.theme.markTabActive(d.tab),d.container.style.display=""):(b.theme.markTabInactive(d.tab),d.container.style.display="none"))})},setValue:function(a,b){a=a||[],Array.isArray(a)||(a=[a]);var c=JSON.stringify(a);if(c!==this.serialized){if(this.schema.minItems)for(;a.lengththis.getMax()&&(a=a.slice(0,this.getMax()));var e=this;d(a,function(a,c){e.rows[a]?e.rows[a].setValue(c,b):e.row_cache[a]?(e.rows[a]=e.row_cache[a],e.rows[a].setValue(c,b),e.rows[a].container.style.display="",e.rows[a].tab&&(e.rows[a].tab.style.display=""),e.rows[a].register()):e.addRow(c,b)});for(var f=a.length;f=this.rows.length;d(this.rows,function(a,c){c.movedown_button&&(a===b.rows.length-1?c.movedown_button.style.display="none":c.movedown_button.style.display=""),c.delete_button&&(e?c.delete_button.style.display="none":c.delete_button.style.display=""),b.value[a]=c.getValue()});var f=!1;this.value.length?1===this.value.length?(this.remove_all_rows_button.style.display="none",e||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",f=!0)):e||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",f=!0):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"),this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",f=!0),!this.collapsed&&f?this.controls.style.display="inline-block":this.controls.style.display="none"}},addRow:function(a,b){var c=this,e=this.rows.length;c.rows[e]=this.getElementEditor(e),c.row_cache[e]=c.rows[e],c.tabs_holder&&(c.rows[e].tab_text=document.createElement("span"),c.rows[e].tab_text.textContent=c.rows[e].getHeaderText(),c.rows[e].tab=c.theme.getTab(c.rows[e].tab_text),c.rows[e].tab.addEventListener("click",function(a){c.active_tab=c.rows[e].tab,c.refreshTabs(),a.preventDefault(),a.stopPropagation()}),c.theme.addTab(c.tabs_holder,c.rows[e].tab));var f=c.rows[e].title_controls||c.rows[e].array_controls;c.hide_delete_buttons||(c.rows[e].delete_button=this.getButton(c.getItemTitle(),"delete","Delete "+c.getItemTitle()),c.rows[e].delete_button.className+=" delete",c.rows[e].delete_button.setAttribute("data-i",e),c.rows[e].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),e=c.getValue(),f=[],g=null;d(e,function(a,d){return a===b?void(c.rows[a].tab===c.active_tab&&(c.rows[a+1]?g=c.rows[a].tab:a&&(g=c.rows[a-1].tab))):void f.push(d)}),c.setValue(f),g&&(c.active_tab=g,c.refreshTabs()),c.onChange(!0)}),f&&f.appendChild(c.rows[e].delete_button)),e&&!c.hide_move_buttons&&(c.rows[e].moveup_button=this.getButton("","moveup","Move up"),c.rows[e].moveup_button.className+=" moveup",c.rows[e].moveup_button.setAttribute("data-i",e),c.rows[e].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i");if(!(0>=b)){var d=c.getValue(),e=d[b-1];d[b-1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b-1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].moveup_button)),c.hide_move_buttons||(c.rows[e].movedown_button=this.getButton("","movedown","Move down"),c.rows[e].movedown_button.className+=" movedown",c.rows[e].movedown_button.setAttribute("data-i",e),c.rows[e].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),d=c.getValue();if(!(b>=d.length-1)){var e=d[b+1];d[b+1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b+1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].movedown_button)),a&&c.rows[e].setValue(a,b),c.refreshTabs()},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls.appendChild(this.toggle_button);var b=a.row_holder.style.display,c=a.controls.style.display;this.toggle_button.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel&&(a.panel.style.display=""),a.row_holder.style.display=b,a.tabs_holder&&(a.tabs_holder.style.display=""),a.controls.style.display=c,a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.row_holder.style.display="none",a.tabs_holder&&(a.tabs_holder.style.display="none"),a.controls.style.display="none",a.panel&&(a.panel.style.display="none"),a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this.getButton(this.getItemTitle(),"add","Add "+this.getItemTitle()),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.rows.length;a.row_cache[c]?(a.rows[c]=a.row_cache[c],a.rows[c].setValue(a.rows[c].getDefault()),a.rows[c].container.style.display="",a.rows[c].tab&&(a.rows[c].tab.style.display=""),a.rows[c].register()):a.addRow(),a.active_tab=a.rows[c].tab,a.refreshTabs(),a.refreshValue(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton("Last "+this.getItemTitle(),"delete","Delete Last "+this.getItemTitle()), +this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue(),d=null;a.rows.length>1&&a.rows[a.rows.length-1].tab===a.active_tab&&(d=a.rows[a.rows.length-2].tab),c.pop(),a.setValue(c),d&&(a.active_tab=d,a.refreshTabs()),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton("All","delete","Delete All"),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button),a.tabs&&(this.add_row_button.style.width="100%",this.add_row_button.style.textAlign="left",this.add_row_button.style.marginBottom="3px",this.delete_last_row_button.style.width="100%",this.delete_last_row_button.style.textAlign="left",this.delete_last_row_button.style.marginBottom="3px",this.remove_all_rows_button.style.width="100%",this.remove_all_rows_button.style.textAlign="left",this.remove_all_rows_button.style.marginBottom="3px")},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";d(this.rows,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.table=f.defaults.editors.array.extend({register:function(){if(this._super(),this.rows)for(var a=0;athis.schema.maxItems&&(a=a.slice(0,this.schema.maxItems));var c=JSON.stringify(a);if(c!==this.serialized){var e=!1,f=this;d(a,function(a,b){f.rows[a]?f.rows[a].setValue(b):(f.addRow(b),e=!0)});for(var g=a.length;g=this.rows.length,c=!1;d(this.rows,function(d,e){e.movedown_button&&(d===a.rows.length-1?e.movedown_button.style.display="none":(c=!0,e.movedown_button.style.display="")),e.delete_button&&(b?e.delete_button.style.display="none":(c=!0,e.delete_button.style.display="")),e.moveup_button&&(c=!0)}),d(this.rows,function(a,b){c?b.controls_cell.style.display="":b.controls_cell.style.display="none"}),c?this.controls_header_cell.style.display="":this.controls_header_cell.style.display="none";var e=!1;this.value.length?1===this.value.length||this.hide_delete_buttons?(this.table.style.display="",this.remove_all_rows_button.style.display="none",b||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",e=!0)):(this.table.style.display="",b||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",e=!0)):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none",this.table.style.display="none"),this.schema.maxItems&&this.schema.maxItems<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",e=!0),e?this.controls.style.display="":this.controls.style.display="none"},refreshValue:function(){var a=this;this.value=[],d(this.rows,function(b,c){a.value[b]=c.getValue()}),this.serialized=JSON.stringify(this.value)},addRow:function(a){var b=this,c=this.rows.length;b.rows[c]=this.getElementEditor(c);var e=b.rows[c].table_controls;this.hide_delete_buttons||(b.rows[c].delete_button=this.getButton("","delete","Delete"),b.rows[c].delete_button.className+=" delete",b.rows[c].delete_button.setAttribute("data-i",c),b.rows[c].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),e=b.getValue(),f=[];d(e,function(a,b){a!==c&&f.push(b)}),b.setValue(f),b.onChange(!0)}),e.appendChild(b.rows[c].delete_button)),c&&!this.hide_move_buttons&&(b.rows[c].moveup_button=this.getButton("","moveup","Move up"),b.rows[c].moveup_button.className+=" moveup",b.rows[c].moveup_button.setAttribute("data-i",c),b.rows[c].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i");if(!(0>=c)){var d=b.getValue(),e=d[c-1];d[c-1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].moveup_button)),this.hide_move_buttons||(b.rows[c].movedown_button=this.getButton("","movedown","Move down"),b.rows[c].movedown_button.className+=" movedown",b.rows[c].movedown_button.setAttribute("data-i",c),b.rows[c].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),d=b.getValue();if(!(c>=d.length-1)){var e=d[c+1];d[c+1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].movedown_button)),a&&b.rows[c].setValue(a)},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls&&(this.title_controls.appendChild(this.toggle_button),this.toggle_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel.style.display="",a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.panel.style.display="none",a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this.getButton(this.getItemTitle(),"add","Add "+this.getItemTitle()),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.addRow(),a.refreshValue(),a.refreshRowButtons(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton("Last "+this.getItemTitle(),"delete","Delete Last "+this.getItemTitle()),this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue();c.pop(),a.setValue(c),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton("All","delete","Delete All"),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button)}}),f.defaults.editors.multiple=f.AbstractEditor.extend({register:function(){if(this.editors){for(var a=0;anull";if("object"==typeof a){var c="";return d(a,function(d,e){var f=b.getHTML(e);Array.isArray(a)||(f="
"+d+": "+f+"
"),c+="
  • "+f+"
  • "}),c=Array.isArray(a)?"
      "+c+"
    ":"
      "+c+"
    "}return"boolean"==typeof a?a?"true":"false":"string"==typeof a?a.replace(/&/g,"&").replace(//g,">"):a},setValue:function(a){this.value!==a&&(this.value=a,this.refreshValue(),this.onChange())},destroy:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),this._super()}}),f.defaults.editors.select=f.AbstractEditor.extend({setValue:function(a,b){a=this.typecast(a||"");var c=a;this.enum_values.indexOf(c)<0&&(c=this.enum_values[0]),this.value!==c&&(this.input.value=this.enum_options[this.enum_values.indexOf(c)],this.select2&&this.select2.select2("val",this.input.value),this.value=c,this.onChange())},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){if(!this.enum_options)return 3;for(var a=this.getTitle().length,b=0;b2||this.enum_options.length&&this.enumSource)){var a=c({},f.plugins.select2);this.schema.options&&this.schema.options.select2_options&&(a=c(a,this.schema.options.select2_options)),this.select2=window.jQuery(this.input).select2(a);var b=this;this.select2.on("select2-blur",function(){b.input.value=b.select2.select2("val"),b.onInputChange()})}else this.select2=null},postBuild:function(){this._super(),this.theme.afterInputReady(this.input),this.setupSelect2()},onWatchedFieldChange:function(){var a,b;if(this.enumSource){a=this.getWatchedFieldValues();for(var c=[],d=[],e=0;eType: "+a+", Size: "+Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)+" bytes","image"===a.substr(0,5)){this.preview.innerHTML+="
    ";var b=document.createElement("img");b.style.maxWidth="100%",b.style.maxHeight="100px",b.src=this.value,this.preview.appendChild(b)}}else this.preview.innerHTML="Invalid data URI"}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.refreshPreview(),this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.upload=f.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){var a=this;if(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!this.jsoneditor.options.upload)throw"Upload handler required for upload editor";this.uploader=this.theme.getFormInputField("file"),this.uploader.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),this.files&&this.files.length){var c=new FileReader;c.onload=function(b){a.preview_value=b.target.result,a.refreshPreview(),a.onChange(!0),c=null},c.readAsDataURL(this.files[0])}})}var b=this.schema.description;b||(b=""),this.preview=this.theme.getFormInputDescription(b),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview),this.container.appendChild(this.control)},refreshPreview:function(){if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var a=this,b=this.preview_value.match(/^data:([^;,]+)[;,]/);b&&(b=b[1]),b||(b="unknown");var c=this.uploader.files[0];if(this.preview.innerHTML="Type: "+b+", Size: "+c.size+" bytes","image"===b.substr(0,5)){this.preview.innerHTML+="
    ";var d=document.createElement("img");d.style.maxWidth="100%",d.style.maxHeight="100px",d.src=this.preview_value, +this.preview.appendChild(d)}this.preview.innerHTML+="
    ";var e=this.getButton("Upload","upload","Upload");this.preview.appendChild(e),e.addEventListener("click",function(b){b.preventDefault(),e.setAttribute("disabled","disabled"),a.theme.removeInputError(a.uploader),a.theme.getProgressBar&&(a.progressBar=a.theme.getProgressBar(),a.preview.appendChild(a.progressBar)),a.jsoneditor.options.upload(a.path,c,{success:function(b){a.setValue(b),a.parent?a.parent.onChildEditorChange(a):a.jsoneditor.onChange(),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},failure:function(b){a.theme.addInputError(a.uploader,b),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},updateProgress:function(b){a.progressBar&&(b?a.theme.updateProgressBar(a.progressBar,b):a.theme.updateProgressBarUnknown(a.progressBar))}})})}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.checkbox=f.AbstractEditor.extend({setValue:function(a,b){this.value=!!a,this.input.checked=this.value,this.onChange()},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))},build:function(){var a=this;this.options.compact||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.options.compact&&(this.container.className+=" compact"),this.input=this.theme.getCheckbox(),this.control=this.theme.getFormControl(this.label,this.input,this.description),(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){b.preventDefault(),b.stopPropagation(),a.value=this.checked,a.onChange(!0)}),this.container.appendChild(this.control)},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},destroy:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this._super()}});var g=function(){var a=document.documentElement;return a.matches?"matches":a.webkitMatchesSelector?"webkitMatchesSelector":a.mozMatchesSelector?"mozMatchesSelector":a.msMatchesSelector?"msMatchesSelector":a.oMatchesSelector?"oMatchesSelector":void 0}();f.AbstractTheme=a.extend({getContainer:function(){return document.createElement("div")},getFloatRightLinkHolder:function(){var a=document.createElement("div");return a.style=a.style||{},a.style.cssFloat="right",a.style.marginLeft="10px",a},getModal:function(){var a=document.createElement("div");return a.style.backgroundColor="white",a.style.border="1px solid black",a.style.boxShadow="3px 3px black",a.style.position="absolute",a.style.zIndex="10",a.style.display="none",a},getGridContainer:function(){var a=document.createElement("div");return a},getGridRow:function(){var a=document.createElement("div");return a.className="row",a},getGridColumn:function(){var a=document.createElement("div");return a},setGridColumnSize:function(a,b){},getLink:function(a){var b=document.createElement("a");return b.setAttribute("href","#"),b.appendChild(document.createTextNode(a)),b},disableHeader:function(a){a.style.color="#ccc"},disableLabel:function(a){a.style.color="#ccc"},enableHeader:function(a){a.style.color=""},enableLabel:function(a){a.style.color=""},getFormInputLabel:function(a){var b=document.createElement("label");return b.appendChild(document.createTextNode(a)),b},getCheckboxLabel:function(a){var b=this.getFormInputLabel(a);return b.style.fontWeight="normal",b},getHeader:function(a,b){var c=document.createElement("h3");return"string"==typeof a?c.textContent=a:c.appendChild(a),b&&(c.className+=" required"),c},getCheckbox:function(){var a=this.getFormInputField("checkbox");return a.style.display="inline-block",a.style.width="auto",a},getMultiCheckboxHolder:function(a,b,c){var d=document.createElement("div");b&&(b.style.display="block",d.appendChild(b));for(var e in a)a.hasOwnProperty(e)&&(a[e].style.display="inline-block",a[e].style.marginRight="20px",d.appendChild(a[e]));return c&&d.appendChild(c),d},getSelectInput:function(a){var b=document.createElement("select");return a&&this.setSelectOptions(b,a),b},getSwitcher:function(a){var b=this.getSelectInput(a);return b.style.backgroundColor="transparent",b.style.display="inline-block",b.style.fontStyle="italic",b.style.fontWeight="normal",b.style.height="auto",b.style.marginBottom=0,b.style.marginLeft="5px",b.style.padding="0 0 0 3px",b.style.width="auto",b},getSwitcherOptions:function(a){return a.getElementsByTagName("option")},setSwitcherOptions:function(a,b,c){this.setSelectOptions(a,b,c)},setSelectOptions:function(a,b,c){c=c||[],a.innerHTML="";for(var d=0;d'),a.errmsg=a.parentNode.getElementsByClassName("error")[0]),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.group.className=a.group.className.replace(/ error/g,""),a.errmsg.style.display="none")},getProgressBar:function(){var a=document.createElement("div");a.className="progress";var b=document.createElement("span");return b.className="meter",b.style.width="0%",a.appendChild(b),a},updateProgressBar:function(a,b){a&&(a.firstChild.style.width=b+"%")},updateProgressBarUnknown:function(a){a&&(a.firstChild.style.width="100%")}}),f.defaults.themes.foundation3=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.fontWeight="bold",b&&(c.className+=" required"),c},getTabHolder:function(){var a=document.createElement("div");return a.className="row",a.innerHTML="
    ",a},setGridColumnSize:function(a,b){var c=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve"];a.className="columns "+c[b]},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.foundation4=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},setGridColumnSize:function(a,b){a.className="columns large-"+b},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.fontWeight="bold",b&&(c.className+=" required"),c}}),f.defaults.themes.foundation5=f.defaults.themes.foundation.extend({getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},setGridColumnSize:function(a,b){a.className="columns medium-"+b},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className=d.className.replace(/\s*small/g,"")+" tiny",d},getTabHolder:function(){var a=document.createElement("div");return a.innerHTML="
    ",a},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.html=f.AbstractTheme.extend({getFormInputLabel:function(a,b){var c=this._super(a);return c.style.display="block",c.style.marginBottom="3px",c.style.fontWeight="bold",b&&(c.className+=" required"),c},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8em",b.style.margin=0,b.style.display="inline-block",b.style.fontStyle="italic",b},getIndentedPanel:function(){var a=this._super();return a.style.border="1px solid #ddd",a.style.padding="5px",a.style.margin="5px",a.style.borderRadius="3px",a},getChildEditorHolder:function(){var a=this._super();return a.style.marginBottom="8px",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.display="inline-block",a.style.marginLeft="10px",a.style.fontSize=".8em",a.style.verticalAlign="middle",a},getTable:function(){var a=this._super();return a.style.borderBottom="1px solid #ccc",a.style.marginBottom="5px",a},addInputError:function(a,b){if(a.style.borderColor="red",a.errmsg)a.errmsg.style.display="block";else{var c=this.closest(a,".form-control");a.errmsg=document.createElement("div"),a.errmsg.setAttribute("class","errmsg"),a.errmsg.style=a.errmsg.style||{},a.errmsg.style.color="red",c.appendChild(a.errmsg)}a.errmsg.innerHTML="",a.errmsg.appendChild(document.createTextNode(b))},removeInputError:function(a){a.style.borderColor="",a.errmsg&&(a.errmsg.style.display="none")},getProgressBar:function(){var a=100,b=0,c=document.createElement("progress");return c.setAttribute("max",a),c.setAttribute("value",b),c},updateProgressBar:function(a,b){a&&a.setAttribute("value",b)},updateProgressBarUnknown:function(a){a&&a.removeAttribute("value")}}),f.defaults.themes.jqueryui=f.AbstractTheme.extend({getTable:function(){var a=this._super();return a.setAttribute("cellpadding",5),a.setAttribute("cellspacing",0),a},getTableHeaderCell:function(a){var b=this._super(a);return b.className="ui-state-active",b.style.fontWeight="bold",b},getTableCell:function(){var a=this._super();return a.className="ui-widget-content",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.marginLeft="10px",a.style.fontSize=".6em",a.style.display="inline-block",a},getFormInputDescription:function(a){var b=this.getDescription(a);return b.style.marginLeft="10px",b.style.display="inline-block",b},getFormControl:function(a,b,c){var d=this._super(a,b,c);return"checkbox"===b.type?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d},getDescription:function(a){var b=document.createElement("span");return b.style.fontSize=".8em",b.style.fontStyle="italic",b.textContent=a,b},getButtonHolder:function(){var a=document.createElement("div");return a.className="ui-buttonset",a.style.fontSize=".7em",a},getFormInputLabel:function(a,b){var c=document.createElement("label");return c.style.fontWeight="bold",c.style.display="block",b&&(c.className+=" required"),c.textContent=a,c},getButton:function(a,b,c){var d=document.createElement("button");d.className="ui-button ui-widget ui-state-default ui-corner-all",b&&!a?(d.className+=" ui-button-icon-only",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):b?(d.className+=" ui-button-text-icon-primary",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):d.className+=" ui-button-text-only";var e=document.createElement("span");return e.className="ui-button-text",e.textContent=a||c||".",d.appendChild(e),d.setAttribute("title",c),d},setButtonText:function(a,b,c,d){a.innerHTML="",a.className="ui-button ui-widget ui-state-default ui-corner-all",c&&!b?(a.className+=" ui-button-icon-only",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):c?(a.className+=" ui-button-text-icon-primary",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):a.className+=" ui-button-text-only";var e=document.createElement("span");e.className="ui-button-text",e.textContent=b||d||".",a.appendChild(e),a.setAttribute("title",d)},getIndentedPanel:function(){var a=document.createElement("div");return a.className="ui-widget-content ui-corner-all",a.style.padding="1em 1.4em",a.style.marginBottom="20px",a},afterInputReady:function(a){a.controls||(a.controls=this.closest(a,".form-control"))},addInputError:function(a,b){a.controls&&(a.errmsg?a.errmsg.style.display="":(a.errmsg=document.createElement("div"),a.errmsg.className="ui-state-error",a.controls.appendChild(a.errmsg)),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.errmsg.style.display="none")},markTabActive:function(a){a.className=a.className.replace(/\s*ui-widget-header/g,"")+" ui-state-active"},markTabInactive:function(a){a.className=a.className.replace(/\s*ui-state-active/g,"")+" ui-widget-header"}}),f.AbstractIconLib=a.extend({mapping:{collapse:"",expand:"","delete":"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},icon_prefix:"",getIconClass:function(a){return this.mapping[a]?this.icon_prefix+this.mapping[a]:null},getIcon:function(a){var b=this.getIconClass(a);if(!b)return null;var c=document.createElement("i");return c.className=b,c}}),f.defaults.iconlibs.bootstrap2=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-up","delete":"trash",edit:"pencil",add:"plus",cancel:"ban-circle",save:"ok",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.bootstrap3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"glyphicon glyphicon-"}),f.defaults.iconlibs.fontawesome3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"ban-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.fontawesome4=f.AbstractIconLib.extend({mapping:{collapse:"caret-square-o-down",expand:"caret-square-o-right","delete":"times",edit:"pencil",add:"plus",cancel:"ban",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fa fa-"}),f.defaults.iconlibs.foundation2=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"remove",edit:"edit",add:"add-doc",cancel:"error",save:"checkmark",moveup:"up-arrow",movedown:"down-arrow"},icon_prefix:"foundicon-"}),f.defaults.iconlibs.foundation3=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"x",edit:"pencil",add:"page-add",cancel:"x-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fi-"}),f.defaults.iconlibs.jqueryui=f.AbstractIconLib.extend({mapping:{collapse:"triangle-1-s",expand:"triangle-1-e","delete":"trash",edit:"pencil",add:"plusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",movedown:"arrowthick-1-s"},icon_prefix:"ui-icon ui-icon-"}),f.defaults.templates["default"]=function(){return{compile:function(a){var b=a.match(/{{\s*([a-zA-Z0-9\-_ \.]+)\s*}}/g),c=b&&b.length;if(!c)return function(){return a};for(var d=[],e=function(a){var c,e=b[a].replace(/[{}]+/g,"").trim().split("."),f=e.length;if(f>1){var g;c=function(b){for(g=b,a=0;f>a&&(g=g[e[a]],g);a++);return g}}else e=e[0],c=function(a){return a[e]};d.push({s:b[a],r:c})},f=0;c>f;f++)e(f);return function(b){var e,g=a+"";for(f=0;c>f;f++)e=d[f],g=g.replace(e.s,e.r(b));return g}}}},f.defaults.templates.ejs=function(){return window.EJS?{compile:function(a){var b=new window.EJS({text:a});return function(a){return b.render(a)}}}:!1},f.defaults.templates.handlebars=function(){return window.Handlebars},f.defaults.templates.hogan=function(){return window.Hogan?{compile:function(a){var b=window.Hogan.compile(a);return function(a){return b.render(a)}}}:!1},f.defaults.templates.markup=function(){return window.Mark&&window.Mark.up?{compile:function(a){return function(b){return window.Mark.up(a,b)}}}:!1},f.defaults.templates.mustache=function(){return window.Mustache?{compile:function(a){return function(b){return window.Mustache.render(a,b)}}}:!1},f.defaults.templates.swig=function(){return window.swig},f.defaults.templates.underscore=function(){return window._?{compile:function(a){return function(b){return window._.template(a,b)}}}:!1},f.defaults.theme="html",f.defaults.template="default",f.defaults.options={},f.defaults.translate=function(a,b){var c=f.defaults.languages[f.defaults.language];if(!c)throw"Unknown language "+f.defaults.language;var d=c[a]||f.defaults.languages[f.defaults.default_language][a];if("undefined"==typeof d)throw"Unknown translate string "+a;if(b)for(var e=0;e=0?"multiselect":void 0}),f.defaults.resolvers.unshift(function(a){return a.oneOf?"multiple":void 0}),function(){if(window.jQuery||window.Zepto){var a=window.jQuery||window.Zepto;a.jsoneditor=f.defaults,a.fn.jsoneditor=function(a){var b=this,c=this.data("jsoneditor");if("value"===a){if(!c)throw"Must initialize jsoneditor before getting/setting the value";if(!(arguments.length>1))return c.getValue();c.setValue(arguments[1])}else{if("validate"===a){if(!c)throw"Must initialize jsoneditor before validating";return arguments.length>1?c.validate(arguments[1]):c.validate()}"destroy"===a?c&&(c.destroy(),this.data("jsoneditor",null)):(c&&c.destroy(),c=new f(this.get(0),a),this.data("jsoneditor",c),c.on("change",function(){b.trigger("change")}),c.on("ready",function(){b.trigger("ready")}))}return this}}}(),window.JSONEditor=f}(); \ No newline at end of file diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lib/lodash.min.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/lodash.min.js new file mode 100644 index 0000000..05870d1 --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lib/lodash.min.js @@ -0,0 +1,102 @@ +/** + * @license + * lodash 3.10.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Build: `lodash compat -o ./lodash.js` + */ +;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===w,u=n===n,o=null===t,i=t===w,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(n=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n); +}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r=F&&mu&&hu?new Dn(t):null,c=t.length;a&&(i=Mn,f=false,t=a);n:for(;++oi(t,a,0)&&u.push(a);return u}function lt(n,t){var r=true;return zu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function st(n,t,r,e){var u=e,o=u;return zu(n,function(n,i,f){ +i=+t(n,i,f),(r(i,u)||i===e&&i===o)&&(u=i,o=n)}),o}function pt(n,t){var r=[];return zu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ht(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function _t(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++ut&&(t=-t>u?0:u+t),r=r===w||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=De(u);++e=c)break n;o=e[o],u*="asc"===o||true===o?1:-1;break n}u=t.b-r.b}return u})}function Ft(n,t){var r=0;return zu(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function Lt(n,t){var e=-1,u=jr(),o=n.length,i=u===r,f=i&&o>=F,a=f&&mu&&hu?new Dn(void 0):null,c=[];a?(u=Mn,i=false):(f=false,a=t?[]:c);n:for(;++eu(a,s,0)&&((t||f)&&a.push(s),c.push(l))}return c}function Nt(n,t){for(var r=-1,e=t.length,u=De(e);++r>>1,i=n[o];(r?i<=t:iu?w:o,u=1);++e=F)return t.plant(e).value();for(var u=0,n=r?o[u].apply(this,n):e;++uarguments.length;return typeof e=="function"&&o===w&&Wo(r)?n(r,e,u,i):Ct(r,br(e,o,4),u,i,t)}}function hr(n,t,r,e,u,o,i,f,a,c){function l(){for(var m=arguments.length,x=m,j=De(m);x--;)j[x]=arguments[x];if(e&&(j=qt(j,e,u)),o&&(j=Kt(j,o,i)),_||y){var x=l.placeholder,k=v(j,x),m=m-k.length;if(mt?0:t)):[]}function Vr(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1), +t=e-(+t||0),St(n,0,0>t?0:t)):[]}function Zr(n){return n?n[0]:w}function Yr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?ju(u+e,0):e;else if(e)return e=zt(n,t),er?ju(u+r,0):r||0,typeof n=="string"||!Wo(n)&&Ae(n)?r<=u&&-1t?0:+t||0,e);++r=n&&(t=w),r}}function le(n,t,r){function e(t,r){r&&cu(r),a=p=h=w,t&&(_=wo(),c=n.apply(s,f),p||a||(f=s=w))}function u(){var n=t-(wo()-l);0>=n||n>t?e(h,a):p=_u(u,n)}function o(){e(g,p)}function i(){if(f=arguments,l=wo(),s=this,h=g&&(p||!y),false===v)var r=y&&!p;else{a||y||(_=l);var e=v-(l-_),i=0>=e||e>v;i?(a&&(a=cu(a)),_=l,c=n.apply(s,f)):a||(a=_u(o,e))}return i&&p?p=cu(p):p||t===v||(p=_u(u,t)),r&&(i=true,c=n.apply(s,f)),!i||p||a||(f=s=w),c}var f,a,c,l,s,p,h,_=0,v=false,g=true;if(typeof n!="function")throw new Xe(T); +if(t=0>t?0:+t||0,true===r)var y=true,g=false;else de(r)&&(y=!!r.leading,v="maxWait"in r&&ju(+r.maxWait||0,t),g="trailing"in r?!!r.trailing:g);return i.cancel=function(){p&&cu(p),a&&cu(a),_=0,a=p=h=w},i}function se(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new Xe(T);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)};return r.cache=new se.Cache,r}function pe(n,t){if(typeof n!="function")throw new Xe(T);return t=ju(t===w?n.length-1:+t||0,0), +function(){for(var r=arguments,e=-1,u=ju(r.length-t,0),o=De(u);++et}function _e(n){return h(n)&&Sr(n)&&eu.call(n,"callee")&&!pu.call(n,"callee")}function ve(n,t,r,e){return e=(r=typeof r=="function"?Dt(r,e,3):w)?r(n,t):w,e===w?wt(n,t,r):!!e}function ge(n){return h(n)&&typeof n.message=="string"&&ou.call(n)==q; +}function ye(n){return de(n)&&ou.call(n)==K}function de(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function me(n){return null==n?false:ye(n)?fu.test(ru.call(n)):h(n)&&(Gn(n)?fu:In).test(n)}function we(n){return typeof n=="number"||h(n)&&ou.call(n)==V}function xe(n){var t;if(!h(n)||ou.call(n)!=Z||Gn(n)||_e(n)||!(eu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return Nn.support.ownLast?(vt(n,function(n,t,e){return r=eu.call(e,t),false}),false!==r):(vt(n,function(n,t){ +r=t}),r===w||eu.call(n,r))}function be(n){return de(n)&&ou.call(n)==Y}function Ae(n){return typeof n=="string"||h(n)&&ou.call(n)==G}function je(n){return h(n)&&Lr(n.length)&&!!Fn[ou.call(n)]}function ke(n,t){return nt||!n||!bu(t))return r;do t%2&&(r+=n),t=wu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function Fe(n,t,r){return r&&$r(n,t,r)&&(t=w),n=u(n),n.match(t||Un)||[]}function Le(n,t,r){return r&&$r(n,t,r)&&(t=w),h(n)?Te(n):it(n,t)}function Ne(n){return n}function Te(n){return At(ft(n,true))}function Pe(n,t,r){if(null==r){var e=de(t),u=e?Ko(t):w;((u=u&&u.length?dt(t,u):w)?u.length:e)||(u=false, +r=t,t=n,n=this)}u||(u=dt(t,Ko(t)));var o=true,e=-1,i=ye(n),f=u.length;false===r?o=false:de(r)&&"chain"in r&&(o=r.chain);for(;++e=$)return r}else n=0;return qu(r,e)}}(),Yu=pe(function(n,t){return h(n)&&Sr(n)?ct(n,_t(t,false,true)):[]}),Gu=er(),Ju=er(true),Xu=pe(function(n){for(var t=n.length,e=t,u=De(l),o=jr(),i=o===r,f=[];e--;){var a=n[e]=Sr(a=n[e])?a:[];u[e]=i&&120<=a.length&&mu&&hu?new Dn(e&&a):null; +}var i=n[0],c=-1,l=i?i.length:0,s=u[0];n:for(;++c(s?Mn(s,a):o(f,a,0))){for(e=t;--e;){var p=u[e];if(0>(p?Mn(p,a):o(n[e],a,0)))continue n}s&&s.push(a),f.push(a)}return f}),Hu=pe(function(t,r){r=_t(r);var e=ut(t,r);return Rt(t,r.sort(n)),e}),Qu=yr(),no=yr(true),to=pe(function(n){return Lt(_t(n,false,true))}),ro=pe(function(n,t){return Sr(n)?ct(n,t):[]}),eo=pe(Hr),uo=pe(function(n){var t=n.length,r=2--n?t.apply(this,arguments):void 0}},Nn.ary=function(n,t,r){return r&&$r(n,t,r)&&(t=w),t=n&&null==t?n.length:ju(+t||0,0),dr(n,E,w,w,w,w,t)},Nn.assign=Lo,Nn.at=io,Nn.before=ce,Nn.bind=xo,Nn.bindAll=bo,Nn.bindKey=Ao,Nn.callback=Le,Nn.chain=te,Nn.chunk=function(n,t,r){t=(r?$r(n,t,r):null==t)?1:ju(wu(t)||1,1),r=0;for(var e=n?n.length:0,u=-1,o=De(du(e/t));rr&&(r=-r>u?0:u+r),e=e===w||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;rt?0:t)):[]},Nn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1),t=e-(+t||0),St(n,0>t?0:t)):[]},Nn.takeRightWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),false,true):[]; +},Nn.takeWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3)):[]},Nn.tap=function(n,t,r){return t.call(r,n),n},Nn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Xe(T);return false===r?e=false:de(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:+t,trailing:u})},Nn.thru=re,Nn.times=function(n,t,r){if(n=wu(n),1>n||!bu(n))return[];var e=-1,u=De(ku(n,4294967295));for(t=Dt(t,r,1);++ee?u[e]=t(e):t(e);return u},Nn.toArray=Oe, +Nn.toPlainObject=Ie,Nn.transform=function(n,t,r,e){var u=Wo(n)||je(n);return t=br(t,e,4),null==r&&(u||de(n)?(e=n.constructor,r=u?Wo(n)?new e:[]:Pu(ye(e)?e.prototype:w)):r={}),(u?Kn:gt)(n,function(n,e,u){return t(r,n,e,u)}),r},Nn.union=to,Nn.uniq=Xr,Nn.unzip=Hr,Nn.unzipWith=Qr,Nn.values=Se,Nn.valuesIn=function(n){return Nt(n,Ee(n))},Nn.where=function(n,t){return ue(n,At(t))},Nn.without=ro,Nn.wrap=function(n,t){return t=null==t?Ne:t,dr(t,I,w,[n],[])},Nn.xor=function(){for(var n=-1,t=arguments.length;++nr?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Nn.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,c):n},Nn.escapeRegExp=function(n){return(n=u(n))&&xn.test(n)?n.replace(wn,l):n||"(?:)"},Nn.every=ee,Nn.find=ao,Nn.findIndex=Gu,Nn.findKey=Po,Nn.findLast=co, +Nn.findLastIndex=Ju,Nn.findLastKey=zo,Nn.findWhere=function(n,t){return ao(n,At(t))},Nn.first=Zr,Nn.floor=ii,Nn.get=function(n,t,r){return n=null==n?w:mt(n,Mr(t),t+""),n===w?r:n},Nn.gt=he,Nn.gte=function(n,t){return n>=t},Nn.has=function(n,t){if(null==n)return false;var r=eu.call(n,t);if(!r&&!Wr(t)){if(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),null==n)return false;t=Gr(t),r=eu.call(n,t)}return r||Lr(n.length)&&Ur(t,n.length)&&(Wo(n)||_e(n)||Ae(n))},Nn.identity=Ne,Nn.includes=oe,Nn.indexOf=Yr,Nn.inRange=function(n,t,r){ +return t=+t||0,r===w?(r=t,t=0):r=+r||0,n>=ku(t,r)&&nr?ju(e+r,0):ku(r||0,e-1))+1;else if(r)return u=zt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1; +if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Nn.lt=ke,Nn.lte=function(n,t){return n<=t},Nn.max=fi,Nn.min=ai,Nn.noConflict=function(){return Yn._=iu,this},Nn.noop=ze,Nn.now=wo,Nn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return er?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Nn.sum=function(n,t,r){if(r&&$r(n,t,r)&&(t=w),t=br(t,r,3),1==t.length){n=Wo(n)?n:Br(n),r=n.length;for(var e=0;r--;)e+=+t(n[r])||0;n=e}else n=Ft(n,t);return n},Nn.template=function(n,t,r){var e=Nn.templateSettings;r&&$r(n,t,r)&&(t=r=w),n=u(n),t=rt(et({},r||t),e,tt),r=rt(et({},t.imports),e.imports,tt); +var o,i,f=Ko(r),a=Nt(r,f),c=0;r=t.interpolate||Cn;var l="__p+='";r=Ge((t.escape||Cn).source+"|"+r.source+"|"+(r===gn?jn:Cn).source+"|"+(t.evaluate||Cn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(Sn,s),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(an,"$1").replace(cn,"$1;"), +l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=ri(function(){return Ke(f,p+"return "+l).apply(w,a)}),t.source=l,ge(t))throw t;return t},Nn.trim=We,Nn.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?$r(e,t,r):null==t)?g(n):o(n,t+"")):n},Nn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,t+"")+1):n; +},Nn.trunc=function(n,t,r){r&&$r(n,t,r)&&(t=w);var e=S;if(r=U,null!=t)if(de(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(be(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=Ge(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o), +-1u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Kn(["filter","map","takeWhile"],function(n,t){ +var r=t+1,e=r!=N;zn.prototype[n]=function(n,t){var u=this.clone();return u.__iteratees__.push({iteratee:br(n,t,1),type:r}),u.__filtered__=u.__filtered__||e,u}}),Kn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Kn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this.__filtered__?new zn(this):this[r](1)}}),Kn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?At:Be;zn.prototype[n]=function(n){ +return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter(Ne)},zn.prototype.reject=function(n,t){return n=br(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return r.__filtered__&&(0t)?new zn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==w&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r)},zn.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},zn.prototype.toArray=function(){return this.take(Cu); +},gt(zn.prototype,function(n,t){var r=/^(?:filter|map|reject)|While$/.test(t),e=/^(?:first|last)$/.test(t),u=Nn[e?"take"+("last"==t?"Right":""):t];u&&(Nn.prototype[t]=function(){var t=e?[1]:arguments,o=this.__chain__,i=this.__wrapped__,f=!!this.__actions__.length,a=i instanceof zn,c=t[0],l=a||Wo(i);l&&r&&typeof c=="function"&&1!=c.length&&(a=l=false);var s=function(n){return e&&o?u(n,1)[0]:u.apply(w,Hn([n],t))},c={func:re,args:[s],thisArg:w},f=a&&!f;return e&&!o?f?(i=i.clone(),i.__actions__.push(c), +n.call(i)):u.call(w,this.value())[0]:!e&&l?(i=f?i:new zn(this),i=n.apply(i,t),i.__actions__.push(c),new Pn(i,o)):this.thru(s)})}),Kn("join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?tu:He)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=!Tu.spliceObjects&&/^(?:pop|shift|splice)$/.test(n),u=/^(?:join|pop|replace|shift)$/.test(n),o=e?function(){var n=t.apply(this,arguments);return 0===this.length&&delete this[0],n}:t;Nn.prototype[n]=function(){ +var n=arguments;return u&&!this.__chain__?o.apply(this.value(),n):this[r](function(t){return o.apply(t,n)})}}),gt(zn.prototype,function(n,t){var r=Nn[t];if(r){var e=r.name+"";(Fu[e]||(Fu[e]=[])).push({name:t,func:r})}}),Fu[hr(w,A).name]=[{name:"wrapper",func:w}],zn.prototype.clone=function(){var n=new zn(this.__wrapped__);return n.__actions__=qn(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=qn(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=qn(this.__views__), +n},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=Wo(t),u=0>r,o=e?t.length:0;n=0;for(var i=o,f=this.__views__,a=-1,c=f.length;++a"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,dn=/^\w*$/,mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wn=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,xn=RegExp(wn.source),bn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,On=/^0[xX]/,In=/^\[object .+?Constructor\]$/,Rn=/^\d+$/,En=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Cn=/($^)/,Sn=/['\n\r\u2028\u2029\\]/g,Un=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),$n="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap".split(" "),Wn="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Fn={}; +Fn[X]=Fn[H]=Fn[Q]=Fn[nn]=Fn[tn]=Fn[rn]=Fn[en]=Fn[un]=Fn[on]=true,Fn[z]=Fn[B]=Fn[J]=Fn[D]=Fn[M]=Fn[q]=Fn[K]=Fn["[object Map]"]=Fn[V]=Fn[Z]=Fn[Y]=Fn["[object Set]"]=Fn[G]=Fn["[object WeakMap]"]=false;var Ln={};Ln[z]=Ln[B]=Ln[J]=Ln[D]=Ln[M]=Ln[X]=Ln[H]=Ln[Q]=Ln[nn]=Ln[tn]=Ln[V]=Ln[Z]=Ln[Y]=Ln[G]=Ln[rn]=Ln[en]=Ln[un]=Ln[on]=true,Ln[q]=Ln[K]=Ln["[object Map]"]=Ln["[object Set]"]=Ln["[object WeakMap]"]=false;var Nn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a", +"\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y", +"\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Tn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Pn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zn={"function":true,object:true},Bn={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Dn={"\\":"\\", +"'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,qn=zn[typeof module]&&module&&!module.nodeType&&module,Kn=zn[typeof self]&&self&&self.Object&&self,Vn=zn[typeof window]&&window&&window.Object&&window,Zn=qn&&qn.exports===Mn&&Mn,Yn=Mn&&qn&&typeof global=="object"&&global&&global.Object&&global||Vn!==(this&&this.window)&&Vn||Kn||this,Gn=function(){try{Object({toString:0}+"")}catch(n){return function(){return false}}return function(n){ +return typeof n.toString!="function"&&typeof(n+"")=="string"}}(),Jn=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Jn, define(function(){return Jn})):Mn&&qn?Zn?(qn.exports=Jn)._=Jn:Mn._=Jn:Yn._=Jn}).call(this); \ No newline at end of file diff --git a/vendor/assets/components/swagger-ui/lib/marked.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/marked.js similarity index 100% rename from vendor/assets/components/swagger-ui/lib/marked.js rename to rswag-ui/vendor/assets/components/swagger-ui/lib/marked.js diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lib/object-assign-pollyfill.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/object-assign-pollyfill.js new file mode 100644 index 0000000..5179920 --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lib/object-assign-pollyfill.js @@ -0,0 +1,23 @@ +if (typeof Object.assign != 'function') { + (function () { + Object.assign = function (target) { + 'use strict'; + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + var output = Object(target); + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (Object.prototype.hasOwnProperty.call(source, nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + return output; + }; + })(); +} diff --git a/rswag-ui/vendor/assets/components/swagger-ui/lib/sanitize-html.min.js b/rswag-ui/vendor/assets/components/swagger-ui/lib/sanitize-html.min.js new file mode 100644 index 0000000..3e3b48d --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/lib/sanitize-html.min.js @@ -0,0 +1,6 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.sanitizeHtml=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=0){globRegex.push(quoteRegexp(name).replace(/\\\*/g,".*"))}else{allowedAttributesMap[tag].push(name)}});allowedAttributesGlobMap[tag]=new RegExp("^("+globRegex.join("|")+")$")})}var allowedClassesMap={};each(options.allowedClasses,function(classes,tag){if(allowedAttributesMap){if(!has(allowedAttributesMap,tag)){allowedAttributesMap[tag]=[]}allowedAttributesMap[tag].push("class")}allowedClassesMap[tag]=classes});var transformTagsMap={};var transformTagsAll;each(options.transformTags,function(transform,tag){var transFun;if(typeof transform==="function"){transFun=transform}else if(typeof transform==="string"){transFun=sanitizeHtml.simpleTransform(transform)}if(tag==="*"){transformTagsAll=transFun}else{transformTagsMap[tag]=transFun}});var depth=0;var stack=[];var skipMap={};var transformMap={};var skipText=false;var skipTextDepth=0;var parser=new htmlparser.Parser({onopentag:function(name,attribs){if(skipText){skipTextDepth++;return}var frame=new Frame(name,attribs);stack.push(frame);var skip=false;var hasText=frame.text?true:false;var transformedTag;if(has(transformTagsMap,name)){transformedTag=transformTagsMap[name](name,attribs);frame.attribs=attribs=transformedTag.attribs;if(transformedTag.text!==undefined){frame.innerText=transformedTag.text}if(name!==transformedTag.tagName){frame.name=name=transformedTag.tagName;transformMap[depth]=transformedTag.tagName}}if(transformTagsAll){transformedTag=transformTagsAll(name,attribs);frame.attribs=attribs=transformedTag.attribs;if(name!==transformedTag.tagName){frame.name=name=transformedTag.tagName;transformMap[depth]=transformedTag.tagName}}if(options.allowedTags&&options.allowedTags.indexOf(name)===-1){skip=true;if(nonTextTagsArray.indexOf(name)!==-1){skipText=true;skipTextDepth=1}skipMap[depth]=true}depth++;if(skip){return}result+="<"+name;if(!allowedAttributesMap||has(allowedAttributesMap,name)||allowedAttributesMap["*"]){each(attribs,function(value,a){if(!allowedAttributesMap||has(allowedAttributesMap,name)&&allowedAttributesMap[name].indexOf(a)!==-1||allowedAttributesMap["*"]&&allowedAttributesMap["*"].indexOf(a)!==-1||has(allowedAttributesGlobMap,name)&&allowedAttributesGlobMap[name].test(a)||allowedAttributesGlobMap["*"]&&allowedAttributesGlobMap["*"].test(a)){if(a==="href"||a==="src"){if(naughtyHref(name,value)){delete frame.attribs[a];return}}if(a==="class"){value=filterClasses(value,allowedClassesMap[name]);if(!value.length){delete frame.attribs[a];return}}result+=" "+a;if(value.length){result+='="'+escapeHtml(value)+'"'}}else{delete frame.attribs[a]}})}if(options.selfClosing.indexOf(name)!==-1){result+=" />"}else{result+=">";if(frame.innerText&&!hasText&&!options.textFilter){result+=frame.innerText}}},ontext:function(text){if(skipText){return}var lastFrame=stack[stack.length-1];var tag;if(lastFrame){tag=lastFrame.tag;text=lastFrame.innerText!==undefined?lastFrame.innerText:text}if(tag==="script"||tag==="style"){result+=text}else{var escaped=escapeHtml(text);if(options.textFilter){result+=options.textFilter(escaped)}else{result+=escaped}}if(stack.length){var frame=stack[stack.length-1];frame.text+=text}},onclosetag:function(name){if(skipText){skipTextDepth--;if(!skipTextDepth){skipText=false}else{return}}var frame=stack.pop();if(!frame){return}skipText=false;depth--;if(skipMap[depth]){delete skipMap[depth];frame.updateParentNodeText();return}if(transformMap[depth]){name=transformMap[depth];delete transformMap[depth]}if(options.exclusiveFilter&&options.exclusiveFilter(frame)){result=result.substr(0,frame.tagPosition);return}frame.updateParentNodeText();if(options.selfClosing.indexOf(name)!==-1){return}result+=""}},options.parser);parser.write(html);parser.end();return result;function escapeHtml(s){if(typeof s!=="string"){s=s+""}return s.replace(/\&/g,"&").replace(//g,">").replace(/\"/g,""")}function naughtyHref(name,href){href=href.replace(/[\x00-\x20]+/g,"");href=href.replace(/<\!\-\-.*?\-\-\>/g,"");var matches=href.match(/^([a-zA-Z]+)\:/);if(!matches){return false}var scheme=matches[1].toLowerCase();if(has(options.allowedSchemesByTag,name)){return options.allowedSchemesByTag[name].indexOf(scheme)===-1}return!options.allowedSchemes||options.allowedSchemes.indexOf(scheme)===-1}function filterClasses(classes,allowed){if(!allowed){return classes}classes=classes.split(/\s+/);return classes.filter(function(clss){return allowed.indexOf(clss)!==-1}).join(" ")}}var htmlParserDefaults={decodeEntities:true};sanitizeHtml.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{}};sanitizeHtml.simpleTransform=function(newTagName,newAttribs,merge){merge=merge===undefined?true:merge;newAttribs=newAttribs||{};return function(tagName,attribs){var attrib;if(merge){for(attrib in newAttribs){attribs[attrib]=newAttribs[attrib]}}else{attribs=newAttribs}return{tagName:newTagName,attribs:attribs}}}},{htmlparser2:36,"regexp-quote":54,xtend:58}],2:[function(require,module,exports){"use strict";exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;function init(){var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i0){throw new Error("Invalid string. Length must be a multiple of 4")}placeHolders=b64[len-2]==="="?2:b64[len-1]==="="?1:0;arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;ilen2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],3:[function(require,module,exports){},{}],4:[function(require,module,exports){(function(global){"use strict";var buffer=require("buffer");var Buffer=buffer.Buffer;var SlowBuffer=buffer.SlowBuffer;var MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function alloc(size,fill,encoding){if(typeof Buffer.alloc==="function"){return Buffer.alloc(size,fill,encoding)}if(typeof encoding==="number"){throw new TypeError("encoding must not be number")}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>MAX_LEN){throw new RangeError("size is too large")}var enc=encoding;var _fill=fill;if(_fill===undefined){enc=undefined;_fill=0}var buf=new Buffer(size);if(typeof _fill==="string"){var fillBuf=new Buffer(_fill,enc);var flen=fillBuf.length;var i=-1;while(++iMAX_LEN){throw new RangeError("size is too large")}return new Buffer(size)};exports.from=function from(value,encodingOrOffset,length){if(typeof Buffer.from==="function"&&(!global.Uint8Array||Uint8Array.from!==Buffer.from)){return Buffer.from(value,encodingOrOffset,length)}if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof value==="string"){return new Buffer(value,encodingOrOffset)}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(arguments.length===1){return new Buffer(value)}if(typeof offset==="undefined"){offset=0}var len=length;if(typeof len==="undefined"){len=value.byteLength-offset}if(offset>=value.byteLength){throw new RangeError("'offset' is out of bounds")}if(len>value.byteLength-offset){throw new RangeError("'length' is out of bounds")}return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);value.copy(out,0,0,value.length);return out}if(value){if(Array.isArray(value)||typeof ArrayBuffer!=="undefined"&&value.buffer instanceof ArrayBuffer||"length"in value){return new Buffer(value)}if(value.type==="Buffer"&&Array.isArray(value.data)){return new Buffer(value.data)}}throw new TypeError("First argument must be a string, Buffer, "+"ArrayBuffer, Array, or array-like object.")};exports.allocUnsafeSlow=function allocUnsafeSlow(size){if(typeof Buffer.allocUnsafeSlow==="function"){return Buffer.allocUnsafeSlow(size)}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>=MAX_LEN){throw new RangeError("size is too large")}return new SlowBuffer(size)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{buffer:5}],5:[function(require,module,exports){(function(global){"use strict";var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("isarray");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(isNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;jremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length); +var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":2,ieee754:37,isarray:40}],6:[function(require,module,exports){(function(Buffer){function isArray(arg){if(Array.isArray){return Array.isArray(arg)}return objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":39}],7:[function(require,module,exports){var ElementType=require("domelementtype");var entities=require("entities");var booleanAttributes={__proto__:null,allowfullscreen:true,async:true,autofocus:true,autoplay:true,checked:true,controls:true,default:true,defer:true,disabled:true,hidden:true,ismap:true,loop:true,multiple:true,muted:true,open:true,readonly:true,required:true,reversed:true,scoped:true,seamless:true,selected:true,typemustmatch:true};var unencodedElements={__proto__:null,style:true,script:true,xmp:true,iframe:true,noembed:true,noframes:true,plaintext:true,noscript:true};function formatAttrs(attributes,opts){if(!attributes)return;var output="",value;for(var key in attributes){value=attributes[key];if(output){output+=" "}if(!value&&booleanAttributes[key]){output+=key}else{output+=key+'="'+(opts.decodeEntities?entities.encodeXML(value):value)+'"'}}return output}var singleTag={__proto__:null,area:true,base:true,basefont:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,isindex:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};var render=module.exports=function(dom,opts){if(!Array.isArray(dom)&&!dom.cheerio)dom=[dom];opts=opts||{};var output="";for(var i=0;i"}else{tag+=">";if(elem.children){tag+=render(elem.children,opts)}if(!singleTag[elem.name]||opts.xmlMode){tag+=""}}return tag}function renderDirective(elem){return"<"+elem.data+">"}function renderText(elem,opts){var data=elem.data||"";if(opts.decodeEntities&&!(elem.parent&&elem.parent.name in unencodedElements)){data=entities.encodeXML(data)}return data}function renderCdata(elem){return""}function renderComment(elem){return""}},{domelementtype:8,entities:20}],8:[function(require,module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(elem){return elem.type==="tag"||elem.type==="script"||elem.type==="style"}}},{}],9:[function(require,module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(elem){return elem.type==="tag"||elem.type==="script"||elem.type==="style"}}},{}],10:[function(require,module,exports){var ElementType=require("domelementtype");var re_whitespace=/\s+/g;var NodePrototype=require("./lib/node");var ElementPrototype=require("./lib/element");function DomHandler(callback,options,elementCB){if(typeof callback==="object"){elementCB=options;options=callback;callback=null}else if(typeof options==="function"){elementCB=options;options=defaultOpts}this._callback=callback;this._options=options||defaultOpts;this._elementCB=elementCB;this.dom=[];this._done=false;this._tagStack=[];this._parser=this._parser||null}var defaultOpts={normalizeWhitespace:false,withStartIndices:false};DomHandler.prototype.onparserinit=function(parser){this._parser=parser};DomHandler.prototype.onreset=function(){DomHandler.call(this,this._callback,this._options,this._elementCB)};DomHandler.prototype.onend=function(){if(this._done)return;this._done=true;this._parser=null;this._handleCallback(null)};DomHandler.prototype._handleCallback=DomHandler.prototype.onerror=function(error){if(typeof this._callback==="function"){this._callback(error,this.dom)}else{if(error)throw error}};DomHandler.prototype.onclosetag=function(){var elem=this._tagStack.pop();if(this._elementCB)this._elementCB(elem)};DomHandler.prototype._addDomElement=function(element){var parent=this._tagStack[this._tagStack.length-1];var siblings=parent?parent.children:this.dom;var previousSibling=siblings[siblings.length-1];element.next=null;if(this._options.withStartIndices){element.startIndex=this._parser.startIndex}if(this._options.withDomLvl1){element.__proto__=element.type==="tag"?ElementPrototype:NodePrototype}if(previousSibling){element.prev=previousSibling;previousSibling.next=element}else{element.prev=null}siblings.push(element);element.parent=parent||null};DomHandler.prototype.onopentag=function(name,attribs){var element={type:name==="script"?ElementType.Script:name==="style"?ElementType.Style:ElementType.Tag,name:name,attribs:attribs,children:[]};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.ontext=function(data){var normalize=this._options.normalizeWhitespace||this._options.ignoreWhitespace;var lastTag;if(!this._tagStack.length&&this.dom.length&&(lastTag=this.dom[this.dom.length-1]).type===ElementType.Text){if(normalize){lastTag.data=(lastTag.data+data).replace(re_whitespace," ")}else{lastTag.data+=data}}else{if(this._tagStack.length&&(lastTag=this._tagStack[this._tagStack.length-1])&&(lastTag=lastTag.children[lastTag.children.length-1])&&lastTag.type===ElementType.Text){if(normalize){lastTag.data=(lastTag.data+data).replace(re_whitespace," ")}else{lastTag.data+=data}}else{if(normalize){data=data.replace(re_whitespace," ")}this._addDomElement({data:data,type:ElementType.Text})}}};DomHandler.prototype.oncomment=function(data){var lastTag=this._tagStack[this._tagStack.length-1];if(lastTag&&lastTag.type===ElementType.Comment){lastTag.data+=data;return}var element={data:data,type:ElementType.Comment};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.oncdatastart=function(){var element={children:[{data:"",type:ElementType.Text}],type:ElementType.CDATA};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.oncommentend=DomHandler.prototype.oncdataend=function(){this._tagStack.pop()};DomHandler.prototype.onprocessinginstruction=function(name,data){this._addDomElement({name:name,data:data,type:ElementType.Directive})};module.exports=DomHandler},{"./lib/element":11,"./lib/node":12,domelementtype:9}],11:[function(require,module,exports){var NodePrototype=require("./node");var ElementPrototype=module.exports=Object.create(NodePrototype);var domLvl1={tagName:"name"};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(ElementPrototype,key,{get:function(){return this[shorthand]||null},set:function(val){this[shorthand]=val;return val}})})},{"./node":12}],12:[function(require,module,exports){var NodePrototype=module.exports={get firstChild(){var children=this.children;return children&&children[0]||null},get lastChild(){var children=this.children;return children&&children[children.length-1]||null},get nodeType(){return nodeTypes[this.type]||nodeTypes.element}};var domLvl1={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};var nodeTypes={element:1,text:3,cdata:4,comment:8};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(NodePrototype,key,{get:function(){return this[shorthand]||null},set:function(val){this[shorthand]=val;return val}})})},{}],13:[function(require,module,exports){var DomUtils=module.exports;[require("./lib/stringify"),require("./lib/traversal"),require("./lib/manipulation"),require("./lib/querying"),require("./lib/legacy"),require("./lib/helpers")].forEach(function(ext){Object.keys(ext).forEach(function(key){DomUtils[key]=ext[key].bind(DomUtils)})})},{"./lib/helpers":14,"./lib/legacy":15,"./lib/manipulation":16,"./lib/querying":17,"./lib/stringify":18,"./lib/traversal":19}],14:[function(require,module,exports){exports.removeSubsets=function(nodes){var idx=nodes.length,node,ancestor,replace;while(--idx>-1){node=ancestor=nodes[idx];nodes[idx]=null;replace=true;while(ancestor){if(nodes.indexOf(ancestor)>-1){replace=false;nodes.splice(idx,1);break}ancestor=ancestor.parent}if(replace){nodes[idx]=node}}return nodes};var POSITION={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16};var comparePos=exports.compareDocumentPosition=function(nodeA,nodeB){var aParents=[];var bParents=[];var current,sharedParent,siblings,aSibling,bSibling,idx;if(nodeA===nodeB){return 0}current=nodeA;while(current){aParents.unshift(current);current=current.parent}current=nodeB;while(current){bParents.unshift(current);current=current.parent}idx=0;while(aParents[idx]===bParents[idx]){idx++}if(idx===0){return POSITION.DISCONNECTED}sharedParent=aParents[idx-1];siblings=sharedParent.children;aSibling=aParents[idx];bSibling=bParents[idx];if(siblings.indexOf(aSibling)>siblings.indexOf(bSibling)){if(sharedParent===nodeB){return POSITION.FOLLOWING|POSITION.CONTAINED_BY}return POSITION.FOLLOWING}else{if(sharedParent===nodeA){return POSITION.PRECEDING|POSITION.CONTAINS}return POSITION.PRECEDING}};exports.uniqueSort=function(nodes){var idx=nodes.length,node,position;nodes=nodes.slice();while(--idx>-1){node=nodes[idx];position=nodes.indexOf(node);if(position>-1&&position0){childs=find(test,childs,recurse,limit);result=result.concat(childs);limit-=childs.length;if(limit<=0)break}}return result}function findOneChild(test,elems){for(var i=0,l=elems.length;i0){elem=findOne(test,elems[i].children)}}return elem}function existsOne(test,elems){for(var i=0,l=elems.length;i0&&existsOne(test,elems[i].children))){return true}}return false}function findAll(test,elems){var result=[];for(var i=0,j=elems.length;i0){result=result.concat(findAll(test,elems[i].children))}}return result}},{domelementtype:9}],18:[function(require,module,exports){var ElementType=require("domelementtype"),getOuterHTML=require("dom-serializer"),isTag=ElementType.isTag;module.exports={getInnerHTML:getInnerHTML,getOuterHTML:getOuterHTML,getText:getText};function getInnerHTML(elem,opts){return elem.children?elem.children.map(function(elem){return getOuterHTML(elem,opts)}).join(""):""}function getText(elem){if(Array.isArray(elem))return elem.map(getText).join("");if(isTag(elem)||elem.type===ElementType.CDATA)return getText(elem.children);if(elem.type===ElementType.Text)return elem.data;return""}},{"dom-serializer":7,domelementtype:9}],19:[function(require,module,exports){var getChildren=exports.getChildren=function(elem){return elem.children};var getParent=exports.getParent=function(elem){return elem.parent};exports.getSiblings=function(elem){var parent=getParent(elem);return parent?getChildren(parent):[elem]};exports.getAttributeValue=function(elem,name){return elem.attribs&&elem.attribs[name]};exports.hasAttrib=function(elem,name){return!!elem.attribs&&hasOwnProperty.call(elem.attribs,name)};exports.getName=function(elem){return elem.name}},{}],20:[function(require,module,exports){var encode=require("./lib/encode.js"),decode=require("./lib/decode.js");exports.decode=function(data,level){return(!level||level<=0?decode.XML:decode.HTML)(data)};exports.decodeStrict=function(data,level){return(!level||level<=0?decode.XML:decode.HTMLStrict)(data)};exports.encode=function(data,level){return(!level||level<=0?encode.XML:encode.HTML)(data)};exports.encodeXML=encode.XML;exports.encodeHTML4=exports.encodeHTML5=exports.encodeHTML=encode.HTML;exports.decodeXML=exports.decodeXMLStrict=decode.XML;exports.decodeHTML4=exports.decodeHTML5=exports.decodeHTML=decode.HTML;exports.decodeHTML4Strict=exports.decodeHTML5Strict=exports.decodeHTMLStrict=decode.HTMLStrict;exports.escape=encode.escape},{"./lib/decode.js":21,"./lib/encode.js":23}],21:[function(require,module,exports){var entityMap=require("../maps/entities.json"),legacyMap=require("../maps/legacy.json"),xmlMap=require("../maps/xml.json"),decodeCodePoint=require("./decode_codepoint.js");var decodeXMLStrict=getStrictDecoder(xmlMap),decodeHTMLStrict=getStrictDecoder(entityMap);function getStrictDecoder(map){var keys=Object.keys(map).join("|"),replace=getReplacer(map);keys+="|#[xX][\\da-fA-F]+|#\\d+";var re=new RegExp("&(?:"+keys+");","g");return function(str){return String(str).replace(re,replace)}}var decodeHTML=function(){var legacy=Object.keys(legacyMap).sort(sorter);var keys=Object.keys(entityMap).sort(sorter);for(var i=0,j=0;i=55296&&codePoint<=57343||codePoint>1114111){return"�"}if(codePoint in decodeMap){codePoint=decodeMap[codePoint]}var output="";if(codePoint>65535){codePoint-=65536;output+=String.fromCharCode(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}output+=String.fromCharCode(codePoint);return output}},{"../maps/decode.json":24}],23:[function(require,module,exports){var inverseXML=getInverseObj(require("../maps/xml.json")),xmlReplacer=getInverseReplacer(inverseXML);exports.XML=getInverse(inverseXML,xmlReplacer);var inverseHTML=getInverseObj(require("../maps/entities.json")),htmlReplacer=getInverseReplacer(inverseHTML);exports.HTML=getInverse(inverseHTML,htmlReplacer);function getInverseObj(obj){return Object.keys(obj).sort().reduce(function(inverse,name){inverse[obj[name]]="&"+name+";";return inverse},{})}function getInverseReplacer(inverse){var single=[],multiple=[];Object.keys(inverse).forEach(function(k){if(k.length===1){single.push("\\"+k)}else{multiple.push(k)}});multiple.unshift("["+single.join("")+"]");return new RegExp(multiple.join("|"),"g")}var re_nonASCII=/[^\0-\x7F]/g,re_astralSymbols=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function singleCharReplacer(c){return"&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"}function astralReplacer(c){var high=c.charCodeAt(0);var low=c.charCodeAt(1);var codePoint=(high-55296)*1024+low-56320+65536;return"&#x"+codePoint.toString(16).toUpperCase()+";"}function getInverse(inverse,re){function func(name){return inverse[name]}return function(data){return data.replace(re,func).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}}var re_xmlChars=getInverseReplacer(inverseXML);function escapeXML(data){return data.replace(re_xmlChars,singleCharReplacer).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}exports.escape=escapeXML},{"../maps/entities.json":25,"../maps/xml.json":27}],24:[function(require,module,exports){module.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},{}],25:[function(require,module,exports){module.exports={Aacute:"Ã",aacute:"á",Abreve:"Ä‚",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"Ð",acy:"а",AElig:"Æ",aelig:"æ",af:"â¡",Afr:"ð”„",afr:"ð”ž",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ä€",amacr:"Ä",amalg:"⨿",amp:"&",AMP:"&",andand:"â©•",And:"â©“",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"â¦",angsph:"∢",angst:"Ã…",angzarr:"â¼",Aogon:"Ä„",aogon:"Ä…",Aopf:"ð”¸",aopf:"ð•’",apacir:"⩯",ap:"≈",apE:"â©°",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"â¡",approx:"≈",approxeq:"≊",Aring:"Ã…",aring:"Ã¥",Ascr:"ð’œ",ascr:"ð’¶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"â‰",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"â‹",Backslash:"∖",Barv:"â«§",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Î’",beta:"β",beth:"â„¶",between:"≬",Bfr:"ð”…",bfr:"ð”Ÿ",bigcap:"â‹‚",bigcirc:"â—¯",bigcup:"⋃",bigodot:"⨀",bigoplus:"â¨",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"â–½",bigtriangleup:"â–³",biguplus:"⨄",bigvee:"â‹",bigwedge:"â‹€",bkarow:"â¤",blacklozenge:"â§«",blacksquare:"â–ª",blacktriangle:"â–´",blacktriangledown:"â–¾",blacktriangleleft:"â—‚",blacktriangleright:"â–¸",blank:"â£",blk12:"â–’",blk14:"â–‘",blk34:"â–“",block:"â–ˆ",bne:"=⃥",bnequiv:"≡⃥",bNot:"â«­",bnot:"âŒ",Bopf:"ð”¹",bopf:"ð•“",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"â”",boxdL:"â••",boxDl:"â•–",boxDL:"â•—",boxdr:"┌",boxdR:"â•’",boxDr:"â•“",boxDR:"â•”",boxh:"─",boxH:"â•",boxhd:"┬",boxHd:"╤",boxhD:"â•¥",boxHD:"╦",boxhu:"â”´",boxHu:"â•§",boxhU:"╨",boxHU:"â•©",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"â•›",boxUl:"╜",boxUL:"â•",boxur:"â””",boxuR:"╘",boxUr:"â•™",boxUR:"╚",boxv:"│",boxV:"â•‘",boxvh:"┼",boxvH:"╪",boxVh:"â•«",boxVH:"╬",boxvl:"┤",boxvL:"â•¡",boxVl:"â•¢",boxVL:"â•£",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"â• ",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"ð’·",Bscr:"ℬ",bsemi:"â",bsim:"∽",bsime:"â‹",bsolb:"â§…",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"â‰",Bumpeq:"≎",bumpeq:"â‰",Cacute:"Ć",cacute:"ć",capand:"â©„",capbrcup:"⩉",capcap:"â©‹",cap:"∩",Cap:"â‹’",capcup:"⩇",capdot:"â©€",CapitalDifferentialD:"â……",caps:"∩︀",caret:"â",caron:"ˇ",Cayleys:"â„­",ccaps:"â©",Ccaron:"ÄŒ",ccaron:"Ä",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"â©",Cdot:"ÄŠ",cdot:"Ä‹",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"ð” ",Cfr:"â„­",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"âŠ",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"â—‹",cirE:"⧃",cire:"≗",cirfnint:"â¨",cirmid:"⫯",cirscir:"â§‚",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"â€",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"â©´",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"âˆ",compfn:"∘",complement:"âˆ",complexes:"â„‚",cong:"≅",congdot:"â©­",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"ð•”",Copf:"â„‚",coprod:"âˆ",Coproduct:"âˆ",copy:"©",COPY:"©",copysr:"â„—",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"ð’ž",cscr:"ð’¸",csub:"â«",csube:"â«‘",csup:"â«",csupe:"â«’",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"â‰",cup:"∪",Cup:"â‹“",cupcup:"⩊",cupdot:"âŠ",cupor:"â©…",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"â‹",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"â‹",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"â€",Dashv:"⫤",dashv:"⊣",dbkarow:"â¤",dblac:"Ë",Dcaron:"ÄŽ",dcaron:"Ä",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"â……",dd:"â…†",DDotrahd:"⤑",ddotseq:"â©·",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"ð”‡",dfr:"ð”¡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"Ë™",DiacriticalDoubleAcute:"Ë",DiacriticalGrave:"`",DiacriticalTilde:"Ëœ",diam:"â‹„",diamond:"â‹„",Diamond:"â‹„",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"â…†",digamma:"Ï",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"Ñ’",dlcorn:"⌞",dlcrop:"âŒ",dollar:"$",Dopf:"ð”»",dopf:"ð••",Dot:"¨",dot:"Ë™",DotDot:"⃜",doteq:"â‰",doteqdot:"≑",DotEqual:"â‰",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"â‡",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"Ì‘",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"â¥",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"â‡",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"â¤",drcorn:"⌟",drcrop:"⌌",Dscr:"ð’Ÿ",dscr:"ð’¹",DScy:"Ð…",dscy:"Ñ•",dsol:"â§¶",Dstrok:"Ä",dstrok:"Ä‘",dtdot:"⋱",dtri:"â–¿",dtrif:"â–¾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Ð",dzcy:"ÑŸ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"â©®",Ecaron:"Äš",ecaron:"Ä›",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"Ñ",eDDot:"â©·",Edot:"Ä–",edot:"Ä—",eDot:"≑",ee:"â…‡",efDot:"≒",Efr:"ð”ˆ",efr:"ð”¢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"â§",ell:"â„“",els:"⪕",elsdot:"⪗",Emacr:"Ä’",emacr:"Ä“",empty:"∅",emptyset:"∅",EmptySmallSquare:"â—»",emptyv:"∅",EmptyVerySmallSquare:"â–«",emsp13:" ",emsp14:" ",emsp:" ",ENG:"ÅŠ",eng:"Å‹",ensp:" ",Eogon:"Ę",eogon:"Ä™",Eopf:"ð”¼",eopf:"ð•–",epar:"â‹•",eparsl:"â§£",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"â§¥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"â„°",esdot:"â‰",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ã",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"â„°",exponentiale:"â…‡",ExponentialE:"â…‡",fallingdotseq:"≒",Fcy:"Ф",fcy:"Ñ„",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"ð”‰",ffr:"ð”£",filig:"ï¬",FilledSmallSquare:"â—¼",FilledVerySmallSquare:"â–ª",fjlig:"fj",flat:"â™­",fllig:"fl",fltns:"â–±",fnof:"Æ’",Fopf:"ð”½",fopf:"ð•—",forall:"∀",ForAll:"∀",fork:"â‹”",forkv:"â«™",Fouriertrf:"ℱ",fpartint:"â¨",frac12:"½",frac13:"â…“",frac14:"¼",frac15:"â…•",frac16:"â…™",frac18:"â…›",frac23:"â…”",frac25:"â…–",frac34:"¾",frac35:"â…—",frac38:"â…œ",frac45:"â…˜",frac56:"â…š",frac58:"â…",frac78:"â…ž",frasl:"â„",frown:"⌢",fscr:"ð’»",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ïœ",gammad:"Ï",gap:"⪆",Gbreve:"Äž",gbreve:"ÄŸ",Gcedil:"Ä¢",Gcirc:"Äœ",gcirc:"Ä",Gcy:"Г",gcy:"г",Gdot:"Ä ",gdot:"Ä¡",ge:"≥",gE:"≧",gEl:"⪌",gel:"â‹›",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"ð”Š",gfr:"ð”¤",gg:"≫",Gg:"â‹™",ggg:"â‹™",gimel:"â„·",GJcy:"Ѓ",gjcy:"Ñ“",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"â‹§",Gopf:"ð”¾",gopf:"ð•˜",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"â‹›",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"ð’¢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"âª",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"â‹—",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"â‹—",gtreqless:"â‹›",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"â„‹",HARDcy:"Ъ",hardcy:"ÑŠ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"â„",Hcirc:"Ĥ",hcirc:"Ä¥",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"ð”¥",Hfr:"ℌ",HilbertSpace:"â„‹",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"ð•™",Hopf:"â„",horbar:"―",HorizontalLine:"─",hscr:"ð’½",Hscr:"â„‹",hslash:"â„",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"â‰",hybull:"âƒ",hyphen:"â€",Iacute:"Ã",iacute:"í",ic:"â£",Icirc:"ÃŽ",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"ð”¦",Ifr:"â„‘",Igrave:"ÃŒ",igrave:"ì",ii:"â…ˆ",iiiint:"⨌",iiint:"∭",iinfin:"â§œ",iiota:"â„©",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"Ä«",image:"â„‘",ImaginaryI:"â…ˆ",imagline:"â„",imagpart:"â„‘",imath:"ı",Im:"â„‘",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"â„…",in:"∈",infin:"∞",infintie:"â§",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"â‹‚",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"â£",InvisibleTimes:"â¢",IOcy:"Ð",iocy:"Ñ‘",Iogon:"Ä®",iogon:"į",Iopf:"ð•€",iopf:"ð•š",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"ð’¾",Iscr:"â„",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"â‹´",isinsv:"⋳",isinv:"∈",it:"â¢",Itilde:"Ĩ",itilde:"Ä©",Iukcy:"І",iukcy:"Ñ–",Iuml:"Ã",iuml:"ï",Jcirc:"Ä´",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"ð”",jfr:"ð”§",jmath:"È·",Jopf:"ð•",jopf:"ð•›",Jscr:"ð’¥",jscr:"ð’¿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"Ñ”",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"Ä·",Kcy:"К",kcy:"к",Kfr:"ð”Ž",kfr:"ð”¨",kgreen:"ĸ",KHcy:"Ð¥",khcy:"Ñ…",KJcy:"ÐŒ",kjcy:"Ñœ",Kopf:"ð•‚",kopf:"ð•œ",Kscr:"ð’¦",kscr:"ð“€",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"â„’",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"â„’",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"â†",Larr:"↞",lArr:"â‡",larrfs:"â¤",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"â²",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"â¦",lbrkslu:"â¦",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ä»",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"â†",LeftArrow:"â†",Leftarrow:"â‡",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"â‹‹",LeftTriangleBar:"â§",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"â©¿",lesdoto:"âª",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"â‹–",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"ð”",lfr:"ð”©",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"â–„",LJcy:"Љ",ljcy:"Ñ™",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"â—º",Lmidot:"Ä¿",lmidot:"Å€",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"ð•ƒ",lopf:"ð•",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"â—Š",lozenge:"â—Š",lozf:"â§«",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"ð“",Lscr:"â„’",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"âª",lsimg:"âª",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Å",lstrok:"Å‚",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"â‹–",lthree:"â‹‹",ltimes:"⋉",ltlarr:"⥶",ltquest:"â©»",ltri:"â—ƒ",ltrie:"⊴",ltrif:"â—‚",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"â–®",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:"âŸ",Mellintrf:"ℳ",Mfr:"ð”",mfr:"ð”ª",mho:"â„§",micro:"µ",midast:"*",midcir:"â«°",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"â«›",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"ð•„",mopf:"ð•ž",mp:"∓",mscr:"ð“‚",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"Å„",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"â™®",naturals:"â„•",natur:"â™®",nbsp:" ",nbump:"≎̸",nbumpe:"â‰Ì¸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Å…",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"â©‚",Ncy:"Ð",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"â‰Ì¸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"ð”‘",nfr:"ð”«",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"Ñš",nlarr:"↚",nlArr:"â‡",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"â‡",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"â ",NonBreakingSpace:" ",nopf:"ð•Ÿ",Nopf:"â„•",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"â‰Ì¸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"â‹·",notinvc:"â‹¶",NotLeftTriangleBar:"â§Ì¸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"â‹ ",NotReverseElement:"∌",NotRightTriangleBar:"â§Ì¸",NotRightTriangle:"â‹«",NotRightTriangleEqual:"â‹­",NotSquareSubset:"âŠÌ¸",NotSquareSubsetEqual:"â‹¢",NotSquareSuperset:"âŠÌ¸",NotSquareSupersetEqual:"â‹£",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"âŠ",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"â‹¡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"â‰",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"â‹ ",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"â‡",nrarrw:"â†Ì¸",nrightarrow:"↛",nRightarrow:"â‡",nrtri:"â‹«",nrtrie:"â‹­",nsc:"âŠ",nsccue:"â‹¡",nsce:"⪰̸",Nscr:"ð’©",nscr:"ð“ƒ",nshortmid:"∤",nshortparallel:"∦",nsim:"â‰",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"â‹¢",nsqsupe:"â‹£",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"âŠ",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"â‹«",ntrianglerighteq:"â‹­",Nu:"Î",nu:"ν",num:"#",numero:"â„–",numsp:" ",nvap:"â‰âƒ’",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"â§ž",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"âŠ",Odblac:"Å",odblac:"Å‘",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Å’",oelig:"Å“",ofcir:"⦿",Ofr:"ð”’",ofr:"ð”¬",ogon:"Ë›",Ograve:"Ã’",ograve:"ò",ogt:"â§",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"â§€",Omacr:"ÅŒ",omacr:"Å",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"ð•†",oopf:"ð• ",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"â©”",or:"∨",ord:"â©",order:"â„´",orderof:"â„´",ordf:"ª",ordm:"º",origof:"⊶",oror:"â©–",orslope:"â©—",orv:"â©›",oS:"Ⓢ",Oscr:"ð’ª",oscr:"â„´",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"âž",OverBracket:"⎴",OverParenthesis:"âœ",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"ð”“",pfr:"ð”­",Phi:"Φ",phi:"φ",phiv:"Ï•",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"Ï€",pitchfork:"â‹”",piv:"Ï–",planck:"â„",planckh:"ℎ",plankv:"â„",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"ð•¡",Popf:"â„™",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"â„™",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"âˆ",Product:"âˆ",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"âˆ",Proportional:"âˆ",Proportion:"∷",propto:"âˆ",prsim:"≾",prurel:"⊰",Pscr:"ð’«",pscr:"ð“…",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"ð””",qfr:"ð”®",qint:"⨌",qopf:"ð•¢",Qopf:"ℚ",qprime:"â—",Qscr:"ð’¬",qscr:"ð“†",quaternions:"â„",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Å”",racute:"Å•",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"â†",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"â¤",rBarr:"â¤",RBarr:"â¤",rbbrk:"â³",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"â¦",Rcaron:"Ř",rcaron:"Å™",Rcedil:"Å–",rcedil:"Å—",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"Ñ€",rdca:"⤷",rdldhar:"⥩",rdquo:"â€",rdquor:"â€",rdsh:"↳",real:"ℜ",realine:"â„›",realpart:"ℜ",reals:"â„",Re:"ℜ",rect:"â–­",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"ð”¯",Rfr:"ℜ",rHar:"⥤",rhard:"â‡",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"Ï",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"â¥",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"â‡",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"â†",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"â§",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"â¥",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"Ëš",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"â€",rmoustache:"⎱",rmoust:"⎱",rnmid:"â«®",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"ð•£",Ropf:"â„",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"ð“‡",Rscr:"â„›",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"â–¹",rtrie:"⊵",rtrif:"â–¸",rtriltri:"â§Ž",RuleDelayed:"â§´",ruluhar:"⥨",rx:"℞",Sacute:"Åš",sacute:"Å›",sbquo:"‚",scap:"⪸",Scaron:"Å ",scaron:"Å¡",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Åž",scedil:"ÅŸ",Scirc:"Åœ",scirc:"Å",scnap:"⪺",scnE:"⪶",scnsim:"â‹©",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"Ñ",sdotb:"⊡",sdot:"â‹…",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"ð”–",sfr:"ð”°",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"â†",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"Ï‚",sigmav:"Ï‚",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"âª",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"â†",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ÑŒ",solbar:"⌿",solb:"â§„",sol:"/",Sopf:"ð•Š",sopf:"ð•¤",spades:"â™ ",spadesuit:"â™ ",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"âŠ",sqsube:"⊑",sqsubset:"âŠ",sqsubseteq:"⊑",sqsup:"âŠ",sqsupe:"⊒",sqsupset:"âŠ",sqsupseteq:"⊒",square:"â–¡",Square:"â–¡",SquareIntersection:"⊓",SquareSubset:"âŠ",SquareSubsetEqual:"⊑",SquareSuperset:"âŠ",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"â–ª",squ:"â–¡",squf:"â–ª",srarr:"→",Sscr:"ð’®",sscr:"ð“ˆ",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"Ï•",strns:"¯",sub:"⊂",Sub:"â‹",subdot:"⪽",subE:"â«…",sube:"⊆",subedot:"⫃",submult:"â«",subnE:"â«‹",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"â‹",subseteq:"⊆",subseteqq:"â«…",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"â«‹",subsim:"⫇",subsub:"â«•",subsup:"â«“",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"â‹©",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"â‹‘",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"â«„",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"â«—",suplarr:"⥻",supmult:"â«‚",supnE:"⫌",supne:"⊋",supplus:"â«€",supset:"⊃",Supset:"â‹‘",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"â«”",supsup:"â«–",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"Ï„",tbrk:"⎴",Tcaron:"Ť",tcaron:"Å¥",Tcedil:"Å¢",tcedil:"Å£",Tcy:"Т",tcy:"Ñ‚",tdot:"⃛",telrec:"⌕",Tfr:"ð”—",tfr:"ð”±",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"Ï‘",thetav:"Ï‘",thickapprox:"≈",thicksim:"∼",ThickSpace:"âŸâ€Š",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"Ëœ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"ð•‹",topf:"ð•¥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"â„¢",TRADE:"â„¢",triangle:"â–µ",triangledown:"â–¿",triangleleft:"â—ƒ",trianglelefteq:"⊴",triangleq:"≜",triangleright:"â–¹",trianglerighteq:"⊵",tridot:"â—¬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"â§",tritime:"⨻",trpezium:"â¢",Tscr:"ð’¯",tscr:"ð“‰",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"Ñ›",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"ÐŽ",ubrcy:"Ñž",Ubreve:"Ŭ",ubreve:"Å­",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"ð”˜",ufr:"ð”²",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"â–€",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"âŒ",ultri:"â—¸",Umacr:"Ū",umacr:"Å«",uml:"¨",UnderBar:"_",UnderBrace:"âŸ",UnderBracket:"⎵",UnderParenthesis:"â",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"ð•Œ",uopf:"ð•¦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"Ï…",Upsi:"Ï’",upsih:"Ï’",Upsilon:"Î¥",upsilon:"Ï…",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"âŒ",urcorner:"âŒ",urcrop:"⌎",Uring:"Å®",uring:"ů",urtri:"â—¹",Uscr:"ð’°",uscr:"ð“Š",utdot:"â‹°",Utilde:"Ũ",utilde:"Å©",utri:"â–µ",utrif:"â–´",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"Ï•",varpi:"Ï–",varpropto:"âˆ",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"Ï‚",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"Ï‘",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"â««",vBarv:"â«©",Vcy:"Ð’",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"â‹",veeeq:"≚",vellip:"â‹®",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"â˜",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"ð”™",vfr:"ð”³",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"ð•",vopf:"ð•§",vprop:"âˆ",vrtri:"⊳",Vscr:"ð’±",vscr:"ð“‹",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Å´",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"â‹€",wedgeq:"≙",weierp:"℘",Wfr:"ð”š",wfr:"ð”´",Wopf:"ð•Ž",wopf:"ð•¨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"ð’²",wscr:"ð“Œ",xcap:"â‹‚",xcirc:"â—¯",xcup:"⋃",xdtri:"â–½",Xfr:"ð”›",xfr:"ð”µ",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"â‹»",xodot:"⨀",Xopf:"ð•",xopf:"ð•©",xoplus:"â¨",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"ð’³",xscr:"ð“",xsqcup:"⨆",xuplus:"⨄",xutri:"â–³",xvee:"â‹",xwedge:"â‹€",Yacute:"Ã",yacute:"ý",YAcy:"Я",yacy:"Ñ",Ycirc:"Ŷ",ycirc:"Å·",Ycy:"Ы",ycy:"Ñ‹",yen:"Â¥",Yfr:"ð”œ",yfr:"ð”¶",YIcy:"Ї",yicy:"Ñ—",Yopf:"ð•",yopf:"ð•ª",Yscr:"ð’´",yscr:"ð“Ž",YUcy:"Ю",yucy:"ÑŽ",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Å»",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"ð”·",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"â‡",zopf:"ð•«",Zopf:"ℤ",Zscr:"ð’µ",zscr:"ð“",zwj:"â€",zwnj:"‌"}},{}],26:[function(require,module,exports){module.exports={Aacute:"Ã",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Ã…",aring:"Ã¥",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ã",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Ã",iacute:"í",Icirc:"ÃŽ",icirc:"î",iexcl:"¡",Igrave:"ÃŒ",igrave:"ì",iquest:"¿",Iuml:"Ã",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ã’",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ã",yacute:"ý",yen:"Â¥",yuml:"ÿ"}},{}],27:[function(require,module,exports){module.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},{}],28:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Uncaught, unspecified "error" event. ('+er+")");err.context=er;throw err}}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=handler.slice();len=listeners.length;for(i=0;i0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-- >0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1); +}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else if(listeners){while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;else if(evlistener)return evlistener.length}return 0};EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],29:[function(require,module,exports){module.exports=CollectingHandler;function CollectingHandler(cbs){this._cbs=cbs||{};this.events=[]}var EVENTS=require("./").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){name="on"+name;CollectingHandler.prototype[name]=function(){this.events.push([name]);if(this._cbs[name])this._cbs[name]()}}else if(EVENTS[name]===1){name="on"+name;CollectingHandler.prototype[name]=function(a){this.events.push([name,a]);if(this._cbs[name])this._cbs[name](a)}}else if(EVENTS[name]===2){name="on"+name;CollectingHandler.prototype[name]=function(a,b){this.events.push([name,a,b]);if(this._cbs[name])this._cbs[name](a,b)}}else{throw Error("wrong number of arguments")}});CollectingHandler.prototype.onreset=function(){this.events=[];if(this._cbs.onreset)this._cbs.onreset()};CollectingHandler.prototype.restart=function(){if(this._cbs.onreset)this._cbs.onreset();for(var i=0,len=this.events.length;i0;this._cbs.onclosetag(this._stack[--i]));}if(this._cbs.onend)this._cbs.onend()};Parser.prototype.reset=function(){if(this._cbs.onreset)this._cbs.onreset();this._tokenizer.reset();this._tagname="";this._attribname="";this._attribs=null;this._stack=[];if(this._cbs.onparserinit)this._cbs.onparserinit(this)};Parser.prototype.parseComplete=function(data){this.reset();this.end(data)};Parser.prototype.write=function(chunk){this._tokenizer.write(chunk)};Parser.prototype.end=function(chunk){this._tokenizer.end(chunk)};Parser.prototype.pause=function(){this._tokenizer.pause()};Parser.prototype.resume=function(){this._tokenizer.resume()};Parser.prototype.parseChunk=Parser.prototype.write;Parser.prototype.done=Parser.prototype.end;module.exports=Parser},{"./Tokenizer.js":34,events:28,inherits:38}],32:[function(require,module,exports){module.exports=ProxyHandler;function ProxyHandler(cbs){this._cbs=cbs||{}}var EVENTS=require("./").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){name="on"+name;ProxyHandler.prototype[name]=function(){if(this._cbs[name])this._cbs[name]()}}else if(EVENTS[name]===1){name="on"+name;ProxyHandler.prototype[name]=function(a){if(this._cbs[name])this._cbs[name](a)}}else if(EVENTS[name]===2){name="on"+name;ProxyHandler.prototype[name]=function(a,b){if(this._cbs[name])this._cbs[name](a,b)}}else{throw Error("wrong number of arguments")}})},{"./":36}],33:[function(require,module,exports){module.exports=Stream;var Parser=require("./WritableStream.js");function Stream(options){Parser.call(this,new Cbs(this),options)}require("inherits")(Stream,Parser);Stream.prototype.readable=true;function Cbs(scope){this.scope=scope}var EVENTS=require("../").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){Cbs.prototype["on"+name]=function(){this.scope.emit(name)}}else if(EVENTS[name]===1){Cbs.prototype["on"+name]=function(a){this.scope.emit(name,a)}}else if(EVENTS[name]===2){Cbs.prototype["on"+name]=function(a,b){this.scope.emit(name,a,b)}}else{throw Error("wrong number of arguments!")}})},{"../":36,"./WritableStream.js":35,inherits:38}],34:[function(require,module,exports){module.exports=Tokenizer;var decodeCodePoint=require("entities/lib/decode_codepoint.js"),entityMap=require("entities/maps/entities.json"),legacyMap=require("entities/maps/legacy.json"),xmlMap=require("entities/maps/xml.json"),i=0,TEXT=i++,BEFORE_TAG_NAME=i++,IN_TAG_NAME=i++,IN_SELF_CLOSING_TAG=i++,BEFORE_CLOSING_TAG_NAME=i++,IN_CLOSING_TAG_NAME=i++,AFTER_CLOSING_TAG_NAME=i++,BEFORE_ATTRIBUTE_NAME=i++,IN_ATTRIBUTE_NAME=i++,AFTER_ATTRIBUTE_NAME=i++,BEFORE_ATTRIBUTE_VALUE=i++,IN_ATTRIBUTE_VALUE_DQ=i++,IN_ATTRIBUTE_VALUE_SQ=i++,IN_ATTRIBUTE_VALUE_NQ=i++,BEFORE_DECLARATION=i++,IN_DECLARATION=i++,IN_PROCESSING_INSTRUCTION=i++,BEFORE_COMMENT=i++,IN_COMMENT=i++,AFTER_COMMENT_1=i++,AFTER_COMMENT_2=i++,BEFORE_CDATA_1=i++,BEFORE_CDATA_2=i++,BEFORE_CDATA_3=i++,BEFORE_CDATA_4=i++,BEFORE_CDATA_5=i++,BEFORE_CDATA_6=i++,IN_CDATA=i++,AFTER_CDATA_1=i++,AFTER_CDATA_2=i++,BEFORE_SPECIAL=i++,BEFORE_SPECIAL_END=i++,BEFORE_SCRIPT_1=i++,BEFORE_SCRIPT_2=i++,BEFORE_SCRIPT_3=i++,BEFORE_SCRIPT_4=i++,BEFORE_SCRIPT_5=i++,AFTER_SCRIPT_1=i++,AFTER_SCRIPT_2=i++,AFTER_SCRIPT_3=i++,AFTER_SCRIPT_4=i++,AFTER_SCRIPT_5=i++,BEFORE_STYLE_1=i++,BEFORE_STYLE_2=i++,BEFORE_STYLE_3=i++,BEFORE_STYLE_4=i++,AFTER_STYLE_1=i++,AFTER_STYLE_2=i++,AFTER_STYLE_3=i++,AFTER_STYLE_4=i++,BEFORE_ENTITY=i++,BEFORE_NUMERIC_ENTITY=i++,IN_NAMED_ENTITY=i++,IN_NUMERIC_ENTITY=i++,IN_HEX_ENTITY=i++,j=0,SPECIAL_NONE=j++,SPECIAL_SCRIPT=j++,SPECIAL_STYLE=j++;function whitespace(c){return c===" "||c==="\n"||c==="\t"||c==="\f"||c==="\r"}function characterState(char,SUCCESS){return function(c){if(c===char)this._state=SUCCESS}}function ifElseState(upper,SUCCESS,FAILURE){var lower=upper.toLowerCase();if(upper===lower){return function(c){if(c===lower){this._state=SUCCESS}else{this._state=FAILURE;this._index--}}}else{return function(c){if(c===lower||c===upper){this._state=SUCCESS}else{this._state=FAILURE;this._index--}}}}function consumeSpecialNameChar(upper,NEXT_STATE){var lower=upper.toLowerCase();return function(c){if(c===lower||c===upper){this._state=NEXT_STATE}else{this._state=IN_TAG_NAME;this._index--}}}function Tokenizer(options,cbs){this._state=TEXT;this._buffer="";this._sectionStart=0;this._index=0;this._bufferOffset=0;this._baseState=TEXT;this._special=SPECIAL_NONE;this._cbs=cbs;this._running=true;this._ended=false;this._xmlMode=!!(options&&options.xmlMode);this._decodeEntities=!!(options&&options.decodeEntities)}Tokenizer.prototype._stateText=function(c){if(c==="<"){if(this._index>this._sectionStart){this._cbs.ontext(this._getSection())}this._state=BEFORE_TAG_NAME;this._sectionStart=this._index}else if(this._decodeEntities&&this._special===SPECIAL_NONE&&c==="&"){if(this._index>this._sectionStart){this._cbs.ontext(this._getSection())}this._baseState=TEXT;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeTagName=function(c){if(c==="/"){this._state=BEFORE_CLOSING_TAG_NAME}else if(c==="<"){this._cbs.ontext(this._getSection());this._sectionStart=this._index}else if(c===">"||this._special!==SPECIAL_NONE||whitespace(c)){this._state=TEXT}else if(c==="!"){this._state=BEFORE_DECLARATION;this._sectionStart=this._index+1}else if(c==="?"){this._state=IN_PROCESSING_INSTRUCTION;this._sectionStart=this._index+1}else{this._state=!this._xmlMode&&(c==="s"||c==="S")?BEFORE_SPECIAL:IN_TAG_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInTagName=function(c){if(c==="/"||c===">"||whitespace(c)){this._emitToken("onopentagname");this._state=BEFORE_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateBeforeCloseingTagName=function(c){if(whitespace(c));else if(c===">"){this._state=TEXT}else if(this._special!==SPECIAL_NONE){if(c==="s"||c==="S"){this._state=BEFORE_SPECIAL_END}else{this._state=TEXT;this._index--}}else{this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInCloseingTagName=function(c){if(c===">"||whitespace(c)){this._emitToken("onclosetag");this._state=AFTER_CLOSING_TAG_NAME;this._index--}};Tokenizer.prototype._stateAfterCloseingTagName=function(c){if(c===">"){this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateBeforeAttributeName=function(c){if(c===">"){this._cbs.onopentagend();this._state=TEXT;this._sectionStart=this._index+1}else if(c==="/"){this._state=IN_SELF_CLOSING_TAG}else if(!whitespace(c)){this._state=IN_ATTRIBUTE_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInSelfClosingTag=function(c){if(c===">"){this._cbs.onselfclosingtag();this._state=TEXT;this._sectionStart=this._index+1}else if(!whitespace(c)){this._state=BEFORE_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateInAttributeName=function(c){if(c==="="||c==="/"||c===">"||whitespace(c)){this._cbs.onattribname(this._getSection());this._sectionStart=-1;this._state=AFTER_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateAfterAttributeName=function(c){if(c==="="){this._state=BEFORE_ATTRIBUTE_VALUE}else if(c==="/"||c===">"){this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME;this._index--}else if(!whitespace(c)){this._cbs.onattribend();this._state=IN_ATTRIBUTE_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeAttributeValue=function(c){if(c==='"'){this._state=IN_ATTRIBUTE_VALUE_DQ;this._sectionStart=this._index+1}else if(c==="'"){this._state=IN_ATTRIBUTE_VALUE_SQ;this._sectionStart=this._index+1}else if(!whitespace(c)){this._state=IN_ATTRIBUTE_VALUE_NQ;this._sectionStart=this._index;this._index--}};Tokenizer.prototype._stateInAttributeValueDoubleQuotes=function(c){if(c==='"'){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateInAttributeValueSingleQuotes=function(c){if(c==="'"){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateInAttributeValueNoQuotes=function(c){if(whitespace(c)||c===">"){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME;this._index--}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeDeclaration=function(c){this._state=c==="["?BEFORE_CDATA_1:c==="-"?BEFORE_COMMENT:IN_DECLARATION};Tokenizer.prototype._stateInDeclaration=function(c){if(c===">"){this._cbs.ondeclaration(this._getSection());this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateInProcessingInstruction=function(c){if(c===">"){this._cbs.onprocessinginstruction(this._getSection());this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateBeforeComment=function(c){if(c==="-"){this._state=IN_COMMENT;this._sectionStart=this._index+1}else{this._state=IN_DECLARATION}};Tokenizer.prototype._stateInComment=function(c){if(c==="-")this._state=AFTER_COMMENT_1};Tokenizer.prototype._stateAfterComment1=function(c){if(c==="-"){this._state=AFTER_COMMENT_2}else{this._state=IN_COMMENT}};Tokenizer.prototype._stateAfterComment2=function(c){if(c===">"){this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2));this._state=TEXT;this._sectionStart=this._index+1}else if(c!=="-"){this._state=IN_COMMENT}};Tokenizer.prototype._stateBeforeCdata1=ifElseState("C",BEFORE_CDATA_2,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata2=ifElseState("D",BEFORE_CDATA_3,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata3=ifElseState("A",BEFORE_CDATA_4,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata4=ifElseState("T",BEFORE_CDATA_5,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata5=ifElseState("A",BEFORE_CDATA_6,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata6=function(c){if(c==="["){this._state=IN_CDATA;this._sectionStart=this._index+1}else{this._state=IN_DECLARATION;this._index--}};Tokenizer.prototype._stateInCdata=function(c){if(c==="]")this._state=AFTER_CDATA_1};Tokenizer.prototype._stateAfterCdata1=characterState("]",AFTER_CDATA_2);Tokenizer.prototype._stateAfterCdata2=function(c){if(c===">"){this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2));this._state=TEXT;this._sectionStart=this._index+1}else if(c!=="]"){this._state=IN_CDATA}};Tokenizer.prototype._stateBeforeSpecial=function(c){if(c==="c"||c==="C"){this._state=BEFORE_SCRIPT_1}else if(c==="t"||c==="T"){this._state=BEFORE_STYLE_1}else{this._state=IN_TAG_NAME;this._index--}};Tokenizer.prototype._stateBeforeSpecialEnd=function(c){if(this._special===SPECIAL_SCRIPT&&(c==="c"||c==="C")){this._state=AFTER_SCRIPT_1}else if(this._special===SPECIAL_STYLE&&(c==="t"||c==="T")){this._state=AFTER_STYLE_1}else this._state=TEXT};Tokenizer.prototype._stateBeforeScript1=consumeSpecialNameChar("R",BEFORE_SCRIPT_2);Tokenizer.prototype._stateBeforeScript2=consumeSpecialNameChar("I",BEFORE_SCRIPT_3);Tokenizer.prototype._stateBeforeScript3=consumeSpecialNameChar("P",BEFORE_SCRIPT_4);Tokenizer.prototype._stateBeforeScript4=consumeSpecialNameChar("T",BEFORE_SCRIPT_5);Tokenizer.prototype._stateBeforeScript5=function(c){if(c==="/"||c===">"||whitespace(c)){this._special=SPECIAL_SCRIPT}this._state=IN_TAG_NAME;this._index--};Tokenizer.prototype._stateAfterScript1=ifElseState("R",AFTER_SCRIPT_2,TEXT);Tokenizer.prototype._stateAfterScript2=ifElseState("I",AFTER_SCRIPT_3,TEXT);Tokenizer.prototype._stateAfterScript3=ifElseState("P",AFTER_SCRIPT_4,TEXT);Tokenizer.prototype._stateAfterScript4=ifElseState("T",AFTER_SCRIPT_5,TEXT);Tokenizer.prototype._stateAfterScript5=function(c){if(c===">"||whitespace(c)){this._special=SPECIAL_NONE;this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index-6;this._index--}else this._state=TEXT};Tokenizer.prototype._stateBeforeStyle1=consumeSpecialNameChar("Y",BEFORE_STYLE_2);Tokenizer.prototype._stateBeforeStyle2=consumeSpecialNameChar("L",BEFORE_STYLE_3);Tokenizer.prototype._stateBeforeStyle3=consumeSpecialNameChar("E",BEFORE_STYLE_4);Tokenizer.prototype._stateBeforeStyle4=function(c){if(c==="/"||c===">"||whitespace(c)){this._special=SPECIAL_STYLE}this._state=IN_TAG_NAME;this._index--};Tokenizer.prototype._stateAfterStyle1=ifElseState("Y",AFTER_STYLE_2,TEXT);Tokenizer.prototype._stateAfterStyle2=ifElseState("L",AFTER_STYLE_3,TEXT);Tokenizer.prototype._stateAfterStyle3=ifElseState("E",AFTER_STYLE_4,TEXT);Tokenizer.prototype._stateAfterStyle4=function(c){if(c===">"||whitespace(c)){this._special=SPECIAL_NONE;this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index-5;this._index--}else this._state=TEXT};Tokenizer.prototype._stateBeforeEntity=ifElseState("#",BEFORE_NUMERIC_ENTITY,IN_NAMED_ENTITY);Tokenizer.prototype._stateBeforeNumericEntity=ifElseState("X",IN_HEX_ENTITY,IN_NUMERIC_ENTITY);Tokenizer.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16)limit=6;while(limit>=2){var entity=this._buffer.substr(start,limit);if(legacyMap.hasOwnProperty(entity)){this._emitPartial(legacyMap[entity]);this._sectionStart+=limit+1;return}else{limit--}}};Tokenizer.prototype._stateInNamedEntity=function(c){if(c===";"){this._parseNamedEntityStrict();if(this._sectionStart+1"z")&&(c<"A"||c>"Z")&&(c<"0"||c>"9")){if(this._xmlMode);else if(this._sectionStart+1===this._index);else if(this._baseState!==TEXT){if(c!=="="){this._parseNamedEntityStrict()}}else{this._parseLegacyEntity()}this._state=this._baseState;this._index--}};Tokenizer.prototype._decodeNumericEntity=function(offset,base){var sectionStart=this._sectionStart+offset;if(sectionStart!==this._index){var entity=this._buffer.substring(sectionStart,this._index);var parsed=parseInt(entity,base);this._emitPartial(decodeCodePoint(parsed));this._sectionStart=this._index}else{this._sectionStart--}this._state=this._baseState};Tokenizer.prototype._stateInNumericEntity=function(c){if(c===";"){this._decodeNumericEntity(2,10);this._sectionStart++}else if(c<"0"||c>"9"){if(!this._xmlMode){this._decodeNumericEntity(2,10)}else{this._state=this._baseState}this._index--}};Tokenizer.prototype._stateInHexEntity=function(c){if(c===";"){this._decodeNumericEntity(3,16);this._sectionStart++}else if((c<"a"||c>"f")&&(c<"A"||c>"F")&&(c<"0"||c>"9")){if(!this._xmlMode){this._decodeNumericEntity(3,16)}else{this._state=this._baseState}this._index--}};Tokenizer.prototype._cleanup=function(){if(this._sectionStart<0){this._buffer="";this._index=0;this._bufferOffset+=this._index}else if(this._running){if(this._state===TEXT){if(this._sectionStart!==this._index){this._cbs.ontext(this._buffer.substr(this._sectionStart))}this._buffer="";this._bufferOffset+=this._index;this._index=0}else if(this._sectionStart===this._index){this._buffer="";this._bufferOffset+=this._index;this._index=0}else{this._buffer=this._buffer.substr(this._sectionStart);this._index-=this._sectionStart;this._bufferOffset+=this._sectionStart}this._sectionStart=0}};Tokenizer.prototype.write=function(chunk){if(this._ended)this._cbs.onerror(Error(".write() after done!"));this._buffer+=chunk;this._parse()};Tokenizer.prototype._parse=function(){while(this._index>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],38:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],39:[function(require,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],40:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],41:[function(require,module,exports){(function(process){"use strict";if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){module.exports=nextTick}else{module.exports=process.nextTick}function nextTick(fn,arg1,arg2,arg3){if(typeof fn!=="function"){throw new TypeError('"callback" argument must be a function')}var len=arguments.length;var args,i;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function afterTickOne(){fn.call(null,arg1)});case 3:return process.nextTick(function afterTickTwo(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function afterTickThree(){fn.call(null,arg1,arg2,arg3)});default:args=new Array(len-1);i=0;while(i1){for(var i=1;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;if(state.decoder&&!addToFront&&!encoding){chunk=state.decoder.write(chunk);skipAdd=!state.objectMode&&chunk.length===0}if(!addToFront)state.reading=false;if(!skipAdd){if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended){state.needReadable=true;return 0}return state.length}Readable.prototype.read=function(n){debug("read",n);n=parseInt(n,10);var state=this._readableState;var nOrig=n;if(n!==0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}else{state.length-=n}if(state.length===0){if(!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++;increasedAwaitDrain=true}src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EElistenerCount(dest,"error")===0)dest.emit("error",er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var _i=0;_i=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.head.data;else ret=state.buffer.concat(state.length);state.buffer.clear()}else{ret=fromListPartial(n,state.buffer,state.decoder)}return ret}function fromListPartial(n,list,hasStrings){var ret;if(nstr.length?str.length:n;if(nb===str.length)ret+=str;else ret+=str.slice(0,n);n-=nb;if(n===0){if(nb===str.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=str.slice(nb)}break}++c}list.length-=c;return ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n);var p=list.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=buf.slice(nb)}break}++c}list.length-=c;return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")};var Stream;(function(){try{Stream=require("st"+"ream")}catch(_){}finally{if(!Stream)Stream=require("events").EventEmitter}})();var Buffer=require("buffer").Buffer;var bufferShim=require("buffer-shims");util.inherits(Writable,Stream);function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb;this.next=null}var Duplex;function WritableState(options,stream){Duplex=Duplex||require("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function writableStateGetBuffer(){var current=this.bufferedRequest;var out=[];while(current){out.push(current);current=current.next}return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")})}catch(_){}})();var Duplex;function Writable(options){Duplex=Duplex||require("./_stream_duplex");if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this);this.writable=true;if(options){if(typeof options.write==="function")this._write=options.write;if(typeof options.writev==="function")this._writev=options.writev}Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er);processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null){er=new TypeError("May not write null values to stream")}else if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}if(er){stream.emit("error",er);processNextTick(cb,er);valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(typeof encoding==="function"){cb=encoding;encoding=null}if(Buffer.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=nop;if(state.ended)writeAfterEnd(this,cb);else if(validChunk(this,state,chunk,cb)){ +state.pendingcb++;ret=writeOrBuffer(this,state,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(this,state)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(encoding){if(typeof encoding==="string")encoding=encoding.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding;return this};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=bufferShim.from(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length};BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length};BufferList.prototype.shift=function(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret};BufferList.prototype.clear=function(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function(s){if(this.length===0)return"";var p=this.head;var ret=""+p.data;while(p=p.next){ret+=s+p.data}return ret};BufferList.prototype.concat=function(n){if(this.length===0)return bufferShim.alloc(0);if(this.length===1)return this.head.data;var ret=bufferShim.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){p.data.copy(ret,i);i+=p.data.length;p=p.next}return ret}},{buffer:5,"buffer-shims":4}],50:[function(require,module,exports){module.exports=require("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":45}],51:[function(require,module,exports){(function(process){var Stream=function(){try{return require("st"+"ream")}catch(_){}}();exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=Stream||exports;exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js");if(!process.browser&&process.env.READABLE_STREAM==="disable"&&Stream){module.exports=Stream}}).call(this,require("_process"))},{"./lib/_stream_duplex.js":44,"./lib/_stream_passthrough.js":45,"./lib/_stream_readable.js":46,"./lib/_stream_transform.js":47,"./lib/_stream_writable.js":48,_process:42}],52:[function(require,module,exports){module.exports=require("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":47}],53:[function(require,module,exports){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":48}],54:[function(require,module,exports){module.exports=function(string){return string.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}},{}],55:[function(require,module,exports){module.exports=Stream;var EE=require("events").EventEmitter;var inherits=require("inherits");inherits(Stream,EE);Stream.Readable=require("readable-stream/readable.js");Stream.Writable=require("readable-stream/writable.js");Stream.Duplex=require("readable-stream/duplex.js");Stream.Transform=require("readable-stream/transform.js");Stream.PassThrough=require("readable-stream/passthrough.js");Stream.Stream=Stream;function Stream(){EE.call(this)}Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){if(dest.writable){if(false===dest.write(chunk)&&source.pause){source.pause()}}}source.on("data",ondata);function ondrain(){if(source.readable&&source.resume){source.resume()}}dest.on("drain",ondrain);if(!dest._isStdio&&(!options||options.end!==false)){source.on("end",onend);source.on("close",onclose)}var didOnEnd=false;function onend(){if(didOnEnd)return;didOnEnd=true;dest.end()}function onclose(){if(didOnEnd)return;didOnEnd=true;if(typeof dest.destroy==="function")dest.destroy()}function onerror(er){cleanup();if(EE.listenerCount(this,"error")===0){throw er}}source.on("error",onerror);dest.on("error",onerror);function cleanup(){source.removeListener("data",ondata);dest.removeListener("drain",ondrain);source.removeListener("end",onend);source.removeListener("close",onclose);source.removeListener("error",onerror);dest.removeListener("error",onerror);source.removeListener("end",cleanup);source.removeListener("close",cleanup);dest.removeListener("close",cleanup)}source.on("end",cleanup);source.on("close",cleanup);dest.on("close",cleanup);dest.emit("pipe",source);return dest}},{events:28,inherits:38,"readable-stream/duplex.js":43,"readable-stream/passthrough.js":50,"readable-stream/readable.js":51,"readable-stream/transform.js":52,"readable-stream/writable.js":53}],56:[function(require,module,exports){var Buffer=require("buffer").Buffer;var isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding)){throw new Error("Unknown encoding: "+encoding)}}var StringDecoder=exports.StringDecoder=function(encoding){this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(encoding);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:5}],57:[function(require,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],58:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i'].join('')); $(document.body).append(popupDialog); + //TODO: only display applicable scopes (will need to pass them into handleLogin) popup = popupDialog.find('ul.api-popup-scopes').empty(); for (i = 0; i < scopes.length; i ++) { scope = scopes[i]; - str = '
  • ' + '
  • ' + '
  • '; popup.append(str); @@ -103,9 +106,25 @@ function handleLogin() { var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html'; var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl; var url = null; - - for (var key in authSchemes) { - if (authSchemes.hasOwnProperty(key)) { + var scopes = [] + var o = popup.find('input:checked'); + var OAuthSchemeKeys = []; + var state; + for(k =0; k < o.length; k++) { + var scope = $(o[k]).attr('scope'); + if (scopes.indexOf(scope) === -1) + scopes.push(scope); + var OAuthSchemeKey = $(o[k]).attr('oauthtype'); + if (OAuthSchemeKeys.indexOf(OAuthSchemeKey) === -1) + OAuthSchemeKeys.push(OAuthSchemeKey); + } + + //TODO: merge not replace if scheme is different from any existing + //(needs to be aware of schemes to do so correctly) + window.enabledScopes=scopes; + + for (var key in authSchemes) { + if (authSchemes.hasOwnProperty(key) && OAuthSchemeKeys.indexOf(key) != -1) { //only look at keys that match this scope. var flow = authSchemes[key].flow; if(authSchemes[key].type === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) { @@ -113,7 +132,14 @@ function handleLogin() { url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code'); window.swaggerUi.tokenName = dets.tokenName || 'access_token'; window.swaggerUi.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null); + state = key; } + else if(authSchemes[key].type === 'oauth2' && flow && (flow === 'application')) { + var dets = authSchemes[key]; + window.swaggerUi.tokenName = dets.tokenName || 'access_token'; + clientCredentialsFlow(scopes, dets.tokenUrl, key); + return; + } else if(authSchemes[key].grantTypes) { // 1.2 support var o = authSchemes[key].grantTypes; @@ -134,20 +160,6 @@ function handleLogin() { } } } - var scopes = [] - var o = $('.api-popup-scopes').find('input:checked'); - - for(k =0; k < o.length; k++) { - var scope = $(o[k]).attr('scope'); - - if (scopes.indexOf(scope) === -1) - scopes.push(scope); - } - - // Implicit auth recommends a state parameter. - var state = Math.random (); - - window.enabledScopes=scopes; redirect_uri = redirectUrl; @@ -156,6 +168,9 @@ function handleLogin() { url += '&client_id=' + encodeURIComponent(clientId); url += '&scope=' + encodeURIComponent(scopes.join(scopeSeparator)); url += '&state=' + encodeURIComponent(state); + for (var key in additionalQueryStringParams) { + url += '&' + key + '=' + encodeURIComponent(additionalQueryStringParams[key]); + } window.open(url); }); @@ -187,9 +202,10 @@ function initOAuth(opts) { popupMask = (o.popupMask||$('#api-common-mask')); popupDialog = (o.popupDialog||$('.api-popup-dialog')); clientId = (o.clientId||errors.push('missing client id')); - clientSecret = (o.clientSecret||errors.push('missing client secret')); + clientSecret = (o.clientSecret||null); realm = (o.realm||errors.push('missing realm')); scopeSeparator = (o.scopeSeparator||' '); + additionalQueryStringParams = (o.additionalQueryStringParams||{}); if(errors.length > 0){ log('auth unable initialize oauth: ' + errors); @@ -208,14 +224,51 @@ function initOAuth(opts) { }); } +function clientCredentialsFlow(scopes, tokenUrl, OAuthSchemeKey) { + var params = { + 'client_id': clientId, + 'client_secret': clientSecret, + 'scope': scopes.join(' '), + 'grant_type': 'client_credentials' + } + $.ajax( + { + url : tokenUrl, + type: "POST", + data: params, + success:function(data, textStatus, jqXHR) + { + onOAuthComplete(data,OAuthSchemeKey); + }, + error: function(jqXHR, textStatus, errorThrown) + { + onOAuthComplete(""); + } + }); + + } + window.processOAuthCode = function processOAuthCode(data) { + var OAuthSchemeKey = data.state; + + // redirect_uri is required in auth code flow + // see https://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.1.3 + var host = window.location; + var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/")); + var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html'; + var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl; + var params = { 'client_id': clientId, - 'client_secret': clientSecret, 'code': data.code, 'grant_type': 'authorization_code', - 'redirect_uri': redirect_uri + 'redirect_uri': redirectUrl + }; + + if (clientSecret) { + params.client_secret = clientSecret; } + $.ajax( { url : window.swaggerUi.tokenUrl, @@ -223,16 +276,16 @@ window.processOAuthCode = function processOAuthCode(data) { data: params, success:function(data, textStatus, jqXHR) { - onOAuthComplete(data); + onOAuthComplete(data, OAuthSchemeKey); }, error: function(jqXHR, textStatus, errorThrown) { onOAuthComplete(""); } }); -} +}; -window.onOAuthComplete = function onOAuthComplete(token) { +window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) { if(token) { if(token.error) { var checkbox = $('input[type=checkbox],.secured') @@ -242,11 +295,14 @@ window.onOAuthComplete = function onOAuthComplete(token) { alert(token.error); } else { - var b = token[window.swaggerUi.tokenName]; + var b = token[window.swaggerUi.tokenName]; + if (!OAuthSchemeKey){ + OAuthSchemeKey = token.state; + } if(b){ // if all roles are satisfied var o = null; - $.each($('.auth .api-ic .api_information_panel'), function(k, v) { + $.each($('.auth .api-ic .api_information_panel'), function(k, v) { var children = v; if(children && children.childNodes) { var requiredScopes = []; @@ -283,8 +339,9 @@ window.onOAuthComplete = function onOAuthComplete(token) { } } }); - window.swaggerUi.api.clientAuthorizations.add(oauth2KeyName, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header')); + window.swaggerUi.api.clientAuthorizations.add(window.OAuthSchemeKey, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header')); + window.swaggerUi.load(); } } } -} +}; diff --git a/vendor/assets/components/swagger-ui/o2c.html b/rswag-ui/vendor/assets/components/swagger-ui/o2c.html similarity index 100% rename from vendor/assets/components/swagger-ui/o2c.html rename to rswag-ui/vendor/assets/components/swagger-ui/o2c.html diff --git a/rswag-ui/vendor/assets/components/swagger-ui/swagger-ui.js b/rswag-ui/vendor/assets/components/swagger-ui/swagger-ui.js new file mode 100644 index 0000000..34da79d --- /dev/null +++ b/rswag-ui/vendor/assets/components/swagger-ui/swagger-ui.js @@ -0,0 +1,24993 @@ +/** + * swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API + * @version v2.2.5 + * @link http://swagger.io + * @license Apache-2.0 + */ +(function(){/* jshint ignore:start */ + {(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['apikey_auth'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return " " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.value : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n"; +},"3":function(container,depth0,helpers,partials,data) { + return " \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "
    \n

    Api key authorization

    \n
    " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "
    \n
    \n
    \n name:\n " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n
    \n
    \n in:\n " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0["in"] : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n
    \n
    \n value:\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + + "
    \n
    \n
    \n"; +},"useData":true}); +templates['auth_button'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + return "Authorize\n"; +},"useData":true}); +templates['auth_button_operation'] = template({"1":function(container,depth0,helpers,partials,data) { + return " authorize__btn_operation_login\n"; +},"3":function(container,depth0,helpers,partials,data) { + return " authorize__btn_operation_logout\n"; +},"5":function(container,depth0,helpers,partials,data) { + var stack1; + + return "
      \n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.scopes : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \n"; +},"6":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "
  • " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.scope : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "
  • \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "
    \n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.scopes : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \n"; +},"useData":true}); +templates['auth_view'] = template({"1":function(container,depth0,helpers,partials,data) { + return " \n"; +},"3":function(container,depth0,helpers,partials,data) { + return " \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "
    \n\n
    \n
    \n" + + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isAuthorized : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \n\n
    \n"; +},"useData":true}); +templates['basic_auth'] = template({"1":function(container,depth0,helpers,partials,data) { + return " - authorized"; +},"3":function(container,depth0,helpers,partials,data) { + var stack1; + + return " " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.username : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n"; +},"5":function(container,depth0,helpers,partials,data) { + return " \n"; +},"7":function(container,depth0,helpers,partials,data) { + return "
    \n password:\n \n
    \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "
    \n

    Basic authentication" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "

    \n
    \n
    " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "
    \n
    \n username:\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") + + "
    \n" + + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \n
    \n"; +},"useData":true}); +templates['content_type'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.produces : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n"; +},"4":function(container,depth0,helpers,partials,data) { + return " \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "\n\n"; +},"useData":true}); +templates['main'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "
    " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "
    \n
    " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "
    \n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.externalDocs : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " " + + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "

    " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.description : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "

    \n " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return ""; +},"6":function(container,depth0,helpers,partials,data) { + var stack1; + + return "
    Created by
    " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "
    "; +},"8":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return ""; +},"10":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return ""; +},"12":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return ""; +},"14":function(container,depth0,helpers,partials,data) { + var stack1; + + return " , api version: " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n "; +},"16":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "
    \n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.info : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \n
    \n
    \n\n
      \n\n
      \n

      [ base url: " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.basePath : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "]\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.validatorUrl : depth0),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "

      \n
      \n
      \n"; +},"useData":true}); +templates['oauth2'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "
    • \n \n
      \n " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.OAuthSchemeKey : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " \n
    • \n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1; + + return " (" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.OAuthSchemeKey : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + ")\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "
      \n

      Select OAuth2.0 Scopes

      \n

      " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "

      \n

      Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\n Learn how to use\n

      \n

      " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.appName : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + " API requires the following scopes. Select which ones you want to grant to Swagger UI.

      \n

      Authorization URL: " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.authorizationUrl : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "

      \n

      flow: " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.flow : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "

      \n
        \n" + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.scopes : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
      \n
      "; +},"useData":true}); +templates['operation'] = template({"1":function(container,depth0,helpers,partials,data) { + return "deprecated"; +},"3":function(container,depth0,helpers,partials,data) { + return "

      Warning: Deprecated

      \n"; +},"5":function(container,depth0,helpers,partials,data) { + var stack1; + + return "

      Implementation Notes

      \n
      " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "
      \n"; +},"7":function(container,depth0,helpers,partials,data) { + return "
      \n"; +},"9":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "
      \n

      Response Class (Status " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.successCode : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + ")

      \n " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.successDescription : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n

      \n
      \n
      \n
      \n"; +},"10":function(container,depth0,helpers,partials,data) { + var stack1; + + return "
      " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.successDescription : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "
      "; +},"12":function(container,depth0,helpers,partials,data) { + var stack1; + + return "

      Headers

      \n \n \n \n \n \n \n \n \n \n \n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.headers : depth0),{"name":"each","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " \n
      HeaderDescriptionTypeOther
      \n"; +},"13":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n " + + container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) + + "\n " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.other : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n \n"; +},"15":function(container,depth0,helpers,partials,data) { + return "

      Parameters

      \n \n \n \n \n \n \n \n \n \n \n \n\n \n
      ParameterValueDescriptionParameter TypeData Type
      \n"; +},"17":function(container,depth0,helpers,partials,data) { + return "
      \n

      Response Messages

      \n \n \n \n \n \n \n \n \n \n \n \n
      HTTP Status CodeReasonResponse ModelHeaders
      \n"; +},"19":function(container,depth0,helpers,partials,data) { + return ""; +},"21":function(container,depth0,helpers,partials,data) { + return "
      \n \n \n \n
      \n"; +},"23":function(container,depth0,helpers,partials,data) { + return "

      Request Headers

      \n
      \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3=container.escapeExpression; + + return " \n"; +},"useData":true}); +templates['param'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n
      \n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : ""); +},"5":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "
      \n \n
      \n
      \n"; +},"7":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n
      \n
      \n
      \n"; +},"9":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(10, data, 0),"data":data})) != null ? stack1 : ""); +},"10":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = (helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helpers.helperMissing).call(depth0 != null ? depth0 : {},depth0,{"name":"renderTextParam","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"11":function(container,depth0,helpers,partials,data) { + return ""; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "\n\n\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") + + "\n\n" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n\n \n\n"; +},"useData":true}); +templates['param_list'] = template({"1":function(container,depth0,helpers,partials,data) { + return " required"; +},"3":function(container,depth0,helpers,partials,data) { + return " multiple=\"multiple\""; +},"5":function(container,depth0,helpers,partials,data) { + return " required "; +},"7":function(container,depth0,helpers,partials,data) { + var stack1; + + return " \n"; +},"8":function(container,depth0,helpers,partials,data) { + return " selected=\"\" "; +},"10":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "\n \n\n"; +},"11":function(container,depth0,helpers,partials,data) { + return " selected=\"\" "; +},"13":function(container,depth0,helpers,partials,data) { + return " (default) "; +},"15":function(container,depth0,helpers,partials,data) { + return ""; +},"17":function(container,depth0,helpers,partials,data) { + return ""; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "\n\n \n\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"description","hash":{},"data":data}) : helper))) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n\n"; +},"useData":true}); +templates['param_readonly'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n
      \n"; +},"3":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : ""); +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return " " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n"; +},"6":function(container,depth0,helpers,partials,data) { + return " (empty)\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "\n\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n\n"; +},"useData":true}); +templates['param_readonly_required'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n"; +},"3":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : ""); +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return " " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n"; +},"6":function(container,depth0,helpers,partials,data) { + return " (empty)\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "\n\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n\n"; +},"useData":true}); +templates['param_required'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : ""); +},"5":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "
      \n \n
      \n
      \n"; +},"7":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n
      \n
      \n
      \n"; +},"9":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.program(12, data, 0),"data":data})) != null ? stack1 : ""); +},"10":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n"; +},"12":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = (helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helpers.helperMissing).call(depth0 != null ? depth0 : {},depth0,{"name":"renderTextParam","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"13":function(container,depth0,helpers,partials,data) { + return ""; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "\n\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") + + "\n\n " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n\n" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n\n"; +},"useData":true}); +templates['parameter_content_type'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.consumes : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n"; +},"4":function(container,depth0,helpers,partials,data) { + return " \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "\n\n"; +},"useData":true}); +templates['popup'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper; + + return "
      \n
      " + + container.escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"title","hash":{},"data":data}) : helper))) + + "
      \n
      \n

      \n
      \n \n
      \n
      \n
      "; +},"useData":true}); +templates['resource'] = template({"1":function(container,depth0,helpers,partials,data) { + return " : "; +},"3":function(container,depth0,helpers,partials,data) { + var stack1; + + return "
    • \n Raw\n
    • \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, options, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, buffer = + "
      \n

      \n " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + " "; + stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : alias2),(options={"name":"summary","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(alias1,options) : helper)); + if (!helpers.summary) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} + if (stack1 != null) { buffer += stack1; } + return buffer + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.summary : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n

      \n
        \n
      • \n Show/Hide\n
      • \n
      • \n \n List Operations\n \n
      • \n
      • \n \n Expand Operations\n \n
      • \n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.url : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
      \n
      \n\n"; +},"useData":true}); +templates['response_content_type'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.produces : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n"; +},"4":function(container,depth0,helpers,partials,data) { + return " \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "\n\n"; +},"useData":true}); +templates['signature'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "\n
      \n\n
      \n\n
      \n
      \n " + + container.escapeExpression((helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.signature : depth0),{"name":"sanitize","hash":{},"data":data})) + + "\n
      \n\n
      \n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleJSON : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleXML : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
      \n
      \n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "
      \n
      "
      +    + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.sampleJSON : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
      +    + "
      \n " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isParam : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n
      \n"; +},"3":function(container,depth0,helpers,partials,data) { + return ""; +},"5":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "
      \n
      "
      +    + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.sampleXML : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
      +    + "
      \n " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isParam : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n
      \n"; +},"7":function(container,depth0,helpers,partials,data) { + var stack1; + + return " " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.signature : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = (helpers.ifCond || (depth0 && depth0.ifCond) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.sampleJSON : depth0),"||",(depth0 != null ? depth0.sampleXML : depth0),{"name":"ifCond","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : ""); +},"useData":true}); +templates['status_code'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " \n " + + container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) + + "\n " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.code : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.message : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n\n\n \n \n" + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.headers : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " \n
      \n"; +},"useData":true}); +})();} + /* jshint ignore:end */ +'use strict'; + + +$(function() { + + // Helper function for vertically aligning DOM elements + // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/ + $.fn.vAlign = function() { + return this.each(function(){ + var ah = $(this).height(); + var ph = $(this).parent().height(); + var mh = (ph - ah) / 2; + $(this).css('margin-top', mh); + }); + }; + + $.fn.stretchFormtasticInputWidthToParent = function() { + return this.each(function(){ + var p_width = $(this).closest("form").innerWidth(); + var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest('form').css('padding-right'), 10); + var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10); + $(this).css('width', p_width - p_padding - this_padding); + }); + }; + + $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent(); + + // Vertically center these paragraphs + // Parent may need a min-height for this to work.. + $('ul.downplayed li div.content p').vAlign(); + + // When a sandbox form is submitted.. + $("form.sandbox").submit(function(){ + + var error_free = true; + + // Cycle through the forms required inputs + $(this).find("input.required").each(function() { + + // Remove any existing error styles from the input + $(this).removeClass('error'); + + // Tack the error style on if the input is empty.. + if ($(this).val() === '') { + $(this).addClass('error'); + $(this).wiggle(); + error_free = false; + } + + }); + + return error_free; + }); + +}); + +function clippyCopiedCallback() { + $('#api_key_copied').fadeIn().delay(1000).fadeOut(); + + // var b = $("#clippy_tooltip_" + a); + // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() { + // b.attr("title", "copy to clipboard") + // }, + // 500)) +} + +// Logging function that accounts for browsers that don't have window.console +function log(){ + log.history = log.history || []; + log.history.push(arguments); + if(this.console){ + console.log( Array.prototype.slice.call(arguments)[0] ); + } +} + +// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913) +if (Function.prototype.bind && console && typeof console.log === "object") { + [ + "log","info","warn","error","assert","dir","clear","profile","profileEnd" + ].forEach(function (method) { + console[method] = this.bind(console[method], console); + }, Function.prototype.call); +} + +window.Docs = { + + shebang: function() { + + // If shebang has an operation nickname in it.. + // e.g. /docs/#!/words/get_search + var fragments = $.param.fragment().split('/'); + fragments.shift(); // get rid of the bang + + switch (fragments.length) { + case 1: + if (fragments[0].length > 0) { // prevent matching "#/" + // Expand all operations for the resource and scroll to it + var dom_id = 'resource_' + fragments[0]; + + Docs.expandEndpointListForResource(fragments[0]); + $("#"+dom_id).slideto({highlight: false}); + } + break; + case 2: + // Refer to the endpoint DOM element, e.g. #words_get_search + + // Expand Resource + Docs.expandEndpointListForResource(fragments[0]); + $("#"+dom_id).slideto({highlight: false}); + + // Expand operation + var li_dom_id = fragments.join('_'); + var li_content_dom_id = li_dom_id + "_content"; + + + Docs.expandOperation($('#'+li_content_dom_id)); + $('#'+li_dom_id).slideto({highlight: false}); + break; + } + }, + + toggleEndpointListForResource: function(resource) { + var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints'); + if (elem.is(':visible')) { + $.bbq.pushState('#/', 2); + Docs.collapseEndpointListForResource(resource); + } else { + $.bbq.pushState('#/' + resource, 2); + Docs.expandEndpointListForResource(resource); + } + }, + + // Expand resource + expandEndpointListForResource: function(resource) { + var resource = Docs.escapeResourceName(resource); + if (resource == '') { + $('.resource ul.endpoints').slideDown(); + return; + } + + $('li#resource_' + resource).addClass('active'); + + var elem = $('li#resource_' + resource + ' ul.endpoints'); + elem.slideDown(); + }, + + // Collapse resource and mark as explicitly closed + collapseEndpointListForResource: function(resource) { + var resource = Docs.escapeResourceName(resource); + if (resource == '') { + $('.resource ul.endpoints').slideUp(); + return; + } + + $('li#resource_' + resource).removeClass('active'); + + var elem = $('li#resource_' + resource + ' ul.endpoints'); + elem.slideUp(); + }, + + expandOperationsForResource: function(resource) { + // Make sure the resource container is open.. + Docs.expandEndpointListForResource(resource); + + if (resource == '') { + $('.resource ul.endpoints li.operation div.content').slideDown(); + return; + } + + $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { + Docs.expandOperation($(this)); + }); + }, + + collapseOperationsForResource: function(resource) { + // Make sure the resource container is open.. + Docs.expandEndpointListForResource(resource); + + if (resource == '') { + $('.resource ul.endpoints li.operation div.content').slideUp(); + return; + } + + $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { + Docs.collapseOperation($(this)); + }); + }, + + escapeResourceName: function(resource) { + return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&"); + }, + + expandOperation: function(elem) { + elem.slideDown(); + }, + + collapseOperation: function(elem) { + elem.slideUp(); + } +}; + +/*! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2015 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ + +// vim: ts=4 sts=4 sw=4 expandtab + +// Add semicolon to prevent IIFE from being passed as argument to concatenated code. +; + +// UMD (Universal Module Definition) +// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js +(function (root, factory) { + 'use strict'; + + /* global define, exports, module */ + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.returnExports = factory(); + } +}(this, function () { + /** + * Brings an environment as close to ECMAScript 5 compliance + * as is possible with the facilities of erstwhile engines. + * + * Annotated ES5: http://es5.github.com/ (specific links below) + * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/ + */ + + // Shortcut to an often accessed properties, in order to avoid multiple + // dereference that costs universally. This also holds a reference to known-good + // functions. + var $Array = Array; + var ArrayPrototype = $Array.prototype; + var $Object = Object; + var ObjectPrototype = $Object.prototype; + var $Function = Function; + var FunctionPrototype = $Function.prototype; + var $String = String; + var StringPrototype = $String.prototype; + var $Number = Number; + var NumberPrototype = $Number.prototype; + var array_slice = ArrayPrototype.slice; + var array_splice = ArrayPrototype.splice; + var array_push = ArrayPrototype.push; + var array_unshift = ArrayPrototype.unshift; + var array_concat = ArrayPrototype.concat; + var array_join = ArrayPrototype.join; + var call = FunctionPrototype.call; + var apply = FunctionPrototype.apply; + var max = Math.max; + var min = Math.min; + + // Having a toString local variable name breaks in Opera so use to_string. + var to_string = ObjectPrototype.toString; + + /* global Symbol */ + /* eslint-disable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, constructorRegex = /^\s*class /, isES6ClassFn = function isES6ClassFn(value) { try { var fnStr = fnToStr.call(value); var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' '); return constructorRegex.test(spaceStripped); } catch (e) { return false; /* not a function */ } }, tryFunctionObject = function tryFunctionObject(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]', isCallable = function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; }; + + var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { regexExec.call(value); return true; } catch (e) { return false; } }, regexClass = '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 'object') { return false; } return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; }; + var isString; /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, tryStringObject = function tryStringObject(value) { try { strValue.call(value); return true; } catch (e) { return false; } }, stringClass = '[object String]'; isString = function isString(value) { if (typeof value === 'string') { return true; } if (typeof value !== 'object') { return false; } return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; }; + /* eslint-enable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + + /* inlined from http://npmjs.com/define-properties */ + var supportsDescriptors = $Object.defineProperty && (function () { + try { + var obj = {}; + $Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); + for (var _ in obj) { // jscs:ignore disallowUnusedVariables + return false; + } + return obj.x === obj; + } catch (e) { /* this is ES3 */ + return false; + } + }()); + var defineProperties = (function (has) { + // Define configurable, writable, and non-enumerable props + // if they don't exist. + var defineProperty; + if (supportsDescriptors) { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && (name in object)) { + return; + } + $Object.defineProperty(object, name, { + configurable: true, + enumerable: false, + writable: true, + value: method + }); + }; + } else { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && (name in object)) { + return; + } + object[name] = method; + }; + } + return function defineProperties(object, map, forceAssign) { + for (var name in map) { + if (has.call(map, name)) { + defineProperty(object, name, map[name], forceAssign); + } + } + }; + }(ObjectPrototype.hasOwnProperty)); + + // + // Util + // ====== + // + + /* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */ + var isPrimitive = function isPrimitive(input) { + var type = typeof input; + return input === null || (type !== 'object' && type !== 'function'); + }; + + var isActualNaN = $Number.isNaN || function isActualNaN(x) { + return x !== x; + }; + + var ES = { + // ES5 9.4 + // http://es5.github.com/#x9.4 + // http://jsperf.com/to-integer + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */ + ToInteger: function ToInteger(num) { + var n = +num; + if (isActualNaN(n)) { + n = 0; + } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */ + ToPrimitive: function ToPrimitive(input) { + var val, valueOf, toStr; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (isCallable(valueOf)) { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toStr = input.toString; + if (isCallable(toStr)) { + val = toStr.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); + }, + + // ES5 9.9 + // http://es5.github.com/#x9.9 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */ + ToObject: function (o) { + if (o == null) { // this matches both null and undefined + throw new TypeError("can't convert " + o + ' to object'); + } + return $Object(o); + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */ + ToUint32: function ToUint32(x) { + return x >>> 0; + } + }; + + // + // Function + // ======== + // + + // ES-5 15.3.4.5 + // http://es5.github.com/#x15.3.4.5 + + var Empty = function Empty() {}; + + defineProperties(FunctionPrototype, { + bind: function bind(that) { // .length is 1 + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + if (!isCallable(target)) { + throw new TypeError('Function.prototype.bind called on incompatible ' + target); + } + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + // XXX slicedArgs will stand in for "A" if used + var args = array_slice.call(arguments, 1); // for normal call + // 4. Let F be a new native ECMAScript object. + // 11. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 12. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 13. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 14. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + var bound; + var binder = function () { + + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs, the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Construct]] internal + // method of target providing args as the arguments. + + var result = apply.call( + target, + this, + array_concat.call(args, array_slice.call(arguments)) + ); + if ($Object(result) === result) { + return result; + } + return this; + + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs, the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Call]] internal method + // of target providing boundThis as the this value and + // providing args as the arguments. + + // equiv: target.call(this, ...boundArgs, ...args) + return apply.call( + target, + that, + array_concat.call(args, array_slice.call(arguments)) + ); + + } + + }; + + // 15. If the [[Class]] internal property of Target is "Function", then + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is + // larger. + // 16. Else set the length own property of F to 0. + + var boundLength = max(0, target.length - args.length); + + // 17. Set the attributes of the length own property of F to the values + // specified in 15.3.5.1. + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + array_push.call(boundArgs, '$' + i); + } + + // XXX Build a dynamic function with desired amount of arguments is the only + // way to set the length property of a function. + // In environments where Content Security Policies enabled (Chrome extensions, + // for ex.) all use of eval or Function costructor throws an exception. + // However in all of these environments Function.prototype.bind exists + // and so this code will never be executed. + bound = $Function('binder', 'return function (' + array_join.call(boundArgs, ',') + '){ return binder.apply(this, arguments); }')(binder); + + if (target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + // Clean up dangling references. + Empty.prototype = null; + } + + // TODO + // 18. Set the [[Extensible]] internal property of F to true. + + // TODO + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). + // 20. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and + // false. + // 21. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, + // and false. + + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property or the [[Code]], [[FormalParameters]], and + // [[Scope]] internal properties. + // XXX can't delete prototype in pure-js. + + // 22. Return F. + return bound; + } + }); + + // _Please note: Shortcuts are defined after `Function.prototype.bind` as we + // use it in defining shortcuts. + var owns = call.bind(ObjectPrototype.hasOwnProperty); + var toStr = call.bind(ObjectPrototype.toString); + var arraySlice = call.bind(array_slice); + var arraySliceApply = apply.bind(array_slice); + var strSlice = call.bind(StringPrototype.slice); + var strSplit = call.bind(StringPrototype.split); + var strIndexOf = call.bind(StringPrototype.indexOf); + var pushCall = call.bind(array_push); + var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable); + var arraySort = call.bind(ArrayPrototype.sort); + + // + // Array + // ===== + // + + var isArray = $Array.isArray || function isArray(obj) { + return toStr(obj) === '[object Array]'; + }; + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.13 + // Return len+argCount. + // [bugfix, ielt8] + // IE < 8 bug: [].unshift(0) === undefined but should be "1" + var hasUnshiftReturnValueBug = [].unshift(0) !== 1; + defineProperties(ArrayPrototype, { + unshift: function () { + array_unshift.apply(this, arguments); + return this.length; + } + }, hasUnshiftReturnValueBug); + + // ES5 15.4.3.2 + // http://es5.github.com/#x15.4.3.2 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray + defineProperties($Array, { isArray: isArray }); + + // The IsCallable() check in the Array functions + // has been replaced with a strict check on the + // internal class of the object to trap cases where + // the provided function was actually a regular + // expression literal, which in V8 and + // JavaScriptCore is a typeof "function". Only in + // V8 are regular expression literals permitted as + // reduce parameters, so it is desirable in the + // general case for the shim to match the more + // strict and common behavior of rejecting regular + // expressions. + + // ES5 15.4.4.18 + // http://es5.github.com/#x15.4.4.18 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach + + // Check failure of by-index access of string characters (IE < 9) + // and failure of `0 in boxedString` (Rhino) + var boxedString = $Object('a'); + var splitString = boxedString[0] !== 'a' || !(0 in boxedString); + + var properlyBoxesContext = function properlyBoxed(method) { + // Check node 0.6.21 bug where third parameter is not boxed + var properlyBoxesNonStrict = true; + var properlyBoxesStrict = true; + var threwException = false; + if (method) { + try { + method.call('foo', function (_, __, context) { + if (typeof context !== 'object') { + properlyBoxesNonStrict = false; + } + }); + + method.call([1], function () { + 'use strict'; + + properlyBoxesStrict = typeof this === 'string'; + }, 'x'); + } catch (e) { + threwException = true; + } + } + return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict; + }; + + defineProperties(ArrayPrototype, { + forEach: function forEach(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var i = -1; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.forEach callback must be a function'); + } + + while (++i < length) { + if (i in self) { + // Invoke the callback function with call, passing arguments: + // context, property value, property key, thisArg object + if (typeof T === 'undefined') { + callbackfn(self[i], i, object); + } else { + callbackfn.call(T, self[i], i, object); + } + } + } + } + }, !properlyBoxesContext(ArrayPrototype.forEach)); + + // ES5 15.4.4.19 + // http://es5.github.com/#x15.4.4.19 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map + defineProperties(ArrayPrototype, { + map: function map(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = $Array(length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.map callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + if (typeof T === 'undefined') { + result[i] = callbackfn(self[i], i, object); + } else { + result[i] = callbackfn.call(T, self[i], i, object); + } + } + } + return result; + } + }, !properlyBoxesContext(ArrayPrototype.map)); + + // ES5 15.4.4.20 + // http://es5.github.com/#x15.4.4.20 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter + defineProperties(ArrayPrototype, { + filter: function filter(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = []; + var value; + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.filter callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if (typeof T === 'undefined' ? callbackfn(value, i, object) : callbackfn.call(T, value, i, object)) { + pushCall(result, value); + } + } + } + return result; + } + }, !properlyBoxesContext(ArrayPrototype.filter)); + + // ES5 15.4.4.16 + // http://es5.github.com/#x15.4.4.16 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every + defineProperties(ArrayPrototype, { + every: function every(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.every callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self && !(typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) { + return false; + } + } + return true; + } + }, !properlyBoxesContext(ArrayPrototype.every)); + + // ES5 15.4.4.17 + // http://es5.github.com/#x15.4.4.17 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some + defineProperties(ArrayPrototype, { + some: function some(callbackfn/*, thisArg */) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.some callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self && (typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) { + return true; + } + } + return false; + } + }, !properlyBoxesContext(ArrayPrototype.some)); + + // ES5 15.4.4.21 + // http://es5.github.com/#x15.4.4.21 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce + var reduceCoercesToObject = false; + if (ArrayPrototype.reduce) { + reduceCoercesToObject = typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties(ArrayPrototype, { + reduce: function reduce(callbackfn/*, initialValue*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduce callback must be a function'); + } + + // no value to return if no initial value and an empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduce of empty array with no initial value'); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + + // if array contains no values, no initial value to return + if (++i >= length) { + throw new TypeError('reduce of empty array with no initial value'); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } + + return result; + } + }, !reduceCoercesToObject); + + // ES5 15.4.4.22 + // http://es5.github.com/#x15.4.4.22 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight + var reduceRightCoercesToObject = false; + if (ArrayPrototype.reduceRight) { + reduceRightCoercesToObject = typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties(ArrayPrototype, { + reduceRight: function reduceRight(callbackfn/*, initial*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduceRight callback must be a function'); + } + + // no value to return if no initial value, empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + + var result; + var i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + + // if array contains no values, no initial value to return + if (--i < 0) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + } while (true); + } + + if (i < 0) { + return result; + } + + do { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } while (i--); + + return result; + } + }, !reduceRightCoercesToObject); + + // ES5 15.4.4.14 + // http://es5.github.com/#x15.4.4.14 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf + var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1; + defineProperties(ArrayPrototype, { + indexOf: function indexOf(searchElement/*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = ES.ToInteger(arguments[1]); + } + + // handle negative indices + i = i >= 0 ? i : max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === searchElement) { + return i; + } + } + return -1; + } + }, hasFirefox2IndexOfBug); + + // ES5 15.4.4.15 + // http://es5.github.com/#x15.4.4.15 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf + var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1; + defineProperties(ArrayPrototype, { + lastIndexOf: function lastIndexOf(searchElement/*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = min(i, ES.ToInteger(arguments[1])); + } + // handle negative indices + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && searchElement === self[i]) { + return i; + } + } + return -1; + } + }, hasFirefox2LastIndexOfBug); + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.12 + var spliceNoopReturnsEmptyArray = (function () { + var a = [1, 2]; + var result = a.splice(); + return a.length === 2 && isArray(result) && result.length === 0; + }()); + defineProperties(ArrayPrototype, { + // Safari 5.0 bug where .splice() returns undefined + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } else { + return array_splice.apply(this, arguments); + } + } + }, !spliceNoopReturnsEmptyArray); + + var spliceWorksWithEmptyObject = (function () { + var obj = {}; + ArrayPrototype.splice.call(obj, 0, 0, 1); + return obj.length === 1; + }()); + defineProperties(ArrayPrototype, { + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } + var args = arguments; + this.length = max(ES.ToInteger(this.length), 0); + if (arguments.length > 0 && typeof deleteCount !== 'number') { + args = arraySlice(arguments); + if (args.length < 2) { + pushCall(args, this.length - start); + } else { + args[1] = ES.ToInteger(deleteCount); + } + } + return array_splice.apply(this, args); + } + }, !spliceWorksWithEmptyObject); + var spliceWorksWithLargeSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Safari 7/8 breaks with sparse arrays of size 1e5 or greater + var arr = new $Array(1e5); + // note: the index MUST be 8 or larger or the test will false pass + arr[8] = 'x'; + arr.splice(1, 1); + // note: this test must be defined *after* the indexOf shim + // per https://github.com/es-shims/es5-shim/issues/313 + return arr.indexOf('x') === 7; + }()); + var spliceWorksWithSmallSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Opera 12.15 breaks on this, no idea why. + var n = 256; + var arr = []; + arr[n] = 'a'; + arr.splice(n + 1, 0, 'b'); + return arr[n] === 'a'; + }()); + defineProperties(ArrayPrototype, { + splice: function splice(start, deleteCount) { + var O = ES.ToObject(this); + var A = []; + var len = ES.ToUint32(O.length); + var relativeStart = ES.ToInteger(start); + var actualStart = relativeStart < 0 ? max((len + relativeStart), 0) : min(relativeStart, len); + var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart); + + var k = 0; + var from; + while (k < actualDeleteCount) { + from = $String(actualStart + k); + if (owns(O, from)) { + A[k] = O[from]; + } + k += 1; + } + + var items = arraySlice(arguments, 2); + var itemCount = items.length; + var to; + if (itemCount < actualDeleteCount) { + k = actualStart; + var maxK = len - actualDeleteCount; + while (k < maxK) { + from = $String(k + actualDeleteCount); + to = $String(k + itemCount); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k += 1; + } + k = len; + var minK = len - actualDeleteCount + itemCount; + while (k > minK) { + delete O[k - 1]; + k -= 1; + } + } else if (itemCount > actualDeleteCount) { + k = len - actualDeleteCount; + while (k > actualStart) { + from = $String(k + actualDeleteCount - 1); + to = $String(k + itemCount - 1); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k -= 1; + } + } + k = actualStart; + for (var i = 0; i < items.length; ++i) { + O[k] = items[i]; + k += 1; + } + O.length = len - actualDeleteCount + itemCount; + + return A; + } + }, !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays); + + var originalJoin = ArrayPrototype.join; + var hasStringJoinBug; + try { + hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3'; + } catch (e) { + hasStringJoinBug = true; + } + if (hasStringJoinBug) { + defineProperties(ArrayPrototype, { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep); + } + }, hasStringJoinBug); + } + + var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2'; + if (hasJoinUndefinedBug) { + defineProperties(ArrayPrototype, { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(this, sep); + } + }, hasJoinUndefinedBug); + } + + var pushShim = function push(item) { + var O = ES.ToObject(this); + var n = ES.ToUint32(O.length); + var i = 0; + while (i < arguments.length) { + O[n + i] = arguments[i]; + i += 1; + } + O.length = n + i; + return n + i; + }; + + var pushIsNotGeneric = (function () { + var obj = {}; + var result = Array.prototype.push.call(obj, undefined); + return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0); + }()); + defineProperties(ArrayPrototype, { + push: function push(item) { + if (isArray(this)) { + return array_push.apply(this, arguments); + } + return pushShim.apply(this, arguments); + } + }, pushIsNotGeneric); + + // This fixes a very weird bug in Opera 10.6 when pushing `undefined + var pushUndefinedIsWeird = (function () { + var arr = []; + var result = arr.push(undefined); + return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0); + }()); + defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird); + + // ES5 15.2.3.14 + // http://es5.github.io/#x15.4.4.10 + // Fix boxed string bug + defineProperties(ArrayPrototype, { + slice: function (start, end) { + var arr = isString(this) ? strSplit(this, '') : this; + return arraySliceApply(arr, arguments); + } + }, splitString); + + var sortIgnoresNonFunctions = (function () { + try { + [1, 2].sort(null); + [1, 2].sort({}); + return true; + } catch (e) {} + return false; + }()); + var sortThrowsOnRegex = (function () { + // this is a problem in Firefox 4, in which `typeof /a/ === 'function'` + try { + [1, 2].sort(/a/); + return false; + } catch (e) {} + return true; + }()); + var sortIgnoresUndefined = (function () { + // applies in IE 8, for one. + try { + [1, 2].sort(undefined); + return true; + } catch (e) {} + return false; + }()); + defineProperties(ArrayPrototype, { + sort: function sort(compareFn) { + if (typeof compareFn === 'undefined') { + return arraySort(this); + } + if (!isCallable(compareFn)) { + throw new TypeError('Array.prototype.sort callback must be a function'); + } + return arraySort(this, compareFn); + } + }, sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex); + + // + // Object + // ====== + // + + // ES5 15.2.3.14 + // http://es5.github.com/#x15.2.3.14 + + // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + var hasDontEnumBug = !isEnum({ 'toString': null }, 'toString'); + var hasProtoEnumBug = isEnum(function () {}, 'prototype'); + var hasStringEnumBug = !owns('x', '0'); + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var blacklistedKeys = { + $window: true, + $console: true, + $parent: true, + $self: true, + $frame: true, + $frames: true, + $frameElement: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $external: true + }; + var hasAutomationEqualityBug = (function () { + /* globals window */ + if (typeof window === 'undefined') { + return false; + } + for (var k in window) { + try { + if (!blacklistedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') { + equalsConstructorPrototype(window[k]); + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (object) { + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(object); + } + try { + return equalsConstructorPrototype(object); + } catch (e) { + return false; + } + }; + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var dontEnumsLength = dontEnums.length; + + // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js + // can be replaced with require('is-arguments') if we ever use a build process instead + var isStandardArguments = function isArguments(value) { + return toStr(value) === '[object Arguments]'; + }; + var isLegacyArguments = function isArguments(value) { + return value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + !isArray(value) && + isCallable(value.callee); + }; + var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments; + + defineProperties($Object, { + keys: function keys(object) { + var isFn = isCallable(object); + var isArgs = isArguments(object); + var isObject = object !== null && typeof object === 'object'; + var isStr = isObject && isString(object); + + if (!isObject && !isFn && !isArgs) { + throw new TypeError('Object.keys called on a non-object'); + } + + var theKeys = []; + var skipProto = hasProtoEnumBug && isFn; + if ((isStr && hasStringEnumBug) || isArgs) { + for (var i = 0; i < object.length; ++i) { + pushCall(theKeys, $String(i)); + } + } + + if (!isArgs) { + for (var name in object) { + if (!(skipProto && name === 'prototype') && owns(object, name)) { + pushCall(theKeys, $String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var j = 0; j < dontEnumsLength; j++) { + var dontEnum = dontEnums[j]; + if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) { + pushCall(theKeys, dontEnum); + } + } + } + return theKeys; + } + }); + + var keysWorksWithArguments = $Object.keys && (function () { + // Safari 5.0 bug + return $Object.keys(arguments).length === 2; + }(1, 2)); + var keysHasArgumentsLengthBug = $Object.keys && (function () { + var argKeys = $Object.keys(arguments); + return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1; + }(1)); + var originalKeys = $Object.keys; + defineProperties($Object, { + keys: function keys(object) { + if (isArguments(object)) { + return originalKeys(arraySlice(object)); + } else { + return originalKeys(object); + } + } + }, !keysWorksWithArguments || keysHasArgumentsLengthBug); + + // + // Date + // ==== + // + + var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0; + var aNegativeTestDate = new Date(-1509842289600292); + var aPositiveTestDate = new Date(1449662400000); + var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT'; + var hasToDateStringFormatBug; + var hasToStringFormatBug; + var timeZoneOffset = aNegativeTestDate.getTimezoneOffset(); + if (timeZoneOffset < -720) { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875'; + hasToStringFormatBug = !(/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString()); + } else { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875'; + hasToStringFormatBug = !(/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString()); + } + + var originalGetFullYear = call.bind(Date.prototype.getFullYear); + var originalGetMonth = call.bind(Date.prototype.getMonth); + var originalGetDate = call.bind(Date.prototype.getDate); + var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear); + var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth); + var originalGetUTCDate = call.bind(Date.prototype.getUTCDate); + var originalGetUTCDay = call.bind(Date.prototype.getUTCDay); + var originalGetUTCHours = call.bind(Date.prototype.getUTCHours); + var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes); + var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds); + var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds); + var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + var daysInMonth = function daysInMonth(month, year) { + return originalGetDate(new Date(year, month, 0)); + }; + + defineProperties(Date.prototype, { + getFullYear: function getFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + if (year < 0 && originalGetMonth(this) > 11) { + return year + 1; + } + return year; + }, + getMonth: function getMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getDate: function getDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + var date = originalGetDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return (days - date) + 1; + } + return date; + }, + getUTCFullYear: function getUTCFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + if (year < 0 && originalGetUTCMonth(this) > 11) { + return year + 1; + } + return year; + }, + getUTCMonth: function getUTCMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getUTCDate: function getUTCDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + var date = originalGetUTCDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return (days - date) + 1; + } + return date; + } + }, hasNegativeMonthYearBug); + + defineProperties(Date.prototype, { + toUTCString: function toUTCString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = originalGetUTCDay(this); + var date = originalGetUTCDate(this); + var month = originalGetUTCMonth(this); + var year = originalGetUTCFullYear(this); + var hour = originalGetUTCHours(this); + var minute = originalGetUTCMinutes(this); + var second = originalGetUTCSeconds(this); + return dayName[day] + ', ' + + (date < 10 ? '0' + date : date) + ' ' + + monthName[month] + ' ' + + year + ' ' + + (hour < 10 ? '0' + hour : hour) + ':' + + (minute < 10 ? '0' + minute : minute) + ':' + + (second < 10 ? '0' + second : second) + ' GMT'; + } + }, hasNegativeMonthYearBug || hasToUTCStringFormatBug); + + // Opera 12 has `,` + defineProperties(Date.prototype, { + toDateString: function toDateString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + return dayName[day] + ' ' + + monthName[month] + ' ' + + (date < 10 ? '0' + date : date) + ' ' + + year; + } + }, hasNegativeMonthYearBug || hasToDateStringFormatBug); + + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + if (hasNegativeMonthYearBug || hasToStringFormatBug) { + Date.prototype.toString = function toString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + var hour = this.getHours(); + var minute = this.getMinutes(); + var second = this.getSeconds(); + var timezoneOffset = this.getTimezoneOffset(); + var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60); + var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60); + return dayName[day] + ' ' + + monthName[month] + ' ' + + (date < 10 ? '0' + date : date) + ' ' + + year + ' ' + + (hour < 10 ? '0' + hour : hour) + ':' + + (minute < 10 ? '0' + minute : minute) + ':' + + (second < 10 ? '0' + second : second) + ' GMT' + + (timezoneOffset > 0 ? '-' : '+') + + (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) + + (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset); + }; + if (supportsDescriptors) { + $Object.defineProperty(Date.prototype, 'toString', { + configurable: true, + enumerable: false, + writable: true + }); + } + } + + // ES5 15.9.5.43 + // http://es5.github.com/#x15.9.5.43 + // This function returns a String value represent the instance in time + // represented by this Date object. The format of the String is the Date Time + // string format defined in 15.9.1.15. All fields are present in the String. + // The time zone is always UTC, denoted by the suffix Z. If the time value of + // this object is not a finite Number a RangeError exception is thrown. + var negativeDate = -62198755200000; + var negativeYearString = '-000001'; + var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1; + var hasSafari51DateBug = Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z'; + + var getTime = call.bind(Date.prototype.getTime); + + defineProperties(Date.prototype, { + toISOString: function toISOString() { + if (!isFinite(this) || !isFinite(getTime(this))) { + // Adope Photoshop requires the second check. + throw new RangeError('Date.prototype.toISOString called on non-finite value.'); + } + + var year = originalGetUTCFullYear(this); + + var month = originalGetUTCMonth(this); + // see https://github.com/es-shims/es5-shim/issues/111 + year += Math.floor(month / 12); + month = (month % 12 + 12) % 12; + + // the date time string format is specified in 15.9.1.15. + var result = [month + 1, originalGetUTCDate(this), originalGetUTCHours(this), originalGetUTCMinutes(this), originalGetUTCSeconds(this)]; + year = ( + (year < 0 ? '-' : (year > 9999 ? '+' : '')) + + strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6) + ); + + for (var i = 0; i < result.length; ++i) { + // pad months, days, hours, minutes, and seconds to have two digits. + result[i] = strSlice('00' + result[i], -2); + } + // pad milliseconds to have three digits. + return ( + year + '-' + arraySlice(result, 0, 2).join('-') + + 'T' + arraySlice(result, 2).join(':') + '.' + + strSlice('000' + originalGetUTCMilliseconds(this), -3) + 'Z' + ); + } + }, hasNegativeDateBug || hasSafari51DateBug); + + // ES5 15.9.5.44 + // http://es5.github.com/#x15.9.5.44 + // This function provides a String representation of a Date object for use by + // JSON.stringify (15.12.3). + var dateToJSONIsSupported = (function () { + try { + return Date.prototype.toJSON && + new Date(NaN).toJSON() === null && + new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 && + Date.prototype.toJSON.call({ // generic + toISOString: function () { return true; } + }); + } catch (e) { + return false; + } + }()); + if (!dateToJSONIsSupported) { + Date.prototype.toJSON = function toJSON(key) { + // When the toJSON method is called with argument key, the following + // steps are taken: + + // 1. Let O be the result of calling ToObject, giving it the this + // value as its argument. + // 2. Let tv be ES.ToPrimitive(O, hint Number). + var O = $Object(this); + var tv = ES.ToPrimitive(O); + // 3. If tv is a Number and is not finite, return null. + if (typeof tv === 'number' && !isFinite(tv)) { + return null; + } + // 4. Let toISO be the result of calling the [[Get]] internal method of + // O with argument "toISOString". + var toISO = O.toISOString; + // 5. If IsCallable(toISO) is false, throw a TypeError exception. + if (!isCallable(toISO)) { + throw new TypeError('toISOString property is not callable'); + } + // 6. Return the result of calling the [[Call]] internal method of + // toISO with O as the this value and an empty argument list. + return toISO.call(O); + + // NOTE 1 The argument is ignored. + + // NOTE 2 The toJSON function is intentionally generic; it does not + // require that its this value be a Date object. Therefore, it can be + // transferred to other kinds of objects for use as a method. However, + // it does require that any such object have a toISOString method. An + // object is free to use the argument key to filter its + // stringification. + }; + } + + // ES5 15.9.4.2 + // http://es5.github.com/#x15.9.4.2 + // based on work shared by Daniel Friesen (dantman) + // http://gist.github.com/303249 + var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15; + var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || !isNaN(Date.parse('2012-12-31T23:59:60.000Z')); + var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z')); + if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) { + // XXX global assignment won't work in embeddings that use + // an alternate object for the context. + /* global Date: true */ + /* eslint-disable no-undef */ + var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1; + var hasSafariSignedIntBug = isActualNaN(new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime()); + /* eslint-disable no-implicit-globals */ + Date = (function (NativeDate) { + /* eslint-enable no-implicit-globals */ + /* eslint-enable no-undef */ + // Date.length === 7 + var DateShim = function Date(Y, M, D, h, m, s, ms) { + var length = arguments.length; + var date; + if (this instanceof NativeDate) { + var seconds = s; + var millis = ms; + if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + seconds += sToShift; + millis -= sToShift * 1e3; + } + date = length === 1 && $String(Y) === Y ? // isString(Y) + // We explicitly pass it through parse: + new NativeDate(DateShim.parse(Y)) : + // We have to manually make calls depending on argument + // length here + length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis) : + length >= 6 ? new NativeDate(Y, M, D, h, m, seconds) : + length >= 5 ? new NativeDate(Y, M, D, h, m) : + length >= 4 ? new NativeDate(Y, M, D, h) : + length >= 3 ? new NativeDate(Y, M, D) : + length >= 2 ? new NativeDate(Y, M) : + length >= 1 ? new NativeDate(Y instanceof NativeDate ? +Y : Y) : + new NativeDate(); + } else { + date = NativeDate.apply(this, arguments); + } + if (!isPrimitive(date)) { + // Prevent mixups with unfixed Date object + defineProperties(date, { constructor: DateShim }, true); + } + return date; + }; + + // 15.9.1.15 Date Time String Format. + var isoDateExpression = new RegExp('^' + + '(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign + + // 6-digit extended year + '(?:-(\\d{2})' + // optional month capture + '(?:-(\\d{2})' + // optional day capture + '(?:' + // capture hours:minutes:seconds.milliseconds + 'T(\\d{2})' + // hours capture + ':(\\d{2})' + // minutes capture + '(?:' + // optional :seconds.milliseconds + ':(\\d{2})' + // seconds capture + '(?:(\\.\\d{1,}))?' + // milliseconds capture + ')?' + + '(' + // capture UTC offset component + 'Z|' + // UTC capture + '(?:' + // offset specifier +/-hours:minutes + '([-+])' + // sign capture + '(\\d{2})' + // hours offset capture + ':(\\d{2})' + // minutes offset capture + ')' + + ')?)?)?)?' + + '$'); + + var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + + var dayFromMonth = function dayFromMonth(year, month) { + var t = month > 1 ? 1 : 0; + return ( + months[month] + + Math.floor((year - 1969 + t) / 4) - + Math.floor((year - 1901 + t) / 100) + + Math.floor((year - 1601 + t) / 400) + + 365 * (year - 1970) + ); + }; + + var toUTC = function toUTC(t) { + var s = 0; + var ms = t; + if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + s += sToShift; + ms -= sToShift * 1e3; + } + return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms)); + }; + + // Copy any custom methods a 3rd party library may have added + for (var key in NativeDate) { + if (owns(NativeDate, key)) { + DateShim[key] = NativeDate[key]; + } + } + + // Copy "native" methods explicitly; they may be non-enumerable + defineProperties(DateShim, { + now: NativeDate.now, + UTC: NativeDate.UTC + }, true); + DateShim.prototype = NativeDate.prototype; + defineProperties(DateShim.prototype, { + constructor: DateShim + }, true); + + // Upgrade Date.parse to handle simplified ISO 8601 strings + var parseShim = function parse(string) { + var match = isoDateExpression.exec(string); + if (match) { + // parse months, days, hours, minutes, seconds, and milliseconds + // provide default values if necessary + // parse the UTC offset component + var year = $Number(match[1]), + month = $Number(match[2] || 1) - 1, + day = $Number(match[3] || 1) - 1, + hour = $Number(match[4] || 0), + minute = $Number(match[5] || 0), + second = $Number(match[6] || 0), + millisecond = Math.floor($Number(match[7] || 0) * 1000), + // When time zone is missed, local offset should be used + // (ES 5.1 bug) + // see https://bugs.ecmascript.org/show_bug.cgi?id=112 + isLocalTime = Boolean(match[4] && !match[8]), + signOffset = match[9] === '-' ? 1 : -1, + hourOffset = $Number(match[10] || 0), + minuteOffset = $Number(match[11] || 0), + result; + var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0; + if ( + hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) && + minute < 60 && second < 60 && millisecond < 1000 && + month > -1 && month < 12 && hourOffset < 24 && + minuteOffset < 60 && // detect invalid offsets + day > -1 && + day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month)) + ) { + result = ( + (dayFromMonth(year, month) + day) * 24 + + hour + + hourOffset * signOffset + ) * 60; + result = ( + (result + minute + minuteOffset * signOffset) * 60 + + second + ) * 1000 + millisecond; + if (isLocalTime) { + result = toUTC(result); + } + if (-8.64e15 <= result && result <= 8.64e15) { + return result; + } + } + return NaN; + } + return NativeDate.parse.apply(this, arguments); + }; + defineProperties(DateShim, { parse: parseShim }); + + return DateShim; + }(Date)); + /* global Date: false */ + } + + // ES5 15.9.4.4 + // http://es5.github.com/#x15.9.4.4 + if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; + } + + // + // Number + // ====== + // + + // ES5.1 15.7.4.5 + // http://es5.github.com/#x15.7.4.5 + var hasToFixedBugs = NumberPrototype.toFixed && ( + (0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128).toFixed(0) !== '1000000000000000128' + ); + + var toFixedHelpers = { + base: 1e7, + size: 6, + data: [0, 0, 0, 0, 0, 0], + multiply: function multiply(n, c) { + var i = -1; + var c2 = c; + while (++i < toFixedHelpers.size) { + c2 += n * toFixedHelpers.data[i]; + toFixedHelpers.data[i] = c2 % toFixedHelpers.base; + c2 = Math.floor(c2 / toFixedHelpers.base); + } + }, + divide: function divide(n) { + var i = toFixedHelpers.size; + var c = 0; + while (--i >= 0) { + c += toFixedHelpers.data[i]; + toFixedHelpers.data[i] = Math.floor(c / n); + c = (c % n) * toFixedHelpers.base; + } + }, + numToString: function numToString() { + var i = toFixedHelpers.size; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) { + var t = $String(toFixedHelpers.data[i]); + if (s === '') { + s = t; + } else { + s += strSlice('0000000', 0, 7 - t.length) + t; + } + } + } + return s; + }, + pow: function pow(x, n, acc) { + return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc))); + }, + log: function log(x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + } + }; + + var toFixedShim = function toFixed(fractionDigits) { + var f, x, s, m, e, z, j, k; + + // Test for NaN and round fractionDigits down + f = $Number(fractionDigits); + f = isActualNaN(f) ? 0 : Math.floor(f); + + if (f < 0 || f > 20) { + throw new RangeError('Number.toFixed called with invalid number of decimals'); + } + + x = $Number(this); + + if (isActualNaN(x)) { + return 'NaN'; + } + + // If it is too big or small, return the string value of the number + if (x <= -1e21 || x >= 1e21) { + return $String(x); + } + + s = ''; + + if (x < 0) { + s = '-'; + x = -x; + } + + m = '0'; + + if (x > 1e-21) { + // 1e-21 < x < 1e21 + // -70 < log2(x) < 70 + e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69; + z = (e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1)); + z *= 0x10000000000000; // Math.pow(2, 52); + e = 52 - e; + + // -18 < e < 122 + // x = z / 2 ^ e + if (e > 0) { + toFixedHelpers.multiply(0, z); + j = f; + + while (j >= 7) { + toFixedHelpers.multiply(1e7, 0); + j -= 7; + } + + toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0); + j = e - 1; + + while (j >= 23) { + toFixedHelpers.divide(1 << 23); + j -= 23; + } + + toFixedHelpers.divide(1 << j); + toFixedHelpers.multiply(1, 1); + toFixedHelpers.divide(2); + m = toFixedHelpers.numToString(); + } else { + toFixedHelpers.multiply(0, z); + toFixedHelpers.multiply(1 << (-e), 0); + m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f); + } + } + + if (f > 0) { + k = m.length; + + if (k <= f) { + m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m; + } else { + m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f); + } + } else { + m = s + m; + } + + return m; + }; + defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs); + + var hasToPrecisionUndefinedBug = (function () { + try { + return 1.0.toPrecision(undefined) === '1'; + } catch (e) { + return true; + } + }()); + var originalToPrecision = NumberPrototype.toPrecision; + defineProperties(NumberPrototype, { + toPrecision: function toPrecision(precision) { + return typeof precision === 'undefined' ? originalToPrecision.call(this) : originalToPrecision.call(this, precision); + } + }, hasToPrecisionUndefinedBug); + + // + // String + // ====== + // + + // ES5 15.5.4.14 + // http://es5.github.com/#x15.5.4.14 + + // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] + // Many browsers do not split properly with regular expressions or they + // do not perform the split correctly under obscure conditions. + // See http://blog.stevenlevithan.com/archives/cross-browser-split + // I've tested in many browsers and this seems to cover the deviant ones: + // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] + // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] + // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not + // [undefined, "t", undefined, "e", ...] + // ''.split(/.?/) should be [], not [""] + // '.'.split(/()()/) should be ["."], not ["", "", "."] + + if ( + 'ab'.split(/(?:ab)*/).length !== 2 || + '.'.split(/(.?)(.?)/).length !== 4 || + 'tesst'.split(/(s)*/)[1] === 't' || + 'test'.split(/(?:)/, -1).length !== 4 || + ''.split(/.?/).length || + '.'.split(/()()/).length > 1 + ) { + (function () { + var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group + var maxSafe32BitInt = Math.pow(2, 32) - 1; + + StringPrototype.split = function (separator, limit) { + var string = String(this); + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + + // If `separator` is not a regex, use native split + if (!isRegex(separator)) { + return strSplit(this, separator, limit); + } + + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + // in ES6 + (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6 + lastLastIndex = 0, + // Make `global` and avoid `lastIndex` issues by working with a copy + separator2, match, lastIndex, lastLength; + var separatorCopy = new RegExp(separator.source, flags + 'g'); + if (!compliantExecNpcg) { + // Doesn't need flags gy, but they don't hurt + separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + } + /* Values for `limit`, per the spec: + * If undefined: 4294967295 // maxSafe32BitInt + * If 0, Infinity, or NaN: 0 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; + * If negative number: 4294967296 - Math.floor(Math.abs(limit)) + * If other: Type-convert, then use the above rules + */ + var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit); + match = separatorCopy.exec(string); + while (match) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0].length; + if (lastIndex > lastLastIndex) { + pushCall(output, strSlice(string, lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1) { + /* eslint-disable no-loop-func */ + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (typeof arguments[i] === 'undefined') { + match[i] = void 0; + } + } + }); + /* eslint-enable no-loop-func */ + } + if (match.length > 1 && match.index < string.length) { + array_push.apply(output, arraySlice(match, 1)); + } + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= splitLimit) { + break; + } + } + if (separatorCopy.lastIndex === match.index) { + separatorCopy.lastIndex++; // Avoid an infinite loop + } + match = separatorCopy.exec(string); + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) { + pushCall(output, ''); + } + } else { + pushCall(output, strSlice(string, lastLastIndex)); + } + return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output; + }; + }()); + + // [bugfix, chrome] + // If separator is undefined, then the result array contains just one String, + // which is the this value (converted to a String). If limit is not undefined, + // then the output array is truncated so that it contains no more than limit + // elements. + // "0".split(undefined, 0) -> [] + } else if ('0'.split(void 0, 0).length) { + StringPrototype.split = function split(separator, limit) { + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + return strSplit(this, separator, limit); + }; + } + + var str_replace = StringPrototype.replace; + var replaceReportsGroupsCorrectly = (function () { + var groups = []; + 'x'.replace(/x(.)?/g, function (match, group) { + pushCall(groups, group); + }); + return groups.length === 1 && typeof groups[0] === 'undefined'; + }()); + + if (!replaceReportsGroupsCorrectly) { + StringPrototype.replace = function replace(searchValue, replaceValue) { + var isFn = isCallable(replaceValue); + var hasCapturingGroups = isRegex(searchValue) && (/\)[*?]/).test(searchValue.source); + if (!isFn || !hasCapturingGroups) { + return str_replace.call(this, searchValue, replaceValue); + } else { + var wrappedReplaceValue = function (match) { + var length = arguments.length; + var originalLastIndex = searchValue.lastIndex; + searchValue.lastIndex = 0; + var args = searchValue.exec(match) || []; + searchValue.lastIndex = originalLastIndex; + pushCall(args, arguments[length - 2], arguments[length - 1]); + return replaceValue.apply(this, args); + }; + return str_replace.call(this, searchValue, wrappedReplaceValue); + } + }; + } + + // ECMA-262, 3rd B.2.3 + // Not an ECMAScript standard, although ECMAScript 3rd Edition has a + // non-normative section suggesting uniform semantics and it should be + // normalized across all browsers + // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE + var string_substr = StringPrototype.substr; + var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b'; + defineProperties(StringPrototype, { + substr: function substr(start, length) { + var normalizedStart = start; + if (start < 0) { + normalizedStart = max(this.length + start, 0); + } + return string_substr.call(this, normalizedStart, length); + } + }, hasNegativeSubstrBug); + + // ES5 15.5.4.20 + // whitespace from: http://es5.github.io/#x15.5.4.20 + var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + + '\u2029\uFEFF'; + var zeroWidth = '\u200b'; + var wsRegexChars = '[' + ws + ']'; + var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*'); + var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$'); + var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim()); + defineProperties(StringPrototype, { + // http://blog.stevenlevithan.com/archives/faster-trim-javascript + // http://perfectionkills.com/whitespace-deviations/ + trim: function trim() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, ''); + } + }, hasTrimWhitespaceBug); + var trim = call.bind(String.prototype.trim); + + var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcã‚ã„'.lastIndexOf('ã‚ã„', 2) !== -1; + defineProperties(StringPrototype, { + lastIndexOf: function lastIndexOf(searchString) { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var S = $String(this); + var searchStr = $String(searchString); + var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN; + var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos); + var start = min(max(pos, 0), S.length); + var searchLen = searchStr.length; + var k = start + searchLen; + while (k > 0) { + k = max(0, k - searchLen); + var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr); + if (index !== -1) { + return k + index; + } + } + return -1; + } + }, hasLastIndexBug); + + var originalLastIndexOf = StringPrototype.lastIndexOf; + defineProperties(StringPrototype, { + lastIndexOf: function lastIndexOf(searchString) { + return originalLastIndexOf.apply(this, arguments); + } + }, StringPrototype.lastIndexOf.length !== 1); + + // ES-5 15.1.2.2 + /* eslint-disable radix */ + if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) { + /* eslint-enable radix */ + /* global parseInt: true */ + parseInt = (function (origParseInt) { + var hexRegex = /^[\-+]?0[xX]/; + return function parseInt(str, radix) { + var string = trim(String(str)); + var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10); + return origParseInt(string, defaultedRadix); + }; + }(parseInt)); + } + + // https://es5.github.io/#x15.1.2.3 + if (1 / parseFloat('-0') !== -Infinity) { + /* global parseFloat: true */ + parseFloat = (function (origParseFloat) { + return function parseFloat(string) { + var inputString = trim(String(string)); + var result = origParseFloat(inputString); + return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result; + }; + }(parseFloat)); + } + + if (String(new RangeError('test')) !== 'RangeError: test') { + var errorToStringShim = function toString() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var name = this.name; + if (typeof name === 'undefined') { + name = 'Error'; + } else if (typeof name !== 'string') { + name = $String(name); + } + var msg = this.message; + if (typeof msg === 'undefined') { + msg = ''; + } else if (typeof msg !== 'string') { + msg = $String(msg); + } + if (!name) { + return msg; + } + if (!msg) { + return name; + } + return name + ': ' + msg; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + Error.prototype.toString = errorToStringShim; + } + + if (supportsDescriptors) { + var ensureNonEnumerable = function (obj, prop) { + if (isEnum(obj, prop)) { + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (desc.configurable) { + desc.enumerable = false; + Object.defineProperty(obj, prop, desc); + } + } + }; + ensureNonEnumerable(Error.prototype, 'message'); + if (Error.prototype.message !== '') { + Error.prototype.message = ''; + } + ensureNonEnumerable(Error.prototype, 'name'); + } + + if (String(/a/mig) !== '/a/gim') { + var regexToString = function toString() { + var str = '/' + this.source + '/'; + if (this.global) { + str += 'g'; + } + if (this.ignoreCase) { + str += 'i'; + } + if (this.multiline) { + str += 'm'; + } + return str; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + RegExp.prototype.toString = regexToString; + } +})); + +'use strict'; +/*jslint eqeq: true*/ + +Handlebars.registerHelper('sanitize', function (text) { + var result; + + if (text === undefined) { return ''; } + + result = sanitizeHtml(text, { + allowedTags: [ 'div', 'span', 'b', 'i', 'em', 'strong', 'a' ], + allowedAttributes: { + 'div': [ 'class' ], + 'span': [ 'class' ], + 'a': [ 'href' ] + } + }); + + return new Handlebars.SafeString(result); +}); + +Handlebars.registerHelper('renderTextParam', function(param) { + var result, type = 'text', idAtt = ''; + var paramType = param.type || param.schema && param.schema.type || ''; + var isArray = paramType.toLowerCase() === 'array' || param.allowMultiple; + var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default; + var name = Handlebars.Utils.escapeExpression(param.name); + var valueId = Handlebars.Utils.escapeExpression(param.valueId); + paramType = Handlebars.Utils.escapeExpression(paramType); + + var dataVendorExtensions = Object.keys(param).filter(function(property) { + // filter X-data- properties + return property.match(/^X-data-/i) !== null; + }).reduce(function(result, property) { + // remove X- from property name, so it results in html attributes like data-foo='bar' + return result += ' ' + property.substring(2, property.length) + '=\'' + param[property] + '\''; + }, ''); + + if(param.format && param.format === 'password') { + type = 'password'; + } + + if(valueId) { + idAtt = ' id=\'' + valueId + '\''; + } + + if (defaultValue) { + defaultValue = sanitizeHtml(defaultValue); + } else { + defaultValue = ''; + } + + if(isArray) { + result = ''; + } else { + var parameterClass = 'parameter'; + if(param.required) { + parameterClass += ' required'; + } + result = ''; + } + return new Handlebars.SafeString(result); +}); + +Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) { + + switch (operator) { + case '==': + return (v1 == v2) ? options.fn(this) : options.inverse(this); + case '===': + return (v1 === v2) ? options.fn(this) : options.inverse(this); + case '<': + return (v1 < v2) ? options.fn(this) : options.inverse(this); + case '<=': + return (v1 <= v2) ? options.fn(this) : options.inverse(this); + case '>': + return (v1 > v2) ? options.fn(this) : options.inverse(this); + case '>=': + return (v1 >= v2) ? options.fn(this) : options.inverse(this); + case '&&': + return (v1 && v2) ? options.fn(this) : options.inverse(this); + case '||': + return (v1 || v2) ? options.fn(this) : options.inverse(this); + default: + return options.inverse(this); + } +}); + +Handlebars.registerHelper('escape', function (value) { + var text = Handlebars.Utils.escapeExpression(value); + + return new Handlebars.SafeString(text); +}); + +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.sanitizeHtml=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=0){globRegex.push(quoteRegexp(name).replace(/\\\*/g,".*"))}else{allowedAttributesMap[tag].push(name)}});allowedAttributesGlobMap[tag]=new RegExp("^("+globRegex.join("|")+")$")})}var allowedClassesMap={};each(options.allowedClasses,function(classes,tag){if(allowedAttributesMap){if(!has(allowedAttributesMap,tag)){allowedAttributesMap[tag]=[]}allowedAttributesMap[tag].push("class")}allowedClassesMap[tag]=classes});var transformTagsMap={};var transformTagsAll;each(options.transformTags,function(transform,tag){var transFun;if(typeof transform==="function"){transFun=transform}else if(typeof transform==="string"){transFun=sanitizeHtml.simpleTransform(transform)}if(tag==="*"){transformTagsAll=transFun}else{transformTagsMap[tag]=transFun}});var depth=0;var stack=[];var skipMap={};var transformMap={};var skipText=false;var skipTextDepth=0;var parser=new htmlparser.Parser({onopentag:function(name,attribs){if(skipText){skipTextDepth++;return}var frame=new Frame(name,attribs);stack.push(frame);var skip=false;var hasText=frame.text?true:false;var transformedTag;if(has(transformTagsMap,name)){transformedTag=transformTagsMap[name](name,attribs);frame.attribs=attribs=transformedTag.attribs;if(transformedTag.text!==undefined){frame.innerText=transformedTag.text}if(name!==transformedTag.tagName){frame.name=name=transformedTag.tagName;transformMap[depth]=transformedTag.tagName}}if(transformTagsAll){transformedTag=transformTagsAll(name,attribs);frame.attribs=attribs=transformedTag.attribs;if(name!==transformedTag.tagName){frame.name=name=transformedTag.tagName;transformMap[depth]=transformedTag.tagName}}if(options.allowedTags&&options.allowedTags.indexOf(name)===-1){skip=true;if(nonTextTagsArray.indexOf(name)!==-1){skipText=true;skipTextDepth=1}skipMap[depth]=true}depth++;if(skip){return}result+="<"+name;if(!allowedAttributesMap||has(allowedAttributesMap,name)||allowedAttributesMap["*"]){each(attribs,function(value,a){if(!allowedAttributesMap||has(allowedAttributesMap,name)&&allowedAttributesMap[name].indexOf(a)!==-1||allowedAttributesMap["*"]&&allowedAttributesMap["*"].indexOf(a)!==-1||has(allowedAttributesGlobMap,name)&&allowedAttributesGlobMap[name].test(a)||allowedAttributesGlobMap["*"]&&allowedAttributesGlobMap["*"].test(a)){if(a==="href"||a==="src"){if(naughtyHref(name,value)){delete frame.attribs[a];return}}if(a==="class"){value=filterClasses(value,allowedClassesMap[name]);if(!value.length){delete frame.attribs[a];return}}result+=" "+a;if(value.length){result+='="'+escapeHtml(value)+'"'}}else{delete frame.attribs[a]}})}if(options.selfClosing.indexOf(name)!==-1){result+=" />"}else{result+=">";if(frame.innerText&&!hasText&&!options.textFilter){result+=frame.innerText}}},ontext:function(text){if(skipText){return}var lastFrame=stack[stack.length-1];var tag;if(lastFrame){tag=lastFrame.tag;text=lastFrame.innerText!==undefined?lastFrame.innerText:text}if(tag==="script"||tag==="style"){result+=text}else{var escaped=escapeHtml(text);if(options.textFilter){result+=options.textFilter(escaped)}else{result+=escaped}}if(stack.length){var frame=stack[stack.length-1];frame.text+=text}},onclosetag:function(name){if(skipText){skipTextDepth--;if(!skipTextDepth){skipText=false}else{return}}var frame=stack.pop();if(!frame){return}skipText=false;depth--;if(skipMap[depth]){delete skipMap[depth];frame.updateParentNodeText();return}if(transformMap[depth]){name=transformMap[depth];delete transformMap[depth]}if(options.exclusiveFilter&&options.exclusiveFilter(frame)){result=result.substr(0,frame.tagPosition);return}frame.updateParentNodeText();if(options.selfClosing.indexOf(name)!==-1){return}result+=""}},options.parser);parser.write(html);parser.end();return result;function escapeHtml(s){if(typeof s!=="string"){s=s+""}return s.replace(/\&/g,"&").replace(//g,">").replace(/\"/g,""")}function naughtyHref(name,href){href=href.replace(/[\x00-\x20]+/g,"");href=href.replace(/<\!\-\-.*?\-\-\>/g,"");var matches=href.match(/^([a-zA-Z]+)\:/);if(!matches){return false}var scheme=matches[1].toLowerCase();if(has(options.allowedSchemesByTag,name)){return options.allowedSchemesByTag[name].indexOf(scheme)===-1}return!options.allowedSchemes||options.allowedSchemes.indexOf(scheme)===-1}function filterClasses(classes,allowed){if(!allowed){return classes}classes=classes.split(/\s+/);return classes.filter(function(clss){return allowed.indexOf(clss)!==-1}).join(" ")}}var htmlParserDefaults={decodeEntities:true};sanitizeHtml.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{}};sanitizeHtml.simpleTransform=function(newTagName,newAttribs,merge){merge=merge===undefined?true:merge;newAttribs=newAttribs||{};return function(tagName,attribs){var attrib;if(merge){for(attrib in newAttribs){attribs[attrib]=newAttribs[attrib]}}else{attribs=newAttribs}return{tagName:newTagName,attribs:attribs}}}},{htmlparser2:36,"regexp-quote":54,xtend:58}],2:[function(require,module,exports){"use strict";exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;function init(){var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i0){throw new Error("Invalid string. Length must be a multiple of 4")}placeHolders=b64[len-2]==="="?2:b64[len-1]==="="?1:0;arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;ilen2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],3:[function(require,module,exports){},{}],4:[function(require,module,exports){(function(global){"use strict";var buffer=require("buffer");var Buffer=buffer.Buffer;var SlowBuffer=buffer.SlowBuffer;var MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function alloc(size,fill,encoding){if(typeof Buffer.alloc==="function"){return Buffer.alloc(size,fill,encoding)}if(typeof encoding==="number"){throw new TypeError("encoding must not be number")}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>MAX_LEN){throw new RangeError("size is too large")}var enc=encoding;var _fill=fill;if(_fill===undefined){enc=undefined;_fill=0}var buf=new Buffer(size);if(typeof _fill==="string"){var fillBuf=new Buffer(_fill,enc);var flen=fillBuf.length;var i=-1;while(++iMAX_LEN){throw new RangeError("size is too large")}return new Buffer(size)};exports.from=function from(value,encodingOrOffset,length){if(typeof Buffer.from==="function"&&(!global.Uint8Array||Uint8Array.from!==Buffer.from)){return Buffer.from(value,encodingOrOffset,length)}if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof value==="string"){return new Buffer(value,encodingOrOffset)}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(arguments.length===1){return new Buffer(value)}if(typeof offset==="undefined"){offset=0}var len=length;if(typeof len==="undefined"){len=value.byteLength-offset}if(offset>=value.byteLength){throw new RangeError("'offset' is out of bounds")}if(len>value.byteLength-offset){throw new RangeError("'length' is out of bounds")}return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);value.copy(out,0,0,value.length);return out}if(value){if(Array.isArray(value)||typeof ArrayBuffer!=="undefined"&&value.buffer instanceof ArrayBuffer||"length"in value){return new Buffer(value)}if(value.type==="Buffer"&&Array.isArray(value.data)){return new Buffer(value.data)}}throw new TypeError("First argument must be a string, Buffer, "+"ArrayBuffer, Array, or array-like object.")};exports.allocUnsafeSlow=function allocUnsafeSlow(size){if(typeof Buffer.allocUnsafeSlow==="function"){return Buffer.allocUnsafeSlow(size)}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>=MAX_LEN){throw new RangeError("size is too large")}return new SlowBuffer(size)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{buffer:5}],5:[function(require,module,exports){(function(global){"use strict";var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("isarray");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(isNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;jremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length); +var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":2,ieee754:37,isarray:40}],6:[function(require,module,exports){(function(Buffer){function isArray(arg){if(Array.isArray){return Array.isArray(arg)}return objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":39}],7:[function(require,module,exports){var ElementType=require("domelementtype");var entities=require("entities");var booleanAttributes={__proto__:null,allowfullscreen:true,async:true,autofocus:true,autoplay:true,checked:true,controls:true,default:true,defer:true,disabled:true,hidden:true,ismap:true,loop:true,multiple:true,muted:true,open:true,readonly:true,required:true,reversed:true,scoped:true,seamless:true,selected:true,typemustmatch:true};var unencodedElements={__proto__:null,style:true,script:true,xmp:true,iframe:true,noembed:true,noframes:true,plaintext:true,noscript:true};function formatAttrs(attributes,opts){if(!attributes)return;var output="",value;for(var key in attributes){value=attributes[key];if(output){output+=" "}if(!value&&booleanAttributes[key]){output+=key}else{output+=key+'="'+(opts.decodeEntities?entities.encodeXML(value):value)+'"'}}return output}var singleTag={__proto__:null,area:true,base:true,basefont:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,isindex:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};var render=module.exports=function(dom,opts){if(!Array.isArray(dom)&&!dom.cheerio)dom=[dom];opts=opts||{};var output="";for(var i=0;i"}else{tag+=">";if(elem.children){tag+=render(elem.children,opts)}if(!singleTag[elem.name]||opts.xmlMode){tag+=""}}return tag}function renderDirective(elem){return"<"+elem.data+">"}function renderText(elem,opts){var data=elem.data||"";if(opts.decodeEntities&&!(elem.parent&&elem.parent.name in unencodedElements)){data=entities.encodeXML(data)}return data}function renderCdata(elem){return""}function renderComment(elem){return""}},{domelementtype:8,entities:20}],8:[function(require,module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(elem){return elem.type==="tag"||elem.type==="script"||elem.type==="style"}}},{}],9:[function(require,module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(elem){return elem.type==="tag"||elem.type==="script"||elem.type==="style"}}},{}],10:[function(require,module,exports){var ElementType=require("domelementtype");var re_whitespace=/\s+/g;var NodePrototype=require("./lib/node");var ElementPrototype=require("./lib/element");function DomHandler(callback,options,elementCB){if(typeof callback==="object"){elementCB=options;options=callback;callback=null}else if(typeof options==="function"){elementCB=options;options=defaultOpts}this._callback=callback;this._options=options||defaultOpts;this._elementCB=elementCB;this.dom=[];this._done=false;this._tagStack=[];this._parser=this._parser||null}var defaultOpts={normalizeWhitespace:false,withStartIndices:false};DomHandler.prototype.onparserinit=function(parser){this._parser=parser};DomHandler.prototype.onreset=function(){DomHandler.call(this,this._callback,this._options,this._elementCB)};DomHandler.prototype.onend=function(){if(this._done)return;this._done=true;this._parser=null;this._handleCallback(null)};DomHandler.prototype._handleCallback=DomHandler.prototype.onerror=function(error){if(typeof this._callback==="function"){this._callback(error,this.dom)}else{if(error)throw error}};DomHandler.prototype.onclosetag=function(){var elem=this._tagStack.pop();if(this._elementCB)this._elementCB(elem)};DomHandler.prototype._addDomElement=function(element){var parent=this._tagStack[this._tagStack.length-1];var siblings=parent?parent.children:this.dom;var previousSibling=siblings[siblings.length-1];element.next=null;if(this._options.withStartIndices){element.startIndex=this._parser.startIndex}if(this._options.withDomLvl1){element.__proto__=element.type==="tag"?ElementPrototype:NodePrototype}if(previousSibling){element.prev=previousSibling;previousSibling.next=element}else{element.prev=null}siblings.push(element);element.parent=parent||null};DomHandler.prototype.onopentag=function(name,attribs){var element={type:name==="script"?ElementType.Script:name==="style"?ElementType.Style:ElementType.Tag,name:name,attribs:attribs,children:[]};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.ontext=function(data){var normalize=this._options.normalizeWhitespace||this._options.ignoreWhitespace;var lastTag;if(!this._tagStack.length&&this.dom.length&&(lastTag=this.dom[this.dom.length-1]).type===ElementType.Text){if(normalize){lastTag.data=(lastTag.data+data).replace(re_whitespace," ")}else{lastTag.data+=data}}else{if(this._tagStack.length&&(lastTag=this._tagStack[this._tagStack.length-1])&&(lastTag=lastTag.children[lastTag.children.length-1])&&lastTag.type===ElementType.Text){if(normalize){lastTag.data=(lastTag.data+data).replace(re_whitespace," ")}else{lastTag.data+=data}}else{if(normalize){data=data.replace(re_whitespace," ")}this._addDomElement({data:data,type:ElementType.Text})}}};DomHandler.prototype.oncomment=function(data){var lastTag=this._tagStack[this._tagStack.length-1];if(lastTag&&lastTag.type===ElementType.Comment){lastTag.data+=data;return}var element={data:data,type:ElementType.Comment};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.oncdatastart=function(){var element={children:[{data:"",type:ElementType.Text}],type:ElementType.CDATA};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.oncommentend=DomHandler.prototype.oncdataend=function(){this._tagStack.pop()};DomHandler.prototype.onprocessinginstruction=function(name,data){this._addDomElement({name:name,data:data,type:ElementType.Directive})};module.exports=DomHandler},{"./lib/element":11,"./lib/node":12,domelementtype:9}],11:[function(require,module,exports){var NodePrototype=require("./node");var ElementPrototype=module.exports=Object.create(NodePrototype);var domLvl1={tagName:"name"};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(ElementPrototype,key,{get:function(){return this[shorthand]||null},set:function(val){this[shorthand]=val;return val}})})},{"./node":12}],12:[function(require,module,exports){var NodePrototype=module.exports={get firstChild(){var children=this.children;return children&&children[0]||null},get lastChild(){var children=this.children;return children&&children[children.length-1]||null},get nodeType(){return nodeTypes[this.type]||nodeTypes.element}};var domLvl1={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};var nodeTypes={element:1,text:3,cdata:4,comment:8};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(NodePrototype,key,{get:function(){return this[shorthand]||null},set:function(val){this[shorthand]=val;return val}})})},{}],13:[function(require,module,exports){var DomUtils=module.exports;[require("./lib/stringify"),require("./lib/traversal"),require("./lib/manipulation"),require("./lib/querying"),require("./lib/legacy"),require("./lib/helpers")].forEach(function(ext){Object.keys(ext).forEach(function(key){DomUtils[key]=ext[key].bind(DomUtils)})})},{"./lib/helpers":14,"./lib/legacy":15,"./lib/manipulation":16,"./lib/querying":17,"./lib/stringify":18,"./lib/traversal":19}],14:[function(require,module,exports){exports.removeSubsets=function(nodes){var idx=nodes.length,node,ancestor,replace;while(--idx>-1){node=ancestor=nodes[idx];nodes[idx]=null;replace=true;while(ancestor){if(nodes.indexOf(ancestor)>-1){replace=false;nodes.splice(idx,1);break}ancestor=ancestor.parent}if(replace){nodes[idx]=node}}return nodes};var POSITION={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16};var comparePos=exports.compareDocumentPosition=function(nodeA,nodeB){var aParents=[];var bParents=[];var current,sharedParent,siblings,aSibling,bSibling,idx;if(nodeA===nodeB){return 0}current=nodeA;while(current){aParents.unshift(current);current=current.parent}current=nodeB;while(current){bParents.unshift(current);current=current.parent}idx=0;while(aParents[idx]===bParents[idx]){idx++}if(idx===0){return POSITION.DISCONNECTED}sharedParent=aParents[idx-1];siblings=sharedParent.children;aSibling=aParents[idx];bSibling=bParents[idx];if(siblings.indexOf(aSibling)>siblings.indexOf(bSibling)){if(sharedParent===nodeB){return POSITION.FOLLOWING|POSITION.CONTAINED_BY}return POSITION.FOLLOWING}else{if(sharedParent===nodeA){return POSITION.PRECEDING|POSITION.CONTAINS}return POSITION.PRECEDING}};exports.uniqueSort=function(nodes){var idx=nodes.length,node,position;nodes=nodes.slice();while(--idx>-1){node=nodes[idx];position=nodes.indexOf(node);if(position>-1&&position0){childs=find(test,childs,recurse,limit);result=result.concat(childs);limit-=childs.length;if(limit<=0)break}}return result}function findOneChild(test,elems){for(var i=0,l=elems.length;i0){elem=findOne(test,elems[i].children)}}return elem}function existsOne(test,elems){for(var i=0,l=elems.length;i0&&existsOne(test,elems[i].children))){return true}}return false}function findAll(test,elems){var result=[];for(var i=0,j=elems.length;i0){result=result.concat(findAll(test,elems[i].children))}}return result}},{domelementtype:9}],18:[function(require,module,exports){var ElementType=require("domelementtype"),getOuterHTML=require("dom-serializer"),isTag=ElementType.isTag;module.exports={getInnerHTML:getInnerHTML,getOuterHTML:getOuterHTML,getText:getText};function getInnerHTML(elem,opts){return elem.children?elem.children.map(function(elem){return getOuterHTML(elem,opts)}).join(""):""}function getText(elem){if(Array.isArray(elem))return elem.map(getText).join("");if(isTag(elem)||elem.type===ElementType.CDATA)return getText(elem.children);if(elem.type===ElementType.Text)return elem.data;return""}},{"dom-serializer":7,domelementtype:9}],19:[function(require,module,exports){var getChildren=exports.getChildren=function(elem){return elem.children};var getParent=exports.getParent=function(elem){return elem.parent};exports.getSiblings=function(elem){var parent=getParent(elem);return parent?getChildren(parent):[elem]};exports.getAttributeValue=function(elem,name){return elem.attribs&&elem.attribs[name]};exports.hasAttrib=function(elem,name){return!!elem.attribs&&hasOwnProperty.call(elem.attribs,name)};exports.getName=function(elem){return elem.name}},{}],20:[function(require,module,exports){var encode=require("./lib/encode.js"),decode=require("./lib/decode.js");exports.decode=function(data,level){return(!level||level<=0?decode.XML:decode.HTML)(data)};exports.decodeStrict=function(data,level){return(!level||level<=0?decode.XML:decode.HTMLStrict)(data)};exports.encode=function(data,level){return(!level||level<=0?encode.XML:encode.HTML)(data)};exports.encodeXML=encode.XML;exports.encodeHTML4=exports.encodeHTML5=exports.encodeHTML=encode.HTML;exports.decodeXML=exports.decodeXMLStrict=decode.XML;exports.decodeHTML4=exports.decodeHTML5=exports.decodeHTML=decode.HTML;exports.decodeHTML4Strict=exports.decodeHTML5Strict=exports.decodeHTMLStrict=decode.HTMLStrict;exports.escape=encode.escape},{"./lib/decode.js":21,"./lib/encode.js":23}],21:[function(require,module,exports){var entityMap=require("../maps/entities.json"),legacyMap=require("../maps/legacy.json"),xmlMap=require("../maps/xml.json"),decodeCodePoint=require("./decode_codepoint.js");var decodeXMLStrict=getStrictDecoder(xmlMap),decodeHTMLStrict=getStrictDecoder(entityMap);function getStrictDecoder(map){var keys=Object.keys(map).join("|"),replace=getReplacer(map);keys+="|#[xX][\\da-fA-F]+|#\\d+";var re=new RegExp("&(?:"+keys+");","g");return function(str){return String(str).replace(re,replace)}}var decodeHTML=function(){var legacy=Object.keys(legacyMap).sort(sorter);var keys=Object.keys(entityMap).sort(sorter);for(var i=0,j=0;i=55296&&codePoint<=57343||codePoint>1114111){return"�"}if(codePoint in decodeMap){codePoint=decodeMap[codePoint]}var output="";if(codePoint>65535){codePoint-=65536;output+=String.fromCharCode(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}output+=String.fromCharCode(codePoint);return output}},{"../maps/decode.json":24}],23:[function(require,module,exports){var inverseXML=getInverseObj(require("../maps/xml.json")),xmlReplacer=getInverseReplacer(inverseXML);exports.XML=getInverse(inverseXML,xmlReplacer);var inverseHTML=getInverseObj(require("../maps/entities.json")),htmlReplacer=getInverseReplacer(inverseHTML);exports.HTML=getInverse(inverseHTML,htmlReplacer);function getInverseObj(obj){return Object.keys(obj).sort().reduce(function(inverse,name){inverse[obj[name]]="&"+name+";";return inverse},{})}function getInverseReplacer(inverse){var single=[],multiple=[];Object.keys(inverse).forEach(function(k){if(k.length===1){single.push("\\"+k)}else{multiple.push(k)}});multiple.unshift("["+single.join("")+"]");return new RegExp(multiple.join("|"),"g")}var re_nonASCII=/[^\0-\x7F]/g,re_astralSymbols=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function singleCharReplacer(c){return"&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"}function astralReplacer(c){var high=c.charCodeAt(0);var low=c.charCodeAt(1);var codePoint=(high-55296)*1024+low-56320+65536;return"&#x"+codePoint.toString(16).toUpperCase()+";"}function getInverse(inverse,re){function func(name){return inverse[name]}return function(data){return data.replace(re,func).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}}var re_xmlChars=getInverseReplacer(inverseXML);function escapeXML(data){return data.replace(re_xmlChars,singleCharReplacer).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}exports.escape=escapeXML},{"../maps/entities.json":25,"../maps/xml.json":27}],24:[function(require,module,exports){module.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},{}],25:[function(require,module,exports){module.exports={Aacute:"Ã",aacute:"á",Abreve:"Ä‚",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"Ð",acy:"а",AElig:"Æ",aelig:"æ",af:"â¡",Afr:"ð”„",afr:"ð”ž",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ä€",amacr:"Ä",amalg:"⨿",amp:"&",AMP:"&",andand:"â©•",And:"â©“",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"â¦",angsph:"∢",angst:"Ã…",angzarr:"â¼",Aogon:"Ä„",aogon:"Ä…",Aopf:"ð”¸",aopf:"ð•’",apacir:"⩯",ap:"≈",apE:"â©°",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"â¡",approx:"≈",approxeq:"≊",Aring:"Ã…",aring:"Ã¥",Ascr:"ð’œ",ascr:"ð’¶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"â‰",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"â‹",Backslash:"∖",Barv:"â«§",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Î’",beta:"β",beth:"â„¶",between:"≬",Bfr:"ð”…",bfr:"ð”Ÿ",bigcap:"â‹‚",bigcirc:"â—¯",bigcup:"⋃",bigodot:"⨀",bigoplus:"â¨",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"â–½",bigtriangleup:"â–³",biguplus:"⨄",bigvee:"â‹",bigwedge:"â‹€",bkarow:"â¤",blacklozenge:"â§«",blacksquare:"â–ª",blacktriangle:"â–´",blacktriangledown:"â–¾",blacktriangleleft:"â—‚",blacktriangleright:"â–¸",blank:"â£",blk12:"â–’",blk14:"â–‘",blk34:"â–“",block:"â–ˆ",bne:"=⃥",bnequiv:"≡⃥",bNot:"â«­",bnot:"âŒ",Bopf:"ð”¹",bopf:"ð•“",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"â”",boxdL:"â••",boxDl:"â•–",boxDL:"â•—",boxdr:"┌",boxdR:"â•’",boxDr:"â•“",boxDR:"â•”",boxh:"─",boxH:"â•",boxhd:"┬",boxHd:"╤",boxhD:"â•¥",boxHD:"╦",boxhu:"â”´",boxHu:"â•§",boxhU:"╨",boxHU:"â•©",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"â•›",boxUl:"╜",boxUL:"â•",boxur:"â””",boxuR:"╘",boxUr:"â•™",boxUR:"╚",boxv:"│",boxV:"â•‘",boxvh:"┼",boxvH:"╪",boxVh:"â•«",boxVH:"╬",boxvl:"┤",boxvL:"â•¡",boxVl:"â•¢",boxVL:"â•£",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"â• ",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"ð’·",Bscr:"ℬ",bsemi:"â",bsim:"∽",bsime:"â‹",bsolb:"â§…",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"â‰",Bumpeq:"≎",bumpeq:"â‰",Cacute:"Ć",cacute:"ć",capand:"â©„",capbrcup:"⩉",capcap:"â©‹",cap:"∩",Cap:"â‹’",capcup:"⩇",capdot:"â©€",CapitalDifferentialD:"â……",caps:"∩︀",caret:"â",caron:"ˇ",Cayleys:"â„­",ccaps:"â©",Ccaron:"ÄŒ",ccaron:"Ä",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"â©",Cdot:"ÄŠ",cdot:"Ä‹",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"ð” ",Cfr:"â„­",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"âŠ",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"â—‹",cirE:"⧃",cire:"≗",cirfnint:"â¨",cirmid:"⫯",cirscir:"â§‚",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"â€",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"â©´",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"âˆ",compfn:"∘",complement:"âˆ",complexes:"â„‚",cong:"≅",congdot:"â©­",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"ð•”",Copf:"â„‚",coprod:"âˆ",Coproduct:"âˆ",copy:"©",COPY:"©",copysr:"â„—",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"ð’ž",cscr:"ð’¸",csub:"â«",csube:"â«‘",csup:"â«",csupe:"â«’",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"â‰",cup:"∪",Cup:"â‹“",cupcup:"⩊",cupdot:"âŠ",cupor:"â©…",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"â‹",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"â‹",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"â€",Dashv:"⫤",dashv:"⊣",dbkarow:"â¤",dblac:"Ë",Dcaron:"ÄŽ",dcaron:"Ä",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"â……",dd:"â…†",DDotrahd:"⤑",ddotseq:"â©·",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"ð”‡",dfr:"ð”¡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"Ë™",DiacriticalDoubleAcute:"Ë",DiacriticalGrave:"`",DiacriticalTilde:"Ëœ",diam:"â‹„",diamond:"â‹„",Diamond:"â‹„",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"â…†",digamma:"Ï",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"Ñ’",dlcorn:"⌞",dlcrop:"âŒ",dollar:"$",Dopf:"ð”»",dopf:"ð••",Dot:"¨",dot:"Ë™",DotDot:"⃜",doteq:"â‰",doteqdot:"≑",DotEqual:"â‰",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"â‡",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"Ì‘",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"â¥",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"â‡",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"â¤",drcorn:"⌟",drcrop:"⌌",Dscr:"ð’Ÿ",dscr:"ð’¹",DScy:"Ð…",dscy:"Ñ•",dsol:"â§¶",Dstrok:"Ä",dstrok:"Ä‘",dtdot:"⋱",dtri:"â–¿",dtrif:"â–¾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Ð",dzcy:"ÑŸ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"â©®",Ecaron:"Äš",ecaron:"Ä›",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"Ñ",eDDot:"â©·",Edot:"Ä–",edot:"Ä—",eDot:"≑",ee:"â…‡",efDot:"≒",Efr:"ð”ˆ",efr:"ð”¢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"â§",ell:"â„“",els:"⪕",elsdot:"⪗",Emacr:"Ä’",emacr:"Ä“",empty:"∅",emptyset:"∅",EmptySmallSquare:"â—»",emptyv:"∅",EmptyVerySmallSquare:"â–«",emsp13:" ",emsp14:" ",emsp:" ",ENG:"ÅŠ",eng:"Å‹",ensp:" ",Eogon:"Ę",eogon:"Ä™",Eopf:"ð”¼",eopf:"ð•–",epar:"â‹•",eparsl:"â§£",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"â§¥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"â„°",esdot:"â‰",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ã",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"â„°",exponentiale:"â…‡",ExponentialE:"â…‡",fallingdotseq:"≒",Fcy:"Ф",fcy:"Ñ„",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"ð”‰",ffr:"ð”£",filig:"ï¬",FilledSmallSquare:"â—¼",FilledVerySmallSquare:"â–ª",fjlig:"fj",flat:"â™­",fllig:"fl",fltns:"â–±",fnof:"Æ’",Fopf:"ð”½",fopf:"ð•—",forall:"∀",ForAll:"∀",fork:"â‹”",forkv:"â«™",Fouriertrf:"ℱ",fpartint:"â¨",frac12:"½",frac13:"â…“",frac14:"¼",frac15:"â…•",frac16:"â…™",frac18:"â…›",frac23:"â…”",frac25:"â…–",frac34:"¾",frac35:"â…—",frac38:"â…œ",frac45:"â…˜",frac56:"â…š",frac58:"â…",frac78:"â…ž",frasl:"â„",frown:"⌢",fscr:"ð’»",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ïœ",gammad:"Ï",gap:"⪆",Gbreve:"Äž",gbreve:"ÄŸ",Gcedil:"Ä¢",Gcirc:"Äœ",gcirc:"Ä",Gcy:"Г",gcy:"г",Gdot:"Ä ",gdot:"Ä¡",ge:"≥",gE:"≧",gEl:"⪌",gel:"â‹›",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"ð”Š",gfr:"ð”¤",gg:"≫",Gg:"â‹™",ggg:"â‹™",gimel:"â„·",GJcy:"Ѓ",gjcy:"Ñ“",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"â‹§",Gopf:"ð”¾",gopf:"ð•˜",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"â‹›",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"ð’¢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"âª",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"â‹—",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"â‹—",gtreqless:"â‹›",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"â„‹",HARDcy:"Ъ",hardcy:"ÑŠ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"â„",Hcirc:"Ĥ",hcirc:"Ä¥",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"ð”¥",Hfr:"ℌ",HilbertSpace:"â„‹",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"ð•™",Hopf:"â„",horbar:"―",HorizontalLine:"─",hscr:"ð’½",Hscr:"â„‹",hslash:"â„",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"â‰",hybull:"âƒ",hyphen:"â€",Iacute:"Ã",iacute:"í",ic:"â£",Icirc:"ÃŽ",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"ð”¦",Ifr:"â„‘",Igrave:"ÃŒ",igrave:"ì",ii:"â…ˆ",iiiint:"⨌",iiint:"∭",iinfin:"â§œ",iiota:"â„©",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"Ä«",image:"â„‘",ImaginaryI:"â…ˆ",imagline:"â„",imagpart:"â„‘",imath:"ı",Im:"â„‘",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"â„…",in:"∈",infin:"∞",infintie:"â§",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"â‹‚",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"â£",InvisibleTimes:"â¢",IOcy:"Ð",iocy:"Ñ‘",Iogon:"Ä®",iogon:"į",Iopf:"ð•€",iopf:"ð•š",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"ð’¾",Iscr:"â„",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"â‹´",isinsv:"⋳",isinv:"∈",it:"â¢",Itilde:"Ĩ",itilde:"Ä©",Iukcy:"І",iukcy:"Ñ–",Iuml:"Ã",iuml:"ï",Jcirc:"Ä´",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"ð”",jfr:"ð”§",jmath:"È·",Jopf:"ð•",jopf:"ð•›",Jscr:"ð’¥",jscr:"ð’¿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"Ñ”",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"Ä·",Kcy:"К",kcy:"к",Kfr:"ð”Ž",kfr:"ð”¨",kgreen:"ĸ",KHcy:"Ð¥",khcy:"Ñ…",KJcy:"ÐŒ",kjcy:"Ñœ",Kopf:"ð•‚",kopf:"ð•œ",Kscr:"ð’¦",kscr:"ð“€",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"â„’",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"â„’",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"â†",Larr:"↞",lArr:"â‡",larrfs:"â¤",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"â²",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"â¦",lbrkslu:"â¦",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ä»",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"â†",LeftArrow:"â†",Leftarrow:"â‡",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"â‹‹",LeftTriangleBar:"â§",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"â©¿",lesdoto:"âª",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"â‹–",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"ð”",lfr:"ð”©",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"â–„",LJcy:"Љ",ljcy:"Ñ™",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"â—º",Lmidot:"Ä¿",lmidot:"Å€",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"ð•ƒ",lopf:"ð•",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"â—Š",lozenge:"â—Š",lozf:"â§«",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"ð“",Lscr:"â„’",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"âª",lsimg:"âª",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Å",lstrok:"Å‚",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"â‹–",lthree:"â‹‹",ltimes:"⋉",ltlarr:"⥶",ltquest:"â©»",ltri:"â—ƒ",ltrie:"⊴",ltrif:"â—‚",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"â–®",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:"âŸ",Mellintrf:"ℳ",Mfr:"ð”",mfr:"ð”ª",mho:"â„§",micro:"µ",midast:"*",midcir:"â«°",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"â«›",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"ð•„",mopf:"ð•ž",mp:"∓",mscr:"ð“‚",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"Å„",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"â™®",naturals:"â„•",natur:"â™®",nbsp:" ",nbump:"≎̸",nbumpe:"â‰Ì¸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Å…",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"â©‚",Ncy:"Ð",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"â‰Ì¸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"ð”‘",nfr:"ð”«",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"Ñš",nlarr:"↚",nlArr:"â‡",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"â‡",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"â ",NonBreakingSpace:" ",nopf:"ð•Ÿ",Nopf:"â„•",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"â‰Ì¸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"â‹·",notinvc:"â‹¶",NotLeftTriangleBar:"â§Ì¸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"â‹ ",NotReverseElement:"∌",NotRightTriangleBar:"â§Ì¸",NotRightTriangle:"â‹«",NotRightTriangleEqual:"â‹­",NotSquareSubset:"âŠÌ¸",NotSquareSubsetEqual:"â‹¢",NotSquareSuperset:"âŠÌ¸",NotSquareSupersetEqual:"â‹£",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"âŠ",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"â‹¡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"â‰",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"â‹ ",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"â‡",nrarrw:"â†Ì¸",nrightarrow:"↛",nRightarrow:"â‡",nrtri:"â‹«",nrtrie:"â‹­",nsc:"âŠ",nsccue:"â‹¡",nsce:"⪰̸",Nscr:"ð’©",nscr:"ð“ƒ",nshortmid:"∤",nshortparallel:"∦",nsim:"â‰",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"â‹¢",nsqsupe:"â‹£",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"âŠ",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"â‹«",ntrianglerighteq:"â‹­",Nu:"Î",nu:"ν",num:"#",numero:"â„–",numsp:" ",nvap:"â‰âƒ’",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"â§ž",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"âŠ",Odblac:"Å",odblac:"Å‘",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Å’",oelig:"Å“",ofcir:"⦿",Ofr:"ð”’",ofr:"ð”¬",ogon:"Ë›",Ograve:"Ã’",ograve:"ò",ogt:"â§",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"â§€",Omacr:"ÅŒ",omacr:"Å",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"ð•†",oopf:"ð• ",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"â©”",or:"∨",ord:"â©",order:"â„´",orderof:"â„´",ordf:"ª",ordm:"º",origof:"⊶",oror:"â©–",orslope:"â©—",orv:"â©›",oS:"Ⓢ",Oscr:"ð’ª",oscr:"â„´",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"âž",OverBracket:"⎴",OverParenthesis:"âœ",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"ð”“",pfr:"ð”­",Phi:"Φ",phi:"φ",phiv:"Ï•",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"Ï€",pitchfork:"â‹”",piv:"Ï–",planck:"â„",planckh:"ℎ",plankv:"â„",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"ð•¡",Popf:"â„™",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"â„™",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"âˆ",Product:"âˆ",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"âˆ",Proportional:"âˆ",Proportion:"∷",propto:"âˆ",prsim:"≾",prurel:"⊰",Pscr:"ð’«",pscr:"ð“…",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"ð””",qfr:"ð”®",qint:"⨌",qopf:"ð•¢",Qopf:"ℚ",qprime:"â—",Qscr:"ð’¬",qscr:"ð“†",quaternions:"â„",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Å”",racute:"Å•",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"â†",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"â¤",rBarr:"â¤",RBarr:"â¤",rbbrk:"â³",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"â¦",Rcaron:"Ř",rcaron:"Å™",Rcedil:"Å–",rcedil:"Å—",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"Ñ€",rdca:"⤷",rdldhar:"⥩",rdquo:"â€",rdquor:"â€",rdsh:"↳",real:"ℜ",realine:"â„›",realpart:"ℜ",reals:"â„",Re:"ℜ",rect:"â–­",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"ð”¯",Rfr:"ℜ",rHar:"⥤",rhard:"â‡",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"Ï",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"â¥",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"â‡",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"â†",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"â§",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"â¥",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"Ëš",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"â€",rmoustache:"⎱",rmoust:"⎱",rnmid:"â«®",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"ð•£",Ropf:"â„",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"ð“‡",Rscr:"â„›",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"â–¹",rtrie:"⊵",rtrif:"â–¸",rtriltri:"â§Ž",RuleDelayed:"â§´",ruluhar:"⥨",rx:"℞",Sacute:"Åš",sacute:"Å›",sbquo:"‚",scap:"⪸",Scaron:"Å ",scaron:"Å¡",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Åž",scedil:"ÅŸ",Scirc:"Åœ",scirc:"Å",scnap:"⪺",scnE:"⪶",scnsim:"â‹©",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"Ñ",sdotb:"⊡",sdot:"â‹…",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"ð”–",sfr:"ð”°",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"â†",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"Ï‚",sigmav:"Ï‚",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"âª",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"â†",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ÑŒ",solbar:"⌿",solb:"â§„",sol:"/",Sopf:"ð•Š",sopf:"ð•¤",spades:"â™ ",spadesuit:"â™ ",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"âŠ",sqsube:"⊑",sqsubset:"âŠ",sqsubseteq:"⊑",sqsup:"âŠ",sqsupe:"⊒",sqsupset:"âŠ",sqsupseteq:"⊒",square:"â–¡",Square:"â–¡",SquareIntersection:"⊓",SquareSubset:"âŠ",SquareSubsetEqual:"⊑",SquareSuperset:"âŠ",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"â–ª",squ:"â–¡",squf:"â–ª",srarr:"→",Sscr:"ð’®",sscr:"ð“ˆ",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"Ï•",strns:"¯",sub:"⊂",Sub:"â‹",subdot:"⪽",subE:"â«…",sube:"⊆",subedot:"⫃",submult:"â«",subnE:"â«‹",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"â‹",subseteq:"⊆",subseteqq:"â«…",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"â«‹",subsim:"⫇",subsub:"â«•",subsup:"â«“",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"â‹©",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"â‹‘",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"â«„",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"â«—",suplarr:"⥻",supmult:"â«‚",supnE:"⫌",supne:"⊋",supplus:"â«€",supset:"⊃",Supset:"â‹‘",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"â«”",supsup:"â«–",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"Ï„",tbrk:"⎴",Tcaron:"Ť",tcaron:"Å¥",Tcedil:"Å¢",tcedil:"Å£",Tcy:"Т",tcy:"Ñ‚",tdot:"⃛",telrec:"⌕",Tfr:"ð”—",tfr:"ð”±",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"Ï‘",thetav:"Ï‘",thickapprox:"≈",thicksim:"∼",ThickSpace:"âŸâ€Š",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"Ëœ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"ð•‹",topf:"ð•¥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"â„¢",TRADE:"â„¢",triangle:"â–µ",triangledown:"â–¿",triangleleft:"â—ƒ",trianglelefteq:"⊴",triangleq:"≜",triangleright:"â–¹",trianglerighteq:"⊵",tridot:"â—¬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"â§",tritime:"⨻",trpezium:"â¢",Tscr:"ð’¯",tscr:"ð“‰",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"Ñ›",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"ÐŽ",ubrcy:"Ñž",Ubreve:"Ŭ",ubreve:"Å­",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"ð”˜",ufr:"ð”²",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"â–€",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"âŒ",ultri:"â—¸",Umacr:"Ū",umacr:"Å«",uml:"¨",UnderBar:"_",UnderBrace:"âŸ",UnderBracket:"⎵",UnderParenthesis:"â",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"ð•Œ",uopf:"ð•¦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"Ï…",Upsi:"Ï’",upsih:"Ï’",Upsilon:"Î¥",upsilon:"Ï…",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"âŒ",urcorner:"âŒ",urcrop:"⌎",Uring:"Å®",uring:"ů",urtri:"â—¹",Uscr:"ð’°",uscr:"ð“Š",utdot:"â‹°",Utilde:"Ũ",utilde:"Å©",utri:"â–µ",utrif:"â–´",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"Ï•",varpi:"Ï–",varpropto:"âˆ",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"Ï‚",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"Ï‘",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"â««",vBarv:"â«©",Vcy:"Ð’",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"â‹",veeeq:"≚",vellip:"â‹®",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"â˜",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"ð”™",vfr:"ð”³",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"ð•",vopf:"ð•§",vprop:"âˆ",vrtri:"⊳",Vscr:"ð’±",vscr:"ð“‹",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Å´",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"â‹€",wedgeq:"≙",weierp:"℘",Wfr:"ð”š",wfr:"ð”´",Wopf:"ð•Ž",wopf:"ð•¨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"ð’²",wscr:"ð“Œ",xcap:"â‹‚",xcirc:"â—¯",xcup:"⋃",xdtri:"â–½",Xfr:"ð”›",xfr:"ð”µ",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"â‹»",xodot:"⨀",Xopf:"ð•",xopf:"ð•©",xoplus:"â¨",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"ð’³",xscr:"ð“",xsqcup:"⨆",xuplus:"⨄",xutri:"â–³",xvee:"â‹",xwedge:"â‹€",Yacute:"Ã",yacute:"ý",YAcy:"Я",yacy:"Ñ",Ycirc:"Ŷ",ycirc:"Å·",Ycy:"Ы",ycy:"Ñ‹",yen:"Â¥",Yfr:"ð”œ",yfr:"ð”¶",YIcy:"Ї",yicy:"Ñ—",Yopf:"ð•",yopf:"ð•ª",Yscr:"ð’´",yscr:"ð“Ž",YUcy:"Ю",yucy:"ÑŽ",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Å»",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"ð”·",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"â‡",zopf:"ð•«",Zopf:"ℤ",Zscr:"ð’µ",zscr:"ð“",zwj:"â€",zwnj:"‌"}},{}],26:[function(require,module,exports){module.exports={Aacute:"Ã",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Ã…",aring:"Ã¥",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ã",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Ã",iacute:"í",Icirc:"ÃŽ",icirc:"î",iexcl:"¡",Igrave:"ÃŒ",igrave:"ì",iquest:"¿",Iuml:"Ã",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ã’",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ã",yacute:"ý",yen:"Â¥",yuml:"ÿ"}},{}],27:[function(require,module,exports){module.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},{}],28:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Uncaught, unspecified "error" event. ('+er+")");err.context=er;throw err}}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=handler.slice();len=listeners.length;for(i=0;i0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-- >0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1); +}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else if(listeners){while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;else if(evlistener)return evlistener.length}return 0};EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],29:[function(require,module,exports){module.exports=CollectingHandler;function CollectingHandler(cbs){this._cbs=cbs||{};this.events=[]}var EVENTS=require("./").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){name="on"+name;CollectingHandler.prototype[name]=function(){this.events.push([name]);if(this._cbs[name])this._cbs[name]()}}else if(EVENTS[name]===1){name="on"+name;CollectingHandler.prototype[name]=function(a){this.events.push([name,a]);if(this._cbs[name])this._cbs[name](a)}}else if(EVENTS[name]===2){name="on"+name;CollectingHandler.prototype[name]=function(a,b){this.events.push([name,a,b]);if(this._cbs[name])this._cbs[name](a,b)}}else{throw Error("wrong number of arguments")}});CollectingHandler.prototype.onreset=function(){this.events=[];if(this._cbs.onreset)this._cbs.onreset()};CollectingHandler.prototype.restart=function(){if(this._cbs.onreset)this._cbs.onreset();for(var i=0,len=this.events.length;i0;this._cbs.onclosetag(this._stack[--i]));}if(this._cbs.onend)this._cbs.onend()};Parser.prototype.reset=function(){if(this._cbs.onreset)this._cbs.onreset();this._tokenizer.reset();this._tagname="";this._attribname="";this._attribs=null;this._stack=[];if(this._cbs.onparserinit)this._cbs.onparserinit(this)};Parser.prototype.parseComplete=function(data){this.reset();this.end(data)};Parser.prototype.write=function(chunk){this._tokenizer.write(chunk)};Parser.prototype.end=function(chunk){this._tokenizer.end(chunk)};Parser.prototype.pause=function(){this._tokenizer.pause()};Parser.prototype.resume=function(){this._tokenizer.resume()};Parser.prototype.parseChunk=Parser.prototype.write;Parser.prototype.done=Parser.prototype.end;module.exports=Parser},{"./Tokenizer.js":34,events:28,inherits:38}],32:[function(require,module,exports){module.exports=ProxyHandler;function ProxyHandler(cbs){this._cbs=cbs||{}}var EVENTS=require("./").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){name="on"+name;ProxyHandler.prototype[name]=function(){if(this._cbs[name])this._cbs[name]()}}else if(EVENTS[name]===1){name="on"+name;ProxyHandler.prototype[name]=function(a){if(this._cbs[name])this._cbs[name](a)}}else if(EVENTS[name]===2){name="on"+name;ProxyHandler.prototype[name]=function(a,b){if(this._cbs[name])this._cbs[name](a,b)}}else{throw Error("wrong number of arguments")}})},{"./":36}],33:[function(require,module,exports){module.exports=Stream;var Parser=require("./WritableStream.js");function Stream(options){Parser.call(this,new Cbs(this),options)}require("inherits")(Stream,Parser);Stream.prototype.readable=true;function Cbs(scope){this.scope=scope}var EVENTS=require("../").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){Cbs.prototype["on"+name]=function(){this.scope.emit(name)}}else if(EVENTS[name]===1){Cbs.prototype["on"+name]=function(a){this.scope.emit(name,a)}}else if(EVENTS[name]===2){Cbs.prototype["on"+name]=function(a,b){this.scope.emit(name,a,b)}}else{throw Error("wrong number of arguments!")}})},{"../":36,"./WritableStream.js":35,inherits:38}],34:[function(require,module,exports){module.exports=Tokenizer;var decodeCodePoint=require("entities/lib/decode_codepoint.js"),entityMap=require("entities/maps/entities.json"),legacyMap=require("entities/maps/legacy.json"),xmlMap=require("entities/maps/xml.json"),i=0,TEXT=i++,BEFORE_TAG_NAME=i++,IN_TAG_NAME=i++,IN_SELF_CLOSING_TAG=i++,BEFORE_CLOSING_TAG_NAME=i++,IN_CLOSING_TAG_NAME=i++,AFTER_CLOSING_TAG_NAME=i++,BEFORE_ATTRIBUTE_NAME=i++,IN_ATTRIBUTE_NAME=i++,AFTER_ATTRIBUTE_NAME=i++,BEFORE_ATTRIBUTE_VALUE=i++,IN_ATTRIBUTE_VALUE_DQ=i++,IN_ATTRIBUTE_VALUE_SQ=i++,IN_ATTRIBUTE_VALUE_NQ=i++,BEFORE_DECLARATION=i++,IN_DECLARATION=i++,IN_PROCESSING_INSTRUCTION=i++,BEFORE_COMMENT=i++,IN_COMMENT=i++,AFTER_COMMENT_1=i++,AFTER_COMMENT_2=i++,BEFORE_CDATA_1=i++,BEFORE_CDATA_2=i++,BEFORE_CDATA_3=i++,BEFORE_CDATA_4=i++,BEFORE_CDATA_5=i++,BEFORE_CDATA_6=i++,IN_CDATA=i++,AFTER_CDATA_1=i++,AFTER_CDATA_2=i++,BEFORE_SPECIAL=i++,BEFORE_SPECIAL_END=i++,BEFORE_SCRIPT_1=i++,BEFORE_SCRIPT_2=i++,BEFORE_SCRIPT_3=i++,BEFORE_SCRIPT_4=i++,BEFORE_SCRIPT_5=i++,AFTER_SCRIPT_1=i++,AFTER_SCRIPT_2=i++,AFTER_SCRIPT_3=i++,AFTER_SCRIPT_4=i++,AFTER_SCRIPT_5=i++,BEFORE_STYLE_1=i++,BEFORE_STYLE_2=i++,BEFORE_STYLE_3=i++,BEFORE_STYLE_4=i++,AFTER_STYLE_1=i++,AFTER_STYLE_2=i++,AFTER_STYLE_3=i++,AFTER_STYLE_4=i++,BEFORE_ENTITY=i++,BEFORE_NUMERIC_ENTITY=i++,IN_NAMED_ENTITY=i++,IN_NUMERIC_ENTITY=i++,IN_HEX_ENTITY=i++,j=0,SPECIAL_NONE=j++,SPECIAL_SCRIPT=j++,SPECIAL_STYLE=j++;function whitespace(c){return c===" "||c==="\n"||c==="\t"||c==="\f"||c==="\r"}function characterState(char,SUCCESS){return function(c){if(c===char)this._state=SUCCESS}}function ifElseState(upper,SUCCESS,FAILURE){var lower=upper.toLowerCase();if(upper===lower){return function(c){if(c===lower){this._state=SUCCESS}else{this._state=FAILURE;this._index--}}}else{return function(c){if(c===lower||c===upper){this._state=SUCCESS}else{this._state=FAILURE;this._index--}}}}function consumeSpecialNameChar(upper,NEXT_STATE){var lower=upper.toLowerCase();return function(c){if(c===lower||c===upper){this._state=NEXT_STATE}else{this._state=IN_TAG_NAME;this._index--}}}function Tokenizer(options,cbs){this._state=TEXT;this._buffer="";this._sectionStart=0;this._index=0;this._bufferOffset=0;this._baseState=TEXT;this._special=SPECIAL_NONE;this._cbs=cbs;this._running=true;this._ended=false;this._xmlMode=!!(options&&options.xmlMode);this._decodeEntities=!!(options&&options.decodeEntities)}Tokenizer.prototype._stateText=function(c){if(c==="<"){if(this._index>this._sectionStart){this._cbs.ontext(this._getSection())}this._state=BEFORE_TAG_NAME;this._sectionStart=this._index}else if(this._decodeEntities&&this._special===SPECIAL_NONE&&c==="&"){if(this._index>this._sectionStart){this._cbs.ontext(this._getSection())}this._baseState=TEXT;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeTagName=function(c){if(c==="/"){this._state=BEFORE_CLOSING_TAG_NAME}else if(c==="<"){this._cbs.ontext(this._getSection());this._sectionStart=this._index}else if(c===">"||this._special!==SPECIAL_NONE||whitespace(c)){this._state=TEXT}else if(c==="!"){this._state=BEFORE_DECLARATION;this._sectionStart=this._index+1}else if(c==="?"){this._state=IN_PROCESSING_INSTRUCTION;this._sectionStart=this._index+1}else{this._state=!this._xmlMode&&(c==="s"||c==="S")?BEFORE_SPECIAL:IN_TAG_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInTagName=function(c){if(c==="/"||c===">"||whitespace(c)){this._emitToken("onopentagname");this._state=BEFORE_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateBeforeCloseingTagName=function(c){if(whitespace(c));else if(c===">"){this._state=TEXT}else if(this._special!==SPECIAL_NONE){if(c==="s"||c==="S"){this._state=BEFORE_SPECIAL_END}else{this._state=TEXT;this._index--}}else{this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInCloseingTagName=function(c){if(c===">"||whitespace(c)){this._emitToken("onclosetag");this._state=AFTER_CLOSING_TAG_NAME;this._index--}};Tokenizer.prototype._stateAfterCloseingTagName=function(c){if(c===">"){this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateBeforeAttributeName=function(c){if(c===">"){this._cbs.onopentagend();this._state=TEXT;this._sectionStart=this._index+1}else if(c==="/"){this._state=IN_SELF_CLOSING_TAG}else if(!whitespace(c)){this._state=IN_ATTRIBUTE_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInSelfClosingTag=function(c){if(c===">"){this._cbs.onselfclosingtag();this._state=TEXT;this._sectionStart=this._index+1}else if(!whitespace(c)){this._state=BEFORE_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateInAttributeName=function(c){if(c==="="||c==="/"||c===">"||whitespace(c)){this._cbs.onattribname(this._getSection());this._sectionStart=-1;this._state=AFTER_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateAfterAttributeName=function(c){if(c==="="){this._state=BEFORE_ATTRIBUTE_VALUE}else if(c==="/"||c===">"){this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME;this._index--}else if(!whitespace(c)){this._cbs.onattribend();this._state=IN_ATTRIBUTE_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeAttributeValue=function(c){if(c==='"'){this._state=IN_ATTRIBUTE_VALUE_DQ;this._sectionStart=this._index+1}else if(c==="'"){this._state=IN_ATTRIBUTE_VALUE_SQ;this._sectionStart=this._index+1}else if(!whitespace(c)){this._state=IN_ATTRIBUTE_VALUE_NQ;this._sectionStart=this._index;this._index--}};Tokenizer.prototype._stateInAttributeValueDoubleQuotes=function(c){if(c==='"'){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateInAttributeValueSingleQuotes=function(c){if(c==="'"){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateInAttributeValueNoQuotes=function(c){if(whitespace(c)||c===">"){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME;this._index--}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeDeclaration=function(c){this._state=c==="["?BEFORE_CDATA_1:c==="-"?BEFORE_COMMENT:IN_DECLARATION};Tokenizer.prototype._stateInDeclaration=function(c){if(c===">"){this._cbs.ondeclaration(this._getSection());this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateInProcessingInstruction=function(c){if(c===">"){this._cbs.onprocessinginstruction(this._getSection());this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateBeforeComment=function(c){if(c==="-"){this._state=IN_COMMENT;this._sectionStart=this._index+1}else{this._state=IN_DECLARATION}};Tokenizer.prototype._stateInComment=function(c){if(c==="-")this._state=AFTER_COMMENT_1};Tokenizer.prototype._stateAfterComment1=function(c){if(c==="-"){this._state=AFTER_COMMENT_2}else{this._state=IN_COMMENT}};Tokenizer.prototype._stateAfterComment2=function(c){if(c===">"){this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2));this._state=TEXT;this._sectionStart=this._index+1}else if(c!=="-"){this._state=IN_COMMENT}};Tokenizer.prototype._stateBeforeCdata1=ifElseState("C",BEFORE_CDATA_2,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata2=ifElseState("D",BEFORE_CDATA_3,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata3=ifElseState("A",BEFORE_CDATA_4,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata4=ifElseState("T",BEFORE_CDATA_5,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata5=ifElseState("A",BEFORE_CDATA_6,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata6=function(c){if(c==="["){this._state=IN_CDATA;this._sectionStart=this._index+1}else{this._state=IN_DECLARATION;this._index--}};Tokenizer.prototype._stateInCdata=function(c){if(c==="]")this._state=AFTER_CDATA_1};Tokenizer.prototype._stateAfterCdata1=characterState("]",AFTER_CDATA_2);Tokenizer.prototype._stateAfterCdata2=function(c){if(c===">"){this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2));this._state=TEXT;this._sectionStart=this._index+1}else if(c!=="]"){this._state=IN_CDATA}};Tokenizer.prototype._stateBeforeSpecial=function(c){if(c==="c"||c==="C"){this._state=BEFORE_SCRIPT_1}else if(c==="t"||c==="T"){this._state=BEFORE_STYLE_1}else{this._state=IN_TAG_NAME;this._index--}};Tokenizer.prototype._stateBeforeSpecialEnd=function(c){if(this._special===SPECIAL_SCRIPT&&(c==="c"||c==="C")){this._state=AFTER_SCRIPT_1}else if(this._special===SPECIAL_STYLE&&(c==="t"||c==="T")){this._state=AFTER_STYLE_1}else this._state=TEXT};Tokenizer.prototype._stateBeforeScript1=consumeSpecialNameChar("R",BEFORE_SCRIPT_2);Tokenizer.prototype._stateBeforeScript2=consumeSpecialNameChar("I",BEFORE_SCRIPT_3);Tokenizer.prototype._stateBeforeScript3=consumeSpecialNameChar("P",BEFORE_SCRIPT_4);Tokenizer.prototype._stateBeforeScript4=consumeSpecialNameChar("T",BEFORE_SCRIPT_5);Tokenizer.prototype._stateBeforeScript5=function(c){if(c==="/"||c===">"||whitespace(c)){this._special=SPECIAL_SCRIPT}this._state=IN_TAG_NAME;this._index--};Tokenizer.prototype._stateAfterScript1=ifElseState("R",AFTER_SCRIPT_2,TEXT);Tokenizer.prototype._stateAfterScript2=ifElseState("I",AFTER_SCRIPT_3,TEXT);Tokenizer.prototype._stateAfterScript3=ifElseState("P",AFTER_SCRIPT_4,TEXT);Tokenizer.prototype._stateAfterScript4=ifElseState("T",AFTER_SCRIPT_5,TEXT);Tokenizer.prototype._stateAfterScript5=function(c){if(c===">"||whitespace(c)){this._special=SPECIAL_NONE;this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index-6;this._index--}else this._state=TEXT};Tokenizer.prototype._stateBeforeStyle1=consumeSpecialNameChar("Y",BEFORE_STYLE_2);Tokenizer.prototype._stateBeforeStyle2=consumeSpecialNameChar("L",BEFORE_STYLE_3);Tokenizer.prototype._stateBeforeStyle3=consumeSpecialNameChar("E",BEFORE_STYLE_4);Tokenizer.prototype._stateBeforeStyle4=function(c){if(c==="/"||c===">"||whitespace(c)){this._special=SPECIAL_STYLE}this._state=IN_TAG_NAME;this._index--};Tokenizer.prototype._stateAfterStyle1=ifElseState("Y",AFTER_STYLE_2,TEXT);Tokenizer.prototype._stateAfterStyle2=ifElseState("L",AFTER_STYLE_3,TEXT);Tokenizer.prototype._stateAfterStyle3=ifElseState("E",AFTER_STYLE_4,TEXT);Tokenizer.prototype._stateAfterStyle4=function(c){if(c===">"||whitespace(c)){this._special=SPECIAL_NONE;this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index-5;this._index--}else this._state=TEXT};Tokenizer.prototype._stateBeforeEntity=ifElseState("#",BEFORE_NUMERIC_ENTITY,IN_NAMED_ENTITY);Tokenizer.prototype._stateBeforeNumericEntity=ifElseState("X",IN_HEX_ENTITY,IN_NUMERIC_ENTITY);Tokenizer.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16)limit=6;while(limit>=2){var entity=this._buffer.substr(start,limit);if(legacyMap.hasOwnProperty(entity)){this._emitPartial(legacyMap[entity]);this._sectionStart+=limit+1;return}else{limit--}}};Tokenizer.prototype._stateInNamedEntity=function(c){if(c===";"){this._parseNamedEntityStrict();if(this._sectionStart+1"z")&&(c<"A"||c>"Z")&&(c<"0"||c>"9")){if(this._xmlMode);else if(this._sectionStart+1===this._index);else if(this._baseState!==TEXT){if(c!=="="){this._parseNamedEntityStrict()}}else{this._parseLegacyEntity()}this._state=this._baseState;this._index--}};Tokenizer.prototype._decodeNumericEntity=function(offset,base){var sectionStart=this._sectionStart+offset;if(sectionStart!==this._index){var entity=this._buffer.substring(sectionStart,this._index);var parsed=parseInt(entity,base);this._emitPartial(decodeCodePoint(parsed));this._sectionStart=this._index}else{this._sectionStart--}this._state=this._baseState};Tokenizer.prototype._stateInNumericEntity=function(c){if(c===";"){this._decodeNumericEntity(2,10);this._sectionStart++}else if(c<"0"||c>"9"){if(!this._xmlMode){this._decodeNumericEntity(2,10)}else{this._state=this._baseState}this._index--}};Tokenizer.prototype._stateInHexEntity=function(c){if(c===";"){this._decodeNumericEntity(3,16);this._sectionStart++}else if((c<"a"||c>"f")&&(c<"A"||c>"F")&&(c<"0"||c>"9")){if(!this._xmlMode){this._decodeNumericEntity(3,16)}else{this._state=this._baseState}this._index--}};Tokenizer.prototype._cleanup=function(){if(this._sectionStart<0){this._buffer="";this._index=0;this._bufferOffset+=this._index}else if(this._running){if(this._state===TEXT){if(this._sectionStart!==this._index){this._cbs.ontext(this._buffer.substr(this._sectionStart))}this._buffer="";this._bufferOffset+=this._index;this._index=0}else if(this._sectionStart===this._index){this._buffer="";this._bufferOffset+=this._index;this._index=0}else{this._buffer=this._buffer.substr(this._sectionStart);this._index-=this._sectionStart;this._bufferOffset+=this._sectionStart}this._sectionStart=0}};Tokenizer.prototype.write=function(chunk){if(this._ended)this._cbs.onerror(Error(".write() after done!"));this._buffer+=chunk;this._parse()};Tokenizer.prototype._parse=function(){while(this._index>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],38:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],39:[function(require,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],40:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],41:[function(require,module,exports){(function(process){"use strict";if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){module.exports=nextTick}else{module.exports=process.nextTick}function nextTick(fn,arg1,arg2,arg3){if(typeof fn!=="function"){throw new TypeError('"callback" argument must be a function')}var len=arguments.length;var args,i;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function afterTickOne(){fn.call(null,arg1)});case 3:return process.nextTick(function afterTickTwo(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function afterTickThree(){fn.call(null,arg1,arg2,arg3)});default:args=new Array(len-1);i=0;while(i1){for(var i=1;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;if(state.decoder&&!addToFront&&!encoding){chunk=state.decoder.write(chunk);skipAdd=!state.objectMode&&chunk.length===0}if(!addToFront)state.reading=false;if(!skipAdd){if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended){state.needReadable=true;return 0}return state.length}Readable.prototype.read=function(n){debug("read",n);n=parseInt(n,10);var state=this._readableState;var nOrig=n;if(n!==0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}else{state.length-=n}if(state.length===0){if(!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++;increasedAwaitDrain=true}src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EElistenerCount(dest,"error")===0)dest.emit("error",er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var _i=0;_i=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.head.data;else ret=state.buffer.concat(state.length);state.buffer.clear()}else{ret=fromListPartial(n,state.buffer,state.decoder)}return ret}function fromListPartial(n,list,hasStrings){var ret;if(nstr.length?str.length:n;if(nb===str.length)ret+=str;else ret+=str.slice(0,n);n-=nb;if(n===0){if(nb===str.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=str.slice(nb)}break}++c}list.length-=c;return ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n);var p=list.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=buf.slice(nb)}break}++c}list.length-=c;return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")};var Stream;(function(){try{Stream=require("st"+"ream")}catch(_){}finally{if(!Stream)Stream=require("events").EventEmitter}})();var Buffer=require("buffer").Buffer;var bufferShim=require("buffer-shims");util.inherits(Writable,Stream);function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb;this.next=null}var Duplex;function WritableState(options,stream){Duplex=Duplex||require("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function writableStateGetBuffer(){var current=this.bufferedRequest;var out=[];while(current){out.push(current);current=current.next}return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")})}catch(_){}})();var Duplex;function Writable(options){Duplex=Duplex||require("./_stream_duplex");if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this);this.writable=true;if(options){if(typeof options.write==="function")this._write=options.write;if(typeof options.writev==="function")this._writev=options.writev}Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er);processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null){er=new TypeError("May not write null values to stream")}else if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}if(er){stream.emit("error",er);processNextTick(cb,er);valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(typeof encoding==="function"){cb=encoding;encoding=null}if(Buffer.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=nop;if(state.ended)writeAfterEnd(this,cb);else if(validChunk(this,state,chunk,cb)){ +state.pendingcb++;ret=writeOrBuffer(this,state,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(this,state)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(encoding){if(typeof encoding==="string")encoding=encoding.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding;return this};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=bufferShim.from(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length};BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length};BufferList.prototype.shift=function(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret};BufferList.prototype.clear=function(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function(s){if(this.length===0)return"";var p=this.head;var ret=""+p.data;while(p=p.next){ret+=s+p.data}return ret};BufferList.prototype.concat=function(n){if(this.length===0)return bufferShim.alloc(0);if(this.length===1)return this.head.data;var ret=bufferShim.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){p.data.copy(ret,i);i+=p.data.length;p=p.next}return ret}},{buffer:5,"buffer-shims":4}],50:[function(require,module,exports){module.exports=require("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":45}],51:[function(require,module,exports){(function(process){var Stream=function(){try{return require("st"+"ream")}catch(_){}}();exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=Stream||exports;exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js");if(!process.browser&&process.env.READABLE_STREAM==="disable"&&Stream){module.exports=Stream}}).call(this,require("_process"))},{"./lib/_stream_duplex.js":44,"./lib/_stream_passthrough.js":45,"./lib/_stream_readable.js":46,"./lib/_stream_transform.js":47,"./lib/_stream_writable.js":48,_process:42}],52:[function(require,module,exports){module.exports=require("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":47}],53:[function(require,module,exports){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":48}],54:[function(require,module,exports){module.exports=function(string){return string.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}},{}],55:[function(require,module,exports){module.exports=Stream;var EE=require("events").EventEmitter;var inherits=require("inherits");inherits(Stream,EE);Stream.Readable=require("readable-stream/readable.js");Stream.Writable=require("readable-stream/writable.js");Stream.Duplex=require("readable-stream/duplex.js");Stream.Transform=require("readable-stream/transform.js");Stream.PassThrough=require("readable-stream/passthrough.js");Stream.Stream=Stream;function Stream(){EE.call(this)}Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){if(dest.writable){if(false===dest.write(chunk)&&source.pause){source.pause()}}}source.on("data",ondata);function ondrain(){if(source.readable&&source.resume){source.resume()}}dest.on("drain",ondrain);if(!dest._isStdio&&(!options||options.end!==false)){source.on("end",onend);source.on("close",onclose)}var didOnEnd=false;function onend(){if(didOnEnd)return;didOnEnd=true;dest.end()}function onclose(){if(didOnEnd)return;didOnEnd=true;if(typeof dest.destroy==="function")dest.destroy()}function onerror(er){cleanup();if(EE.listenerCount(this,"error")===0){throw er}}source.on("error",onerror);dest.on("error",onerror);function cleanup(){source.removeListener("data",ondata);dest.removeListener("drain",ondrain);source.removeListener("end",onend);source.removeListener("close",onclose);source.removeListener("error",onerror);dest.removeListener("error",onerror);source.removeListener("end",cleanup);source.removeListener("close",cleanup);dest.removeListener("close",cleanup)}source.on("end",cleanup);source.on("close",cleanup);dest.on("close",cleanup);dest.emit("pipe",source);return dest}},{events:28,inherits:38,"readable-stream/duplex.js":43,"readable-stream/passthrough.js":50,"readable-stream/readable.js":51,"readable-stream/transform.js":52,"readable-stream/writable.js":53}],56:[function(require,module,exports){var Buffer=require("buffer").Buffer;var isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding)){throw new Error("Unknown encoding: "+encoding)}}var StringDecoder=exports.StringDecoder=function(encoding){this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(encoding);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:5}],57:[function(require,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],58:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i 0) { + qp = obj.url.substring(obj.url.indexOf('?') + 1); + var parts = qp.split('&'); + if(parts && parts.length > 0) { + for(var i = 0; i < parts.length; i++) { + var kv = parts[i].split('='); + if(kv && kv.length > 0) { + if (kv[0] === this.name) { + // skip it + return false; + } + } + } + } + } + + if (obj.url.indexOf('?') > 0) { + obj.url = obj.url + '&' + this.name + '=' + this.value; + } else { + obj.url = obj.url + '?' + this.name + '=' + this.value; + } + + return true; + } else if (this.type === 'header') { + if(typeof obj.headers[this.name] === 'undefined') { + obj.headers[this.name] = this.value; + } + + return true; + } +}; + +var CookieAuthorization = module.exports.CookieAuthorization = function (cookie) { + this.cookie = cookie; +}; + +CookieAuthorization.prototype.apply = function (obj) { + obj.cookieJar = obj.cookieJar || new CookieJar(); + obj.cookieJar.setCookie(this.cookie); + + return true; +}; + +/** + * Password Authorization is a basic auth implementation + */ +var PasswordAuthorization = module.exports.PasswordAuthorization = function (username, password) { + if (arguments.length === 3) { + helpers.log('PasswordAuthorization: the \'name\' argument has been removed, pass only username and password'); + username = arguments[1]; + password = arguments[2]; + } + this.username = username; + this.password = password; +}; + +PasswordAuthorization.prototype.apply = function (obj) { + if(typeof obj.headers.Authorization === 'undefined') { + obj.headers.Authorization = 'Basic ' + btoa(this.username + ':' + this.password); + } + + return true; +}; + +},{"./helpers":4,"btoa":13,"cookiejar":18,"lodash-compat/collection/each":52,"lodash-compat/collection/includes":55,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isObject":144}],3:[function(require,module,exports){ +'use strict'; + +var _ = { + bind: require('lodash-compat/function/bind'), + cloneDeep: require('lodash-compat/lang/cloneDeep'), + find: require('lodash-compat/collection/find'), + forEach: require('lodash-compat/collection/forEach'), + indexOf: require('lodash-compat/array/indexOf'), + isArray: require('lodash-compat/lang/isArray'), + isObject: require('lodash-compat/lang/isObject'), + isFunction: require('lodash-compat/lang/isFunction'), + isPlainObject: require('lodash-compat/lang/isPlainObject'), + isUndefined: require('lodash-compat/lang/isUndefined') +}; +var auth = require('./auth'); +var helpers = require('./helpers'); +var Model = require('./types/model'); +var Operation = require('./types/operation'); +var OperationGroup = require('./types/operationGroup'); +var Resolver = require('./resolver'); +var SwaggerHttp = require('./http'); +var SwaggerSpecConverter = require('./spec-converter'); +var Q = require('q'); + +// We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the +// following usage: 'client.{tagName}' +var reservedClientTags = [ + 'apis', + 'authorizationScheme', + 'authorizations', + 'basePath', + 'build', + 'buildFrom1_1Spec', + 'buildFrom1_2Spec', + 'buildFromSpec', + 'clientAuthorizations', + 'convertInfo', + 'debug', + 'defaultErrorCallback', + 'defaultSuccessCallback', + 'enableCookies', + 'fail', + 'failure', + 'finish', + 'help', + 'host', + 'idFromOp', + 'info', + 'initialize', + 'isBuilt', + 'isValid', + 'modelPropertyMacro', + 'models', + 'modelsArray', + 'options', + 'parameterMacro', + 'parseUri', + 'progress', + 'resourceCount', + 'sampleModels', + 'selfReflect', + 'setConsolidatedModels', + 'spec', + 'supportedSubmitMethods', + 'swaggerRequestHeaders', + 'tagFromLabel', + 'title', + 'url', + 'useJQuery', + 'jqueryAjaxCache' +]; +// We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the +// following usage: 'client.apis.{tagName}' +var reservedApiTags = [ + 'apis', + 'asCurl', + 'description', + 'externalDocs', + 'help', + 'label', + 'name', + 'operation', + 'operations', + 'operationsArray', + 'path', + 'tag' +]; +var supportedOperationMethods = ['delete', 'get', 'head', 'options', 'patch', 'post', 'put']; +var SwaggerClient = module.exports = function (url, options) { + this.authorizations = null; + this.authorizationScheme = null; + this.basePath = null; + this.debug = false; + this.enableCookies = false; + this.info = null; + this.isBuilt = false; + this.isValid = false; + this.modelsArray = []; + this.resourceCount = 0; + this.url = null; + this.useJQuery = false; + this.jqueryAjaxCache = false; + this.swaggerObject = {}; + this.deferredClient = undefined; + + this.clientAuthorizations = new auth.SwaggerAuthorizations(); + + if (typeof url !== 'undefined') { + return this.initialize(url, options); + } else { + return this; + } +}; + +SwaggerClient.prototype.initialize = function (url, options) { + this.models = {}; + this.sampleModels = {}; + + if (typeof url === 'string') { + this.url = url; + } else if (_.isObject(url)) { + options = url; + this.url = options.url; + } + + if(this.url && this.url.indexOf('http:') === -1 && this.url.indexOf('https:') === -1) { + // no protocol, so we can only use window if it exists + if(typeof(window) !== 'undefined' && window && window.location) { + this.url = window.location.origin + this.url; + } + } + + options = options || {}; + this.clientAuthorizations.add(options.authorizations); + this.swaggerRequestHeaders = options.swaggerRequestHeaders || 'application/json;charset=utf-8,*/*'; + this.defaultSuccessCallback = options.defaultSuccessCallback || null; + this.defaultErrorCallback = options.defaultErrorCallback || null; + this.modelPropertyMacro = options.modelPropertyMacro || null; + this.parameterMacro = options.parameterMacro || null; + this.usePromise = options.usePromise || null; + + // operation request timeout default + this.timeout = options.timeout || null; + // default to request timeout when not specified + this.fetchSpecTimeout = typeof options.fetchSpecTimeout !== 'undefined' ? + options.fetchSpecTimeout : options.timeout || null; + + if(this.usePromise) { + this.deferredClient = Q.defer(); + } + + if (typeof options.success === 'function') { + this.success = options.success; + } + if (options.useJQuery) { + this.useJQuery = options.useJQuery; + } + + if (options.jqueryAjaxCache) { + this.jqueryAjaxCache = options.jqueryAjaxCache; + } + + if (options.enableCookies) { + this.enableCookies = options.enableCookies; + } + + this.options = options || {}; + + // maybe don't need this? + this.options.timeout = this.timeout; + this.options.fetchSpecTimeout = this.fetchSpecTimeout; + + this.supportedSubmitMethods = options.supportedSubmitMethods || []; + this.failure = options.failure || function (err) { throw err; }; + this.progress = options.progress || function () {}; + this.spec = _.cloneDeep(options.spec); // Clone so we do not alter the provided document + + if (options.scheme) { + this.scheme = options.scheme; + } + + if (this.usePromise || typeof options.success === 'function') { + this.ready = true; + return this.build(); + } +}; + +SwaggerClient.prototype.build = function (mock) { + if (this.isBuilt) { + return this; + } + + var self = this; + + if (this.spec) { + this.progress('fetching resource list; Please wait.'); + } else { + this.progress('fetching resource list: ' + this.url + '; Please wait.'); + } + + var obj = { + useJQuery: this.useJQuery, + jqueryAjaxCache: this.jqueryAjaxCache, + url: this.url, + method: 'get', + headers: { + accept: this.swaggerRequestHeaders + }, + on: { + error: function (response) { + if (self.url.substring(0, 4) !== 'http') { + return self.fail('Please specify the protocol for ' + self.url); + } else if (response.errObj && (response.errObj.code === 'ECONNABORTED' || response.errObj.message.indexOf('timeout') !== -1)) { + return self.fail('Request timed out after ' + self.fetchSpecTimeout + 'ms'); + } else if (response.status === 0) { + return self.fail('Can\'t read from server. It may not have the appropriate access-control-origin settings.'); + } else if (response.status === 404) { + return self.fail('Can\'t read swagger JSON from ' + self.url); + } else { + return self.fail(response.status + ' : ' + response.statusText + ' ' + self.url); + } + }, + response: function (resp) { + + var responseObj = resp.obj; + if(!responseObj) { + return self.fail('failed to parse JSON/YAML response'); + } + + self.swaggerVersion = responseObj.swaggerVersion; + self.swaggerObject = responseObj; + + if (responseObj.swagger && parseInt(responseObj.swagger) === 2) { + self.swaggerVersion = responseObj.swagger; + + new Resolver().resolve(responseObj, self.url, self.buildFromSpec, self); + + self.isValid = true; + } else { + var converter = new SwaggerSpecConverter(); + self.oldSwaggerObject = self.swaggerObject; + + converter.setDocumentationLocation(self.url); + converter.convert(responseObj, self.clientAuthorizations, self.options, function(spec) { + self.swaggerObject = spec; + new Resolver().resolve(spec, self.url, self.buildFromSpec, self); + self.isValid = true; + }); + } + } + } + }; + + // only set timeout when specified + if (this.fetchSpecTimeout) { + obj.timeout = this.fetchSpecTimeout; + } + + if (this.spec) { + self.swaggerObject = this.spec; + setTimeout(function () { + new Resolver().resolve(self.spec, self.url, self.buildFromSpec, self); + }, 10); + } else { + this.clientAuthorizations.apply(obj); + + if (mock) { + return obj; + } + + new SwaggerHttp().execute(obj, this.options); + } + + return (this.usePromise) ? this.deferredClient.promise : this; +}; + +SwaggerClient.prototype.buildFromSpec = function (response) { + if (this.isBuilt) { + return this; + } + + this.apis = {}; + this.apisArray = []; + this.basePath = response.basePath || ''; + this.consumes = response.consumes; + this.host = response.host || ''; + this.info = response.info || {}; + this.produces = response.produces; + this.schemes = response.schemes || []; + this.securityDefinitions = response.securityDefinitions; + this.security = response.security; + this.title = response.title || ''; + + if (response.externalDocs) { + this.externalDocs = response.externalDocs; + } + + // legacy support + this.authSchemes = response.securityDefinitions; + + var definedTags = {}; + var k; + + if (Array.isArray(response.tags)) { + definedTags = {}; + + for (k = 0; k < response.tags.length; k++) { + var t = response.tags[k]; + definedTags[t.name] = t; + } + } + + var location; + + if (typeof this.url === 'string') { + location = this.parseUri(this.url); + if (typeof this.scheme === 'undefined' && typeof this.schemes === 'undefined' || this.schemes.length === 0) { + if(typeof window !== 'undefined') { + // use the window scheme + this.scheme = window.location.protocol.replace(':',''); + } + else { + this.scheme = location.scheme || 'http'; + } + } else if (typeof this.scheme === 'undefined') { + if(typeof window !== 'undefined') { + var scheme = window.location.protocol.replace(':',''); + if(this.schemes.indexOf(scheme) !== -1) { + this.scheme = scheme; + } + else { + this.scheme = 'http'; + } + } + else { + this.scheme = this.schemes[0] || location.scheme; + } + } + + if (typeof this.host === 'undefined' || this.host === '') { + this.host = location.host; + + if (location.port) { + this.host = this.host + ':' + location.port; + } + } + } + else { + if (typeof this.schemes === 'undefined' || this.schemes.length === 0) { + this.scheme = 'http'; + } + else if (typeof this.scheme === 'undefined') { + this.scheme = this.schemes[0]; + } + } + + this.definitions = response.definitions; + + var key; + + for (key in this.definitions) { + var model = new Model(key, this.definitions[key], this.models, this.modelPropertyMacro); + + if (model) { + this.models[key] = model; + } + } + + // get paths, create functions for each operationId + var self = this; + + // Bind help to 'client.apis' + self.apis.help = _.bind(self.help, self); + + _.forEach(response.paths, function (pathObj, path) { + // Only process a path if it's an object + if (!_.isPlainObject(pathObj)) { + return; + } + + _.forEach(supportedOperationMethods, function (method) { + var operation = pathObj[method]; + + if (_.isUndefined(operation)) { + // Operation does not exist + return; + } else if (!_.isPlainObject(operation)) { + // Operation exists but it is not an Operation Object. Since this is invalid, log it. + helpers.log('The \'' + method + '\' operation for \'' + path + '\' path is not an Operation Object'); + + return; + } + + var tags = operation.tags; + + if (_.isUndefined(tags) || !_.isArray(tags) || tags.length === 0) { + tags = operation.tags = [ 'default' ]; + } + + var operationId = self.idFromOp(path, method, operation); + + var operationObject = new Operation(self, + operation.scheme, + operationId, + method, + path, + operation, + self.definitions, + self.models, + self.clientAuthorizations); + + // bind self operation's execute command to the api + _.forEach(tags, function (tag) { + var clientProperty = _.indexOf(reservedClientTags, tag) > -1 ? '_' + tag : tag; + var apiProperty = _.indexOf(reservedApiTags, tag) > -1 ? '_' + tag : tag; + var operationGroup = self[clientProperty]; + + if (clientProperty !== tag) { + helpers.log('The \'' + tag + '\' tag conflicts with a SwaggerClient function/property name. Use \'client.' + + clientProperty + '\' or \'client.apis.' + tag + '\' instead of \'client.' + tag + '\'.'); + } + + if (apiProperty !== tag) { + helpers.log('The \'' + tag + '\' tag conflicts with a SwaggerClient operation function/property name. Use ' + + '\'client.apis.' + apiProperty + '\' instead of \'client.apis.' + tag + '\'.'); + } + + if (_.indexOf(reservedApiTags, operationId) > -1) { + helpers.log('The \'' + operationId + '\' operationId conflicts with a SwaggerClient operation ' + + 'function/property name. Use \'client.apis.' + apiProperty + '._' + operationId + + '\' instead of \'client.apis.' + apiProperty + '.' + operationId + '\'.'); + + operationId = '_' + operationId; + operationObject.nickname = operationId; // So 'client.apis.[tag].operationId.help() works properly + } + + if (_.isUndefined(operationGroup)) { + operationGroup = self[clientProperty] = self.apis[apiProperty] = {}; + + operationGroup.operations = {}; + operationGroup.label = apiProperty; + operationGroup.apis = {}; + + var tagDef = definedTags[tag]; + + if (!_.isUndefined(tagDef)) { + operationGroup.description = tagDef.description; + operationGroup.externalDocs = tagDef.externalDocs; + } + + self[clientProperty].help = _.bind(self.help, operationGroup); + self.apisArray.push(new OperationGroup(tag, operationGroup.description, operationGroup.externalDocs, operationObject)); + } + + operationId = self.makeUniqueOperationId(operationId, self.apis[apiProperty]); + + // Bind tag help + if (!_.isFunction(operationGroup.help)) { + operationGroup.help = _.bind(self.help, operationGroup); + } + + // bind to the apis object + self.apis[apiProperty][operationId] = operationGroup[operationId] = _.bind(operationObject.execute, + operationObject); + self.apis[apiProperty][operationId].help = operationGroup[operationId].help = _.bind(operationObject.help, + operationObject); + self.apis[apiProperty][operationId].asCurl = operationGroup[operationId].asCurl = _.bind(operationObject.asCurl, + operationObject); + + operationGroup.apis[operationId] = operationGroup.operations[operationId] = operationObject; + + // legacy UI feature + var api = _.find(self.apisArray, function (api) { + return api.tag === tag; + }); + + if (api) { + api.operationsArray.push(operationObject); + } + }); + }); + }); + + // sort the apisArray according to the tags + var sortedApis = []; + _.forEach(Object.keys(definedTags), function (tag) { + var pos; + for(pos in self.apisArray) { + var _api = self.apisArray[pos]; + if(_api && tag === _api.name) { + sortedApis.push(_api); + self.apisArray[pos] = null; + } + } + }); + // add anything left + _.forEach(self.apisArray, function (api) { + if(api) { + sortedApis.push(api); + } + }); + self.apisArray = sortedApis; + + _.forEach(response.definitions, function (definitionObj, definition) { + definitionObj.id = definition.toLowerCase(); + definitionObj.name = definition; + self.modelsArray.push(definitionObj); + }); + + this.isBuilt = true; + + if (this.usePromise) { + this.isValid = true; + this.isBuilt = true; + this.deferredClient.resolve(this); + + return this.deferredClient.promise; + } + + if (this.success) { + this.success(); + } + + return this; +}; + +SwaggerClient.prototype.makeUniqueOperationId = function(operationId, api) { + var count = 0; + var name = operationId; + + // make unique across this operation group + while(true) { + var matched = false; + _.forEach(api.operations, function (operation) { + if(operation.nickname === name) { + matched = true; + } + }); + if(!matched) { + return name; + } + name = operationId + '_' + count; + count ++; + } + + return operationId; +}; + +SwaggerClient.prototype.parseUri = function (uri) { + var urlParseRE = /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/; + var parts = urlParseRE.exec(uri); + + return { + scheme: parts[4] ? parts[4].replace(':','') : undefined, + host: parts[11], + port: parts[12], + path: parts[15] + }; +}; + +SwaggerClient.prototype.help = function (dontPrint) { + var output = ''; + + if (this instanceof SwaggerClient) { + _.forEach(this.apis, function (api, name) { + if (_.isPlainObject(api)) { + output += 'operations for the \'' + name + '\' tag\n'; + + _.forEach(api.operations, function (operation, name) { + output += ' * ' + name + ': ' + operation.summary + '\n'; + }); + } + }); + } else if (this instanceof OperationGroup || _.isPlainObject(this)) { + output += 'operations for the \'' + this.label + '\' tag\n'; + + _.forEach(this.apis, function (operation, name) { + output += ' * ' + name + ': ' + operation.summary + '\n'; + }); + } + + if (dontPrint) { + return output; + } else { + helpers.log(output); + + return output; + } +}; + +SwaggerClient.prototype.tagFromLabel = function (label) { + return label; +}; + +SwaggerClient.prototype.idFromOp = function (path, httpMethod, op) { + if(!op || !op.operationId) { + op = op || {}; + op.operationId = httpMethod + '_' + path; + } + var opId = op.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g, '_') || (path.substring(1) + '_' + httpMethod); + + opId = opId.replace(/((_){2,})/g, '_'); + opId = opId.replace(/^(_)*/g, ''); + opId = opId.replace(/([_])*$/g, ''); + + return opId; +}; + +SwaggerClient.prototype.setHost = function (host) { + this.host = host; + + if(this.apis) { + _.forEach(this.apis, function(api) { + if(api.operations) { + _.forEach(api.operations, function(operation) { + operation.host = host; + }); + } + }); + } +}; + +SwaggerClient.prototype.setBasePath = function (basePath) { + this.basePath = basePath; + + if(this.apis) { + _.forEach(this.apis, function(api) { + if(api.operations) { + _.forEach(api.operations, function(operation) { + operation.basePath = basePath; + }); + } + }); + } +}; + +SwaggerClient.prototype.setSchemes = function (schemes) { + this.schemes = schemes; + + if(schemes && schemes.length > 0) { + if(this.apis) { + _.forEach(this.apis, function (api) { + if (api.operations) { + _.forEach(api.operations, function (operation) { + operation.scheme = schemes[0]; + }); + } + }); + } + } +}; + + +SwaggerClient.prototype.fail = function (message) { + if (this.usePromise) { + this.deferredClient.reject(message); + return this.deferredClient.promise; + } else { + if (this.failure) { + this.failure(message); + } + else { + this.failure(message); + } + } +}; + +},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":49,"lodash-compat/collection/find":53,"lodash-compat/collection/forEach":54,"lodash-compat/function/bind":58,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isFunction":142,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isUndefined":148,"q":157}],4:[function(require,module,exports){ +(function (process){ +'use strict'; + +var _ = { + isPlainObject: require('lodash-compat/lang/isPlainObject'), + indexOf: require('lodash-compat/array/indexOf') +}; + +module.exports.__bind = function (fn, me) { + return function(){ + return fn.apply(me, arguments); + }; +}; + +var log = module.exports.log = function() { + // Only log if available and we're not testing + if (console && process.env.NODE_ENV !== 'test') { + console.log(Array.prototype.slice.call(arguments)[0]); + } +}; + +module.exports.fail = function (message) { + log(message); +}; + +var optionHtml = module.exports.optionHtml = function (label, value) { + return '' + label + ':' + value + ''; +}; + +var resolveSchema = module.exports.resolveSchema = function (schema) { + if (_.isPlainObject(schema.schema)) { + schema = resolveSchema(schema.schema); + } + + return schema; +}; + +var simpleRef = module.exports.simpleRef = function (name) { + if (typeof name === 'undefined') { + return null; + } + + if (name.indexOf('#/definitions/') === 0) { + return name.substring('#/definitions/'.length); + } else { + return name; + } +}; + + +}).call(this,require('_process')) +//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9oZWxwZXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG52YXIgXyA9IHtcbiAgaXNQbGFpbk9iamVjdDogcmVxdWlyZSgnbG9kYXNoLWNvbXBhdC9sYW5nL2lzUGxhaW5PYmplY3QnKSxcbiAgaW5kZXhPZjogcmVxdWlyZSgnbG9kYXNoLWNvbXBhdC9hcnJheS9pbmRleE9mJylcbn07XG5cbm1vZHVsZS5leHBvcnRzLl9fYmluZCA9IGZ1bmN0aW9uIChmbiwgbWUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uKCl7XG4gICAgcmV0dXJuIGZuLmFwcGx5KG1lLCBhcmd1bWVudHMpO1xuICB9O1xufTtcblxudmFyIGxvZyA9IG1vZHVsZS5leHBvcnRzLmxvZyA9IGZ1bmN0aW9uKCkge1xuICAvLyBPbmx5IGxvZyBpZiBhdmFpbGFibGUgYW5kIHdlJ3JlIG5vdCB0ZXN0aW5nXG4gIGlmIChjb25zb2xlICYmIHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAndGVzdCcpIHtcbiAgICBjb25zb2xlLmxvZyhBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpWzBdKTtcbiAgfVxufTtcblxubW9kdWxlLmV4cG9ydHMuZmFpbCA9IGZ1bmN0aW9uIChtZXNzYWdlKSB7XG4gIGxvZyhtZXNzYWdlKTtcbn07XG5cbnZhciBvcHRpb25IdG1sID0gbW9kdWxlLmV4cG9ydHMub3B0aW9uSHRtbCA9IGZ1bmN0aW9uIChsYWJlbCwgdmFsdWUpIHtcbiAgcmV0dXJuICc8dHI+PHRkIGNsYXNzPVwib3B0aW9uTmFtZVwiPicgKyBsYWJlbCArICc6PC90ZD48dGQ+JyArIHZhbHVlICsgJzwvdGQ+PC90cj4nO1xufTtcblxudmFyIHJlc29sdmVTY2hlbWEgPSBtb2R1bGUuZXhwb3J0cy5yZXNvbHZlU2NoZW1hID0gZnVuY3Rpb24gKHNjaGVtYSkge1xuICBpZiAoXy5pc1BsYWluT2JqZWN0KHNjaGVtYS5zY2hlbWEpKSB7XG4gICAgc2NoZW1hID0gcmVzb2x2ZVNjaGVtYShzY2hlbWEuc2NoZW1hKTtcbiAgfVxuXG4gIHJldHVybiBzY2hlbWE7XG59O1xuXG52YXIgc2ltcGxlUmVmID0gbW9kdWxlLmV4cG9ydHMuc2ltcGxlUmVmID0gZnVuY3Rpb24gKG5hbWUpIHtcbiAgaWYgKHR5cGVvZiBuYW1lID09PSAndW5kZWZpbmVkJykge1xuICAgIHJldHVybiBudWxsO1xuICB9XG5cbiAgaWYgKG5hbWUuaW5kZXhPZignIy9kZWZpbml0aW9ucy8nKSA9PT0gMCkge1xuICAgIHJldHVybiBuYW1lLnN1YnN0cmluZygnIy9kZWZpbml0aW9ucy8nLmxlbmd0aCk7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIG5hbWU7XG4gIH1cbn07XG5cbiJdfQ== +},{"_process":12,"lodash-compat/array/indexOf":49,"lodash-compat/lang/isPlainObject":145}],5:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +var helpers = require('./helpers'); +var request = require('superagent'); +var jsyaml = require('js-yaml'); +var _ = { + isObject: require('lodash-compat/lang/isObject'), + keys: require('lodash-compat/object/keys') +}; + +/* + * JQueryHttpClient is a light-weight, node or browser HTTP client + */ +var JQueryHttpClient = function () { + this.type = 'JQueryHttpClient'; +}; + +/* + * SuperagentHttpClient is a light-weight, node or browser HTTP client + */ +var SuperagentHttpClient = function () { + this.type = 'SuperagentHttpClient'; +}; + +/** + * SwaggerHttp is a wrapper for executing requests + */ +var SwaggerHttp = module.exports = function () {}; + +SwaggerHttp.prototype.execute = function (obj, opts) { + var client; + + if(opts && opts.client) { + client = opts.client; + } + else { + client = new SuperagentHttpClient(opts); + } + client.opts = opts || {}; + + // legacy support + var hasJQuery = false; + if(typeof window !== 'undefined') { + if(typeof window.jQuery !== 'undefined') { + hasJQuery = true; + } + } + // OPTIONS support + if(obj.method.toLowerCase() === 'options' && client.type === 'SuperagentHttpClient') { + log('forcing jQuery as OPTIONS are not supported by SuperAgent'); + obj.useJQuery = true; + } + if(this.isInternetExplorer() && (obj.useJQuery === false || !hasJQuery )) { + throw new Error('Unsupported configuration! JQuery is required but not available'); + } + if ((obj && obj.useJQuery === true) || this.isInternetExplorer() && hasJQuery) { + client = new JQueryHttpClient(opts); + } + + var success = obj.on.response; + var error = obj.on.error; + + var requestInterceptor = function(data) { + if(opts && opts.requestInterceptor) { + data = opts.requestInterceptor.apply(data); + } + return data; + }; + + var responseInterceptor = function(data) { + if(opts && opts.responseInterceptor) { + data = opts.responseInterceptor.apply(data); + } + return success(data); + }; + + var errorInterceptor = function(data) { + if(opts && opts.responseInterceptor) { + data = opts.responseInterceptor.apply(data); + } + error(data); + }; + + obj.on.error = function(data) { + errorInterceptor(data); + }; + + obj.on.response = function(data) { + responseInterceptor(data); + }; + + if (_.isObject(obj) && _.isObject(obj.body)) { + // special processing for file uploads via jquery + if (obj.body.type && obj.body.type === 'formData'){ + if(opts.useJQuery) { + obj.contentType = false; + obj.processData = false; + delete obj.headers['Content-Type']; + } + } + } + + obj = requestInterceptor(obj) || obj; + if (obj.beforeSend) { + obj.beforeSend(function(_obj) { + client.execute(_obj || obj); + }); + } else { + client.execute(obj); + } + + return (obj.deferred) ? obj.deferred.promise : obj; +}; + +SwaggerHttp.prototype.isInternetExplorer = function () { + var detectedIE = false; + + if (typeof navigator !== 'undefined' && navigator.userAgent) { + var nav = navigator.userAgent.toLowerCase(); + + if (nav.indexOf('msie') !== -1) { + var version = parseInt(nav.split('msie')[1]); + + if (version <= 8) { + detectedIE = true; + } + } + } + + return detectedIE; +}; + +JQueryHttpClient.prototype.execute = function (obj) { + var jq = this.jQuery || (typeof window !== 'undefined' && window.jQuery); + var cb = obj.on; + var request = obj; + + if(typeof jq === 'undefined' || jq === false) { + throw new Error('Unsupported configuration! JQuery is required but not available'); + } + + obj.type = obj.method; + obj.cache = obj.jqueryAjaxCache; + obj.data = obj.body; + delete obj.jqueryAjaxCache; + delete obj.useJQuery; + delete obj.body; + + obj.complete = function (response) { + var headers = {}; + var headerArray = response.getAllResponseHeaders().split('\n'); + + for (var i = 0; i < headerArray.length; i++) { + var toSplit = headerArray[i].trim(); + + if (toSplit.length === 0) { + continue; + } + + var separator = toSplit.indexOf(':'); + + if (separator === -1) { + // Name but no value in the header + headers[toSplit] = null; + + continue; + } + + var name = toSplit.substring(0, separator).trim(); + var value = toSplit.substring(separator + 1).trim(); + + headers[name] = value; + } + + var out = { + url: request.url, + method: request.method, + status: response.status, + statusText: response.statusText, + data: response.responseText, + headers: headers + }; + + try { + var possibleObj = response.responseJSON || jsyaml.safeLoad(response.responseText); + out.obj = (typeof possibleObj === 'string') ? {} : possibleObj; + } catch (ex) { + // do not set out.obj + helpers.log('unable to parse JSON/YAML content'); + } + + // I can throw, or parse null? + out.obj = out.obj || null; + + if (response.status >= 200 && response.status < 300) { + cb.response(out); + } else if (response.status === 0 || (response.status >= 400 && response.status < 599)) { + cb.error(out); + } else { + return cb.response(out); + } + }; + + jq.support.cors = true; + + return jq.ajax(obj); +}; + +SuperagentHttpClient.prototype.execute = function (obj) { + var method = obj.method.toLowerCase(); + var timeout = obj.timeout; + + if (method === 'delete') { + method = 'del'; + } + var headers = obj.headers || {}; + var r = request[method](obj.url); + + if (timeout) { + r.timeout(timeout); + } + + if (obj.enableCookies) { + r.withCredentials(); + } + + var accept = obj.headers.Accept; + + if(this.binaryRequest(accept)) { + r.on('request', function () { + if(this.xhr) { + this.xhr.responseType = 'blob'; + } + }); + } + + if(obj.body) { + if(_.isObject(obj.body)) { + var contentType = obj.headers['Content-Type'] || ''; + if (contentType.indexOf('multipart/form-data') === 0) { + delete headers['Content-Type']; + if({}.toString.apply(obj.body) === '[object FormData]') { + var itr = obj.body.keys(); + var p = []; + while(true) { + var v = itr.next(); + if(v.done) { + break; + } + var key = v.value; + // only once + if(p.indexOf(key) === -1) { + p.push(key); + var value = obj.body.getAll(key); + if({}.toString.apply(value) === '[object File]') { + r.attach(key, value); + } + else { + if (Array.isArray(value)) { + for (var t in value) { + r.field(key, value[t]); + } + } + else { + r.field(key, value); + } + } + } + } + } + else { + var keyname, value, v; + for (keyname in obj.body) { + value = obj.body[keyname]; + if(Array.isArray(value)) { + for(v in value) { + r.field(keyname, v); + } + } + else { + r.field(keyname, value); + } + } + } + } + else if (_.isObject(obj.body)) { + obj.body = JSON.stringify(obj.body); + r.send(obj.body); + } + } + else { + r.send(obj.body); + } + } + + var name; + for (name in headers) { + r.set(name, headers[name]); + } + + if(typeof r.buffer === 'function') { + r.buffer(); // force superagent to populate res.text with the raw response data + } + + r.end(function (err, res) { + res = res || { + status: 0, + headers: {error: 'no response from server'} + }; + var response = { + url: obj.url, + method: obj.method, + headers: res.headers + }; + var cb; + + if (!err && res.error) { + err = res.error; + } + + if (err && obj.on && obj.on.error) { + response.errObj = err; + response.status = res ? res.status : 500; + response.statusText = res ? res.text : err.message; + if (res.headers && res.headers['content-type']) { + if (res.headers['content-type'].indexOf('application/json') >= 0) { + try { + response.obj = JSON.parse(response.statusText); + } + catch (e) { + response.obj = null; + } + } + } + cb = obj.on.error; + } else if (res && obj.on && obj.on.response) { + var possibleObj; + + // Already parsed by by superagent? + if (res.body && _.keys(res.body).length > 0) { + possibleObj = res.body; + } else { + try { + possibleObj = jsyaml.safeLoad(res.text); + // can parse into a string... which we don't need running around in the system + possibleObj = (typeof possibleObj === 'string') ? null : possibleObj; + } catch (e) { + helpers.log('cannot parse JSON/YAML content'); + } + } + + // null means we can't parse into object + if(typeof Buffer === 'function' && Buffer.isBuffer(possibleObj)) { + response.data = possibleObj; + } + else { + response.obj = (typeof possibleObj === 'object') ? possibleObj : null; + } + + response.status = res.status; + response.statusText = res.text; + cb = obj.on.response; + } + if (res.xhr && res.xhr.response) { + response.data = res.xhr.response; + } + else if(!response.data) { + response.data = response.statusText; + } + + if (cb) { + cb(response); + } + }); +}; + +SuperagentHttpClient.prototype. binaryRequest = function (accept) { + if(!accept) { + return false; + } + return (/^image/i).test(accept) || (/^application\/pdf/).test(accept); +}; + +}).call(this,require("buffer").Buffer) +//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9odHRwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciBoZWxwZXJzID0gcmVxdWlyZSgnLi9oZWxwZXJzJyk7XG52YXIgcmVxdWVzdCA9IHJlcXVpcmUoJ3N1cGVyYWdlbnQnKTtcbnZhciBqc3lhbWwgPSByZXF1aXJlKCdqcy15YW1sJyk7XG52YXIgXyA9IHtcbiAgaXNPYmplY3Q6IHJlcXVpcmUoJ2xvZGFzaC1jb21wYXQvbGFuZy9pc09iamVjdCcpLFxuICBrZXlzOiByZXF1aXJlKCdsb2Rhc2gtY29tcGF0L29iamVjdC9rZXlzJylcbn07XG5cbi8qXG4gKiBKUXVlcnlIdHRwQ2xpZW50IGlzIGEgbGlnaHQtd2VpZ2h0LCBub2RlIG9yIGJyb3dzZXIgSFRUUCBjbGllbnRcbiAqL1xudmFyIEpRdWVyeUh0dHBDbGllbnQgPSBmdW5jdGlvbiAoKSB7XG4gIHRoaXMudHlwZSA9ICdKUXVlcnlIdHRwQ2xpZW50Jztcbn07XG5cbi8qXG4gKiBTdXBlcmFnZW50SHR0cENsaWVudCBpcyBhIGxpZ2h0LXdlaWdodCwgbm9kZSBvciBicm93c2VyIEhUVFAgY2xpZW50XG4gKi9cbnZhciBTdXBlcmFnZW50SHR0cENsaWVudCA9IGZ1bmN0aW9uICgpIHtcbiAgdGhpcy50eXBlID0gJ1N1cGVyYWdlbnRIdHRwQ2xpZW50Jztcbn07XG5cbi8qKlxuICogU3dhZ2dlckh0dHAgaXMgYSB3cmFwcGVyIGZvciBleGVjdXRpbmcgcmVxdWVzdHNcbiAqL1xudmFyIFN3YWdnZXJIdHRwID0gbW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoKSB7fTtcblxuU3dhZ2dlckh0dHAucHJvdG90eXBlLmV4ZWN1dGUgPSBmdW5jdGlvbiAob2JqLCBvcHRzKSB7XG4gIHZhciBjbGllbnQ7XG5cbiAgaWYob3B0cyAmJiBvcHRzLmNsaWVudCkge1xuICAgIGNsaWVudCA9IG9wdHMuY2xpZW50O1xuICB9XG4gIGVsc2Uge1xuICAgIGNsaWVudCA9IG5ldyBTdXBlcmFnZW50SHR0cENsaWVudChvcHRzKTtcbiAgfVxuICBjbGllbnQub3B0cyA9IG9wdHMgfHwge307XG5cbiAgLy8gbGVnYWN5IHN1cHBvcnRcbiAgdmFyIGhhc0pRdWVyeSA9IGZhbHNlO1xuICBpZih0eXBlb2Ygd2luZG93ICE9PSAndW5kZWZpbmVkJykge1xuICAgIGlmKHR5cGVvZiB3aW5kb3cualF1ZXJ5ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgaGFzSlF1ZXJ5ID0gdHJ1ZTtcbiAgICB9XG4gIH1cbiAgLy8gT1BUSU9OUyBzdXBwb3J0XG4gIGlmKG9iai5tZXRob2QudG9Mb3dlckNhc2UoKSA9PT0gJ29wdGlvbnMnICYmIGNsaWVudC50eXBlID09PSAnU3VwZXJhZ2VudEh0dHBDbGllbnQnKSB7XG4gICAgbG9nKCdmb3JjaW5nIGpRdWVyeSBhcyBPUFRJT05TIGFyZSBub3Qgc3VwcG9ydGVkIGJ5IFN1cGVyQWdlbnQnKTtcbiAgICBvYmoudXNlSlF1ZXJ5ID0gdHJ1ZTtcbiAgfVxuICBpZih0aGlzLmlzSW50ZXJuZXRFeHBsb3JlcigpICYmIChvYmoudXNlSlF1ZXJ5ID09PSBmYWxzZSB8fCAhaGFzSlF1ZXJ5ICkpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ1Vuc3VwcG9ydGVkIGNvbmZpZ3VyYXRpb24hIEpRdWVyeSBpcyByZXF1aXJlZCBidXQgbm90IGF2YWlsYWJsZScpO1xuICB9XG4gIGlmICgob2JqICYmIG9iai51c2VKUXVlcnkgPT09IHRydWUpIHx8IHRoaXMuaXNJbnRlcm5ldEV4cGxvcmVyKCkgJiYgaGFzSlF1ZXJ5KSB7XG4gICAgY2xpZW50ID0gbmV3IEpRdWVyeUh0dHBDbGllbnQob3B0cyk7XG4gIH1cblxuICB2YXIgc3VjY2VzcyA9IG9iai5vbi5yZXNwb25zZTtcbiAgdmFyIGVycm9yID0gb2JqLm9uLmVycm9yO1xuXG4gIHZhciByZXF1ZXN0SW50ZXJjZXB0b3IgPSBmdW5jdGlvbihkYXRhKSB7XG4gICAgaWYob3B0cyAmJiBvcHRzLnJlcXVlc3RJbnRlcmNlcHRvcikge1xuICAgICAgZGF0YSA9IG9wdHMucmVxdWVzdEludGVyY2VwdG9yLmFwcGx5KGRhdGEpO1xuICAgIH1cbiAgICByZXR1cm4gZGF0YTtcbiAgfTtcblxuICB2YXIgcmVzcG9uc2VJbnRlcmNlcHRvciA9IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICBpZihvcHRzICYmIG9wdHMucmVzcG9uc2VJbnRlcmNlcHRvcikge1xuICAgICAgZGF0YSA9IG9wdHMucmVzcG9uc2VJbnRlcmNlcHRvci5hcHBseShkYXRhKTtcbiAgICB9XG4gICAgcmV0dXJuIHN1Y2Nlc3MoZGF0YSk7XG4gIH07XG5cbiAgdmFyIGVycm9ySW50ZXJjZXB0b3IgPSBmdW5jdGlvbihkYXRhKSB7XG4gICAgaWYob3B0cyAmJiBvcHRzLnJlc3BvbnNlSW50ZXJjZXB0b3IpIHtcbiAgICAgIGRhdGEgPSBvcHRzLnJlc3BvbnNlSW50ZXJjZXB0b3IuYXBwbHkoZGF0YSk7XG4gICAgfVxuICAgIGVycm9yKGRhdGEpO1xuICB9O1xuXG4gIG9iai5vbi5lcnJvciA9IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICBlcnJvckludGVyY2VwdG9yKGRhdGEpO1xuICB9O1xuXG4gIG9iai5vbi5yZXNwb25zZSA9IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICByZXNwb25zZUludGVyY2VwdG9yKGRhdGEpO1xuICB9O1xuXG4gIGlmIChfLmlzT2JqZWN0KG9iaikgJiYgXy5pc09iamVjdChvYmouYm9keSkpIHtcbiAgICAvLyBzcGVjaWFsIHByb2Nlc3NpbmcgZm9yIGZpbGUgdXBsb2FkcyB2aWEganF1ZXJ5XG4gICAgaWYgKG9iai5ib2R5LnR5cGUgJiYgb2JqLmJvZHkudHlwZSA9PT0gJ2Zvcm1EYXRhJyl7XG4gICAgICBpZihvcHRzLnVzZUpRdWVyeSkge1xuICAgICAgICBvYmouY29udGVudFR5cGUgPSBmYWxzZTtcbiAgICAgICAgb2JqLnByb2Nlc3NEYXRhID0gZmFsc2U7XG4gICAgICAgIGRlbGV0ZSBvYmouaGVhZGVyc1snQ29udGVudC1UeXBlJ107XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgb2JqID0gcmVxdWVzdEludGVyY2VwdG9yKG9iaikgfHwgb2JqO1xuICBpZiAob2JqLmJlZm9yZVNlbmQpIHtcbiAgICBvYmouYmVmb3JlU2VuZChmdW5jdGlvbihfb2JqKSB7XG4gICAgICBjbGllbnQuZXhlY3V0ZShfb2JqIHx8IG9iaik7XG4gICAgfSk7XG4gIH0gZWxzZSB7XG4gICAgY2xpZW50LmV4ZWN1dGUob2JqKTtcbiAgfVxuXG4gIHJldHVybiAob2JqLmRlZmVycmVkKSA/IG9iai5kZWZlcnJlZC5wcm9taXNlIDogb2JqO1xufTtcblxuU3dhZ2dlckh0dHAucHJvdG90eXBlLmlzSW50ZXJuZXRFeHBsb3JlciA9IGZ1bmN0aW9uICgpIHtcbiAgdmFyIGRldGVjdGVkSUUgPSBmYWxzZTtcblxuICBpZiAodHlwZW9mIG5hdmlnYXRvciAhPT0gJ3VuZGVmaW5lZCcgJiYgbmF2aWdhdG9yLnVzZXJBZ2VudCkge1xuICAgIHZhciBuYXYgPSBuYXZpZ2F0b3IudXNlckFnZW50LnRvTG93ZXJDYXNlKCk7XG5cbiAgICBpZiAobmF2LmluZGV4T2YoJ21zaWUnKSAhPT0gLTEpIHtcbiAgICAgIHZhciB2ZXJzaW9uID0gcGFyc2VJbnQobmF2LnNwbGl0KCdtc2llJylbMV0pO1xuXG4gICAgICBpZiAodmVyc2lvbiA8PSA4KSB7XG4gICAgICAgIGRldGVjdGVkSUUgPSB0cnVlO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBkZXRlY3RlZElFO1xufTtcblxuSlF1ZXJ5SHR0cENsaWVudC5wcm90b3R5cGUuZXhlY3V0ZSA9IGZ1bmN0aW9uIChvYmopIHtcbiAgdmFyIGpxID0gdGhpcy5qUXVlcnkgfHwgKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnICYmIHdpbmRvdy5qUXVlcnkpO1xuICB2YXIgY2IgPSBvYmoub247XG4gIHZhciByZXF1ZXN0ID0gb2JqO1xuXG4gIGlmKHR5cGVvZiBqcSA9PT0gJ3VuZGVmaW5lZCcgfHwganEgPT09IGZhbHNlKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdVbnN1cHBvcnRlZCBjb25maWd1cmF0aW9uISBKUXVlcnkgaXMgcmVxdWlyZWQgYnV0IG5vdCBhdmFpbGFibGUnKTtcbiAgfVxuXG4gIG9iai50eXBlID0gb2JqLm1ldGhvZDtcbiAgb2JqLmNhY2hlID0gb2JqLmpxdWVyeUFqYXhDYWNoZTtcbiAgb2JqLmRhdGEgPSBvYmouYm9keTtcbiAgZGVsZXRlIG9iai5qcXVlcnlBamF4Q2FjaGU7XG4gIGRlbGV0ZSBvYmoudXNlSlF1ZXJ5O1xuICBkZWxldGUgb2JqLmJvZHk7XG5cbiAgb2JqLmNvbXBsZXRlID0gZnVuY3Rpb24gKHJlc3BvbnNlKSB7XG4gICAgdmFyIGhlYWRlcnMgPSB7fTtcbiAgICB2YXIgaGVhZGVyQXJyYXkgPSByZXNwb25zZS5nZXRBbGxSZXNwb25zZUhlYWRlcnMoKS5zcGxpdCgnXFxuJyk7XG5cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGhlYWRlckFycmF5Lmxlbmd0aDsgaSsrKSB7XG4gICAgICB2YXIgdG9TcGxpdCA9IGhlYWRlckFycmF5W2ldLnRyaW0oKTtcblxuICAgICAgaWYgKHRvU3BsaXQubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIGNvbnRpbnVlO1xuICAgICAgfVxuXG4gICAgICB2YXIgc2VwYXJhdG9yID0gdG9TcGxpdC5pbmRleE9mKCc6Jyk7XG5cbiAgICAgIGlmIChzZXBhcmF0b3IgPT09IC0xKSB7XG4gICAgICAgIC8vIE5hbWUgYnV0IG5vIHZhbHVlIGluIHRoZSBoZWFkZXJcbiAgICAgICAgaGVhZGVyc1t0b1NwbGl0XSA9IG51bGw7XG5cbiAgICAgICAgY29udGludWU7XG4gICAgICB9XG5cbiAgICAgIHZhciBuYW1lID0gdG9TcGxpdC5zdWJzdHJpbmcoMCwgc2VwYXJhdG9yKS50cmltKCk7XG4gICAgICB2YXIgdmFsdWUgPSB0b1NwbGl0LnN1YnN0cmluZyhzZXBhcmF0b3IgKyAxKS50cmltKCk7XG5cbiAgICAgIGhlYWRlcnNbbmFtZV0gPSB2YWx1ZTtcbiAgICB9XG5cbiAgICB2YXIgb3V0ID0ge1xuICAgICAgdXJsOiByZXF1ZXN0LnVybCxcbiAgICAgIG1ldGhvZDogcmVxdWVzdC5tZXRob2QsXG4gICAgICBzdGF0dXM6IHJlc3BvbnNlLnN0YXR1cyxcbiAgICAgIHN0YXR1c1RleHQ6IHJlc3BvbnNlLnN0YXR1c1RleHQsXG4gICAgICBkYXRhOiByZXNwb25zZS5yZXNwb25zZVRleHQsXG4gICAgICBoZWFkZXJzOiBoZWFkZXJzXG4gICAgfTtcblxuICAgIHRyeSB7XG4gICAgICB2YXIgcG9zc2libGVPYmogPSAgcmVzcG9uc2UucmVzcG9uc2VKU09OIHx8IGpzeWFtbC5zYWZlTG9hZChyZXNwb25zZS5yZXNwb25zZVRleHQpO1xuICAgICAgb3V0Lm9iaiA9ICh0eXBlb2YgcG9zc2libGVPYmogPT09ICdzdHJpbmcnKSA/IHt9IDogcG9zc2libGVPYmo7XG4gICAgfSBjYXRjaCAoZXgpIHtcbiAgICAgIC8vIGRvIG5vdCBzZXQgb3V0Lm9ialxuICAgICAgaGVscGVycy5sb2coJ3VuYWJsZSB0byBwYXJzZSBKU09OL1lBTUwgY29udGVudCcpO1xuICAgIH1cblxuICAgIC8vIEkgY2FuIHRocm93LCBvciBwYXJzZSBudWxsP1xuICAgIG91dC5vYmogPSBvdXQub2JqIHx8IG51bGw7XG5cbiAgICBpZiAocmVzcG9uc2Uuc3RhdHVzID49IDIwMCAmJiByZXNwb25zZS5zdGF0dXMgPCAzMDApIHtcbiAgICAgIGNiLnJlc3BvbnNlKG91dCk7XG4gICAgfSBlbHNlIGlmIChyZXNwb25zZS5zdGF0dXMgPT09IDAgfHwgKHJlc3BvbnNlLnN0YXR1cyA+PSA0MDAgJiYgcmVzcG9uc2Uuc3RhdHVzIDwgNTk5KSkge1xuICAgICAgY2IuZXJyb3Iob3V0KTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGNiLnJlc3BvbnNlKG91dCk7XG4gICAgfVxuICB9O1xuXG4gIGpxLnN1cHBvcnQuY29ycyA9IHRydWU7XG5cbiAgcmV0dXJuIGpxLmFqYXgob2JqKTtcbn07XG5cblN1cGVyYWdlbnRIdHRwQ2xpZW50LnByb3RvdHlwZS5leGVjdXRlID0gZnVuY3Rpb24gKG9iaikge1xuICB2YXIgbWV0aG9kID0gb2JqLm1ldGhvZC50b0xvd2VyQ2FzZSgpO1xuICB2YXIgdGltZW91dCA9IG9iai50aW1lb3V0O1xuXG4gIGlmIChtZXRob2QgPT09ICdkZWxldGUnKSB7XG4gICAgbWV0aG9kID0gJ2RlbCc7XG4gIH1cbiAgdmFyIGhlYWRlcnMgPSBvYmouaGVhZGVycyB8fCB7fTtcbiAgdmFyIHIgPSByZXF1ZXN0W21ldGhvZF0ob2JqLnVybCk7XG5cbiAgaWYgKHRpbWVvdXQpIHtcbiAgICByLnRpbWVvdXQodGltZW91dCk7XG4gIH1cblxuICBpZiAob2JqLmVuYWJsZUNvb2tpZXMpIHtcbiAgICByLndpdGhDcmVkZW50aWFscygpO1xuICB9XG5cbiAgdmFyIGFjY2VwdCA9IG9iai5oZWFkZXJzLkFjY2VwdDtcblxuICBpZih0aGlzLmJpbmFyeVJlcXVlc3QoYWNjZXB0KSkge1xuICAgIHIub24oJ3JlcXVlc3QnLCBmdW5jdGlvbiAoKSB7XG4gICAgICBpZih0aGlzLnhocikge1xuICAgICAgICB0aGlzLnhoci5yZXNwb25zZVR5cGUgPSAnYmxvYic7XG4gICAgICB9XG4gICAgfSk7XG4gIH1cblxuICBpZihvYmouYm9keSkge1xuICAgIGlmKF8uaXNPYmplY3Qob2JqLmJvZHkpKSB7XG4gICAgICB2YXIgY29udGVudFR5cGUgPSBvYmouaGVhZGVyc1snQ29udGVudC1UeXBlJ10gfHwgJyc7XG4gICAgICBpZiAoY29udGVudFR5cGUuaW5kZXhPZignbXVsdGlwYXJ0L2Zvcm0tZGF0YScpID09PSAwKSB7XG4gICAgICAgIGRlbGV0ZSBoZWFkZXJzWydDb250ZW50LVR5cGUnXTtcbiAgICAgICAgaWYoe30udG9TdHJpbmcuYXBwbHkob2JqLmJvZHkpID09PSAnW29iamVjdCBGb3JtRGF0YV0nKSB7XG4gICAgICAgICAgdmFyIGl0ciA9IG9iai5ib2R5LmtleXMoKTtcbiAgICAgICAgICB2YXIgcCA9IFtdO1xuICAgICAgICAgIHdoaWxlKHRydWUpIHtcbiAgICAgICAgICAgIHZhciB2ID0gaXRyLm5leHQoKTtcbiAgICAgICAgICAgIGlmKHYuZG9uZSkge1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBrZXkgPSB2LnZhbHVlO1xuICAgICAgICAgICAgLy8gb25seSBvbmNlXG4gICAgICAgICAgICBpZihwLmluZGV4T2Yoa2V5KSA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgcC5wdXNoKGtleSk7XG4gICAgICAgICAgICAgIHZhciB2YWx1ZSA9IG9iai5ib2R5LmdldEFsbChrZXkpO1xuICAgICAgICAgICAgICBpZih7fS50b1N0cmluZy5hcHBseSh2YWx1ZSkgPT09ICdbb2JqZWN0IEZpbGVdJykge1xuICAgICAgICAgICAgICAgIHIuYXR0YWNoKGtleSwgdmFsdWUpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgZm9yICh2YXIgdCBpbiB2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICByLmZpZWxkKGtleSwgdmFsdWVbdF0pO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIHIuZmllbGQoa2V5LCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIHZhciBrZXluYW1lLCB2YWx1ZSwgdjtcbiAgICAgICAgICBmb3IgKGtleW5hbWUgaW4gb2JqLmJvZHkpIHtcbiAgICAgICAgICAgIHZhbHVlID0gb2JqLmJvZHlba2V5bmFtZV07XG4gICAgICAgICAgICBpZihBcnJheS5pc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgICAgICBmb3IodiBpbiB2YWx1ZSkge1xuICAgICAgICAgICAgICAgIHIuZmllbGQoa2V5bmFtZSwgdik7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICByLmZpZWxkKGtleW5hbWUsIHZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2UgaWYgKF8uaXNPYmplY3Qob2JqLmJvZHkpKSB7XG4gICAgICAgIG9iai5ib2R5ID0gSlNPTi5zdHJpbmdpZnkob2JqLmJvZHkpO1xuICAgICAgICByLnNlbmQob2JqLmJvZHkpO1xuICAgICAgfVxuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIHIuc2VuZChvYmouYm9keSk7XG4gICAgfVxuICB9XG5cbiAgdmFyIG5hbWU7XG4gIGZvciAobmFtZSBpbiBoZWFkZXJzKSB7XG4gICAgci5zZXQobmFtZSwgaGVhZGVyc1tuYW1lXSk7XG4gIH1cblxuICBpZih0eXBlb2Ygci5idWZmZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICByLmJ1ZmZlcigpOyAvLyBmb3JjZSBzdXBlcmFnZW50IHRvIHBvcHVsYXRlIHJlcy50ZXh0IHdpdGggdGhlIHJhdyByZXNwb25zZSBkYXRhXG4gIH1cblxuICByLmVuZChmdW5jdGlvbiAoZXJyLCByZXMpIHtcbiAgICByZXMgPSByZXMgfHwge1xuICAgICAgc3RhdHVzOiAwLFxuICAgICAgaGVhZGVyczoge2Vycm9yOiAnbm8gcmVzcG9uc2UgZnJvbSBzZXJ2ZXInfVxuICAgIH07XG4gICAgdmFyIHJlc3BvbnNlID0ge1xuICAgICAgdXJsOiBvYmoudXJsLFxuICAgICAgbWV0aG9kOiBvYmoubWV0aG9kLFxuICAgICAgaGVhZGVyczogcmVzLmhlYWRlcnNcbiAgICB9O1xuICAgIHZhciBjYjtcblxuICAgIGlmICghZXJyICYmIHJlcy5lcnJvcikge1xuICAgICAgZXJyID0gcmVzLmVycm9yO1xuICAgIH1cblxuICAgIGlmIChlcnIgJiYgb2JqLm9uICYmIG9iai5vbi5lcnJvcikge1xuICAgICAgcmVzcG9uc2UuZXJyT2JqID0gZXJyO1xuICAgICAgcmVzcG9uc2Uuc3RhdHVzID0gcmVzID8gcmVzLnN0YXR1cyA6IDUwMDtcbiAgICAgIHJlc3BvbnNlLnN0YXR1c1RleHQgPSByZXMgPyByZXMudGV4dCA6IGVyci5tZXNzYWdlO1xuICAgICAgaWYgKHJlcy5oZWFkZXJzICYmIHJlcy5oZWFkZXJzWydjb250ZW50LXR5cGUnXSkge1xuICAgICAgICBpZiAocmVzLmhlYWRlcnNbJ2NvbnRlbnQtdHlwZSddLmluZGV4T2YoJ2FwcGxpY2F0aW9uL2pzb24nKSA+PSAwKSB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJlc3BvbnNlLm9iaiA9IEpTT04ucGFyc2UocmVzcG9uc2Uuc3RhdHVzVGV4dCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICByZXNwb25zZS5vYmogPSBudWxsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgY2IgPSBvYmoub24uZXJyb3I7XG4gICAgfSBlbHNlIGlmIChyZXMgJiYgb2JqLm9uICYmIG9iai5vbi5yZXNwb25zZSkge1xuICAgICAgdmFyIHBvc3NpYmxlT2JqO1xuXG4gICAgICAvLyBBbHJlYWR5IHBhcnNlZCBieSBieSBzdXBlcmFnZW50P1xuICAgICAgaWYgKHJlcy5ib2R5ICYmIF8ua2V5cyhyZXMuYm9keSkubGVuZ3RoID4gMCkge1xuICAgICAgICBwb3NzaWJsZU9iaiA9IHJlcy5ib2R5O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBwb3NzaWJsZU9iaiA9IGpzeWFtbC5zYWZlTG9hZChyZXMudGV4dCk7XG4gICAgICAgICAgLy8gY2FuIHBhcnNlIGludG8gYSBzdHJpbmcuLi4gd2hpY2ggd2UgZG9uJ3QgbmVlZCBydW5uaW5nIGFyb3VuZCBpbiB0aGUgc3lzdGVtXG4gICAgICAgICAgcG9zc2libGVPYmogPSAodHlwZW9mIHBvc3NpYmxlT2JqID09PSAnc3RyaW5nJykgPyBudWxsIDogcG9zc2libGVPYmo7XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBoZWxwZXJzLmxvZygnY2Fubm90IHBhcnNlIEpTT04vWUFNTCBjb250ZW50Jyk7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgLy8gbnVsbCBtZWFucyB3ZSBjYW4ndCBwYXJzZSBpbnRvIG9iamVjdFxuICAgICAgaWYodHlwZW9mIEJ1ZmZlciA9PT0gJ2Z1bmN0aW9uJyAmJiBCdWZmZXIuaXNCdWZmZXIocG9zc2libGVPYmopKSB7XG4gICAgICAgIHJlc3BvbnNlLmRhdGEgPSBwb3NzaWJsZU9iajtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICByZXNwb25zZS5vYmogPSAodHlwZW9mIHBvc3NpYmxlT2JqID09PSAnb2JqZWN0JykgPyBwb3NzaWJsZU9iaiA6IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHJlc3BvbnNlLnN0YXR1cyA9IHJlcy5zdGF0dXM7XG4gICAgICByZXNwb25zZS5zdGF0dXNUZXh0ID0gcmVzLnRleHQ7XG4gICAgICBjYiA9IG9iai5vbi5yZXNwb25zZTtcbiAgICB9XG4gICAgaWYgKHJlcy54aHIgJiYgcmVzLnhoci5yZXNwb25zZSkge1xuICAgICAgcmVzcG9uc2UuZGF0YSA9IHJlcy54aHIucmVzcG9uc2U7XG4gICAgfVxuICAgIGVsc2UgaWYoIXJlc3BvbnNlLmRhdGEpIHtcbiAgICAgIHJlc3BvbnNlLmRhdGEgPSByZXNwb25zZS5zdGF0dXNUZXh0O1xuICAgIH1cblxuICAgIGlmIChjYikge1xuICAgICAgY2IocmVzcG9uc2UpO1xuICAgIH1cbiAgfSk7XG59O1xuXG5TdXBlcmFnZW50SHR0cENsaWVudC5wcm90b3R5cGUuIGJpbmFyeVJlcXVlc3QgPSBmdW5jdGlvbiAoYWNjZXB0KSB7XG4gIGlmKCFhY2NlcHQpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cbiAgcmV0dXJuICgvXmltYWdlL2kpLnRlc3QoYWNjZXB0KSB8fCAoL15hcHBsaWNhdGlvblxcL3BkZi8pLnRlc3QoYWNjZXB0KTtcbn07XG4iXX0= +},{"./helpers":4,"buffer":14,"js-yaml":19,"lodash-compat/lang/isObject":144,"lodash-compat/object/keys":149,"superagent":158}],6:[function(require,module,exports){ +'use strict'; + +var SwaggerHttp = require('./http'); +var _ = { + isObject: require('lodash-compat/lang/isObject'), + cloneDeep: require('lodash-compat/lang/cloneDeep'), + isArray: require('lodash-compat/lang/isArray'), + isString: require('lodash-compat/lang/isString') +}; + + +/** + * Resolves a spec's remote references + */ +var Resolver = module.exports = function () { + this.failedUrls = []; + this.resolverCache = {}; + this.pendingUrls = {}; +}; + +Resolver.prototype.processAllOf = function(root, name, definition, resolutionTable, unresolvedRefs, spec) { + var i, location, property; + + definition['x-resolved-from'] = [ '#/definitions/' + name ]; + var allOf = definition.allOf; + // the refs go first + allOf.sort(function(a, b) { + if(a.$ref && b.$ref) { return 0; } + else if(a.$ref) { return -1; } + else { return 1; } + }); + for (i = 0; i < allOf.length; i++) { + property = allOf[i]; + location = '/definitions/' + name + '/allOf'; + this.resolveInline(root, spec, property, resolutionTable, unresolvedRefs, location); + } +}; + +Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { + this.spec = spec; + var root = arg1, callback = arg2, scope = arg3, opts = {}, location, i; + if(typeof arg1 === 'function') { + root = null; + callback = arg1; + scope = arg2; + } + var _root = root; + this.scope = (scope || this); + this.iteration = this.iteration || 0; + + if(this.scope.options && this.scope.options.requestInterceptor){ + opts.requestInterceptor = this.scope.options.requestInterceptor; + } + + if(this.scope.options && this.scope.options.responseInterceptor){ + opts.responseInterceptor = this.scope.options.responseInterceptor; + } + + var name, path, property, propertyName; + var processedCalls = 0, resolvedRefs = {}, unresolvedRefs = {}; + var resolutionTable = []; // store objects for dereferencing + + spec.definitions = spec.definitions || {}; + // definitions + for (name in spec.definitions) { + var definition = spec.definitions[name]; + if(definition['$ref']) { + this.resolveInline(root, spec, definition, resolutionTable, unresolvedRefs, definition); + } + else { + for (propertyName in definition.properties) { + property = definition.properties[propertyName]; + if (_.isArray(property.allOf)) { + this.processAllOf(root, name, property, resolutionTable, unresolvedRefs, spec); + } + else { + this.resolveTo(root, property, resolutionTable, '/definitions'); + } + } + + if (definition.allOf) { + this.processAllOf(root, name, definition, resolutionTable, unresolvedRefs, spec); + } + } + } + + // shared parameters + spec.parameters = spec.parameters || {}; + for(name in spec.parameters) { + var parameter = spec.parameters[name]; + if (parameter.in === 'body' && parameter.schema) { + if(_.isArray(parameter.schema.allOf)) { + // move to a definition + var modelName = 'inline_model'; + var name = modelName; + var done = false; var counter = 0; + while(!done) { + if(typeof spec.definitions[name] === 'undefined') { + done = true; + break; + } + name = modelName + '_' + counter; + counter ++; + } + spec.definitions[name] = { allOf: parameter.schema.allOf }; + delete parameter.schema.allOf; + parameter.schema.$ref = '#/definitions/' + name; + this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec); + } + else { + this.resolveTo(root, parameter.schema, resolutionTable, location); + } + } + + if (parameter.$ref) { + // parameter reference + this.resolveInline(root, spec, parameter, resolutionTable, unresolvedRefs, parameter.$ref); + } + } + + // operations + for (name in spec.paths) { + var method, operation, responseCode; + path = spec.paths[name]; + + for (method in path) { + // operation reference + if(method === '$ref') { + // location = path[method]; + location = '/paths' + name; + this.resolveInline(root, spec, path, resolutionTable, unresolvedRefs, location); + } + else { + operation = path[method]; + var sharedParameters = path.parameters || []; + var parameters = operation.parameters || []; + + for (i in sharedParameters) { + var parameter = sharedParameters[i]; + parameters.unshift(parameter); + } + if(method !== 'parameters' && _.isObject(operation)) { + operation.parameters = operation.parameters || parameters; + } + + for (i in parameters) { + var parameter = parameters[i]; + location = '/paths' + name + '/' + method + '/parameters'; + + if (parameter.in === 'body' && parameter.schema) { + if(_.isArray(parameter.schema.allOf)) { + // move to a definition + var modelName = 'inline_model'; + var name = modelName; + var done = false; var counter = 0; + while(!done) { + if(typeof spec.definitions[name] === 'undefined') { + done = true; + break; + } + name = modelName + '_' + counter; + counter ++; + } + spec.definitions[name] = { allOf: parameter.schema.allOf }; + delete parameter.schema.allOf; + parameter.schema.$ref = '#/definitions/' + name; + this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec); + } + else { + this.resolveTo(root, parameter.schema, resolutionTable, location); + } + } + + if (parameter.$ref) { + // parameter reference + this.resolveInline(root, spec, parameter, resolutionTable, unresolvedRefs, parameter.$ref); + } + } + + for (responseCode in operation.responses) { + var response = operation.responses[responseCode]; + location = '/paths' + name + '/' + method + '/responses/' + responseCode; + + if(_.isObject(response)) { + if(response.$ref) { + // response reference + this.resolveInline(root, spec, response, resolutionTable, unresolvedRefs, location); + } + if (response.schema) { + var responseObj = response; + if(_.isArray(responseObj.schema.allOf)) { + // move to a definition + var modelName = 'inline_model'; + var name = modelName; + var done = false; var counter = 0; + while(!done) { + if(typeof spec.definitions[name] === 'undefined') { + done = true; + break; + } + name = modelName + '_' + counter; + counter ++; + } + spec.definitions[name] = { allOf: responseObj.schema.allOf }; + delete responseObj.schema.allOf; + delete responseObj.schema.type; + responseObj.schema.$ref = '#/definitions/' + name; + this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec); + } + else if('array' === responseObj.schema.type) { + if(responseObj.schema.items && responseObj.schema.items.$ref) { + // response reference + this.resolveInline(root, spec, responseObj.schema.items, resolutionTable, unresolvedRefs, location); + } + } + else { + this.resolveTo(root, response.schema, resolutionTable, location); + } + } + } + } + } + } + // clear them out to avoid multiple resolutions + path.parameters = []; + } + + var expectedCalls = 0, toResolve = []; + // if the root is same as obj[i].root we can resolve locally + var all = resolutionTable; + + var parts; + for(i = 0; i < all.length; i++) { + var a = all[i]; + if(root === a.root) { + if(a.resolveAs === 'ref') { + // resolve any path walking + var joined = ((a.root || '') + '/' + a.key).split('/'); + var normalized = []; + var url = ''; + var k; + + if(a.key.indexOf('../') >= 0) { + for(var j = 0; j < joined.length; j++) { + if(joined[j] === '..') { + normalized = normalized.slice(0, normalized.length-1); + } + else { + normalized.push(joined[j]); + } + } + for(k = 0; k < normalized.length; k ++) { + if(k > 0) { + url += '/'; + } + url += normalized[k]; + } + // we now have to remote resolve this because the path has changed + a.root = url; + toResolve.push(a); + } + else { + parts = a.key.split('#'); + if(parts.length === 2) { + if(parts[0].indexOf('http:') === 0 || parts[0].indexOf('https:') === 0) { + a.root = parts[0]; + } + location = parts[1].split('/'); + var r; + var s = spec; + for(k = 0; k < location.length; k++) { + var part = location[k]; + if(part !== '') { + s = s[part]; + if(typeof s !== 'undefined') { + r = s; + } + else { + r = null; + break; + } + } + } + if(r === null) { + // must resolve this too + toResolve.push(a); + } + } + } + } + else { + if (a.resolveAs === 'inline') { + if(a.key && a.key.indexOf('#') === -1 && a.key.charAt(0) !== '/') { + // handle relative schema + parts = a.root.split('/'); + location = ''; + for(i = 0; i < parts.length - 1; i++) { + location += parts[i] + '/'; + } + location += a.key; + a.root = location; + a.location = ''; + } + toResolve.push(a); + } + } + } + else { + toResolve.push(a); + } + } + expectedCalls = toResolve.length; + + // resolve anything that is local + + var lock = {}; + for(var ii = 0; ii < toResolve.length; ii++) { + (function(item, spec, self, lock, ii) { + if(!item.root || item.root === root) { + // local resolve + self.resolveItem(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, item); + processedCalls += 1; + + if(processedCalls === expectedCalls) { + self.finish(spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback, true); + } + } + else if(self.failedUrls.indexOf(item.root) === -1) { + var obj = { + useJQuery: false, // TODO + url: item.root, + method: 'get', + headers: { + accept: self.scope.swaggerRequestHeaders || 'application/json' + }, + on: { + error: function (error) { + processedCalls += 1; + console.log('failed url: ' + obj.url); + self.failedUrls.push(obj.url); + if (lock) { + delete lock[item.root]; + } + unresolvedRefs[item.key] = { + root: item.root, + location: item.location + }; + + if (processedCalls === expectedCalls) { + self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); + } + }, // jshint ignore:line + response: function (response) { + var swagger = response.obj; + if (lock) { + delete lock[item.root]; + } + if (self.resolverCache) { + self.resolverCache[item.root] = swagger; + } + self.resolveItem(swagger, item.root, resolutionTable, resolvedRefs, unresolvedRefs, item); + processedCalls += 1; + + if (processedCalls === expectedCalls) { + self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); + } + } + } // jshint ignore:line + }; + + // apply timeout only when specified + if (scope && scope.fetchSpecTimeout) { + obj.timeout = scope.fetchSpecTimeout; + } + + if (scope && scope.clientAuthorizations) { + scope.clientAuthorizations.apply(obj); + } + + (function waitForUnlock() { + setTimeout(function() { + if (lock[obj.url]) { + waitForUnlock(); + } + else { + var cached = self.resolverCache[obj.url]; + if (_.isObject(cached)) { + obj.on.response({obj: cached}), 1; + } + else { + lock[obj.url] = true; + new SwaggerHttp().execute(obj, opts); + } + } + }, 0); + })(); + } + + else { + processedCalls += 1; + unresolvedRefs[item.key] = { + root: item.root, + location: item.location + }; + if (processedCalls === expectedCalls) { + self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); + } + } + }(toResolve[ii], spec, this, lock, ii)); + } + + if (Object.keys(toResolve).length === 0) { + this.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); + } +}; + +Resolver.prototype.resolveItem = function(spec, root, resolutionTable, resolvedRefs, unresolvedRefs, item) { + var path = item.location; + var location = spec, parts = path.split('/'); + if(path !== '') { + for (var j = 0; j < parts.length; j++) { + var segment = parts[j]; + if (segment.indexOf('~1') !== -1) { + segment = parts[j].replace(/~0/g, '~').replace(/~1/g, '/'); + if (segment.charAt(0) !== '/') { + segment = '/' + segment; + } + } + if (typeof location === 'undefined' || location === null) { + break; + } + if (segment === '' && j === (parts.length - 1) && parts.length > 1) { + location = null; + break; + } + if (segment.length > 0) { + location = location[segment]; + } + } + } + var resolved = item.key; + parts = item.key.split('/'); + var resolvedName = parts[parts.length-1]; + + if(resolvedName.indexOf('#') >= 0) { + resolvedName = resolvedName.split('#')[1]; + } + + if (location !== null && typeof location !== 'undefined') { + resolvedRefs[resolved] = { + name: resolvedName, + obj: location, + key: item.key, + root: item.root + }; + } else { + unresolvedRefs[resolved] = { + root: item.root, + location: item.location + }; + } +}; + +Resolver.prototype.finish = function (spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback, localResolve) { + // walk resolution table and replace with resolved refs + var ref; + for (ref in resolutionTable) { + var item = resolutionTable[ref]; + + var key = item.key; + var resolvedTo = resolvedRefs[key]; + if (resolvedTo) { + spec.definitions = spec.definitions || {}; + if (item.resolveAs === 'ref') { + if (localResolve !== true) { + // don't retain root for local definitions + for (key in resolvedTo.obj) { + var abs = this.retainRoot(key, resolvedTo.obj[key], item.root); + resolvedTo.obj[key] = abs; + } + } + spec.definitions[resolvedTo.name] = resolvedTo.obj; + item.obj.$ref = '#/definitions/' + resolvedTo.name; + } else if (item.resolveAs === 'inline') { + var targetObj = item.obj; + targetObj['x-resolved-from'] = [ item.key ]; + delete targetObj.$ref; + + for (key in resolvedTo.obj) { + var abs = resolvedTo.obj[key]; + + if (localResolve !== true) { + // don't retain root for local definitions + abs = this.retainRoot(key, resolvedTo.obj[key], item.root); + } + targetObj[key] = abs; + } + } + } + } + var existingUnresolved = this.countUnresolvedRefs(spec); + + if(existingUnresolved === 0 || this.iteration > 5) { + this.resolveAllOf(spec.definitions); + this.resolverCache = null; + callback.call(this.scope, spec, unresolvedRefs); + } + else { + this.iteration += 1; + this.resolve(spec, root, callback, this.scope); + } +}; + +Resolver.prototype.countUnresolvedRefs = function(spec) { + var i; + var refs = this.getRefs(spec); + var keys = []; + var unresolvedKeys = []; + for(i in refs) { + if(i.indexOf('#') === 0) { + keys.push(i.substring(1)); + } + else { + unresolvedKeys.push(i); + } + } + + // verify possible keys + for (i = 0; i < keys.length; i++) { + var part = keys[i]; + var parts = part.split('/'); + var obj = spec; + + for (var k = 0; k < parts.length; k++) { + var key = parts[k]; + if(key !== '') { + obj = obj[key]; + if(typeof obj === 'undefined') { + unresolvedKeys.push(part); + break; + } + } + } + } + return unresolvedKeys.length; +}; + +Resolver.prototype.getRefs = function(spec, obj) { + obj = obj || spec; + var output = {}; + for(var key in obj) { + if (!obj.hasOwnProperty(key)) { + continue; + } + var item = obj[key]; + if(key === '$ref' && typeof item === 'string') { + output[item] = null; + } + else if(_.isObject(item)) { + var o = this.getRefs(item); + for(var k in o) { + output[k] = null; + } + } + } + return output; +}; + +function splitUrl(url) { + var result = {}; + var proto = /[a-z]+:\/\//i.exec(url); + if (proto) { + result.proto = proto[0].slice(0, -3); + url = url.slice(result.proto.length + 1); + } + if (url.slice(0, 2) === '//') { + result.domain = url.slice(2).split('/')[0]; + url = url.slice(2 + result.domain.length); + } + var p = url.split('#'); + if (p[0].length) { + result.path = p[0]; + } + if (p.length > 1) { + result.fragment = p.slice(1).join('#'); + } + return result; +} + +function unsplitUrl(url) { + var result = url.path; + if (result === undefined) { + result = ''; + } + if (url.fragment !== undefined) { + result += '#' + url.fragment; + } + if (url.domain !== undefined) { + if (result.slice(0, 1) === '/') { + result = result.slice(1); + } + result = '//' + url.domain + '/' + result; + if (url.proto !== undefined) { + result = url.proto + ':' + result; + } + } + return result; +} + +function joinUrl(base, rel) { + var relsp = splitUrl(rel); + if (relsp.domain !== undefined) { + return rel; + } + var result = splitUrl(base); + if (relsp.path === undefined) { + // change only fragment part + result.fragment = relsp.fragment; + } else if (relsp.path.slice(0, 1) === '/') { + // relative to domain + result.path = relsp.path; + result.fragment = relsp.fragment; + } else { + // relative to path + var path = result.path === undefined ? [] : result.path.split('/'); + var relpath = relsp.path.split('/'); + if (path.length) { + path.pop(); + } + while (relpath[0] === '..' || relpath[0] === '.') { + if (relpath[0] === '..') { + path.pop(); + } + relpath.shift(); + } + result.path = path.concat(relpath).join('/'); + result.fragment = relsp.fragment; + } + return unsplitUrl(result); +} + +Resolver.prototype.retainRoot = function(origKey, obj, root) { + // walk object and look for relative $refs + if(_.isObject(obj)) { + for(var key in obj) { + var item = obj[key]; + if (key === '$ref' && typeof item === 'string') { + obj[key] = joinUrl(root, item); + } + else if (_.isObject(item)) { + this.retainRoot(key, item, root); + } + } + } + else if(_.isString(obj) && origKey === '$ref') { + obj = joinUrl(root, obj); + } + return obj; +}; + +/** + * immediately in-lines local refs, queues remote refs + * for inline resolution + */ +Resolver.prototype.resolveInline = function (root, spec, property, resolutionTable, unresolvedRefs, location) { + var key = property.$ref, ref = property.$ref, i, p, p2, rs; + var rootTrimmed = false; + + root = root || '' // Guard against .split. @fehguy, you'll need to check if this logic fits + // More imporantly is how do we gracefully handle relative urls, when provided just a 'spec', not a 'url' ? + + if (ref) { + if(ref.indexOf('../') === 0) { + // reset root + p = ref.split('../'); + p2 = root.split('/'); + ref = ''; + for(i = 0; i < p.length; i++) { + if(p[i] === '') { + p2 = p2.slice(0, p2.length-1); + } + else { + ref += p[i]; + } + } + root = ''; + for(i = 0; i < p2.length - 1; i++) { + if(i > 0) { root += '/'; } + root += p2[i]; + } + rootTrimmed = true; + } + if(ref.indexOf('#') >= 0) { + if(ref.indexOf('/') === 0) { + rs = ref.split('#'); + p = root.split('//'); + p2 = p[1].split('/'); + root = p[0] + '//' + p2[0] + rs[0]; + location = rs[1]; + } + else { + rs = ref.split('#'); + if(rs[0] !== '') { + p2 = root.split('/'); + p2 = p2.slice(0, p2.length - 1); + if(!rootTrimmed) { + root = ''; + for (var k = 0; k < p2.length; k++) { + if(k > 0) { root += '/'; } + root += p2[k]; + } + } + root += '/' + ref.split('#')[0]; + } + location = rs[1]; + } + } + if (ref.indexOf('http:') === 0 || ref.indexOf('https:') === 0) { + if(ref.indexOf('#') >= 0) { + root = ref.split('#')[0]; + location = ref.split('#')[1]; + } + else { + root = ref; + location = ''; + } + resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); + } else if (ref.indexOf('#') === 0) { + location = ref.split('#')[1]; + resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); + } else if (ref.indexOf('/') === 0 && ref.indexOf('#') === -1) { + location = ref; + var matches = root.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i); + if(matches) { + root = matches[0] + ref.substring(1); + location = ''; + } + resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); + } + else { + resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); + } + } + else if (property.type === 'array') { + this.resolveTo(root, property.items, resolutionTable, location); + } +}; + +Resolver.prototype.resolveTo = function (root, property, resolutionTable, location) { + var sp, i; + var ref = property.$ref; + var lroot = root; + if ((typeof ref !== 'undefined') && (ref !== null)) { + if(ref.indexOf('#') >= 0) { + var parts = ref.split('#'); + + // #/definitions/foo + // foo.json#/bar + if(parts[0] && ref.indexOf('/') === 0) { + + } + else if(parts[0] && (parts[0].indexOf('http:') === 0 || parts[0].indexOf('https:') === 0)) { + lroot = parts[0]; + ref = parts[1]; + } + else if(parts[0] && parts[0].length > 0) { + // relative file + sp = root.split('/'); + lroot = ''; + for(i = 0; i < sp.length - 1; i++) { + lroot += sp[i] + '/'; + } + lroot += parts[0]; + } + else { + + } + + location = parts[1]; + } + else if (ref.indexOf('http:') === 0 || ref.indexOf('https:') === 0) { + lroot = ref; + location = ''; + } + else { + // relative file + sp = root.split('/'); + lroot = ''; + for(i = 0; i < sp.length - 1; i++) { + lroot += sp[i] + '/'; + } + lroot += ref; + location = ''; + } + resolutionTable.push({ + obj: property, resolveAs: 'ref', root: lroot, key: ref, location: location + }); + } else if (property.type === 'array') { + var items = property.items; + this.resolveTo(root, items, resolutionTable, location); + } else { + if(property && (property.properties || property.additionalProperties)) { + var name = this.uniqueName('inline_model'); + if (property.title) { + name = this.uniqueName(property.title); + } + delete property.title; + this.spec.definitions[name] = _.cloneDeep(property); + property['$ref'] = '#/definitions/' + name; + delete property.type; + delete property.properties; + } + } +}; + +Resolver.prototype.uniqueName = function(base) { + var name = base; + var count = 0; + while(true) { + if(!_.isObject(this.spec.definitions[name])) { + return name; + } + name = base + '_' + count; + count++; + } +}; + +Resolver.prototype.resolveAllOf = function(spec, obj, depth) { + depth = depth || 0; + obj = obj || spec; + var name; + for(var key in obj) { + if (!obj.hasOwnProperty(key)) { + continue; + } + var item = obj[key]; + if(item === null) { + throw new TypeError('Swagger 2.0 does not support null types (' + obj + '). See https://github.com/swagger-api/swagger-spec/issues/229.'); + } + if(typeof item === 'object') { + this.resolveAllOf(spec, item, depth + 1); + } + if(item && typeof item.allOf !== 'undefined') { + var allOf = item.allOf; + if(_.isArray(allOf)) { + var output = _.cloneDeep(item); + delete output.allOf; + + output['x-composed'] = true; + if (typeof item['x-resolved-from'] !== 'undefined') { + output['x-resolved-from'] = item['x-resolved-from']; + } + + for(var i = 0; i < allOf.length; i++) { + var component = allOf[i]; + var source = 'self'; + if(typeof component['x-resolved-from'] !== 'undefined') { + source = component['x-resolved-from'][0]; + } + + for(var part in component) { + if(!output.hasOwnProperty(part)) { + output[part] = _.cloneDeep(component[part]); + if(part === 'properties') { + for(name in output[part]) { + output[part][name]['x-resolved-from'] = source; + } + } + } + else { + if(part === 'properties') { + var properties = component[part]; + for(name in properties) { + output.properties[name] = _.cloneDeep(properties[name]); + var resolvedFrom = properties[name]['x-resolved-from']; + if (typeof resolvedFrom === 'undefined' || resolvedFrom === 'self') { + resolvedFrom = source; + } + output.properties[name]['x-resolved-from'] = resolvedFrom; + } + } + else if(part === 'required') { + // merge & dedup the required array + var a = output.required.concat(component[part]); + for(var k = 0; k < a.length; ++k) { + for(var j = k + 1; j < a.length; ++j) { + if(a[k] === a[j]) { a.splice(j--, 1); } + } + } + output.required = a; + } + else if(part === 'x-resolved-from') { + output['x-resolved-from'].push(source); + } + else { + // TODO: need to merge this property + // console.log('what to do with ' + part) + } + } + } + } + obj[key] = output; + } + } + } +}; + +},{"./http":5,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isString":146}],7:[function(require,module,exports){ +'use strict'; + +var Helpers = require('./helpers'); + +var _ = { + isPlainObject: require('lodash-compat/lang/isPlainObject'), + isUndefined: require('lodash-compat/lang/isUndefined'), + isArray: require('lodash-compat/lang/isArray'), + isObject: require('lodash-compat/lang/isObject'), + isEmpty: require('lodash-compat/lang/isEmpty'), + map: require('lodash-compat/collection/map'), + indexOf: require('lodash-compat/array/indexOf'), + cloneDeep: require('lodash-compat/lang/cloneDeep'), + keys: require('lodash-compat/object/keys'), + forEach: require('lodash-compat/collection/forEach') +}; + +module.exports.optionHtml = optionHtml; +module.exports.typeFromJsonSchema = typeFromJsonSchema; +module.exports.getStringSignature = getStringSignature; +module.exports.schemaToHTML = schemaToHTML; +module.exports.schemaToJSON = schemaToJSON; + +function optionHtml(label, value) { + return '' + label + ':' + value + ''; +} + +function typeFromJsonSchema(type, format) { + var str; + + if (type === 'integer' && format === 'int32') { + str = 'integer'; + } else if (type === 'integer' && format === 'int64') { + str = 'long'; + } else if (type === 'integer' && typeof format === 'undefined') { + str = 'long'; + } else if (type === 'string' && format === 'date-time') { + str = 'date-time'; + } else if (type === 'string' && format === 'date') { + str = 'date'; + } else if (type === 'number' && format === 'float') { + str = 'float'; + } else if (type === 'number' && format === 'double') { + str = 'double'; + } else if (type === 'number' && typeof format === 'undefined') { + str = 'double'; + } else if (type === 'boolean') { + str = 'boolean'; + } else if (type === 'string') { + str = 'string'; + } + + return str; +} + +function getStringSignature(obj, baseComponent) { + var str = ''; + + if (typeof obj.$ref !== 'undefined') { + str += Helpers.simpleRef(obj.$ref); + } else if (typeof obj.type === 'undefined') { + str += 'object'; + } else if (obj.type === 'array') { + if (baseComponent) { + str += getStringSignature((obj.items || obj.$ref || {})); + } else { + str += 'Array['; + str += getStringSignature((obj.items || obj.$ref || {})); + str += ']'; + } + } else if (obj.type === 'integer' && obj.format === 'int32') { + str += 'integer'; + } else if (obj.type === 'integer' && obj.format === 'int64') { + str += 'long'; + } else if (obj.type === 'integer' && typeof obj.format === 'undefined') { + str += 'long'; + } else if (obj.type === 'string' && obj.format === 'date-time') { + str += 'date-time'; + } else if (obj.type === 'string' && obj.format === 'date') { + str += 'date'; + } else if (obj.type === 'string' && typeof obj.format === 'undefined') { + str += 'string'; + } else if (obj.type === 'number' && obj.format === 'float') { + str += 'float'; + } else if (obj.type === 'number' && obj.format === 'double') { + str += 'double'; + } else if (obj.type === 'number' && typeof obj.format === 'undefined') { + str += 'double'; + } else if (obj.type === 'boolean') { + str += 'boolean'; + } else if (obj.$ref) { + str += Helpers.simpleRef(obj.$ref); + } else { + str += obj.type; + } + + return str; +} + +function schemaToJSON(schema, models, modelsToIgnore, modelPropertyMacro) { + // Resolve the schema (Handle nested schemas) + schema = Helpers.resolveSchema(schema); + + if(typeof modelPropertyMacro !== 'function') { + modelPropertyMacro = function(prop){ + return (prop || {}).default; + }; + } + + modelsToIgnore= modelsToIgnore || {}; + + var type = schema.type || 'object'; + var format = schema.format; + var model; + var output; + + if (!_.isUndefined(schema.example)) { + output = schema.example; + } else if (_.isUndefined(schema.items) && _.isArray(schema.enum)) { + output = schema.enum[0]; + } + + if (_.isUndefined(output)) { + if (schema.$ref) { + model = models[Helpers.simpleRef(schema.$ref)]; + + if (!_.isUndefined(model)) { + if (_.isUndefined(modelsToIgnore[model.name])) { + modelsToIgnore[model.name] = model; + output = schemaToJSON(model.definition, models, modelsToIgnore, modelPropertyMacro); + delete modelsToIgnore[model.name]; + } else { + if (model.type === 'array') { + output = []; + } else { + output = {}; + } + } + } + } else if (!_.isUndefined(schema.default)) { + output = schema.default; + } else if (type === 'string') { + if (format === 'date-time') { + output = new Date().toISOString(); + } else if (format === 'date') { + output = new Date().toISOString().split('T')[0]; + } else { + output = 'string'; + } + } else if (type === 'integer') { + output = 0; + } else if (type === 'number') { + output = 0.0; + } else if (type === 'boolean') { + output = true; + } else if (type === 'object') { + output = {}; + + _.forEach(schema.properties, function (property, name) { + var cProperty = _.cloneDeep(property); + + // Allow macro to set the default value + cProperty.default = modelPropertyMacro(property); + + output[name] = schemaToJSON(cProperty, models, modelsToIgnore, modelPropertyMacro); + }); + } else if (type === 'array') { + output = []; + + if (_.isArray(schema.items)) { + _.forEach(schema.items, function (item) { + output.push(schemaToJSON(item, models, modelsToIgnore, modelPropertyMacro)); + }); + } else if (_.isPlainObject(schema.items)) { + output.push(schemaToJSON(schema.items, models, modelsToIgnore, modelPropertyMacro)); + } else if (_.isUndefined(schema.items)) { + output.push({}); + } else { + Helpers.log('Array type\'s \'items\' property is not an array or an object, cannot process'); + } + } + } + + return output; +} + +function schemaToHTML(name, schema, models, modelPropertyMacro) { + + var strongOpen = ''; + var strongClose = ''; + + // Allow for ignoring the 'name' argument.... shifting the rest + if(_.isObject(arguments[0])) { + name = void 0; + schema = arguments[0]; + models = arguments[1]; + modelPropertyMacro = arguments[2]; + } + + models = models || {}; + + // Resolve the schema (Handle nested schemas) + schema = Helpers.resolveSchema(schema); + + // Return for empty object + if(_.isEmpty(schema)) { + return strongOpen + 'Empty' + strongClose; + } + + // Dereference $ref from 'models' + if(typeof schema.$ref === 'string') { + name = Helpers.simpleRef(schema.$ref); + schema = models[name]; + if(typeof schema === 'undefined') + { + return strongOpen + name + ' is not defined!' + strongClose; + } + } + + if(typeof name !== 'string') { + name = schema.title || 'Inline Model'; + } + + // If we are a Model object... adjust accordingly + if(schema.definition) { + schema = schema.definition; + } + + if(typeof modelPropertyMacro !== 'function') { + modelPropertyMacro = function(prop){ + return (prop || {}).default; + }; + } + + var references = {}; + var seenModels = []; + var inlineModels = 0; + + + + // Generate current HTML + var html = processModel(schema, name); + + // Generate references HTML + while (_.keys(references).length > 0) { + /* jshint ignore:start */ + _.forEach(references, function (schema, name) { + var seenModel = _.indexOf(seenModels, name) > -1; + + delete references[name]; + + if (!seenModel) { + seenModels.push(name); + + html += '
      ' + processModel(schema, name); + } + }); + /* jshint ignore:end */ + } + + return html; + + ///////////////////////////////// + + function addReference(schema, name, skipRef) { + var modelName = name; + var model; + + if (schema.$ref) { + modelName = schema.title || Helpers.simpleRef(schema.$ref); + model = models[modelName]; + } else if (_.isUndefined(name)) { + modelName = schema.title || 'Inline Model ' + (++inlineModels); + model = {definition: schema}; + } + + if (skipRef !== true) { + references[modelName] = _.isUndefined(model) ? {} : model.definition; + } + + return modelName; + } + + function primitiveToHTML(schema) { + var html = ''; + var type = schema.type || 'object'; + + if (schema.$ref) { + html += addReference(schema, Helpers.simpleRef(schema.$ref)); + } else if (type === 'object') { + if (!_.isUndefined(schema.properties)) { + html += addReference(schema); + } else { + html += 'object'; + } + } else if (type === 'array') { + html += 'Array['; + + if (_.isArray(schema.items)) { + html += _.map(schema.items, addReference).join(','); + } else if (_.isPlainObject(schema.items)) { + if (_.isUndefined(schema.items.$ref)) { + if (!_.isUndefined(schema.items.type) && _.indexOf(['array', 'object'], schema.items.type) === -1) { + html += schema.items.type; + } else { + html += addReference(schema.items); + } + } else { + html += addReference(schema.items, Helpers.simpleRef(schema.items.$ref)); + } + } else { + Helpers.log('Array type\'s \'items\' schema is not an array or an object, cannot process'); + html += 'object'; + } + + html += ']'; + } else { + html += schema.type; + } + + html += ''; + + return html; + } + + function primitiveToOptionsHTML(schema, html) { + var options = ''; + var type = schema.type || 'object'; + var isArray = type === 'array'; + + if (isArray) { + if (_.isPlainObject(schema.items) && !_.isUndefined(schema.items.type)) { + type = schema.items.type; + } else { + type = 'object'; + } + } + + if (!_.isUndefined(schema.default)) { + options += optionHtml('Default', schema.default); + } + + switch (type) { + case 'string': + if (schema.minLength) { + options += optionHtml('Min. Length', schema.minLength); + } + + if (schema.maxLength) { + options += optionHtml('Max. Length', schema.maxLength); + } + + if (schema.pattern) { + options += optionHtml('Reg. Exp.', schema.pattern); + } + break; + case 'integer': + case 'number': + if (schema.minimum) { + options += optionHtml('Min. Value', schema.minimum); + } + + if (schema.exclusiveMinimum) { + options += optionHtml('Exclusive Min.', 'true'); + } + + if (schema.maximum) { + options += optionHtml('Max. Value', schema.maximum); + } + + if (schema.exclusiveMaximum) { + options += optionHtml('Exclusive Max.', 'true'); + } + + if (schema.multipleOf) { + options += optionHtml('Multiple Of', schema.multipleOf); + } + + break; + } + + if (isArray) { + if (schema.minItems) { + options += optionHtml('Min. Items', schema.minItems); + } + + if (schema.maxItems) { + options += optionHtml('Max. Items', schema.maxItems); + } + + if (schema.uniqueItems) { + options += optionHtml('Unique Items', 'true'); + } + + if (schema.collectionFormat) { + options += optionHtml('Coll. Format', schema.collectionFormat); + } + } + + if (_.isUndefined(schema.items)) { + if (_.isArray(schema.enum)) { + var enumString; + + if (type === 'number' || type === 'integer') { + enumString = schema.enum.join(', '); + } else { + enumString = '"' + schema.enum.join('", "') + '"'; + } + + options += optionHtml('Enum', enumString); + } + } + + if (options.length > 0) { + html = '' + html + '' + options + '
      ' + type + '
      '; + } + + return html; + } + + function processModel(schema, name) { + var type = schema.type || 'object'; + var isArray = schema.type === 'array'; + var html = strongOpen + name + ' ' + (isArray ? '[' : '{') + strongClose; + + if (name) { + seenModels.push(name); + } + + if (isArray) { + if (_.isArray(schema.items)) { + html += '
      ' + _.map(schema.items, function (item) { + var type = item.type || 'object'; + + if (_.isUndefined(item.$ref)) { + if (_.indexOf(['array', 'object'], type) > -1) { + if (type === 'object' && _.isUndefined(item.properties)) { + return 'object'; + } else { + return addReference(item); + } + } else { + return primitiveToOptionsHTML(item, type); + } + } else { + return addReference(item, Helpers.simpleRef(item.$ref)); + } + }).join(',
      '); + } else if (_.isPlainObject(schema.items)) { + if (_.isUndefined(schema.items.$ref)) { + if (_.indexOf(['array', 'object'], schema.items.type || 'object') > -1) { + if ((_.isUndefined(schema.items.type) || schema.items.type === 'object') && _.isUndefined(schema.items.properties)) { + html += '
      object
      '; + } else { + html += '
      ' + addReference(schema.items) + '
      '; + } + } else { + html += '
      ' + primitiveToOptionsHTML(schema.items, schema.items.type) + '
      '; + } + } else { + html += '
      ' + addReference(schema.items, Helpers.simpleRef(schema.items.$ref)) + '
      '; + } + } else { + Helpers.log('Array type\'s \'items\' property is not an array or an object, cannot process'); + html += '
      object
      '; + } + } else { + if (schema.$ref) { + html += '
      ' + addReference(schema, name) + '
      '; + } else if (type === 'object') { + if (_.isPlainObject(schema.properties)) { + var contents = _.map(schema.properties, function (property, name) { + var propertyIsRequired = (_.indexOf(schema.required, name) >= 0); + var cProperty = _.cloneDeep(property); + + var requiredClass = propertyIsRequired ? 'required' : ''; + var html = '' + name + ' ('; + var model; + var propDescription; + + // Allow macro to set the default value + cProperty.default = modelPropertyMacro(cProperty); + + // Resolve the schema (Handle nested schemas) + cProperty = Helpers.resolveSchema(cProperty); + + propDescription = property.description || cProperty.description; + + // We need to handle property references to primitives (Issue 339) + if (!_.isUndefined(cProperty.$ref)) { + model = models[Helpers.simpleRef(cProperty.$ref)]; + + if (!_.isUndefined(model) && _.indexOf([undefined, 'array', 'object'], model.definition.type) === -1) { + // Use referenced schema + cProperty = Helpers.resolveSchema(model.definition); + } + } + + html += primitiveToHTML(cProperty); + + if(!propertyIsRequired) { + html += ', optional'; + } + + if(property.readOnly) { + html += ', read only'; + } + + html += ')'; + + if (!_.isUndefined(propDescription)) { + html += ': ' + '' + propDescription + ''; + } + + if (cProperty.enum) { + html += ' = [\'' + cProperty.enum.join('\', \'') + '\']'; + } + + return '' + primitiveToOptionsHTML(cProperty, html); + }).join(',
      '); + + if (contents) { + html += contents + '
      '; + } + } + } else { + html += '
      ' + primitiveToOptionsHTML(schema, type) + '
      '; + } + } + + return html + strongOpen + (isArray ? ']' : '}') + strongClose; + } +} + +},{"./helpers":4,"lodash-compat/array/indexOf":49,"lodash-compat/collection/forEach":54,"lodash-compat/collection/map":56,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isEmpty":141,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isUndefined":148,"lodash-compat/object/keys":149}],8:[function(require,module,exports){ +'use strict'; + +var SwaggerHttp = require('./http'); +var _ = { + isObject: require('lodash-compat/lang/isObject') +}; + +var SwaggerSpecConverter = module.exports = function () { + this.errors = []; + this.warnings = []; + this.modelMap = {}; +}; + +SwaggerSpecConverter.prototype.setDocumentationLocation = function (location) { + this.docLocation = location; +}; + +/** + * converts a resource listing OR api declaration + **/ +SwaggerSpecConverter.prototype.convert = function (obj, clientAuthorizations, opts, callback) { + // not a valid spec + if(!obj || !Array.isArray(obj.apis)) { + return this.finish(callback, null); + } + this.clientAuthorizations = clientAuthorizations; + + // create a new swagger object to return + var swagger = { swagger: '2.0' }; + + swagger.originalVersion = obj.swaggerVersion; + + // add the info + this.apiInfo(obj, swagger); + + // add security definitions + this.securityDefinitions(obj, swagger); + + // take basePath into account + if (obj.basePath) { + this.setDocumentationLocation(obj.basePath); + } + + // see if this is a single-file swagger definition + var isSingleFileSwagger = false; + var i; + for(i = 0; i < obj.apis.length; i++) { + var api = obj.apis[i]; + if(Array.isArray(api.operations)) { + isSingleFileSwagger = true; + } + } + if(isSingleFileSwagger) { + this.declaration(obj, swagger); + this.finish(callback, swagger); + } + else { + this.resourceListing(obj, swagger, opts, callback); + } +}; + +SwaggerSpecConverter.prototype.declaration = function(obj, swagger) { + var name, i, p, pos; + if(!obj.apis) { + return; + } + + if (obj.basePath.indexOf('http://') === 0) { + p = obj.basePath.substring('http://'.length); + pos = p.indexOf('/'); + if (pos > 0) { + swagger.host = p.substring(0, pos); + swagger.basePath = p.substring(pos); + } + else { + swagger.host = p; + swagger.basePath = '/'; + } + } else if (obj.basePath.indexOf('https://') === 0) { + p = obj.basePath.substring('https://'.length); + pos = p.indexOf('/'); + if (pos > 0) { + swagger.host = p.substring(0, pos); + swagger.basePath = p.substring(pos); + } + else { + swagger.host = p; + swagger.basePath = '/'; + } + } else { + swagger.basePath = obj.basePath; + } + + var resourceLevelAuth; + if(obj.authorizations) { + resourceLevelAuth = obj.authorizations; + } + if(obj.consumes) { + swagger.consumes = obj.consumes; + } + if(obj.produces) { + swagger.produces = obj.produces; + } + + // build a mapping of id to name for 1.0 model resolutions + if(_.isObject(obj)) { + for(name in obj.models) { + var existingModel = obj.models[name]; + var key = (existingModel.id || name); + this.modelMap[key] = name; + } + } + + for(i = 0; i < obj.apis.length; i++) { + var api = obj.apis[i]; + var path = api.path; + var operations = api.operations; + this.operations(path, obj.resourcePath, operations, resourceLevelAuth, swagger); + } + + var models = obj.models || {}; + this.models(models, swagger); +}; + +SwaggerSpecConverter.prototype.models = function(obj, swagger) { + if(!_.isObject(obj)) { + return; + } + var name; + + swagger.definitions = swagger.definitions || {}; + for(name in obj) { + var existingModel = obj[name]; + var _required = []; + var schema = { properties: {}}; + var propertyName; + for(propertyName in existingModel.properties) { + var existingProperty = existingModel.properties[propertyName]; + var property = {}; + this.dataType(existingProperty, property); + if(existingProperty.description) { + property.description = existingProperty.description; + } + if(existingProperty['enum']) { + property['enum'] = existingProperty['enum']; + } + if(typeof existingProperty.required === 'boolean' && existingProperty.required === true) { + _required.push(propertyName); + } + if(typeof existingProperty.required === 'string' && existingProperty.required === 'true') { + _required.push(propertyName); + } + schema.properties[propertyName] = property; + } + if(_required.length > 0) { + schema.required = _required; + } else { + schema.required = existingModel.required; + } + swagger.definitions[name] = schema; + } +}; + +SwaggerSpecConverter.prototype.extractTag = function(resourcePath) { + var pathString = resourcePath || 'default'; + if(pathString.indexOf('http:') === 0 || pathString.indexOf('https:') === 0) { + pathString = pathString.split(['/']); + pathString = pathString[pathString.length -1].substring(); + } + if(pathString.endsWith('.json')) { + pathString = pathString.substring(0, pathString.length - '.json'.length); + } + return pathString.replace('/',''); +}; + +SwaggerSpecConverter.prototype.operations = function(path, resourcePath, obj, resourceLevelAuth, swagger) { + if(!Array.isArray(obj)) { + return; + } + var i; + + if(!swagger.paths) { + swagger.paths = {}; + } + + var pathObj = swagger.paths[path] || {}; + var tag = this.extractTag(resourcePath); + swagger.tags = swagger.tags || []; + var matched = false; + for(i = 0; i < swagger.tags.length; i++) { + var tagObject = swagger.tags[i]; + if(tagObject.name === tag) { + matched = true; + } + } + if(!matched) { + swagger.tags.push({name: tag}); + } + + for(i = 0; i < obj.length; i++) { + var existingOperation = obj[i]; + var method = (existingOperation.method || existingOperation.httpMethod).toLowerCase(); + var operation = {tags: [tag]}; + var existingAuthorizations = existingOperation.authorizations; + + if(existingAuthorizations && Object.keys(existingAuthorizations).length === 0) { + existingAuthorizations = resourceLevelAuth; + } + + if(typeof existingAuthorizations !== 'undefined') { + var scopesObject; + for(var key in existingAuthorizations) { + operation.security = operation.security || []; + var scopes = existingAuthorizations[key]; + if(scopes) { + var securityScopes = []; + for(var j in scopes) { + securityScopes.push(scopes[j].scope); + } + scopesObject = {}; + scopesObject[key] = securityScopes; + operation.security.push(scopesObject); + } + else { + scopesObject = {}; + scopesObject[key] = []; + operation.security.push(scopesObject); + } + } + } + + if(existingOperation.consumes) { + operation.consumes = existingOperation.consumes; + } + else if(swagger.consumes) { + operation.consumes = swagger.consumes; + } + if(existingOperation.produces) { + operation.produces = existingOperation.produces; + } + else if(swagger.produces) { + operation.produces = swagger.produces; + } + if(existingOperation.summary) { + operation.summary = existingOperation.summary; + } + if(existingOperation.notes) { + operation.description = existingOperation.notes; + } + if(existingOperation.nickname) { + operation.operationId = existingOperation.nickname; + } + if(existingOperation.deprecated) { + operation.deprecated = existingOperation.deprecated; + } + + this.authorizations(existingAuthorizations, swagger); + this.parameters(operation, existingOperation.parameters, swagger); + this.responseMessages(operation, existingOperation, swagger); + + pathObj[method] = operation; + } + + swagger.paths[path] = pathObj; +}; + +SwaggerSpecConverter.prototype.responseMessages = function(operation, existingOperation) { + if(!_.isObject(existingOperation)) { + return; + } + // build default response from the operation (1.x) + var defaultResponse = {}; + this.dataType(existingOperation, defaultResponse); + // TODO: look into the real problem of rendering responses in swagger-ui + // ....should reponseType have an implicit schema? + if(!defaultResponse.schema && defaultResponse.type) { + defaultResponse = {schema: defaultResponse}; + } + + operation.responses = operation.responses || {}; + + // grab from responseMessages (1.2) + var has200 = false; + if(Array.isArray(existingOperation.responseMessages)) { + var i; + var existingResponses = existingOperation.responseMessages; + for(i = 0; i < existingResponses.length; i++) { + var existingResponse = existingResponses[i]; + var response = { description: existingResponse.message }; + if(existingResponse.code === 200) { + has200 = true; + } + // Convert responseModel -> schema{$ref: responseModel} + if(existingResponse.responseModel) { + response.schema = {'$ref': '#/definitions/' + existingResponse.responseModel}; + } + operation.responses['' + existingResponse.code] = response; + } + } + + if(has200) { + operation.responses['default'] = defaultResponse; + } + else { + operation.responses['200'] = defaultResponse; + } +}; + +SwaggerSpecConverter.prototype.authorizations = function(obj) { + // TODO + if(!_.isObject(obj)) { + return; + } +}; + +SwaggerSpecConverter.prototype.parameters = function(operation, obj) { + if(!Array.isArray(obj)) { + return; + } + var i; + for(i = 0; i < obj.length; i++) { + var existingParameter = obj[i]; + var parameter = {}; + parameter.name = existingParameter.name; + parameter.description = existingParameter.description; + parameter.required = existingParameter.required; + parameter.in = existingParameter.paramType; + + // per #168 + if(parameter.in === 'body') { + parameter.name = 'body'; + } + if(parameter.in === 'form') { + parameter.in = 'formData'; + } + + if(existingParameter.enum) { + parameter.enum = existingParameter.enum; + } + + if(existingParameter.allowMultiple === true || existingParameter.allowMultiple === 'true') { + var innerType = {}; + this.dataType(existingParameter, innerType); + parameter.type = 'array'; + parameter.items = innerType; + + if(existingParameter.allowableValues) { + var av = existingParameter.allowableValues; + if(av.valueType === 'LIST') { + parameter['enum'] = av.values; + } + } + } + else { + this.dataType(existingParameter, parameter); + } + if(typeof existingParameter.defaultValue !== 'undefined') { + parameter.default = existingParameter.defaultValue; + } + + operation.parameters = operation.parameters || []; + operation.parameters.push(parameter); + } +}; + +SwaggerSpecConverter.prototype.dataType = function(source, target) { + if(!_.isObject(source)) { + return; + } + + if(source.minimum) { + target.minimum = source.minimum; + } + if(source.maximum) { + target.maximum = source.maximum; + } + if (source.format) { + target.format = source.format; + } + + // default can be 'false' + if(typeof source.defaultValue !== 'undefined') { + target.default = source.defaultValue; + } + + var jsonSchemaType = this.toJsonSchema(source); + if(jsonSchemaType) { + target = target || {}; + if(jsonSchemaType.type) { + target.type = jsonSchemaType.type; + } + if(jsonSchemaType.format) { + target.format = jsonSchemaType.format; + } + if(jsonSchemaType.$ref) { + target.schema = {$ref: jsonSchemaType.$ref}; + } + if(jsonSchemaType.items) { + target.items = jsonSchemaType.items; + } + } +}; + +SwaggerSpecConverter.prototype.toJsonSchema = function(source) { + if(!source) { + return 'object'; + } + var detectedType = (source.type || source.dataType || source.responseClass || ''); + var lcType = detectedType.toLowerCase(); + var format = (source.format || '').toLowerCase(); + + if(lcType.indexOf('list[') === 0) { + var innerType = detectedType.substring(5, detectedType.length - 1); + var jsonType = this.toJsonSchema({type: innerType}); + return {type: 'array', items: jsonType}; + } else if(lcType === 'int' || (lcType === 'integer' && format === 'int32')) { + {return {type: 'integer', format: 'int32'};} + } else if(lcType === 'long' || (lcType === 'integer' && format === 'int64')) { + {return {type: 'integer', format: 'int64'};} + } else if(lcType === 'integer') { + {return {type: 'integer', format: 'int64'};} + } else if(lcType === 'float' || (lcType === 'number' && format === 'float')) { + {return {type: 'number', format: 'float'};} + } else if(lcType === 'double' || (lcType === 'number' && format === 'double')) { + {return {type: 'number', format: 'double'};} + } else if((lcType === 'string' && format === 'date-time') || (lcType === 'date')) { + {return {type: 'string', format: 'date-time'};} + } else if(lcType === 'string') { + {return {type: 'string'};} + } else if(lcType === 'file') { + {return {type: 'file'};} + } else if(lcType === 'boolean') { + {return {type: 'boolean'};} + } else if(lcType === 'boolean') { + {return {type: 'boolean'};} + } else if(lcType === 'array' || lcType === 'list') { + if(source.items) { + var it = this.toJsonSchema(source.items); + return {type: 'array', items: it}; + } + else { + return {type: 'array', items: {type: 'object'}}; + } + } else if(source.$ref) { + return {$ref: this.modelMap[source.$ref] ? '#/definitions/' + this.modelMap[source.$ref] : source.$ref}; + } else if(lcType === 'void' || lcType === '') { + {return {};} + } else if (this.modelMap[source.type]) { + // If this a model using `type` instead of `$ref`, that's fine. + return {$ref: '#/definitions/' + this.modelMap[source.type]}; + } else { + // Unknown model type or 'object', pass it along. + return {type: source.type}; + } +}; + +SwaggerSpecConverter.prototype.resourceListing = function(obj, swagger, opts, callback) { + var i; + var processedCount = 0; // jshint ignore:line + var self = this; // jshint ignore:line + var expectedCount = obj.apis.length; + var _swagger = swagger; // jshint ignore:line + var _opts = {}; + + if(opts && opts.requestInterceptor){ + _opts.requestInterceptor = opts.requestInterceptor; + } + + if(opts && opts.responseInterceptor){ + _opts.responseInterceptor = opts.responseInterceptor; + } + + var swaggerRequestHeaders = 'application/json'; + + if(opts && opts.swaggerRequestHeaders) { + swaggerRequestHeaders = opts.swaggerRequestHeaders; + } + + if(expectedCount === 0) { + this.finish(callback, swagger); + } + + for(i = 0; i < expectedCount; i++) { + var api = obj.apis[i]; + var path = api.path; + var absolutePath = this.getAbsolutePath(obj.swaggerVersion, this.docLocation, path); + + if(api.description) { + swagger.tags = swagger.tags || []; + swagger.tags.push({ + name : this.extractTag(api.path), + description : api.description || '' + }); + } + var http = { + url: absolutePath, + headers: { accept: swaggerRequestHeaders }, + on: {}, + method: 'get', + timeout: opts.timeout + }; + /* jshint ignore:start */ + http.on.response = function(data) { + processedCount += 1; + var obj = data.obj; + if(obj) { + self.declaration(obj, _swagger); + } + if(processedCount === expectedCount) { + self.finish(callback, _swagger); + } + }; + http.on.error = function(data) { + console.error(data); + processedCount += 1; + if(processedCount === expectedCount) { + self.finish(callback, _swagger); + } + }; + /* jshint ignore:end */ + + if(this.clientAuthorizations && typeof this.clientAuthorizations.apply === 'function') { + this.clientAuthorizations.apply(http); + } + + new SwaggerHttp().execute(http, _opts); + } +}; + +SwaggerSpecConverter.prototype.getAbsolutePath = function(version, docLocation, path) { + if(version === '1.0') { + if(docLocation.endsWith('.json')) { + // get root path + var pos = docLocation.lastIndexOf('/'); + if(pos > 0) { + docLocation = docLocation.substring(0, pos); + } + } + } + + var location = docLocation; + if(path.indexOf('http:') === 0 || path.indexOf('https:') === 0) { + location = path; + } + else { + if(docLocation.endsWith('/')) { + location = docLocation.substring(0, docLocation.length - 1); + } + location += path; + } + location = location.replace('{format}', 'json'); + return location; +}; + +SwaggerSpecConverter.prototype.securityDefinitions = function(obj, swagger) { + if(obj.authorizations) { + var name; + for(name in obj.authorizations) { + var isValid = false; + var securityDefinition = {}; + var definition = obj.authorizations[name]; + if(definition.type === 'apiKey') { + securityDefinition.type = 'apiKey'; + securityDefinition.in = definition.passAs; + securityDefinition.name = definition.keyname || name; + isValid = true; + } + else if(definition.type === 'basicAuth') { + securityDefinition.type = 'basicAuth'; + isValid = true; + } + else if(definition.type === 'oauth2') { + var existingScopes = definition.scopes || []; + var scopes = {}; + var i; + for(i in existingScopes) { + var scope = existingScopes[i]; + scopes[scope.scope] = scope.description; + } + securityDefinition.type = 'oauth2'; + if(i > 0) { + securityDefinition.scopes = scopes; + } + if(definition.grantTypes) { + if(definition.grantTypes.implicit) { + var implicit = definition.grantTypes.implicit; + securityDefinition.flow = 'implicit'; + securityDefinition.authorizationUrl = implicit.loginEndpoint; + isValid = true; + } + /* jshint ignore:start */ + if(definition.grantTypes['authorization_code']) { + if(!securityDefinition.flow) { + // cannot set if flow is already defined + var authCode = definition.grantTypes['authorization_code']; + securityDefinition.flow = 'accessCode'; + securityDefinition.authorizationUrl = authCode.tokenRequestEndpoint.url; + securityDefinition.tokenUrl = authCode.tokenEndpoint.url; + isValid = true; + } + } + /* jshint ignore:end */ + } + } + if(isValid) { + swagger.securityDefinitions = swagger.securityDefinitions || {}; + swagger.securityDefinitions[name] = securityDefinition; + } + } + } +}; + +SwaggerSpecConverter.prototype.apiInfo = function(obj, swagger) { + // info section + if(obj.info) { + var info = obj.info; + swagger.info = {}; + + if(info.contact) { + swagger.info.contact = {}; + swagger.info.contact.email = info.contact; + } + if(info.description) { + swagger.info.description = info.description; + } + if(info.title) { + swagger.info.title = info.title; + } + if(info.termsOfServiceUrl) { + swagger.info.termsOfService = info.termsOfServiceUrl; + } + if(info.license || info.licenseUrl) { + swagger.license = {}; + if(info.license) { + swagger.license.name = info.license; + } + if(info.licenseUrl) { + swagger.license.url = info.licenseUrl; + } + } + } + else { + this.warnings.push('missing info section'); + } +}; + +SwaggerSpecConverter.prototype.finish = function (callback, obj) { + callback(obj); +}; + +},{"./http":5,"lodash-compat/lang/isObject":144}],9:[function(require,module,exports){ +'use strict'; + +var log = require('../helpers').log; +var _ = { + isPlainObject: require('lodash-compat/lang/isPlainObject'), + isString: require('lodash-compat/lang/isString'), +}; + +var SchemaMarkup = require('../schema-markup.js'); +var jsyaml = require('js-yaml'); + +var Model = module.exports = function (name, definition, models, modelPropertyMacro) { + this.definition = definition || {}; + this.isArray = definition.type === 'array'; + this.models = models || {}; + this.name = name || definition.title || 'Inline Model'; + this.modelPropertyMacro = modelPropertyMacro || function (property) { + return property.default; + }; + + return this; +}; + +// Note! This function will be removed in 2.2.x! +Model.prototype.createJSONSample = Model.prototype.getSampleValue = function (modelsToIgnore) { + modelsToIgnore = modelsToIgnore || {}; + + modelsToIgnore[this.name] = this; + + // Response support + if (this.examples && _.isPlainObject(this.examples) && this.examples['application/json']) { + this.definition.example = this.examples['application/json']; + + if (_.isString(this.definition.example)) { + this.definition.example = jsyaml.safeLoad(this.definition.example); + } + } else if (!this.definition.example) { + this.definition.example = this.examples; + } + + return SchemaMarkup.schemaToJSON(this.definition, this.models, modelsToIgnore, this.modelPropertyMacro); +}; + +Model.prototype.getMockSignature = function () { + return SchemaMarkup.schemaToHTML(this.name, this.definition, this.models, this.modelPropertyMacro); +}; + +},{"../helpers":4,"../schema-markup.js":7,"js-yaml":19,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isString":146}],10:[function(require,module,exports){ +'use strict'; + +var _ = { + cloneDeep: require('lodash-compat/lang/cloneDeep'), + isUndefined: require('lodash-compat/lang/isUndefined'), + isEmpty: require('lodash-compat/lang/isEmpty'), + isObject: require('lodash-compat/lang/isObject') +}; +var helpers = require('../helpers'); +var Model = require('./model'); +var SwaggerHttp = require('../http'); +var Q = require('q'); + +var Operation = module.exports = function (parent, scheme, operationId, httpMethod, path, args, definitions, models, clientAuthorizations) { + var errors = []; + + parent = parent || {}; + args = args || {}; + + if(parent && parent.options) { + this.client = parent.options.client || null; + this.requestInterceptor = parent.options.requestInterceptor || null; + this.responseInterceptor = parent.options.responseInterceptor || null; + } + this.authorizations = args.security; + this.basePath = parent.basePath || '/'; + this.clientAuthorizations = clientAuthorizations; + this.consumes = args.consumes || parent.consumes || ['application/json']; + this.produces = args.produces || parent.produces || ['application/json']; + this.deprecated = args.deprecated; + this.description = args.description; + this.host = parent.host; + this.method = (httpMethod || errors.push('Operation ' + operationId + ' is missing method.')); + this.models = models || {}; + this.nickname = (operationId || errors.push('Operations must have a nickname.')); + this.operation = args; + this.operations = {}; + this.parameters = args !== null ? (args.parameters || []) : {}; + this.parent = parent; + this.path = (path || errors.push('Operation ' + this.nickname + ' is missing path.')); + this.responses = (args.responses || {}); + this.scheme = scheme || parent.scheme || 'http'; + this.schemes = args.schemes || parent.schemes; + this.security = args.security || parent.security; + this.summary = args.summary || ''; + this.timeout = parent.timeout; + this.type = null; + this.useJQuery = parent.useJQuery; + this.jqueryAjaxCache = parent.jqueryAjaxCache; + this.enableCookies = parent.enableCookies; + + if(!this.host) { + if(typeof window !== 'undefined') { + this.host = window.location.host; + } + else { + this.host = 'localhost'; + } + } + this.parameterMacro = parent.parameterMacro || function (operation, parameter) { + return parameter.default; + }; + + this.inlineModels = []; + + if(this.basePath !== '/' && this.basePath.slice(-1) === '/') { + this.basePath = this.basePath.slice(0, -1); + } + + if (typeof this.deprecated === 'string') { + switch(this.deprecated.toLowerCase()) { + case 'true': case 'yes': case '1': { + this.deprecated = true; + break; + } + + case 'false': case 'no': case '0': case null: { + this.deprecated = false; + break; + } + + default: this.deprecated = Boolean(this.deprecated); + } + } + + var i, model; + + if (definitions) { + // add to global models + var key; + + for (key in definitions) { + model = new Model(key, definitions[key], this.models, parent.modelPropertyMacro); + + if (model) { + this.models[key] = model; + } + } + } + else { + definitions = {}; + } + + for (i = 0; i < this.parameters.length; i++) { + var param = this.parameters[i]; + + // Allow macro to set the default value + param.default = this.parameterMacro(this, param); + + if (param.type === 'array') { + param.isList = true; + param.allowMultiple = true; + // the enum can be defined at the items level + //if (param.items && param.items.enum) { + // param['enum'] = param.items.enum; + //} + } + + var innerType = this.getType(param); + + if (innerType && innerType.toString().toLowerCase() === 'boolean') { + param.allowableValues = {}; + param.isList = true; + param['enum'] = [true, false]; // use actual primitives + } + + if(typeof param['x-example'] !== 'undefined') { + var d = param['x-example']; + param.default = d; + } + if(param['x-examples']) { + var d = param['x-examples'].default; + if(typeof d !== 'undefined') { + param.default = d; + } + } + + var enumValues = param['enum'] || (param.items && param.items['enum']); + + if (typeof enumValues !== 'undefined') { + var id; + + param.allowableValues = {}; + param.allowableValues.values = []; + param.allowableValues.descriptiveValues = []; + + for (id = 0; id < enumValues.length; id++) { + var value = enumValues[id]; + var isDefault = (value === param.default || value+'' === param.default); + + param.allowableValues.values.push(value); + // Always have string for descriptive values.... + param.allowableValues.descriptiveValues.push({value : value+'', isDefault: isDefault}); + } + } + + if (param.type === 'array') { + innerType = [innerType]; + + if (typeof param.allowableValues === 'undefined') { + // can't show as a list if no values to select from + delete param.isList; + delete param.allowMultiple; + } + } + + param.modelSignature = {type: innerType, definitions: this.models}; + param.signature = this.getModelSignature(innerType, this.models).toString(); + param.sampleJSON = this.getModelSampleJSON(innerType, this.models); + param.responseClassSignature = param.signature; + } + + var defaultResponseCode, response, responses = this.responses; + + if (responses['200']) { + response = responses['200']; + defaultResponseCode = '200'; + } else if (responses['201']) { + response = responses['201']; + defaultResponseCode = '201'; + } else if (responses['202']) { + response = responses['202']; + defaultResponseCode = '202'; + } else if (responses['203']) { + response = responses['203']; + defaultResponseCode = '203'; + } else if (responses['204']) { + response = responses['204']; + defaultResponseCode = '204'; + } else if (responses['205']) { + response = responses['205']; + defaultResponseCode = '205'; + } else if (responses['206']) { + response = responses['206']; + defaultResponseCode = '206'; + } else if (responses['default']) { + response = responses['default']; + defaultResponseCode = 'default'; + } + + if (response && response.schema) { + var resolvedModel = this.resolveModel(response.schema, definitions); + var successResponse; + + delete responses[defaultResponseCode]; + + if (resolvedModel) { + this.successResponse = {}; + successResponse = this.successResponse[defaultResponseCode] = resolvedModel; + } else if (!response.schema.type || response.schema.type === 'object' || response.schema.type === 'array') { + // Inline model + this.successResponse = {}; + successResponse = this.successResponse[defaultResponseCode] = new Model(undefined, response.schema || {}, this.models, parent.modelPropertyMacro); + } else { + // Primitive + this.successResponse = {}; + successResponse = this.successResponse[defaultResponseCode] = response.schema; + } + + if (successResponse) { + // Attach response properties + if (response.description) { + successResponse.description = response.description; + } + + if (response.examples) { + successResponse.examples = response.examples; + } + + if (response.headers) { + successResponse.headers = response.headers; + } + } + + this.type = response; + } + + if (errors.length > 0) { + if (this.resource && this.resource.api && this.resource.api.fail) { + this.resource.api.fail(errors); + } + } + + return this; +}; + +Operation.prototype.isDefaultArrayItemValue = function(value, param) { + if (param.default && Array.isArray(param.default)) { + return param.default.indexOf(value) !== -1; + } + return value === param.default; +}; + +Operation.prototype.getType = function (param) { + var type = param.type; + var format = param.format; + var isArray = false; + var str; + + if (type === 'integer' && format === 'int32') { + str = 'integer'; + } else if (type === 'integer' && format === 'int64') { + str = 'long'; + } else if (type === 'integer') { + str = 'integer'; + } else if (type === 'string') { + if (format === 'date-time') { + str = 'date-time'; + } else if (format === 'date') { + str = 'date'; + } else { + str = 'string'; + } + } else if (type === 'number' && format === 'float') { + str = 'float'; + } else if (type === 'number' && format === 'double') { + str = 'double'; + } else if (type === 'number') { + str = 'double'; + } else if (type === 'boolean') { + str = 'boolean'; + } else if (type === 'array') { + isArray = true; + + if (param.items) { + str = this.getType(param.items); + } + } else if (type === 'file') { + str = 'file'; + } + + if (param.$ref) { + str = helpers.simpleRef(param.$ref); + } + + var schema = param.schema; + + if (schema) { + var ref = schema.$ref; + + if (ref) { + ref = helpers.simpleRef(ref); + + if (isArray) { + return [ ref ]; + } else { + return ref; + } + } else { + // If inline schema, we add it our interal hash -> which gives us it's ID (int) + if(schema.type === 'object') { + return this.addInlineModel(schema); + } + return this.getType(schema); + } + } + if (isArray) { + return [ str ]; + } else { + return str; + } +}; + +/** + * adds an inline schema (model) to a hash, where we can ref it later + * @param {object} schema a schema + * @return {number} the ID of the schema being added, or null + **/ +Operation.prototype.addInlineModel = function (schema) { + var len = this.inlineModels.length; + var model = this.resolveModel(schema, {}); + if(model) { + this.inlineModels.push(model); + return 'Inline Model '+len; // return string ref of the inline model (used with #getInlineModel) + } + return null; // report errors? +}; + +/** + * gets the internal ref to an inline model + * @param {string} inline_str a string reference to an inline model + * @return {Model} the model being referenced. Or null + **/ +Operation.prototype.getInlineModel = function(inlineStr) { + if(/^Inline Model \d+$/.test(inlineStr)) { + var id = parseInt(inlineStr.substr('Inline Model'.length).trim(),10); // + var model = this.inlineModels[id]; + return model; + } + // I'm returning null here, should I rather throw an error? + return null; +}; + +Operation.prototype.resolveModel = function (schema, definitions) { + if (typeof schema.$ref !== 'undefined') { + var ref = schema.$ref; + + if (ref.indexOf('#/definitions/') === 0) { + ref = ref.substring('#/definitions/'.length); + } + + if (definitions[ref]) { + return new Model(ref, definitions[ref], this.models, this.parent.modelPropertyMacro); + } + // schema must at least be an object to get resolved to an inline Model + } else if (schema && typeof schema === 'object' && + (schema.type === 'object' || _.isUndefined(schema.type))) { + return new Model(undefined, schema, this.models, this.parent.modelPropertyMacro); + } + + return null; +}; + +Operation.prototype.help = function (dontPrint) { + var out = this.nickname + ': ' + this.summary + '\n'; + + for (var i = 0; i < this.parameters.length; i++) { + var param = this.parameters[i]; + var typeInfo = param.signature; + + out += '\n * ' + param.name + ' (' + typeInfo + '): ' + param.description; + } + + if (typeof dontPrint === 'undefined') { + helpers.log(out); + } + + return out; +}; + +Operation.prototype.getModelSignature = function (type, definitions) { + var isPrimitive, listType; + + if (type instanceof Array) { + listType = true; + type = type[0]; + } + + // Convert undefined to string of 'undefined' + if (typeof type === 'undefined') { + type = 'undefined'; + isPrimitive = true; + + } else if (definitions[type]){ + // a model def exists? + type = definitions[type]; /* Model */ + isPrimitive = false; + + } else if (this.getInlineModel(type)) { + type = this.getInlineModel(type); /* Model */ + isPrimitive = false; + + } else { + // We default to primitive + isPrimitive = true; + } + + if (isPrimitive) { + if (listType) { + return 'Array[' + type + ']'; + } else { + return type.toString(); + } + } else { + if (listType) { + return 'Array[' + type.getMockSignature() + ']'; + } else { + return type.getMockSignature(); + } + } +}; + +Operation.prototype.supportHeaderParams = function () { + return true; +}; + +Operation.prototype.supportedSubmitMethods = function () { + return this.parent.supportedSubmitMethods; +}; + +Operation.prototype.getHeaderParams = function (args) { + var headers = this.setContentTypes(args, {}); + var headerParamsByLowerCase = {}; + + for (var i = 0; i < this.parameters.length; i++) { + var param = this.parameters[i]; + + if (param.in === 'header') { + headerParamsByLowerCase[param.name.toLowerCase()] = param; + } + } + + for (var arg in args) { + var headerParam = headerParamsByLowerCase[arg.toLowerCase()]; + if (typeof headerParam !== 'undefined') { + var value = args[arg]; + + if (Array.isArray(value)) { + value = value.toString(); + } + + headers[headerParam.name] = value; + } + } + + return headers; +}; + +Operation.prototype.urlify = function (args) { + var formParams = {}; + var requestUrl = this.path.replace(/#.*/, ''); // remove URL fragment + var querystring = ''; // grab params from the args, build the querystring along the way + + for (var i = 0; i < this.parameters.length; i++) { + var param = this.parameters[i]; + + if (typeof args[param.name] !== 'undefined') { + if (param.in === 'path') { + var reg = new RegExp('\{' + param.name + '\}', 'gi'); + var value = args[param.name]; + + if (Array.isArray(value)) { + value = this.encodePathCollection(param.collectionFormat, param.name, value); + } else { + value = this.encodePathParam(value); + } + + requestUrl = requestUrl.replace(reg, value); + } else if (param.in === 'query' && typeof args[param.name] !== 'undefined') { + if (querystring === '' && requestUrl.indexOf('?') < 0) { + querystring += '?'; + } else { + querystring += '&'; + } + + if (typeof param.collectionFormat !== 'undefined') { + var qp = args[param.name]; + + if (Array.isArray(qp)) { + querystring += this.encodeQueryCollection(param.collectionFormat, param.name, qp); + } else { + querystring += this.encodeQueryKey(param.name) + '=' + this.encodeQueryParam(args[param.name]); + } + } else { + querystring += this.encodeQueryKey(param.name) + '=' + this.encodeQueryParam(args[param.name]); + } + } else if (param.in === 'formData') { + formParams[param.name] = args[param.name]; + } + } + } + var url = this.scheme + '://' + this.host; + + if (this.basePath !== '/') { + url += this.basePath; + } + return url + requestUrl + querystring; +}; + +Operation.prototype.getMissingParams = function (args) { + var missingParams = []; // check required params, track the ones that are missing + var i; + + for (i = 0; i < this.parameters.length; i++) { + var param = this.parameters[i]; + + if (param.required === true) { + if (typeof args[param.name] === 'undefined') { + missingParams = param.name; + } + } + } + + return missingParams; +}; + +Operation.prototype.getBody = function (headers, args, opts) { + var formParams = {}, hasFormParams, body, key, value, hasBody = false; + + // look at each param and put form params in an object + for (var i = 0; i < this.parameters.length; i++) { + var param = this.parameters[i]; + if (typeof args[param.name] !== 'undefined') { + if (param.in === 'body') { + body = args[param.name]; + } else if (param.in === 'formData') { + formParams[param.name] = { + param: param, + value: args[param.name] + }; + hasFormParams = true; + } + } + else { + if(param.in === 'body') { + hasBody = true; + } + } + } + + // if body is null and hasBody is true, AND a JSON body is requested, send empty {} + if(hasBody && typeof body === 'undefined') { + var contentType = headers['Content-Type']; + if(contentType && contentType.indexOf('application/json') === 0) { + body = '{}'; + } + } + + var isMultiPart = false; + if(headers['Content-Type'] && headers['Content-Type'].indexOf('multipart/form-data') >= 0) { + isMultiPart = true; + } + + // handle form params + if (hasFormParams && !isMultiPart) { + var encoded = ''; + + for (key in formParams) { + var param = formParams[key].param; + value = formParams[key].value; + + if (typeof value !== 'undefined') { + if (Array.isArray(value)) { + if (encoded !== '') { + encoded += '&'; + } + encoded += this.encodeQueryCollection(param.collectionFormat, key, value); + } + else { + if (encoded !== '') { + encoded += '&'; + } + + encoded += encodeURIComponent(key) + '=' + encodeURIComponent(value); + } + } + } + + body = encoded; + } else if (isMultiPart) { + var bodyParam; + if (typeof FormData === 'function') { + bodyParam = new FormData(); + + bodyParam.type = 'formData'; + + for (key in formParams) { + var param = formParams[key].param; + value = args[key]; + + if (typeof value !== 'undefined') { + if({}.toString.apply(value) === '[object File]') { + bodyParam.append(key, value); + } + else if (value.type === 'file' && value.value) { + bodyParam.append(key, value.value); + } else { + if (Array.isArray(value)) { + if(param.collectionFormat === 'multi') { + bodyParam.delete(key); + for(var v in value) { + bodyParam.append(key, value[v]); + } + } + else { + bodyParam.append(key, this.encodeQueryCollection(param.collectionFormat, key, value).split('=').slice(1).join('=')); + } + } + else { + bodyParam.append(key, value); + } + } + } + } + body = bodyParam; + } + else { + bodyParam = {}; + for (key in formParams) { + value = args[key]; + if (Array.isArray(value)) { + var delimeter; + var format = param.collectionFormat || 'multi'; + if(format === 'ssv') { + delimeter = ' '; + } + else if(format === 'pipes') { + delimeter = '|'; + } + else if(format === 'tsv') { + delimeter = '\t'; + } + else if(format === 'multi') { + bodyParam[key] = value; + break; + } + else { + delimeter = ','; + } + var data; + value.forEach(function(v) { + if(data) { + data += delimeter; + } + else { + data = ''; + } + data += v; + }); + bodyParam[key] = data; + } + else { + bodyParam[key] = value; + } + } + body = bodyParam; + } + headers['Content-Type'] = 'multipart/form-data'; + } + + return body; +}; + +/** + * gets sample response for a single operation + **/ +Operation.prototype.getModelSampleJSON = function (type, models) { + var listType, sampleJson, innerType; + models = models || {}; + + listType = (type instanceof Array); + innerType = listType ? type[0] : type; + + if(models[innerType]) { + sampleJson = models[innerType].createJSONSample(); + } else if (this.getInlineModel(innerType)){ + sampleJson = this.getInlineModel(innerType).createJSONSample(); // may return null, if type isn't correct + } + + + if (sampleJson) { + sampleJson = listType ? [sampleJson] : sampleJson; + + if (typeof sampleJson === 'string') { + return sampleJson; + } else if (_.isObject(sampleJson)) { + var t = sampleJson; + + if (sampleJson instanceof Array && sampleJson.length > 0) { + t = sampleJson[0]; + } + + if (t.nodeName && typeof t === 'Node') { + var xmlString = new XMLSerializer().serializeToString(t); + + return this.formatXml(xmlString); + } else { + return JSON.stringify(sampleJson, null, 2); + } + } else { + return sampleJson; + } + } +}; + +/** + * legacy binding + **/ +Operation.prototype.do = function (args, opts, callback, error, parent) { + return this.execute(args, opts, callback, error, parent); +}; + +/** + * executes an operation + **/ +Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) { + var args = arg1 || {}; + var opts = {}, success, error, deferred, timeout; + + if (_.isObject(arg2)) { + opts = arg2; + success = arg3; + error = arg4; + } + + timeout = typeof opts.timeout !== 'undefined' + ? opts.timeout + : this.timeout; + + if(this.client) { + opts.client = this.client; + } + + // add the request interceptor from parent, if none sent from client + if(!opts.requestInterceptor && this.requestInterceptor ) { + opts.requestInterceptor = this.requestInterceptor ; + } + + if(!opts.responseInterceptor && this.responseInterceptor) { + opts.responseInterceptor = this.responseInterceptor; + } + + if (typeof arg2 === 'function') { + success = arg2; + error = arg3; + } + + if (this.parent.usePromise) { + deferred = Q.defer(); + } else { + success = (success || this.parent.defaultSuccessCallback || helpers.log); + error = (error || this.parent.defaultErrorCallback || helpers.log); + } + + if (typeof opts.useJQuery === 'undefined') { + opts.useJQuery = this.useJQuery; + } + + if (typeof opts.jqueryAjaxCache === 'undefined') { + opts.jqueryAjaxCache = this.jqueryAjaxCache; + } + + if (typeof opts.enableCookies === 'undefined') { + opts.enableCookies = this.enableCookies; + } + + var missingParams = this.getMissingParams(args); + + if (missingParams.length > 0) { + var message = 'missing required params: ' + missingParams; + + helpers.fail(message); + + if (this.parent.usePromise) { + deferred.reject(message); + return deferred.promise; + } else { + error(message, parent); + return {}; + } + } + + var allHeaders = this.getHeaderParams(args); + var contentTypeHeaders = this.setContentTypes(args, opts); + var headers = {}, attrname; + + for (attrname in allHeaders) { headers[attrname] = allHeaders[attrname]; } + for (attrname in contentTypeHeaders) { headers[attrname] = contentTypeHeaders[attrname]; } + + var body = this.getBody(contentTypeHeaders, args, opts); + var url = this.urlify(args); + + if(url.indexOf('.{format}') > 0) { + if(headers) { + var format = headers.Accept || headers.accept; + if(format && format.indexOf('json') > 0) { + url = url.replace('.{format}', '.json'); + } + else if(format && format.indexOf('xml') > 0) { + url = url.replace('.{format}', '.xml'); + } + } + } + + var obj = { + url: url, + method: this.method.toUpperCase(), + body: body, + enableCookies: opts.enableCookies, + useJQuery: opts.useJQuery, + jqueryAjaxCache: opts.jqueryAjaxCache, + deferred: deferred, + headers: headers, + clientAuthorizations: opts.clientAuthorizations, + on: { + response: function (response) { + if (deferred) { + deferred.resolve(response); + return deferred.promise; + } else { + return success(response, parent); + } + }, + error: function (response) { + if (deferred) { + deferred.reject(response); + return deferred.promise; + } else { + return error(response, parent); + } + } + } + }; + + if (timeout) { + obj.timeout = timeout; + } + + this.clientAuthorizations.apply(obj, this.operation.security); + if (opts.mock === true) { + return obj; + } else { + return new SwaggerHttp().execute(obj, opts); + } +}; + +function itemByPriority(col, itemPriority) { + + // No priorities? return first... + if(_.isEmpty(itemPriority)) { + return col[0]; + } + + for (var i = 0, len = itemPriority.length; i < len; i++) { + if(col.indexOf(itemPriority[i]) > -1) { + return itemPriority[i]; + } + } + + // Otherwise return first + return col[0]; +} + +Operation.prototype.setContentTypes = function (args, opts) { + // default type + var allDefinedParams = this.parameters; + var body; + var consumes = args.parameterContentType || itemByPriority(this.consumes, ['application/json', 'application/yaml']); + var accepts = opts.responseContentType || itemByPriority(this.produces, ['application/json', 'application/yaml']); + var definedFileParams = []; + var definedFormParams = []; + var headers = {}; + var i; + + // get params from the operation and set them in definedFileParams, definedFormParams, headers + for (i = 0; i < allDefinedParams.length; i++) { + var param = allDefinedParams[i]; + + if (param.in === 'formData') { + if (param.type === 'file') { + definedFileParams.push(param); + } else { + definedFormParams.push(param); + } + } else if (param.in === 'header' && opts) { + var key = param.name; + var headerValue = opts[param.name]; + + if (typeof opts[param.name] !== 'undefined') { + headers[key] = headerValue; + } + } else if (param.in === 'body' && typeof args[param.name] !== 'undefined') { + body = args[param.name]; + } + } + + // if there's a body, need to set the consumes header via requestContentType + var hasBody = body || definedFileParams.length || definedFormParams.length; + if (this.method === 'post' || this.method === 'put' || this.method === 'patch' || + ((this.method === 'delete' || this.method === 'get') && hasBody)) { + if (opts.requestContentType) { + consumes = opts.requestContentType; + } + // if any form params, content type must be set + if (definedFormParams.length > 0) { + consumes = undefined; + if (opts.requestContentType) { // override if set + consumes = opts.requestContentType; + } else if (definedFileParams.length > 0) { // if a file, must be multipart/form-data + consumes = 'multipart/form-data'; + } else { + if (this.consumes && this.consumes.length > 0) { + // use the consumes setting + for(var c in this.consumes) { + var chk = this.consumes[c]; + if(chk.indexOf('application/x-www-form-urlencoded') === 0 || chk.indexOf('multipart/form-data') === 0) { + consumes = chk; + } + } + } + } + if(typeof consumes === 'undefined') { + // default to x-www-from-urlencoded + consumes = 'application/x-www-form-urlencoded'; + } + } + } + else { + consumes = null; + } + + if (consumes && this.consumes) { + if (this.consumes.indexOf(consumes) === -1) { + helpers.log('server doesn\'t consume ' + consumes + ', try ' + JSON.stringify(this.consumes)); + } + } + + if (!this.matchesAccept(accepts)) { + helpers.log('server can\'t produce ' + accepts); + } + + if ((consumes && body !== '') || (consumes === 'application/x-www-form-urlencoded')) { + headers['Content-Type'] = consumes; + } + else if(this.consumes && this.consumes.length > 0 && this.consumes[0] === 'application/x-www-form-urlencoded') { + headers['Content-Type'] = this.consumes[0]; + } + + if (accepts) { + headers.Accept = accepts; + } + + return headers; +}; + +/** + * Returns true if the request accepts header matches anything in this.produces. + * If this.produces contains * / *, ignore the accept header. + * @param {string=} accepts The client request accept header. + * @return {boolean} + */ +Operation.prototype.matchesAccept = function(accepts) { + // no accepts or produces, no problem! + if (!accepts || !this.produces) { + return true; + } + return this.produces.indexOf(accepts) !== -1 || this.produces.indexOf('*/*') !== -1; +}; + +Operation.prototype.asCurl = function (args1, args2) { + var opts = {mock: true}; + if (typeof args2 === 'object') { + for (var argKey in args2) { + opts[argKey] = args2[argKey]; + } + } + var obj = this.execute(args1, opts); + + this.clientAuthorizations.apply(obj, this.operation.security); + + var results = []; + + results.push('-X ' + this.method.toUpperCase()); + + if (typeof obj.headers !== 'undefined') { + var key; + + for (key in obj.headers) { + var value = obj.headers[key]; + if(typeof value === 'string'){ + value = value.replace(/\'/g, '\\u0027'); + } + results.push('--header \'' + key + ': ' + value + '\''); + } + } + var isFormData = false; + var isMultipart = false; + + var type = obj.headers['Content-Type']; + if(type && type.indexOf('application/x-www-form-urlencoded') === 0) { + isFormData = true; + } + else if (type && type.indexOf('multipart/form-data') === 0) { + isFormData = true; + isMultipart = true; + } + + if (obj.body) { + var body; + if (_.isObject(obj.body)) { + if(isMultipart) { + isMultipart = true; + // add the form data + for(var i = 0; i < this.parameters.length; i++) { + var parameter = this.parameters[i]; + if(parameter.in === 'formData') { + if (!body) { + body = ''; + } + + var paramValue; + if(typeof FormData === 'function' && obj.body instanceof FormData) { + paramValue = obj.body.getAll(parameter.name); + } + else { + paramValue = obj.body[parameter.name]; + } + if (paramValue) { + if (parameter.type === 'file') { + if(paramValue.name) { + body += '-F ' + parameter.name + '=@"' + paramValue.name + '" '; + } + } + else { + if (Array.isArray(paramValue)) { + if(parameter.collectionFormat === 'multi') { + for(var v in paramValue) { + body += '-F ' + this.encodeQueryKey(parameter.name) + '=' + paramValue[v] + ' '; + } + } + else { + body += '-F ' + this.encodeQueryCollection(parameter.collectionFormat, parameter.name, paramValue) + ' '; + } + } else { + body += '-F ' + this.encodeQueryKey(parameter.name) + '=' + paramValue + ' '; + } + } + } + } + } + } + if(!body) { + body = JSON.stringify(obj.body); + } + } else { + body = obj.body; + } + // escape @ => %40, ' => %27 + body = body.replace(/\'/g, '%27').replace(/\n/g, ' \\ \n '); + + if(!isFormData) { + // escape & => %26 + body = body.replace(/&/g, '%26'); + } + if(isMultipart) { + results.push(body); + } + else { + results.push('-d \'' + body.replace(/@/g, '%40') + '\''); + } + } + + return 'curl ' + (results.join(' ')) + ' \'' + obj.url + '\''; +}; + +Operation.prototype.encodePathCollection = function (type, name, value) { + var encoded = ''; + var i; + var separator = ''; + + if (type === 'ssv') { + separator = '%20'; + } else if (type === 'tsv') { + separator = '%09'; + } else if (type === 'pipes') { + separator = '|'; + } else { + separator = ','; + } + + for (i = 0; i < value.length; i++) { + if (i === 0) { + encoded = this.encodeQueryParam(value[i]); + } else { + encoded += separator + this.encodeQueryParam(value[i]); + } + } + + return encoded; +}; + +Operation.prototype.encodeQueryCollection = function (type, name, value) { + var encoded = ''; + var i; + + type = type || 'default'; + if (type === 'default' || type === 'multi') { + for (i = 0; i < value.length; i++) { + if (i > 0) {encoded += '&';} + + encoded += this.encodeQueryKey(name) + '=' + this.encodeQueryParam(value[i]); + } + } else { + var separator = ''; + + if (type === 'csv') { + separator = ','; + } else if (type === 'ssv') { + separator = '%20'; + } else if (type === 'tsv') { + separator = '%09'; + } else if (type === 'pipes') { + separator = '|'; + } else if (type === 'brackets') { + for (i = 0; i < value.length; i++) { + if (i !== 0) { + encoded += '&'; + } + + encoded += this.encodeQueryKey(name) + '[]=' + this.encodeQueryParam(value[i]); + } + } + + if (separator !== '') { + for (i = 0; i < value.length; i++) { + if (i === 0) { + encoded = this.encodeQueryKey(name) + '=' + this.encodeQueryParam(value[i]); + } else { + encoded += separator + this.encodeQueryParam(value[i]); + } + } + } + } + + return encoded; +}; + +Operation.prototype.encodeQueryKey = function (arg) { + return encodeURIComponent(arg) + .replace('%5B','[').replace('%5D', ']').replace('%24', '$'); +}; + +Operation.prototype.encodeQueryParam = function (arg) { + return encodeURIComponent(arg); +}; + +/** + * TODO revisit, might not want to leave '/' + **/ +Operation.prototype.encodePathParam = function (pathParam) { + return encodeURIComponent(pathParam); +}; + +},{"../helpers":4,"../http":5,"./model":9,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isEmpty":141,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isUndefined":148,"q":157}],11:[function(require,module,exports){ +'use strict'; + +var OperationGroup = module.exports = function (tag, description, externalDocs, operation) { + this.description = description; + this.externalDocs = externalDocs; + this.name = tag; + this.operation = operation; + this.operationsArray = []; + this.path = tag; + this.tag = tag; +}; + +OperationGroup.prototype.sort = function () { + +}; + + +},{}],12:[function(require,module,exports){ +// shim for using process in browser + +var process = module.exports = {}; +var queue = []; +var draining = false; + +function drainQueue() { + if (draining) { + return; + } + draining = true; + var currentQueue; + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + var i = -1; + while (++i < len) { + currentQueue[i](); + } + len = queue.length; + } + draining = false; +} +process.nextTick = function (fun) { + queue.push(fun); + if (!draining) { + setTimeout(drainQueue, 0); + } +}; + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],13:[function(require,module,exports){ +(function (Buffer){ +(function () { + "use strict"; + + function btoa(str) { + var buffer + ; + + if (str instanceof Buffer) { + buffer = str; + } else { + buffer = new Buffer(str.toString(), 'binary'); + } + + return buffer.toString('base64'); + } + + module.exports = btoa; +}()); + +}).call(this,require("buffer").Buffer) +//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idG9hL2luZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiKGZ1bmN0aW9uICgpIHtcbiAgXCJ1c2Ugc3RyaWN0XCI7XG5cbiAgZnVuY3Rpb24gYnRvYShzdHIpIHtcbiAgICB2YXIgYnVmZmVyXG4gICAgICA7XG5cbiAgICBpZiAoc3RyIGluc3RhbmNlb2YgQnVmZmVyKSB7XG4gICAgICBidWZmZXIgPSBzdHI7XG4gICAgfSBlbHNlIHtcbiAgICAgIGJ1ZmZlciA9IG5ldyBCdWZmZXIoc3RyLnRvU3RyaW5nKCksICdiaW5hcnknKTtcbiAgICB9XG5cbiAgICByZXR1cm4gYnVmZmVyLnRvU3RyaW5nKCdiYXNlNjQnKTtcbiAgfVxuXG4gIG1vZHVsZS5leHBvcnRzID0gYnRvYTtcbn0oKSk7XG4iXX0= +},{"buffer":14}],14:[function(require,module,exports){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +var base64 = require('base64-js') +var ieee754 = require('ieee754') +var isArray = require('is-array') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 // not used by this implementation + +var rootParent = {} + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property + * on objects. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = (function () { + function Bar () {} + try { + var arr = new Uint8Array(1) + arr.foo = function () { return 42 } + arr.constructor = Bar + return arr.foo() === 42 && // typed array instances can be augmented + arr.constructor === Bar && // constructor can be set + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +})() + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + */ +function Buffer (arg) { + if (!(this instanceof Buffer)) { + // Avoid going through an ArgumentsAdaptorTrampoline in the common case. + if (arguments.length > 1) return new Buffer(arg, arguments[1]) + return new Buffer(arg) + } + + this.length = 0 + this.parent = undefined + + // Common case. + if (typeof arg === 'number') { + return fromNumber(this, arg) + } + + // Slightly less common case. + if (typeof arg === 'string') { + return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') + } + + // Unusual. + return fromObject(this, arg) +} + +function fromNumber (that, length) { + that = allocate(that, length < 0 ? 0 : checked(length) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < length; i++) { + that[i] = 0 + } + } + return that +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' + + // Assumption: byteLength() return value is always < kMaxLength. + var length = byteLength(string, encoding) | 0 + that = allocate(that, length) + + that.write(string, encoding) + return that +} + +function fromObject (that, object) { + if (Buffer.isBuffer(object)) return fromBuffer(that, object) + + if (isArray(object)) return fromArray(that, object) + + if (object == null) { + throw new TypeError('must start with number, buffer, array or string') + } + + if (typeof ArrayBuffer !== 'undefined') { + if (object.buffer instanceof ArrayBuffer) { + return fromTypedArray(that, object) + } + if (object instanceof ArrayBuffer) { + return fromArrayBuffer(that, object) + } + } + + if (object.length) return fromArrayLike(that, object) + + return fromJsonObject(that, object) +} + +function fromBuffer (that, buffer) { + var length = checked(buffer.length) | 0 + that = allocate(that, length) + buffer.copy(that, 0, 0, length) + return that +} + +function fromArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Duplicate of fromArray() to keep fromArray() monomorphic. +function fromTypedArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + // Truncating the elements is probably not what people expect from typed + // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior + // of the old Buffer constructor. + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayBuffer (that, array) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + array.byteLength + that = Buffer._augment(new Uint8Array(array)) + } else { + // Fallback: Return an object instance of the Buffer class + that = fromTypedArray(that, new Uint8Array(array)) + } + return that +} + +function fromArrayLike (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. +// Returns a zero-length buffer for inputs that don't conform to the spec. +function fromJsonObject (that, object) { + var array + var length = 0 + + if (object.type === 'Buffer' && isArray(object.data)) { + array = object.data + length = checked(array.length) | 0 + } + that = allocate(that, length) + + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function allocate (that, length) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = Buffer._augment(new Uint8Array(length)) + } else { + // Fallback: Return an object instance of the Buffer class + that.length = length + that._isBuffer = true + } + + var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 + if (fromPool) that.parent = rootParent + + return that +} + +function checked (length) { + // Note: cannot use `length < kMaxLength` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (subject, encoding) { + if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) + + var buf = new Buffer(subject, encoding) + delete buf.parent + return buf +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + var i = 0 + var len = Math.min(x, y) + while (i < len) { + if (a[i] !== b[i]) break + + ++i + } + + if (i !== len) { + x = a[i] + y = b[i] + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'raw': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') + + if (list.length === 0) { + return new Buffer(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; i++) { + length += list[i].length + } + } + + var buf = new Buffer(length) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} + +function byteLength (string, encoding) { + if (typeof string !== 'string') string = '' + string + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'binary': + // Deprecated + case 'raw': + case 'raws': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +// pre-set for values that may exist in the future +Buffer.prototype.length = undefined +Buffer.prototype.parent = undefined + +function slowToString (encoding, start, end) { + var loweredCase = false + + start = start | 0 + end = end === undefined || end === Infinity ? this.length : end | 0 + + if (!encoding) encoding = 'utf8' + if (start < 0) start = 0 + if (end > this.length) end = this.length + if (end <= start) return '' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'binary': + return binarySlice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return 0 + return Buffer.compare(this, b) +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset) { + if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff + else if (byteOffset < -0x80000000) byteOffset = -0x80000000 + byteOffset >>= 0 + + if (this.length === 0) return -1 + if (byteOffset >= this.length) return -1 + + // Negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) + + if (typeof val === 'string') { + if (val.length === 0) return -1 // special case: looking for empty string always fails + return String.prototype.indexOf.call(this, val, byteOffset) + } + if (Buffer.isBuffer(val)) { + return arrayIndexOf(this, val, byteOffset) + } + if (typeof val === 'number') { + if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { + return Uint8Array.prototype.indexOf.call(this, val, byteOffset) + } + return arrayIndexOf(this, [ val ], byteOffset) + } + + function arrayIndexOf (arr, val, byteOffset) { + var foundIndex = -1 + for (var i = 0; byteOffset + i < arr.length; i++) { + if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex + } else { + foundIndex = -1 + } + } + return -1 + } + + throw new TypeError('val must be string, number or Buffer') +} + +// `get` is deprecated +Buffer.prototype.get = function get (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} + +// `set` is deprecated +Buffer.prototype.set = function set (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new Error('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) throw new Error('Invalid hex string') + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + var swap = encoding + encoding = offset + offset = length | 0 + length = swap + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'binary': + return binaryWrite(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function binarySlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + } + + if (newBuf.length) newBuf.parent = this.parent || this + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = value + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = value + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = value + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = value + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = value + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = value + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = value + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') + if (offset < 0) throw new RangeError('index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + var i + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; i--) { + target[i + targetStart] = this[i + start] + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; i++) { + target[i + targetStart] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), targetStart) + } + + return len +} + +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function fill (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + if (end < start) throw new RangeError('end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') + if (end < 0 || end > this.length) throw new RangeError('end out of bounds') + + var i + if (typeof value === 'number') { + for (i = start; i < end; i++) { + this[i] = value + } + } else { + var bytes = utf8ToBytes(value.toString()) + var len = bytes.length + for (i = start; i < end; i++) { + this[i] = bytes[i % len] + } + } + + return this +} + +/** + * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. + * Added in Node 0.12. Only available in browsers that support ArrayBuffer. + */ +Buffer.prototype.toArrayBuffer = function toArrayBuffer () { + if (typeof Uint8Array !== 'undefined') { + if (Buffer.TYPED_ARRAY_SUPPORT) { + return (new Buffer(this)).buffer + } else { + var buf = new Uint8Array(this.length) + for (var i = 0, len = buf.length; i < len; i += 1) { + buf[i] = this[i] + } + return buf.buffer + } + } else { + throw new TypeError('Buffer.toArrayBuffer not supported in this browser') + } +} + +// HELPER FUNCTIONS +// ================ + +var BP = Buffer.prototype + +/** + * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods + */ +Buffer._augment = function _augment (arr) { + arr.constructor = Buffer + arr._isBuffer = true + + // save reference to original Uint8Array set method before overwriting + arr._set = arr.set + + // deprecated + arr.get = BP.get + arr.set = BP.set + + arr.write = BP.write + arr.toString = BP.toString + arr.toLocaleString = BP.toString + arr.toJSON = BP.toJSON + arr.equals = BP.equals + arr.compare = BP.compare + arr.indexOf = BP.indexOf + arr.copy = BP.copy + arr.slice = BP.slice + arr.readUIntLE = BP.readUIntLE + arr.readUIntBE = BP.readUIntBE + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + arr.readIntLE = BP.readIntLE + arr.readIntBE = BP.readIntBE + arr.readInt8 = BP.readInt8 + arr.readInt16LE = BP.readInt16LE + arr.readInt16BE = BP.readInt16BE + arr.readInt32LE = BP.readInt32LE + arr.readInt32BE = BP.readInt32BE + arr.readFloatLE = BP.readFloatLE + arr.readFloatBE = BP.readFloatBE + arr.readDoubleLE = BP.readDoubleLE + arr.readDoubleBE = BP.readDoubleBE + arr.writeUInt8 = BP.writeUInt8 + arr.writeUIntLE = BP.writeUIntLE + arr.writeUIntBE = BP.writeUIntBE + arr.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + arr.writeIntLE = BP.writeIntLE + arr.writeIntBE = BP.writeIntBE + arr.writeInt8 = BP.writeInt8 + arr.writeInt16LE = BP.writeInt16LE + arr.writeInt16BE = BP.writeInt16BE + arr.writeInt32LE = BP.writeInt32LE + arr.writeInt32BE = BP.writeInt32BE + arr.writeFloatLE = BP.writeFloatLE + arr.writeFloatBE = BP.writeFloatBE + arr.writeDoubleLE = BP.writeDoubleLE + arr.writeDoubleBE = BP.writeDoubleBE + arr.fill = BP.fill + arr.inspect = BP.inspect + arr.toArrayBuffer = BP.toArrayBuffer + + return arr +} + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; i++) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; i++) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +},{"base64-js":15,"ieee754":16,"is-array":17}],15:[function(require,module,exports){ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],16:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],17:[function(require,module,exports){ + +/** + * isArray + */ + +var isArray = Array.isArray; + +/** + * toString + */ + +var str = Object.prototype.toString; + +/** + * Whether or not the given `val` + * is an array. + * + * example: + * + * isArray([]); + * // > true + * isArray(arguments); + * // > false + * isArray(''); + * // > false + * + * @param {mixed} val + * @return {bool} + */ + +module.exports = isArray || function (val) { + return !! val && '[object Array]' == str.call(val); +}; + +},{}],18:[function(require,module,exports){ +/* jshint node: true */ +(function () { + "use strict"; + + function CookieAccessInfo(domain, path, secure, script) { + if (this instanceof CookieAccessInfo) { + this.domain = domain || undefined; + this.path = path || "/"; + this.secure = !!secure; + this.script = !!script; + return this; + } + return new CookieAccessInfo(domain, path, secure, script); + } + exports.CookieAccessInfo = CookieAccessInfo; + + function Cookie(cookiestr, request_domain, request_path) { + if (cookiestr instanceof Cookie) { + return cookiestr; + } + if (this instanceof Cookie) { + this.name = null; + this.value = null; + this.expiration_date = Infinity; + this.path = String(request_path || "/"); + this.explicit_path = false; + this.domain = request_domain || null; + this.explicit_domain = false; + this.secure = false; //how to define default? + this.noscript = false; //httponly + if (cookiestr) { + this.parse(cookiestr, request_domain, request_path); + } + return this; + } + return new Cookie(cookiestr, request_domain, request_path); + } + exports.Cookie = Cookie; + + Cookie.prototype.toString = function toString() { + var str = [this.name + "=" + this.value]; + if (this.expiration_date !== Infinity) { + str.push("expires=" + (new Date(this.expiration_date)).toGMTString()); + } + if (this.domain) { + str.push("domain=" + this.domain); + } + if (this.path) { + str.push("path=" + this.path); + } + if (this.secure) { + str.push("secure"); + } + if (this.noscript) { + str.push("httponly"); + } + return str.join("; "); + }; + + Cookie.prototype.toValueString = function toValueString() { + return this.name + "=" + this.value; + }; + + var cookie_str_splitter = /[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g; + Cookie.prototype.parse = function parse(str, request_domain, request_path) { + if (this instanceof Cookie) { + var parts = str.split(";").filter(function (value) { + return !!value; + }), + pair = parts[0].match(/([^=]+)=([\s\S]*)/), + key = pair[1], + value = pair[2], + i; + this.name = key; + this.value = value; + + for (i = 1; i < parts.length; i += 1) { + pair = parts[i].match(/([^=]+)(?:=([\s\S]*))?/); + key = pair[1].trim().toLowerCase(); + value = pair[2]; + switch (key) { + case "httponly": + this.noscript = true; + break; + case "expires": + this.expiration_date = value ? + Number(Date.parse(value)) : + Infinity; + break; + case "path": + this.path = value ? + value.trim() : + ""; + this.explicit_path = true; + break; + case "domain": + this.domain = value ? + value.trim() : + ""; + this.explicit_domain = !!this.domain; + break; + case "secure": + this.secure = true; + break; + } + } + + if (!this.explicit_path) { + this.path = request_path || "/"; + } + if (!this.explicit_domain) { + this.domain = request_domain; + } + + return this; + } + return new Cookie().parse(str, request_domain, request_path); + }; + + Cookie.prototype.matches = function matches(access_info) { + if (this.noscript && access_info.script || + this.secure && !access_info.secure || + !this.collidesWith(access_info)) { + return false; + } + return true; + }; + + Cookie.prototype.collidesWith = function collidesWith(access_info) { + if ((this.path && !access_info.path) || (this.domain && !access_info.domain)) { + return false; + } + if (this.path && access_info.path.indexOf(this.path) !== 0) { + return false; + } + if (this.explicit_path && access_info.path.indexOf( this.path ) !== 0) { + return false; + } + var access_domain = access_info.domain && access_info.domain.replace(/^[\.]/,''); + var cookie_domain = this.domain && this.domain.replace(/^[\.]/,''); + if (cookie_domain === access_domain) { + return true; + } + if (cookie_domain) { + if (!this.explicit_domain) { + return false; // we already checked if the domains were exactly the same + } + var wildcard = access_domain.indexOf(cookie_domain); + if (wildcard === -1 || wildcard !== access_domain.length - cookie_domain.length) { + return false; + } + return true; + } + return true; + }; + + function CookieJar() { + var cookies, cookies_list, collidable_cookie; + if (this instanceof CookieJar) { + cookies = Object.create(null); //name: [Cookie] + + this.setCookie = function setCookie(cookie, request_domain, request_path) { + var remove, i; + cookie = new Cookie(cookie, request_domain, request_path); + //Delete the cookie if the set is past the current time + remove = cookie.expiration_date <= Date.now(); + if (cookies[cookie.name] !== undefined) { + cookies_list = cookies[cookie.name]; + for (i = 0; i < cookies_list.length; i += 1) { + collidable_cookie = cookies_list[i]; + if (collidable_cookie.collidesWith(cookie)) { + if (remove) { + cookies_list.splice(i, 1); + if (cookies_list.length === 0) { + delete cookies[cookie.name]; + } + return false; + } + cookies_list[i] = cookie; + return cookie; + } + } + if (remove) { + return false; + } + cookies_list.push(cookie); + return cookie; + } + if (remove) { + return false; + } + cookies[cookie.name] = [cookie]; + return cookies[cookie.name]; + }; + //returns a cookie + this.getCookie = function getCookie(cookie_name, access_info) { + var cookie, i; + cookies_list = cookies[cookie_name]; + if (!cookies_list) { + return; + } + for (i = 0; i < cookies_list.length; i += 1) { + cookie = cookies_list[i]; + if (cookie.expiration_date <= Date.now()) { + if (cookies_list.length === 0) { + delete cookies[cookie.name]; + } + continue; + } + + if (cookie.matches(access_info)) { + return cookie; + } + } + }; + //returns a list of cookies + this.getCookies = function getCookies(access_info) { + var matches = [], cookie_name, cookie; + for (cookie_name in cookies) { + cookie = this.getCookie(cookie_name, access_info); + if (cookie) { + matches.push(cookie); + } + } + matches.toString = function toString() { + return matches.join(":"); + }; + matches.toValueString = function toValueString() { + return matches.map(function (c) { + return c.toValueString(); + }).join(';'); + }; + return matches; + }; + + return this; + } + return new CookieJar(); + } + exports.CookieJar = CookieJar; + + //returns list of cookies that were set correctly. Cookies that are expired and removed are not returned. + CookieJar.prototype.setCookies = function setCookies(cookies, request_domain, request_path) { + cookies = Array.isArray(cookies) ? + cookies : + cookies.split(cookie_str_splitter); + var successful = [], + i, + cookie; + cookies = cookies.map(function(item){ + return new Cookie(item, request_domain, request_path); + }); + for (i = 0; i < cookies.length; i += 1) { + cookie = cookies[i]; + if (this.setCookie(cookie, request_domain, request_path)) { + successful.push(cookie); + } + } + return successful; + }; +}()); + +},{}],19:[function(require,module,exports){ +'use strict'; + + +var yaml = require('./lib/js-yaml.js'); + + +module.exports = yaml; + +},{"./lib/js-yaml.js":20}],20:[function(require,module,exports){ +'use strict'; + + +var loader = require('./js-yaml/loader'); +var dumper = require('./js-yaml/dumper'); + + +function deprecated(name) { + return function () { + throw new Error('Function ' + name + ' is deprecated and cannot be used.'); + }; +} + + +module.exports.Type = require('./js-yaml/type'); +module.exports.Schema = require('./js-yaml/schema'); +module.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe'); +module.exports.JSON_SCHEMA = require('./js-yaml/schema/json'); +module.exports.CORE_SCHEMA = require('./js-yaml/schema/core'); +module.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); +module.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full'); +module.exports.load = loader.load; +module.exports.loadAll = loader.loadAll; +module.exports.safeLoad = loader.safeLoad; +module.exports.safeLoadAll = loader.safeLoadAll; +module.exports.dump = dumper.dump; +module.exports.safeDump = dumper.safeDump; +module.exports.YAMLException = require('./js-yaml/exception'); + +// Deprecated schema names from JS-YAML 2.0.x +module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe'); +module.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); +module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full'); + +// Deprecated functions from JS-YAML 1.x.x +module.exports.scan = deprecated('scan'); +module.exports.parse = deprecated('parse'); +module.exports.compose = deprecated('compose'); +module.exports.addConstructor = deprecated('addConstructor'); + +},{"./js-yaml/dumper":22,"./js-yaml/exception":23,"./js-yaml/loader":24,"./js-yaml/schema":26,"./js-yaml/schema/core":27,"./js-yaml/schema/default_full":28,"./js-yaml/schema/default_safe":29,"./js-yaml/schema/failsafe":30,"./js-yaml/schema/json":31,"./js-yaml/type":32}],21:[function(require,module,exports){ +'use strict'; + + +function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); +} + + +function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); +} + + +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; +} + + +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; +} + + +function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; +} + + +function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); +} + + +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; + +},{}],22:[function(require,module,exports){ +'use strict'; + +/*eslint-disable no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); +var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); + +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + + type = schema.compiledTypeMap[tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + +function State(options) { + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// Simplified test for values allowed after the first character in plain style. +function isPlainSafe(c) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // - ":" - "#" + && c !== CHAR_COLON + && c !== CHAR_SHARP; +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-†| “?†| “:†| “,†| “[†| “]†| “{†| “}†+ && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#†| “&†| “*†| “!†| “|†| “>†| “'†| “"†+ && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%†| “@†| “`â€) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(string.charCodeAt(0)) + && !isWhitespace(string.charCodeAt(string.length - 1)); + + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) + ? STYLE_PLAIN : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (string[0] === ' ' && indentPerLevel > 9) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey) { + state.dump = (function () { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && + DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = (string[0] === ' ') ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) + ? string[i] + : escapeSeq || encodeHex(char); + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += ', '; + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + _result += '- ' + state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (index !== 0) pairBuffer += ', '; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + ': '; + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + state.tag = explicit ? type.tag : '?'; + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + writeBlockSequence(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + state.dump = '!<' + state.tag + '> ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; + + return ''; +} + +function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + +module.exports.dump = dump; +module.exports.safeDump = safeDump; + +},{"./common":21,"./exception":23,"./schema/default_full":28,"./schema/default_safe":29}],23:[function(require,module,exports){ +// YAML error class. http://stackoverflow.com/questions/8458984 +// +'use strict'; + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ': '; + + result += this.reason || '(unknown reason)'; + + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } + + return result; +}; + + +module.exports = YAMLException; + +},{}],24:[function(require,module,exports){ +'use strict'; + +/*eslint-disable max-len,no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var Mark = require('./mark'); +var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); +var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode(((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + return new YAMLException( + message, + new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; + _position < _length; + _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode) { + var index, quantity; + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + throwError(state, 'duplicated mapping key'); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = captureEnd = state.position; + state.position++; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = {}, + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else { + break; // Reading is done. Go to the epilogue. + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if (state.lineIndent > nodeIndent && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; + typeIndex < typeQuantity; + typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only assigned to plain scalars. So, it isn't + // needed to check for 'kind' conformity. + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap, state.tag)) { + type = state.typeMap[state.tag]; + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + var documents = loadDocuments(input, options), index, length; + + for (index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +function safeLoadAll(input, output, options) { + loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + + +function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + + +module.exports.loadAll = loadAll; +module.exports.load = load; +module.exports.safeLoadAll = safeLoadAll; +module.exports.safeLoad = safeLoad; + +},{"./common":21,"./exception":23,"./mark":25,"./schema/default_full":28,"./schema/default_safe":29}],25:[function(require,module,exports){ +'use strict'; + + +var common = require('./common'); + + +function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; +} + + +Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + + if (!this.buffer) return null; + + indent = indent || 4; + maxLength = maxLength || 75; + + head = ''; + start = this.position; + + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > (maxLength / 2 - 1)) { + head = ' ... '; + start += 5; + break; + } + } + + tail = ''; + end = this.position; + + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > (maxLength / 2 - 1)) { + tail = ' ... '; + end -= 5; + break; + } + } + + snippet = this.buffer.slice(start, end); + + return common.repeat(' ', indent) + head + snippet + tail + '\n' + + common.repeat(' ', indent + this.position - start + head.length) + '^'; +}; + + +Mark.prototype.toString = function toString(compact) { + var snippet, where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; + } + + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; + } + } + + return where; +}; + + +module.exports = Mark; + +},{"./common":21}],26:[function(require,module,exports){ +'use strict'; + +/*eslint-disable max-len*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var Type = require('./type'); + + +function compileList(schema, name, result) { + var exclude = []; + + schema.include.forEach(function (includedSchema) { + result = compileList(includedSchema, name, result); + }); + + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag) { + exclude.push(previousIndex); + } + }); + + result.push(currentType); + }); + + return result.filter(function (type, index) { + return exclude.indexOf(index) === -1; + }); +} + + +function compileMap(/* lists... */) { + var result = {}, index, length; + + function collectType(type) { + result[type.tag] = type; + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + + return result; +} + + +function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + + this.implicit.forEach(function (type) { + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + }); + + this.compiledImplicit = compileList(this, 'implicit', []); + this.compiledExplicit = compileList(this, 'explicit', []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); +} + + +Schema.DEFAULT = null; + + +Schema.create = function createSchema() { + var schemas, types; + + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + + default: + throw new YAMLException('Wrong number of arguments for Schema.create function'); + } + + schemas = common.toArray(schemas); + types = common.toArray(types); + + if (!schemas.every(function (schema) { return schema instanceof Schema; })) { + throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); + } + + if (!types.every(function (type) { return type instanceof Type; })) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + return new Schema({ + include: schemas, + explicit: types + }); +}; + + +module.exports = Schema; + +},{"./common":21,"./exception":23,"./type":32}],27:[function(require,module,exports){ +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./json') + ] +}); + +},{"../schema":26,"./json":31}],28:[function(require,module,exports){ +// JS-YAML's default schema for `load` function. +// It is not described in the YAML specification. +// +// This schema is based on JS-YAML's default safe schema and includes +// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. +// +// Also this schema is used as default base schema at `Schema.create` function. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = Schema.DEFAULT = new Schema({ + include: [ + require('./default_safe') + ], + explicit: [ + require('../type/js/undefined'), + require('../type/js/regexp'), + require('../type/js/function') + ] +}); + +},{"../schema":26,"../type/js/function":37,"../type/js/regexp":38,"../type/js/undefined":39,"./default_safe":29}],29:[function(require,module,exports){ +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./core') + ], + implicit: [ + require('../type/timestamp'), + require('../type/merge') + ], + explicit: [ + require('../type/binary'), + require('../type/omap'), + require('../type/pairs'), + require('../type/set') + ] +}); + +},{"../schema":26,"../type/binary":33,"../type/merge":41,"../type/omap":43,"../type/pairs":44,"../type/set":46,"../type/timestamp":48,"./core":27}],30:[function(require,module,exports){ +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + explicit: [ + require('../type/str'), + require('../type/seq'), + require('../type/map') + ] +}); + +},{"../schema":26,"../type/map":40,"../type/seq":45,"../type/str":47}],31:[function(require,module,exports){ +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./failsafe') + ], + implicit: [ + require('../type/null'), + require('../type/bool'), + require('../type/int'), + require('../type/float') + ] +}); + +},{"../schema":26,"../type/bool":34,"../type/float":35,"../type/int":36,"../type/null":42,"./failsafe":30}],32:[function(require,module,exports){ +'use strict'; + +var YAMLException = require('./exception'); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; + +},{"./exception":23}],33:[function(require,module,exports){ +'use strict'; + +/*eslint-disable no-bitwise*/ + +var NodeBuffer; + +try { + // A trick for browserified version, to not include `Buffer` shim + var _require = require; + NodeBuffer = _require('buffer').Buffer; +} catch (__) {} + +var Type = require('../type'); + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + // Wrap into Buffer for NodeJS and leave Array for browser + if (NodeBuffer) return new NodeBuffer(result); + + return result; +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); +} + +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); + +},{"../type":32}],34:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); + +},{"../type":32}],35:[function(require,module,exports){ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +var YAML_FLOAT_PATTERN = new RegExp( + '^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?' + + '|\\.[0-9_]+(?:[eE][-+][0-9]+)?' + + '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + + '|[-+]?\\.(?:inf|Inf|INF)' + + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data)) return false; + + return true; +} + +function constructYamlFloat(data) { + var value, sign, base, digits; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + digits = []; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + + } else if (value.indexOf(':') >= 0) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); + + value = 0.0; + base = 1; + + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + + return sign * value; + + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); + +},{"../common":21,"../type":32}],36:[function(require,module,exports){ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits; + } + + // base 8 + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits; + } + + // base 10 (except 0) or base 60 + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch === ':') break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + if (!hasDigits) return false; + + // if !base60 - done; + if (ch !== ':') return true; + + // base60 almost not used, no needs to optimize + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + + if (value.indexOf(':') !== -1) { + value.split(':').forEach(function (v) { + digits.unshift(parseInt(v, 10)); + }); + + value = 0; + base = 1; + + digits.forEach(function (d) { + value += (d * base); + base *= 60; + }); + + return sign * value; + + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (object) { return '0b' + object.toString(2); }, + octal: function (object) { return '0' + object.toString(8); }, + decimal: function (object) { return object.toString(10); }, + hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); + +},{"../common":21,"../type":32}],37:[function(require,module,exports){ +'use strict'; + +var esprima; + +// Browserified version does not have esprima +// +// 1. For node.js just require module as deps +// 2. For browser try to require mudule via external AMD system. +// If not found - try to fallback to window.esprima. If not +// found too - then fail to parse. +// +try { + // workaround to exclude package from browserify list. + var _require = require; + esprima = _require('esprima'); +} catch (_) { + /*global window */ + if (typeof window !== 'undefined') esprima = window.esprima; +} + +var Type = require('../../type'); + +function resolveJavascriptFunction(data) { + if (data === null) return false; + + try { + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }); + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + ast.body[0].expression.type !== 'FunctionExpression') { + return false; + } + + return true; + } catch (err) { + return false; + } +} + +function constructJavascriptFunction(data) { + /*jslint evil:true*/ + + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }), + params = [], + body; + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + ast.body[0].expression.type !== 'FunctionExpression') { + throw new Error('Failed to resolve function'); + } + + ast.body[0].expression.params.forEach(function (param) { + params.push(param.name); + }); + + body = ast.body[0].expression.body.range; + + // Esprima's ranges include the first '{' and the last '}' characters on + // function expressions. So cut them out. + /*eslint-disable no-new-func*/ + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); +} + +function representJavascriptFunction(object /*, style*/) { + return object.toString(); +} + +function isFunction(object) { + return Object.prototype.toString.call(object) === '[object Function]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/function', { + kind: 'scalar', + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction +}); + +},{"../../type":32}],38:[function(require,module,exports){ +'use strict'; + +var Type = require('../../type'); + +function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; + + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // if regexp starts with '/' it can have modifiers and must be properly closed + // `/foo/gim` - modifiers tail can be maximum 3 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + + if (modifiers.length > 3) return false; + // if expression starts with /, is should be properly terminated + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; + } + + return true; +} + +function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // `/foo/gim` - tail can be maximum 4 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + + return new RegExp(regexp, modifiers); +} + +function representJavascriptRegExp(object /*, style*/) { + var result = '/' + object.source + '/'; + + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; + + return result; +} + +function isRegExp(object) { + return Object.prototype.toString.call(object) === '[object RegExp]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp +}); + +},{"../../type":32}],39:[function(require,module,exports){ +'use strict'; + +var Type = require('../../type'); + +function resolveJavascriptUndefined() { + return true; +} + +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; +} + +function representJavascriptUndefined() { + return ''; +} + +function isUndefined(object) { + return typeof object === 'undefined'; +} + +module.exports = new Type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); + +},{"../../type":32}],40:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); + +},{"../type":32}],41:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + +},{"../type":32}],42:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; } + }, + defaultStyle: 'lowercase' +}); + +},{"../type":32}],43:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); + +},{"../type":32}],44:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var _toString = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); + +},{"../type":32}],45:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); + +},{"../type":32}],46:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + +},{"../type":32}],47:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); + +},{"../type":32}],48:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + +},{"../type":32}],49:[function(require,module,exports){ +var baseIndexOf = require('../internal/baseIndexOf'), + binaryIndex = require('../internal/binaryIndex'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + * + * // performing a binary search + * _.indexOf([1, 1, 2, 2], 2, true); + * // => 2 + */ +function indexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else if (fromIndex) { + var index = binaryIndex(array, value); + if (index < length && + (value === value ? (value === array[index]) : (array[index] !== array[index]))) { + return index; + } + return -1; + } + return baseIndexOf(array, value, fromIndex || 0); +} + +module.exports = indexOf; + +},{"../internal/baseIndexOf":78,"../internal/binaryIndex":92}],50:[function(require,module,exports){ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; +} + +module.exports = last; + +},{}],51:[function(require,module,exports){ +var LazyWrapper = require('../internal/LazyWrapper'), + LodashWrapper = require('../internal/LodashWrapper'), + baseLodash = require('../internal/baseLodash'), + isArray = require('../lang/isArray'), + isObjectLike = require('../internal/isObjectLike'), + wrapperClone = require('../internal/wrapperClone'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a `lodash` object which wraps `value` to enable implicit chaining. + * Methods that operate on and return arrays, collections, and functions can + * be chained together. Methods that retrieve a single value or may return a + * primitive value will automatically end the chain returning the unwrapped + * value. Explicit chaining may be enabled using `_.chain`. The execution of + * chained methods is lazy, that is, execution is deferred until `_#value` + * is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. Shortcut + * fusion is an optimization strategy which merge iteratee calls; this can help + * to avoid the creation of intermediate data structures and greatly reduce the + * number of iteratee executions. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, + * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, + * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, + * and `where` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, + * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, + * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`, + * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`, + * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, + * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`, + * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`, + * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`, + * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`, + * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, + * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`, + * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, + * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`, + * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`, + * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, + * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, + * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`, + * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, + * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`, + * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, + * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, + * `unescape`, `uniqueId`, `value`, and `words` + * + * The wrapper method `sample` will return a wrapped value when `n` is provided, + * otherwise an unwrapped value is returned. + * + * @name _ + * @constructor + * @category Chain + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(total, n) { + * return total + n; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(n) { + * return n * n; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ +function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); +} + +// Ensure wrappers are instances of `baseLodash`. +lodash.prototype = baseLodash.prototype; + +module.exports = lodash; + +},{"../internal/LazyWrapper":60,"../internal/LodashWrapper":61,"../internal/baseLodash":82,"../internal/isObjectLike":126,"../internal/wrapperClone":137,"../lang/isArray":140}],52:[function(require,module,exports){ +module.exports = require('./forEach'); + +},{"./forEach":54}],53:[function(require,module,exports){ +var baseEach = require('../internal/baseEach'), + createFind = require('../internal/createFind'); + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias detect + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.result(_.find(users, function(chr) { + * return chr.age < 40; + * }), 'user'); + * // => 'barney' + * + * // using the `_.matches` callback shorthand + * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.result(_.find(users, 'active', false), 'user'); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.result(_.find(users, 'active'), 'user'); + * // => 'barney' + */ +var find = createFind(baseEach); + +module.exports = find; + +},{"../internal/baseEach":71,"../internal/createFind":102}],54:[function(require,module,exports){ +var arrayEach = require('../internal/arrayEach'), + baseEach = require('../internal/baseEach'), + createForEach = require('../internal/createForEach'); + +/** + * Iterates over elements of `collection` invoking `iteratee` for each element. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early + * by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEach(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from left to right and returns the array + * + * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { + * console.log(n, key); + * }); + * // => logs each value-key pair and returns the object (iteration order is not guaranteed) + */ +var forEach = createForEach(arrayEach, baseEach); + +module.exports = forEach; + +},{"../internal/arrayEach":63,"../internal/baseEach":71,"../internal/createForEach":103}],55:[function(require,module,exports){ +var baseIndexOf = require('../internal/baseIndexOf'), + getLength = require('../internal/getLength'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'), + isLength = require('../internal/isLength'), + isString = require('../lang/isString'), + values = require('../object/values'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `target` is in `collection` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `collection`. + * + * @static + * @memberOf _ + * @alias contains, include + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {*} target The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {boolean} Returns `true` if a matching element is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.includes('pebbles', 'eb'); + * // => true + */ +function includes(collection, target, fromIndex, guard) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + collection = values(collection); + length = collection.length; + } + if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { + fromIndex = 0; + } else { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); + } + return (typeof collection == 'string' || !isArray(collection) && isString(collection)) + ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) + : (!!length && baseIndexOf(collection, target, fromIndex) > -1); +} + +module.exports = includes; + +},{"../internal/baseIndexOf":78,"../internal/getLength":112,"../internal/isIterateeCall":122,"../internal/isLength":125,"../lang/isArray":140,"../lang/isString":146,"../object/values":152}],56:[function(require,module,exports){ +var arrayMap = require('../internal/arrayMap'), + baseCallback = require('../internal/baseCallback'), + baseMap = require('../internal/baseMap'), + isArray = require('../lang/isArray'); + +/** + * Creates an array of values by running each element in `collection` through + * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, + * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, + * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, + * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, + * `sum`, `uniq`, and `words` + * + * @static + * @memberOf _ + * @alias collect + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new mapped array. + * @example + * + * function timesThree(n) { + * return n * 3; + * } + * + * _.map([1, 2], timesThree); + * // => [3, 6] + * + * _.map({ 'a': 1, 'b': 2 }, timesThree); + * // => [3, 6] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // using the `_.property` callback shorthand + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee, thisArg) { + var func = isArray(collection) ? arrayMap : baseMap; + iteratee = baseCallback(iteratee, thisArg, 3); + return func(collection, iteratee); +} + +module.exports = map; + +},{"../internal/arrayMap":64,"../internal/baseCallback":67,"../internal/baseMap":83,"../lang/isArray":140}],57:[function(require,module,exports){ +var getNative = require('../internal/getNative'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeNow = getNative(Date, 'now'); + +/** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Date + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => logs the number of milliseconds it took for the deferred function to be invoked + */ +var now = nativeNow || function() { + return new Date().getTime(); +}; + +module.exports = now; + +},{"../internal/getNative":114}],58:[function(require,module,exports){ +var createWrapper = require('../internal/createWrapper'), + replaceHolders = require('../internal/replaceHolders'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and prepends any additional `_.bind` arguments to those provided to the + * bound function. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind` this method does not set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var greet = function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * }; + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // using placeholders + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = restParam(function(func, thisArg, partials) { + var bitmask = BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bind.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +module.exports = bind; + +},{"../internal/createWrapper":106,"../internal/replaceHolders":132,"./restParam":59}],59:[function(require,module,exports){ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; + +},{}],60:[function(require,module,exports){ +var baseCreate = require('./baseCreate'), + baseLodash = require('./baseLodash'); + +/** Used as references for `-Infinity` and `Infinity`. */ +var POSITIVE_INFINITY = Number.POSITIVE_INFINITY; + +/** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @param {*} value The value to wrap. + */ +function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = POSITIVE_INFINITY; + this.__views__ = []; +} + +LazyWrapper.prototype = baseCreate(baseLodash.prototype); +LazyWrapper.prototype.constructor = LazyWrapper; + +module.exports = LazyWrapper; + +},{"./baseCreate":70,"./baseLodash":82}],61:[function(require,module,exports){ +var baseCreate = require('./baseCreate'), + baseLodash = require('./baseLodash'); + +/** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable chaining for all wrapper methods. + * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value. + */ +function LodashWrapper(value, chainAll, actions) { + this.__wrapped__ = value; + this.__actions__ = actions || []; + this.__chain__ = !!chainAll; +} + +LodashWrapper.prototype = baseCreate(baseLodash.prototype); +LodashWrapper.prototype.constructor = LodashWrapper; + +module.exports = LodashWrapper; + +},{"./baseCreate":70,"./baseLodash":82}],62:[function(require,module,exports){ +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function arrayCopy(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = arrayCopy; + +},{}],63:[function(require,module,exports){ +/** + * A specialized version of `_.forEach` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; + +},{}],64:[function(require,module,exports){ +/** + * A specialized version of `_.map` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; + +},{}],65:[function(require,module,exports){ +/** + * A specialized version of `_.some` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; + +},{}],66:[function(require,module,exports){ +var baseCopy = require('./baseCopy'), + keys = require('../object/keys'); + +/** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); +} + +module.exports = baseAssign; + +},{"../object/keys":149,"./baseCopy":69}],67:[function(require,module,exports){ +var baseMatches = require('./baseMatches'), + baseMatchesProperty = require('./baseMatchesProperty'), + bindCallback = require('./bindCallback'), + identity = require('../utility/identity'), + property = require('../utility/property'); + +/** + * The base implementation of `_.callback` which supports specifying the + * number of arguments to provide to `func`. + * + * @private + * @param {*} [func=_.identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function baseCallback(func, thisArg, argCount) { + var type = typeof func; + if (type == 'function') { + return thisArg === undefined + ? func + : bindCallback(func, thisArg, argCount); + } + if (func == null) { + return identity; + } + if (type == 'object') { + return baseMatches(func); + } + return thisArg === undefined + ? property(func) + : baseMatchesProperty(func, thisArg); +} + +module.exports = baseCallback; + +},{"../utility/identity":154,"../utility/property":156,"./baseMatches":84,"./baseMatchesProperty":85,"./bindCallback":94}],68:[function(require,module,exports){ +var arrayCopy = require('./arrayCopy'), + arrayEach = require('./arrayEach'), + baseAssign = require('./baseAssign'), + baseForOwn = require('./baseForOwn'), + initCloneArray = require('./initCloneArray'), + initCloneByTag = require('./initCloneByTag'), + initCloneObject = require('./initCloneObject'), + isArray = require('../lang/isArray'), + isHostObject = require('./isHostObject'), + isObject = require('../lang/isObject'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = +cloneableTags[dateTag] = cloneableTags[float32Tag] = +cloneableTags[float64Tag] = cloneableTags[int8Tag] = +cloneableTags[int16Tag] = cloneableTags[int32Tag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[stringTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[mapTag] = cloneableTags[setTag] = +cloneableTags[weakMapTag] = false; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * The base implementation of `_.clone` without support for argument juggling + * and `this` binding `customizer` functions. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The object `value` belongs to. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { + var result; + if (customizer) { + result = object ? customizer(value, key, object) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return arrayCopy(value, result); + } + } else { + var tag = objToString.call(value), + isFunc = tag == funcTag; + + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return baseAssign(result, value); + } + } else { + return cloneableTags[tag] + ? initCloneByTag(value, tag, isDeep) + : (object ? value : {}); + } + } + // Check for circular references and return its corresponding clone. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + // Add the source value to the stack of traversed objects and associate it with its clone. + stackA.push(value); + stackB.push(result); + + // Recursively populate clone (susceptible to call stack limits). + (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { + result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); + }); + return result; +} + +module.exports = baseClone; + +},{"../lang/isArray":140,"../lang/isObject":144,"./arrayCopy":62,"./arrayEach":63,"./baseAssign":66,"./baseForOwn":76,"./initCloneArray":116,"./initCloneByTag":117,"./initCloneObject":118,"./isHostObject":120}],69:[function(require,module,exports){ +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ +function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; +} + +module.exports = baseCopy; + +},{}],70:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(prototype) { + if (isObject(prototype)) { + object.prototype = prototype; + var result = new object; + object.prototype = undefined; + } + return result || {}; + }; +}()); + +module.exports = baseCreate; + +},{"../lang/isObject":144}],71:[function(require,module,exports){ +var baseForOwn = require('./baseForOwn'), + createBaseEach = require('./createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; + +},{"./baseForOwn":76,"./createBaseEach":98}],72:[function(require,module,exports){ +/** + * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, + * without support for callback shorthands and `this` binding, which iterates + * over `collection` using the provided `eachFunc`. + * + * @private + * @param {Array|Object|string} collection The collection to search. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @param {boolean} [retKey] Specify returning the key of the found element + * instead of the element itself. + * @returns {*} Returns the found element or its key, else `undefined`. + */ +function baseFind(collection, predicate, eachFunc, retKey) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = retKey ? key : value; + return false; + } + }); + return result; +} + +module.exports = baseFind; + +},{}],73:[function(require,module,exports){ +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to search. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +module.exports = baseFindIndex; + +},{}],74:[function(require,module,exports){ +var createBaseFor = require('./createBaseFor'); + +/** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; + +},{"./createBaseFor":99}],75:[function(require,module,exports){ +var baseFor = require('./baseFor'), + keysIn = require('../object/keysIn'); + +/** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); +} + +module.exports = baseForIn; + +},{"../object/keysIn":150,"./baseFor":74}],76:[function(require,module,exports){ +var baseFor = require('./baseFor'), + keys = require('../object/keys'); + +/** + * The base implementation of `_.forOwn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; + +},{"../object/keys":149,"./baseFor":74}],77:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * The base implementation of `get` without support for string paths + * and default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path of the property to get. + * @param {string} [pathKey] The key representation of path. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path, pathKey) { + if (object == null) { + return; + } + object = toObject(object); + if (pathKey !== undefined && pathKey in object) { + path = [pathKey]; + } + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = toObject(object)[path[index++]]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; + +},{"./toObject":135}],78:[function(require,module,exports){ +var indexOfNaN = require('./indexOfNaN'); + +/** + * The base implementation of `_.indexOf` without support for binary searches. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return indexOfNaN(array, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = baseIndexOf; + +},{"./indexOfNaN":115}],79:[function(require,module,exports){ +var baseIsEqualDeep = require('./baseIsEqualDeep'), + isObject = require('../lang/isObject'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` without support for `this` binding + * `customizer` functions. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); +} + +module.exports = baseIsEqual; + +},{"../lang/isObject":144,"./baseIsEqualDeep":80,"./isObjectLike":126}],80:[function(require,module,exports){ +var equalArrays = require('./equalArrays'), + equalByTag = require('./equalByTag'), + equalObjects = require('./equalObjects'), + isArray = require('../lang/isArray'), + isHostObject = require('./isHostObject'), + isTypedArray = require('../lang/isTypedArray'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing objects. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `value` objects. + * @param {Array} [stackB=[]] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = objToString.call(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = objToString.call(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag && !isHostObject(object), + othIsObj = othTag == objectTag && !isHostObject(other), + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag); + } + if (!isLoose) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + } + } + if (!isSameTag) { + return false; + } + // Assume cyclic values are equal. + // For more information on detecting circular references see https://es5.github.io/#JO. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == object) { + return stackB[length] == other; + } + } + // Add `object` and `other` to the stack of traversed objects. + stackA.push(object); + stackB.push(other); + + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); + + stackA.pop(); + stackB.pop(); + + return result; +} + +module.exports = baseIsEqualDeep; + +},{"../lang/isArray":140,"../lang/isTypedArray":147,"./equalArrays":107,"./equalByTag":108,"./equalObjects":109,"./isHostObject":120}],81:[function(require,module,exports){ +var baseIsEqual = require('./baseIsEqual'), + toObject = require('./toObject'); + +/** + * The base implementation of `_.isMatch` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} matchData The propery names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparing objects. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = toObject(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var result = customizer ? customizer(objValue, srcValue, key) : undefined; + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; + +},{"./baseIsEqual":79,"./toObject":135}],82:[function(require,module,exports){ +/** + * The function whose prototype all chaining wrappers inherit from. + * + * @private + */ +function baseLodash() { + // No operation performed. +} + +module.exports = baseLodash; + +},{}],83:[function(require,module,exports){ +var baseEach = require('./baseEach'), + isArrayLike = require('./isArrayLike'); + +/** + * The base implementation of `_.map` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +module.exports = baseMap; + +},{"./baseEach":71,"./isArrayLike":119}],84:[function(require,module,exports){ +var baseIsMatch = require('./baseIsMatch'), + getMatchData = require('./getMatchData'), + toObject = require('./toObject'); + +/** + * The base implementation of `_.matches` which does not clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + object = toObject(object); + return object[key] === value && (value !== undefined || (key in object)); + }; + } + return function(object) { + return baseIsMatch(object, matchData); + }; +} + +module.exports = baseMatches; + +},{"./baseIsMatch":81,"./getMatchData":113,"./toObject":135}],85:[function(require,module,exports){ +var baseGet = require('./baseGet'), + baseIsEqual = require('./baseIsEqual'), + baseSlice = require('./baseSlice'), + isArray = require('../lang/isArray'), + isKey = require('./isKey'), + isStrictComparable = require('./isStrictComparable'), + last = require('../array/last'), + toObject = require('./toObject'), + toPath = require('./toPath'); + +/** + * The base implementation of `_.matchesProperty` which does not clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to compare. + * @returns {Function} Returns the new function. + */ +function baseMatchesProperty(path, srcValue) { + var isArr = isArray(path), + isCommon = isKey(path) && isStrictComparable(srcValue), + pathKey = (path + ''); + + path = toPath(path); + return function(object) { + if (object == null) { + return false; + } + var key = pathKey; + object = toObject(object); + if ((isArr || !isCommon) && !(key in object)) { + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + key = last(path); + object = toObject(object); + } + return object[key] === srcValue + ? (srcValue !== undefined || (key in object)) + : baseIsEqual(srcValue, object[key], undefined, true); + }; +} + +module.exports = baseMatchesProperty; + +},{"../array/last":50,"../lang/isArray":140,"./baseGet":77,"./baseIsEqual":79,"./baseSlice":89,"./isKey":123,"./isStrictComparable":127,"./toObject":135,"./toPath":136}],86:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : toObject(object)[key]; + }; +} + +module.exports = baseProperty; + +},{"./toObject":135}],87:[function(require,module,exports){ +var baseGet = require('./baseGet'), + toPath = require('./toPath'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ +function basePropertyDeep(path) { + var pathKey = (path + ''); + path = toPath(path); + return function(object) { + return baseGet(object, path, pathKey); + }; +} + +module.exports = basePropertyDeep; + +},{"./baseGet":77,"./toPath":136}],88:[function(require,module,exports){ +var identity = require('../utility/identity'), + metaMap = require('./metaMap'); + +/** + * The base implementation of `setData` without support for hot loop detection. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; +}; + +module.exports = baseSetData; + +},{"../utility/identity":154,"./metaMap":129}],89:[function(require,module,exports){ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; + +},{}],90:[function(require,module,exports){ +/** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + return value == null ? '' : (value + ''); +} + +module.exports = baseToString; + +},{}],91:[function(require,module,exports){ +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + var index = -1, + length = props.length, + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + return result; +} + +module.exports = baseValues; + +},{}],92:[function(require,module,exports){ +var binaryIndexBy = require('./binaryIndexBy'), + identity = require('../utility/identity'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + +/** + * Performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function binaryIndex(array, value, retHighest) { + var low = 0, + high = array ? array.length : low; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return binaryIndexBy(array, value, identity, retHighest); +} + +module.exports = binaryIndex; + +},{"../utility/identity":154,"./binaryIndexBy":93}],93:[function(require,module,exports){ +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeMin = Math.min; + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; + +/** + * This function is like `binaryIndex` except that it invokes `iteratee` for + * `value` and each element of `array` to compute their sort ranking. The + * iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The function invoked per iteration. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function binaryIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array ? array.length : 0, + valIsNaN = value !== value, + valIsNull = value === null, + valIsUndef = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + isDef = computed !== undefined, + isReflexive = computed === computed; + + if (valIsNaN) { + var setLow = isReflexive || retHighest; + } else if (valIsNull) { + setLow = isReflexive && isDef && (retHighest || computed != null); + } else if (valIsUndef) { + setLow = isReflexive && (retHighest || isDef); + } else if (computed == null) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); +} + +module.exports = binaryIndexBy; + +},{}],94:[function(require,module,exports){ +var identity = require('../utility/identity'); + +/** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; +} + +module.exports = bindCallback; + +},{"../utility/identity":154}],95:[function(require,module,exports){ +(function (global){ +/** Native method references. */ +var ArrayBuffer = global.ArrayBuffer, + Uint8Array = global.Uint8Array; + +/** + * Creates a clone of the given array buffer. + * + * @private + * @param {ArrayBuffer} buffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function bufferClone(buffer) { + var result = new ArrayBuffer(buffer.byteLength), + view = new Uint8Array(result); + + view.set(new Uint8Array(buffer)); + return result; +} + +module.exports = bufferClone; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2J1ZmZlckNsb25lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBOYXRpdmUgbWV0aG9kIHJlZmVyZW5jZXMuICovXG52YXIgQXJyYXlCdWZmZXIgPSBnbG9iYWwuQXJyYXlCdWZmZXIsXG4gICAgVWludDhBcnJheSA9IGdsb2JhbC5VaW50OEFycmF5O1xuXG4vKipcbiAqIENyZWF0ZXMgYSBjbG9uZSBvZiB0aGUgZ2l2ZW4gYXJyYXkgYnVmZmVyLlxuICpcbiAqIEBwcml2YXRlXG4gKiBAcGFyYW0ge0FycmF5QnVmZmVyfSBidWZmZXIgVGhlIGFycmF5IGJ1ZmZlciB0byBjbG9uZS5cbiAqIEByZXR1cm5zIHtBcnJheUJ1ZmZlcn0gUmV0dXJucyB0aGUgY2xvbmVkIGFycmF5IGJ1ZmZlci5cbiAqL1xuZnVuY3Rpb24gYnVmZmVyQ2xvbmUoYnVmZmVyKSB7XG4gIHZhciByZXN1bHQgPSBuZXcgQXJyYXlCdWZmZXIoYnVmZmVyLmJ5dGVMZW5ndGgpLFxuICAgICAgdmlldyA9IG5ldyBVaW50OEFycmF5KHJlc3VsdCk7XG5cbiAgdmlldy5zZXQobmV3IFVpbnQ4QXJyYXkoYnVmZmVyKSk7XG4gIHJldHVybiByZXN1bHQ7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gYnVmZmVyQ2xvbmU7XG4iXX0= +},{}],96:[function(require,module,exports){ +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgs(args, partials, holders) { + var holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + leftIndex = -1, + leftLength = partials.length, + result = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + while (argsLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; +} + +module.exports = composeArgs; + +},{}],97:[function(require,module,exports){ +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgsRight(args, partials, holders) { + var holdersIndex = -1, + holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + rightIndex = -1, + rightLength = partials.length, + result = Array(argsLength + rightLength); + + while (++argsIndex < argsLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + return result; +} + +module.exports = composeArgsRight; + +},{}],98:[function(require,module,exports){ +var getLength = require('./getLength'), + isLength = require('./isLength'), + toObject = require('./toObject'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + return eachFunc(collection, iteratee); + } + var index = fromRight ? length : -1, + iterable = toObject(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; + +},{"./getLength":112,"./isLength":125,"./toObject":135}],99:[function(require,module,exports){ +var toObject = require('./toObject'); + +/** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; + +},{"./toObject":135}],100:[function(require,module,exports){ +(function (global){ +var createCtorWrapper = require('./createCtorWrapper'); + +/** + * Creates a function that wraps `func` and invokes it with the `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new bound function. + */ +function createBindWrapper(func, thisArg) { + var Ctor = createCtorWrapper(func); + + function wrapper() { + var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func; + return fn.apply(thisArg, arguments); + } + return wrapper; +} + +module.exports = createBindWrapper; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZUJpbmRXcmFwcGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY3JlYXRlQ3RvcldyYXBwZXIgPSByZXF1aXJlKCcuL2NyZWF0ZUN0b3JXcmFwcGVyJyk7XG5cbi8qKlxuICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgd3JhcHMgYGZ1bmNgIGFuZCBpbnZva2VzIGl0IHdpdGggdGhlIGB0aGlzYFxuICogYmluZGluZyBvZiBgdGhpc0FyZ2AuXG4gKlxuICogQHByaXZhdGVcbiAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGJpbmQuXG4gKiBAcGFyYW0geyp9IFt0aGlzQXJnXSBUaGUgYHRoaXNgIGJpbmRpbmcgb2YgYGZ1bmNgLlxuICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgYm91bmQgZnVuY3Rpb24uXG4gKi9cbmZ1bmN0aW9uIGNyZWF0ZUJpbmRXcmFwcGVyKGZ1bmMsIHRoaXNBcmcpIHtcbiAgdmFyIEN0b3IgPSBjcmVhdGVDdG9yV3JhcHBlcihmdW5jKTtcblxuICBmdW5jdGlvbiB3cmFwcGVyKCkge1xuICAgIHZhciBmbiA9ICh0aGlzICYmIHRoaXMgIT09IGdsb2JhbCAmJiB0aGlzIGluc3RhbmNlb2Ygd3JhcHBlcikgPyBDdG9yIDogZnVuYztcbiAgICByZXR1cm4gZm4uYXBwbHkodGhpc0FyZywgYXJndW1lbnRzKTtcbiAgfVxuICByZXR1cm4gd3JhcHBlcjtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBjcmVhdGVCaW5kV3JhcHBlcjtcbiJdfQ== +},{"./createCtorWrapper":101}],101:[function(require,module,exports){ +var baseCreate = require('./baseCreate'), + isObject = require('../lang/isObject'); + +/** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ +function createCtorWrapper(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. + // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; +} + +module.exports = createCtorWrapper; + +},{"../lang/isObject":144,"./baseCreate":70}],102:[function(require,module,exports){ +var baseCallback = require('./baseCallback'), + baseFind = require('./baseFind'), + baseFindIndex = require('./baseFindIndex'), + isArray = require('../lang/isArray'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ +function createFind(eachFunc, fromRight) { + return function(collection, predicate, thisArg) { + predicate = baseCallback(predicate, thisArg, 3); + if (isArray(collection)) { + var index = baseFindIndex(collection, predicate, fromRight); + return index > -1 ? collection[index] : undefined; + } + return baseFind(collection, predicate, eachFunc); + }; +} + +module.exports = createFind; + +},{"../lang/isArray":140,"./baseCallback":67,"./baseFind":72,"./baseFindIndex":73}],103:[function(require,module,exports){ +var bindCallback = require('./bindCallback'), + isArray = require('../lang/isArray'); + +/** + * Creates a function for `_.forEach` or `_.forEachRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ +function createForEach(arrayFunc, eachFunc) { + return function(collection, iteratee, thisArg) { + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee) + : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); + }; +} + +module.exports = createForEach; + +},{"../lang/isArray":140,"./bindCallback":94}],104:[function(require,module,exports){ +(function (global){ +var arrayCopy = require('./arrayCopy'), + composeArgs = require('./composeArgs'), + composeArgsRight = require('./composeArgsRight'), + createCtorWrapper = require('./createCtorWrapper'), + isLaziable = require('./isLaziable'), + reorder = require('./reorder'), + replaceHolders = require('./replaceHolders'), + setData = require('./setData'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + CURRY_BOUND_FLAG = 4, + CURRY_FLAG = 8, + CURRY_RIGHT_FLAG = 16, + PARTIAL_FLAG = 32, + PARTIAL_RIGHT_FLAG = 64, + ARY_FLAG = 128; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that wraps `func` and invokes it with optional `this` + * binding of, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & ARY_FLAG, + isBind = bitmask & BIND_FLAG, + isBindKey = bitmask & BIND_KEY_FLAG, + isCurry = bitmask & CURRY_FLAG, + isCurryBound = bitmask & CURRY_BOUND_FLAG, + isCurryRight = bitmask & CURRY_RIGHT_FLAG, + Ctor = isBindKey ? undefined : createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it to other functions. + var length = arguments.length, + index = length, + args = Array(length); + + while (index--) { + args[index] = arguments[index]; + } + if (partials) { + args = composeArgs(args, partials, holders); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight); + } + if (isCurry || isCurryRight) { + var placeholder = wrapper.placeholder, + argsHolders = replaceHolders(args, placeholder); + + length -= argsHolders.length; + if (length < arity) { + var newArgPos = argPos ? arrayCopy(argPos) : undefined, + newArity = nativeMax(arity - length, 0), + newsHolders = isCurry ? argsHolders : undefined, + newHoldersRight = isCurry ? undefined : argsHolders, + newPartials = isCurry ? args : undefined, + newPartialsRight = isCurry ? undefined : args; + + bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); + + if (!isCurryBound) { + bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); + } + var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity], + result = createHybridWrapper.apply(undefined, newData); + + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return result; + } + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + if (argPos) { + args = reorder(args, argPos); + } + if (isAry && ary < args.length) { + args.length = ary; + } + if (this && this !== global && this instanceof wrapper) { + fn = Ctor || createCtorWrapper(func); + } + return fn.apply(thisBinding, args); + } + return wrapper; +} + +module.exports = createHybridWrapper; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZUh5YnJpZFdyYXBwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYXJyYXlDb3B5ID0gcmVxdWlyZSgnLi9hcnJheUNvcHknKSxcbiAgICBjb21wb3NlQXJncyA9IHJlcXVpcmUoJy4vY29tcG9zZUFyZ3MnKSxcbiAgICBjb21wb3NlQXJnc1JpZ2h0ID0gcmVxdWlyZSgnLi9jb21wb3NlQXJnc1JpZ2h0JyksXG4gICAgY3JlYXRlQ3RvcldyYXBwZXIgPSByZXF1aXJlKCcuL2NyZWF0ZUN0b3JXcmFwcGVyJyksXG4gICAgaXNMYXppYWJsZSA9IHJlcXVpcmUoJy4vaXNMYXppYWJsZScpLFxuICAgIHJlb3JkZXIgPSByZXF1aXJlKCcuL3Jlb3JkZXInKSxcbiAgICByZXBsYWNlSG9sZGVycyA9IHJlcXVpcmUoJy4vcmVwbGFjZUhvbGRlcnMnKSxcbiAgICBzZXREYXRhID0gcmVxdWlyZSgnLi9zZXREYXRhJyk7XG5cbi8qKiBVc2VkIHRvIGNvbXBvc2UgYml0bWFza3MgZm9yIHdyYXBwZXIgbWV0YWRhdGEuICovXG52YXIgQklORF9GTEFHID0gMSxcbiAgICBCSU5EX0tFWV9GTEFHID0gMixcbiAgICBDVVJSWV9CT1VORF9GTEFHID0gNCxcbiAgICBDVVJSWV9GTEFHID0gOCxcbiAgICBDVVJSWV9SSUdIVF9GTEFHID0gMTYsXG4gICAgUEFSVElBTF9GTEFHID0gMzIsXG4gICAgUEFSVElBTF9SSUdIVF9GTEFHID0gNjQsXG4gICAgQVJZX0ZMQUcgPSAxMjg7XG5cbi8qIE5hdGl2ZSBtZXRob2QgcmVmZXJlbmNlcyBmb3IgdGhvc2Ugd2l0aCB0aGUgc2FtZSBuYW1lIGFzIG90aGVyIGBsb2Rhc2hgIG1ldGhvZHMuICovXG52YXIgbmF0aXZlTWF4ID0gTWF0aC5tYXg7XG5cbi8qKlxuICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgd3JhcHMgYGZ1bmNgIGFuZCBpbnZva2VzIGl0IHdpdGggb3B0aW9uYWwgYHRoaXNgXG4gKiBiaW5kaW5nIG9mLCBwYXJ0aWFsIGFwcGxpY2F0aW9uLCBhbmQgY3VycnlpbmcuXG4gKlxuICogQHByaXZhdGVcbiAqIEBwYXJhbSB7RnVuY3Rpb258c3RyaW5nfSBmdW5jIFRoZSBmdW5jdGlvbiBvciBtZXRob2QgbmFtZSB0byByZWZlcmVuY2UuXG4gKiBAcGFyYW0ge251bWJlcn0gYml0bWFzayBUaGUgYml0bWFzayBvZiBmbGFncy4gU2VlIGBjcmVhdGVXcmFwcGVyYCBmb3IgbW9yZSBkZXRhaWxzLlxuICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBmdW5jYC5cbiAqIEBwYXJhbSB7QXJyYXl9IFtwYXJ0aWFsc10gVGhlIGFyZ3VtZW50cyB0byBwcmVwZW5kIHRvIHRob3NlIHByb3ZpZGVkIHRvIHRoZSBuZXcgZnVuY3Rpb24uXG4gKiBAcGFyYW0ge0FycmF5fSBbaG9sZGVyc10gVGhlIGBwYXJ0aWFsc2AgcGxhY2Vob2xkZXIgaW5kZXhlcy5cbiAqIEBwYXJhbSB7QXJyYXl9IFtwYXJ0aWFsc1JpZ2h0XSBUaGUgYXJndW1lbnRzIHRvIGFwcGVuZCB0byB0aG9zZSBwcm92aWRlZCB0byB0aGUgbmV3IGZ1bmN0aW9uLlxuICogQHBhcmFtIHtBcnJheX0gW2hvbGRlcnNSaWdodF0gVGhlIGBwYXJ0aWFsc1JpZ2h0YCBwbGFjZWhvbGRlciBpbmRleGVzLlxuICogQHBhcmFtIHtBcnJheX0gW2FyZ1Bvc10gVGhlIGFyZ3VtZW50IHBvc2l0aW9ucyBvZiB0aGUgbmV3IGZ1bmN0aW9uLlxuICogQHBhcmFtIHtudW1iZXJ9IFthcnldIFRoZSBhcml0eSBjYXAgb2YgYGZ1bmNgLlxuICogQHBhcmFtIHtudW1iZXJ9IFthcml0eV0gVGhlIGFyaXR5IG9mIGBmdW5jYC5cbiAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IHdyYXBwZWQgZnVuY3Rpb24uXG4gKi9cbmZ1bmN0aW9uIGNyZWF0ZUh5YnJpZFdyYXBwZXIoZnVuYywgYml0bWFzaywgdGhpc0FyZywgcGFydGlhbHMsIGhvbGRlcnMsIHBhcnRpYWxzUmlnaHQsIGhvbGRlcnNSaWdodCwgYXJnUG9zLCBhcnksIGFyaXR5KSB7XG4gIHZhciBpc0FyeSA9IGJpdG1hc2sgJiBBUllfRkxBRyxcbiAgICAgIGlzQmluZCA9IGJpdG1hc2sgJiBCSU5EX0ZMQUcsXG4gICAgICBpc0JpbmRLZXkgPSBiaXRtYXNrICYgQklORF9LRVlfRkxBRyxcbiAgICAgIGlzQ3VycnkgPSBiaXRtYXNrICYgQ1VSUllfRkxBRyxcbiAgICAgIGlzQ3VycnlCb3VuZCA9IGJpdG1hc2sgJiBDVVJSWV9CT1VORF9GTEFHLFxuICAgICAgaXNDdXJyeVJpZ2h0ID0gYml0bWFzayAmIENVUlJZX1JJR0hUX0ZMQUcsXG4gICAgICBDdG9yID0gaXNCaW5kS2V5ID8gdW5kZWZpbmVkIDogY3JlYXRlQ3RvcldyYXBwZXIoZnVuYyk7XG5cbiAgZnVuY3Rpb24gd3JhcHBlcigpIHtcbiAgICAvLyBBdm9pZCBgYXJndW1lbnRzYCBvYmplY3QgdXNlIGRpc3F1YWxpZnlpbmcgb3B0aW1pemF0aW9ucyBieVxuICAgIC8vIGNvbnZlcnRpbmcgaXQgdG8gYW4gYXJyYXkgYmVmb3JlIHByb3ZpZGluZyBpdCB0byBvdGhlciBmdW5jdGlvbnMuXG4gICAgdmFyIGxlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGgsXG4gICAgICAgIGluZGV4ID0gbGVuZ3RoLFxuICAgICAgICBhcmdzID0gQXJyYXkobGVuZ3RoKTtcblxuICAgIHdoaWxlIChpbmRleC0tKSB7XG4gICAgICBhcmdzW2luZGV4XSA9IGFyZ3VtZW50c1tpbmRleF07XG4gICAgfVxuICAgIGlmIChwYXJ0aWFscykge1xuICAgICAgYXJncyA9IGNvbXBvc2VBcmdzKGFyZ3MsIHBhcnRpYWxzLCBob2xkZXJzKTtcbiAgICB9XG4gICAgaWYgKHBhcnRpYWxzUmlnaHQpIHtcbiAgICAgIGFyZ3MgPSBjb21wb3NlQXJnc1JpZ2h0KGFyZ3MsIHBhcnRpYWxzUmlnaHQsIGhvbGRlcnNSaWdodCk7XG4gICAgfVxuICAgIGlmIChpc0N1cnJ5IHx8IGlzQ3VycnlSaWdodCkge1xuICAgICAgdmFyIHBsYWNlaG9sZGVyID0gd3JhcHBlci5wbGFjZWhvbGRlcixcbiAgICAgICAgICBhcmdzSG9sZGVycyA9IHJlcGxhY2VIb2xkZXJzKGFyZ3MsIHBsYWNlaG9sZGVyKTtcblxuICAgICAgbGVuZ3RoIC09IGFyZ3NIb2xkZXJzLmxlbmd0aDtcbiAgICAgIGlmIChsZW5ndGggPCBhcml0eSkge1xuICAgICAgICB2YXIgbmV3QXJnUG9zID0gYXJnUG9zID8gYXJyYXlDb3B5KGFyZ1BvcykgOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZXdBcml0eSA9IG5hdGl2ZU1heChhcml0eSAtIGxlbmd0aCwgMCksXG4gICAgICAgICAgICBuZXdzSG9sZGVycyA9IGlzQ3VycnkgPyBhcmdzSG9sZGVycyA6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIG5ld0hvbGRlcnNSaWdodCA9IGlzQ3VycnkgPyB1bmRlZmluZWQgOiBhcmdzSG9sZGVycyxcbiAgICAgICAgICAgIG5ld1BhcnRpYWxzID0gaXNDdXJyeSA/IGFyZ3MgOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZXdQYXJ0aWFsc1JpZ2h0ID0gaXNDdXJyeSA/IHVuZGVmaW5lZCA6IGFyZ3M7XG5cbiAgICAgICAgYml0bWFzayB8PSAoaXNDdXJyeSA/IFBBUlRJQUxfRkxBRyA6IFBBUlRJQUxfUklHSFRfRkxBRyk7XG4gICAgICAgIGJpdG1hc2sgJj0gfihpc0N1cnJ5ID8gUEFSVElBTF9SSUdIVF9GTEFHIDogUEFSVElBTF9GTEFHKTtcblxuICAgICAgICBpZiAoIWlzQ3VycnlCb3VuZCkge1xuICAgICAgICAgIGJpdG1hc2sgJj0gfihCSU5EX0ZMQUcgfCBCSU5EX0tFWV9GTEFHKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgbmV3RGF0YSA9IFtmdW5jLCBiaXRtYXNrLCB0aGlzQXJnLCBuZXdQYXJ0aWFscywgbmV3c0hvbGRlcnMsIG5ld1BhcnRpYWxzUmlnaHQsIG5ld0hvbGRlcnNSaWdodCwgbmV3QXJnUG9zLCBhcnksIG5ld0FyaXR5XSxcbiAgICAgICAgICAgIHJlc3VsdCA9IGNyZWF0ZUh5YnJpZFdyYXBwZXIuYXBwbHkodW5kZWZpbmVkLCBuZXdEYXRhKTtcblxuICAgICAgICBpZiAoaXNMYXppYWJsZShmdW5jKSkge1xuICAgICAgICAgIHNldERhdGEocmVzdWx0LCBuZXdEYXRhKTtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHQucGxhY2Vob2xkZXIgPSBwbGFjZWhvbGRlcjtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgIH1cbiAgICB9XG4gICAgdmFyIHRoaXNCaW5kaW5nID0gaXNCaW5kID8gdGhpc0FyZyA6IHRoaXMsXG4gICAgICAgIGZuID0gaXNCaW5kS2V5ID8gdGhpc0JpbmRpbmdbZnVuY10gOiBmdW5jO1xuXG4gICAgaWYgKGFyZ1Bvcykge1xuICAgICAgYXJncyA9IHJlb3JkZXIoYXJncywgYXJnUG9zKTtcbiAgICB9XG4gICAgaWYgKGlzQXJ5ICYmIGFyeSA8IGFyZ3MubGVuZ3RoKSB7XG4gICAgICBhcmdzLmxlbmd0aCA9IGFyeTtcbiAgICB9XG4gICAgaWYgKHRoaXMgJiYgdGhpcyAhPT0gZ2xvYmFsICYmIHRoaXMgaW5zdGFuY2VvZiB3cmFwcGVyKSB7XG4gICAgICBmbiA9IEN0b3IgfHwgY3JlYXRlQ3RvcldyYXBwZXIoZnVuYyk7XG4gICAgfVxuICAgIHJldHVybiBmbi5hcHBseSh0aGlzQmluZGluZywgYXJncyk7XG4gIH1cbiAgcmV0dXJuIHdyYXBwZXI7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gY3JlYXRlSHlicmlkV3JhcHBlcjtcbiJdfQ== +},{"./arrayCopy":62,"./composeArgs":96,"./composeArgsRight":97,"./createCtorWrapper":101,"./isLaziable":124,"./reorder":131,"./replaceHolders":132,"./setData":133}],105:[function(require,module,exports){ +(function (global){ +var createCtorWrapper = require('./createCtorWrapper'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` and invokes it with the optional `this` + * binding of `thisArg` and the `partials` prepended to those provided to + * the wrapper. + * + * @private + * @param {Function} func The function to partially apply arguments to. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to the new function. + * @returns {Function} Returns the new bound function. + */ +function createPartialWrapper(func, bitmask, thisArg, partials) { + var isBind = bitmask & BIND_FLAG, + Ctor = createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it `func`. + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; +} + +module.exports = createPartialWrapper; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZVBhcnRpYWxXcmFwcGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY3JlYXRlQ3RvcldyYXBwZXIgPSByZXF1aXJlKCcuL2NyZWF0ZUN0b3JXcmFwcGVyJyk7XG5cbi8qKiBVc2VkIHRvIGNvbXBvc2UgYml0bWFza3MgZm9yIHdyYXBwZXIgbWV0YWRhdGEuICovXG52YXIgQklORF9GTEFHID0gMTtcblxuLyoqXG4gKiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCB3cmFwcyBgZnVuY2AgYW5kIGludm9rZXMgaXQgd2l0aCB0aGUgb3B0aW9uYWwgYHRoaXNgXG4gKiBiaW5kaW5nIG9mIGB0aGlzQXJnYCBhbmQgdGhlIGBwYXJ0aWFsc2AgcHJlcGVuZGVkIHRvIHRob3NlIHByb3ZpZGVkIHRvXG4gKiB0aGUgd3JhcHBlci5cbiAqXG4gKiBAcHJpdmF0ZVxuICogQHBhcmFtIHtGdW5jdGlvbn0gZnVuYyBUaGUgZnVuY3Rpb24gdG8gcGFydGlhbGx5IGFwcGx5IGFyZ3VtZW50cyB0by5cbiAqIEBwYXJhbSB7bnVtYmVyfSBiaXRtYXNrIFRoZSBiaXRtYXNrIG9mIGZsYWdzLiBTZWUgYGNyZWF0ZVdyYXBwZXJgIGZvciBtb3JlIGRldGFpbHMuXG4gKiBAcGFyYW0geyp9IHRoaXNBcmcgVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBmdW5jYC5cbiAqIEBwYXJhbSB7QXJyYXl9IHBhcnRpYWxzIFRoZSBhcmd1bWVudHMgdG8gcHJlcGVuZCB0byB0aG9zZSBwcm92aWRlZCB0byB0aGUgbmV3IGZ1bmN0aW9uLlxuICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgYm91bmQgZnVuY3Rpb24uXG4gKi9cbmZ1bmN0aW9uIGNyZWF0ZVBhcnRpYWxXcmFwcGVyKGZ1bmMsIGJpdG1hc2ssIHRoaXNBcmcsIHBhcnRpYWxzKSB7XG4gIHZhciBpc0JpbmQgPSBiaXRtYXNrICYgQklORF9GTEFHLFxuICAgICAgQ3RvciA9IGNyZWF0ZUN0b3JXcmFwcGVyKGZ1bmMpO1xuXG4gIGZ1bmN0aW9uIHdyYXBwZXIoKSB7XG4gICAgLy8gQXZvaWQgYGFyZ3VtZW50c2Agb2JqZWN0IHVzZSBkaXNxdWFsaWZ5aW5nIG9wdGltaXphdGlvbnMgYnlcbiAgICAvLyBjb252ZXJ0aW5nIGl0IHRvIGFuIGFycmF5IGJlZm9yZSBwcm92aWRpbmcgaXQgYGZ1bmNgLlxuICAgIHZhciBhcmdzSW5kZXggPSAtMSxcbiAgICAgICAgYXJnc0xlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGgsXG4gICAgICAgIGxlZnRJbmRleCA9IC0xLFxuICAgICAgICBsZWZ0TGVuZ3RoID0gcGFydGlhbHMubGVuZ3RoLFxuICAgICAgICBhcmdzID0gQXJyYXkobGVmdExlbmd0aCArIGFyZ3NMZW5ndGgpO1xuXG4gICAgd2hpbGUgKCsrbGVmdEluZGV4IDwgbGVmdExlbmd0aCkge1xuICAgICAgYXJnc1tsZWZ0SW5kZXhdID0gcGFydGlhbHNbbGVmdEluZGV4XTtcbiAgICB9XG4gICAgd2hpbGUgKGFyZ3NMZW5ndGgtLSkge1xuICAgICAgYXJnc1tsZWZ0SW5kZXgrK10gPSBhcmd1bWVudHNbKythcmdzSW5kZXhdO1xuICAgIH1cbiAgICB2YXIgZm4gPSAodGhpcyAmJiB0aGlzICE9PSBnbG9iYWwgJiYgdGhpcyBpbnN0YW5jZW9mIHdyYXBwZXIpID8gQ3RvciA6IGZ1bmM7XG4gICAgcmV0dXJuIGZuLmFwcGx5KGlzQmluZCA/IHRoaXNBcmcgOiB0aGlzLCBhcmdzKTtcbiAgfVxuICByZXR1cm4gd3JhcHBlcjtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBjcmVhdGVQYXJ0aWFsV3JhcHBlcjtcbiJdfQ== +},{"./createCtorWrapper":101}],106:[function(require,module,exports){ +var baseSetData = require('./baseSetData'), + createBindWrapper = require('./createBindWrapper'), + createHybridWrapper = require('./createHybridWrapper'), + createPartialWrapper = require('./createPartialWrapper'), + getData = require('./getData'), + mergeData = require('./mergeData'), + setData = require('./setData'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + PARTIAL_FLAG = 32, + PARTIAL_RIGHT_FLAG = 64; + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + length -= (holders ? holders.length : 0); + if (bitmask & PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func), + newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; + + if (data) { + mergeData(newData, data); + bitmask = newData[1]; + arity = newData[9]; + } + newData[9] = arity == null + ? (isBindKey ? 0 : func.length) + : (nativeMax(arity - length, 0) || 0); + + if (bitmask == BIND_FLAG) { + var result = createBindWrapper(newData[0], newData[2]); + } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) { + result = createPartialWrapper.apply(undefined, newData); + } else { + result = createHybridWrapper.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setter(result, newData); +} + +module.exports = createWrapper; + +},{"./baseSetData":88,"./createBindWrapper":100,"./createHybridWrapper":104,"./createPartialWrapper":105,"./getData":110,"./mergeData":128,"./setData":133}],107:[function(require,module,exports){ +var arraySome = require('./arraySome'); + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing arrays. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { + return false; + } + } + return true; +} + +module.exports = equalArrays; + +},{"./arraySome":65}],108:[function(require,module,exports){ +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) + ? other != +other + : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + } + return false; +} + +module.exports = equalByTag; + +},{}],109:[function(require,module,exports){ +var keys = require('../object/keys'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isLoose) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + + // Recursively compare objects (susceptible to call stack limits). + if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; +} + +module.exports = equalObjects; + +},{"../object/keys":149}],110:[function(require,module,exports){ +var metaMap = require('./metaMap'), + noop = require('../utility/noop'); + +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); +}; + +module.exports = getData; + +},{"../utility/noop":155,"./metaMap":129}],111:[function(require,module,exports){ +var realNames = require('./realNames'); + +/** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ +function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = array ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; +} + +module.exports = getFuncName; + +},{"./realNames":130}],112:[function(require,module,exports){ +var baseProperty = require('./baseProperty'); + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +module.exports = getLength; + +},{"./baseProperty":86}],113:[function(require,module,exports){ +var isStrictComparable = require('./isStrictComparable'), + pairs = require('../object/pairs'); + +/** + * Gets the propery names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = pairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; +} + +module.exports = getMatchData; + +},{"../object/pairs":151,"./isStrictComparable":127}],114:[function(require,module,exports){ +var isNative = require('../lang/isNative'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +module.exports = getNative; + +},{"../lang/isNative":143}],115:[function(require,module,exports){ +/** + * Gets the index at which the first occurrence of `NaN` is found in `array`. + * + * @private + * @param {Array} array The array to search. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched `NaN`, else `-1`. + */ +function indexOfNaN(array, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 0 : -1); + + while ((fromRight ? index-- : ++index < length)) { + var other = array[index]; + if (other !== other) { + return index; + } + } + return -1; +} + +module.exports = indexOfNaN; + +},{}],116:[function(require,module,exports){ +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add array properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +module.exports = initCloneArray; + +},{}],117:[function(require,module,exports){ +(function (global){ +var bufferClone = require('./bufferClone'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** Native method references. */ +var Uint8Array = global.Uint8Array; + +/** Used to lookup a type array constructors by `toStringTag`. */ +var ctorByTag = {}; +ctorByTag[float32Tag] = global.Float32Array; +ctorByTag[float64Tag] = global.Float64Array; +ctorByTag[int8Tag] = global.Int8Array; +ctorByTag[int16Tag] = global.Int16Array; +ctorByTag[int32Tag] = global.Int32Array; +ctorByTag[uint8Tag] = Uint8Array; +ctorByTag[uint8ClampedTag] = global.Uint8ClampedArray; +ctorByTag[uint16Tag] = global.Uint16Array; +ctorByTag[uint32Tag] = global.Uint32Array; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return bufferClone(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + // Safari 5 mobile incorrectly has `Object` as the constructor of typed arrays. + if (Ctor instanceof Ctor) { + Ctor = ctorByTag[tag]; + } + var buffer = object.buffer; + return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + var result = new Ctor(object.source, reFlags.exec(object)); + result.lastIndex = object.lastIndex; + } + return result; +} + +module.exports = initCloneByTag; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2luaXRDbG9uZUJ5VGFnLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYnVmZmVyQ2xvbmUgPSByZXF1aXJlKCcuL2J1ZmZlckNsb25lJyk7XG5cbi8qKiBgT2JqZWN0I3RvU3RyaW5nYCByZXN1bHQgcmVmZXJlbmNlcy4gKi9cbnZhciBib29sVGFnID0gJ1tvYmplY3QgQm9vbGVhbl0nLFxuICAgIGRhdGVUYWcgPSAnW29iamVjdCBEYXRlXScsXG4gICAgbnVtYmVyVGFnID0gJ1tvYmplY3QgTnVtYmVyXScsXG4gICAgcmVnZXhwVGFnID0gJ1tvYmplY3QgUmVnRXhwXScsXG4gICAgc3RyaW5nVGFnID0gJ1tvYmplY3QgU3RyaW5nXSc7XG5cbnZhciBhcnJheUJ1ZmZlclRhZyA9ICdbb2JqZWN0IEFycmF5QnVmZmVyXScsXG4gICAgZmxvYXQzMlRhZyA9ICdbb2JqZWN0IEZsb2F0MzJBcnJheV0nLFxuICAgIGZsb2F0NjRUYWcgPSAnW29iamVjdCBGbG9hdDY0QXJyYXldJyxcbiAgICBpbnQ4VGFnID0gJ1tvYmplY3QgSW50OEFycmF5XScsXG4gICAgaW50MTZUYWcgPSAnW29iamVjdCBJbnQxNkFycmF5XScsXG4gICAgaW50MzJUYWcgPSAnW29iamVjdCBJbnQzMkFycmF5XScsXG4gICAgdWludDhUYWcgPSAnW29iamVjdCBVaW50OEFycmF5XScsXG4gICAgdWludDhDbGFtcGVkVGFnID0gJ1tvYmplY3QgVWludDhDbGFtcGVkQXJyYXldJyxcbiAgICB1aW50MTZUYWcgPSAnW29iamVjdCBVaW50MTZBcnJheV0nLFxuICAgIHVpbnQzMlRhZyA9ICdbb2JqZWN0IFVpbnQzMkFycmF5XSc7XG5cbi8qKiBVc2VkIHRvIG1hdGNoIGBSZWdFeHBgIGZsYWdzIGZyb20gdGhlaXIgY29lcmNlZCBzdHJpbmcgdmFsdWVzLiAqL1xudmFyIHJlRmxhZ3MgPSAvXFx3KiQvO1xuXG4vKiogTmF0aXZlIG1ldGhvZCByZWZlcmVuY2VzLiAqL1xudmFyIFVpbnQ4QXJyYXkgPSBnbG9iYWwuVWludDhBcnJheTtcblxuLyoqIFVzZWQgdG8gbG9va3VwIGEgdHlwZSBhcnJheSBjb25zdHJ1Y3RvcnMgYnkgYHRvU3RyaW5nVGFnYC4gKi9cbnZhciBjdG9yQnlUYWcgPSB7fTtcbmN0b3JCeVRhZ1tmbG9hdDMyVGFnXSA9IGdsb2JhbC5GbG9hdDMyQXJyYXk7XG5jdG9yQnlUYWdbZmxvYXQ2NFRhZ10gPSBnbG9iYWwuRmxvYXQ2NEFycmF5O1xuY3RvckJ5VGFnW2ludDhUYWddID0gZ2xvYmFsLkludDhBcnJheTtcbmN0b3JCeVRhZ1tpbnQxNlRhZ10gPSBnbG9iYWwuSW50MTZBcnJheTtcbmN0b3JCeVRhZ1tpbnQzMlRhZ10gPSBnbG9iYWwuSW50MzJBcnJheTtcbmN0b3JCeVRhZ1t1aW50OFRhZ10gPSBVaW50OEFycmF5O1xuY3RvckJ5VGFnW3VpbnQ4Q2xhbXBlZFRhZ10gPSBnbG9iYWwuVWludDhDbGFtcGVkQXJyYXk7XG5jdG9yQnlUYWdbdWludDE2VGFnXSA9IGdsb2JhbC5VaW50MTZBcnJheTtcbmN0b3JCeVRhZ1t1aW50MzJUYWddID0gZ2xvYmFsLlVpbnQzMkFycmF5O1xuXG4vKipcbiAqIEluaXRpYWxpemVzIGFuIG9iamVjdCBjbG9uZSBiYXNlZCBvbiBpdHMgYHRvU3RyaW5nVGFnYC5cbiAqXG4gKiAqKk5vdGU6KiogVGhpcyBmdW5jdGlvbiBvbmx5IHN1cHBvcnRzIGNsb25pbmcgdmFsdWVzIHdpdGggdGFncyBvZlxuICogYEJvb2xlYW5gLCBgRGF0ZWAsIGBFcnJvcmAsIGBOdW1iZXJgLCBgUmVnRXhwYCwgb3IgYFN0cmluZ2AuXG4gKlxuICogQHByaXZhdGVcbiAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBjbG9uZS5cbiAqIEBwYXJhbSB7c3RyaW5nfSB0YWcgVGhlIGB0b1N0cmluZ1RhZ2Agb2YgdGhlIG9iamVjdCB0byBjbG9uZS5cbiAqIEBwYXJhbSB7Ym9vbGVhbn0gW2lzRGVlcF0gU3BlY2lmeSBhIGRlZXAgY2xvbmUuXG4gKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBpbml0aWFsaXplZCBjbG9uZS5cbiAqL1xuZnVuY3Rpb24gaW5pdENsb25lQnlUYWcob2JqZWN0LCB0YWcsIGlzRGVlcCkge1xuICB2YXIgQ3RvciA9IG9iamVjdC5jb25zdHJ1Y3RvcjtcbiAgc3dpdGNoICh0YWcpIHtcbiAgICBjYXNlIGFycmF5QnVmZmVyVGFnOlxuICAgICAgcmV0dXJuIGJ1ZmZlckNsb25lKG9iamVjdCk7XG5cbiAgICBjYXNlIGJvb2xUYWc6XG4gICAgY2FzZSBkYXRlVGFnOlxuICAgICAgcmV0dXJuIG5ldyBDdG9yKCtvYmplY3QpO1xuXG4gICAgY2FzZSBmbG9hdDMyVGFnOiBjYXNlIGZsb2F0NjRUYWc6XG4gICAgY2FzZSBpbnQ4VGFnOiBjYXNlIGludDE2VGFnOiBjYXNlIGludDMyVGFnOlxuICAgIGNhc2UgdWludDhUYWc6IGNhc2UgdWludDhDbGFtcGVkVGFnOiBjYXNlIHVpbnQxNlRhZzogY2FzZSB1aW50MzJUYWc6XG4gICAgICAvLyBTYWZhcmkgNSBtb2JpbGUgaW5jb3JyZWN0bHkgaGFzIGBPYmplY3RgIGFzIHRoZSBjb25zdHJ1Y3RvciBvZiB0eXBlZCBhcnJheXMuXG4gICAgICBpZiAoQ3RvciBpbnN0YW5jZW9mIEN0b3IpIHtcbiAgICAgICAgQ3RvciA9IGN0b3JCeVRhZ1t0YWddO1xuICAgICAgfVxuICAgICAgdmFyIGJ1ZmZlciA9IG9iamVjdC5idWZmZXI7XG4gICAgICByZXR1cm4gbmV3IEN0b3IoaXNEZWVwID8gYnVmZmVyQ2xvbmUoYnVmZmVyKSA6IGJ1ZmZlciwgb2JqZWN0LmJ5dGVPZmZzZXQsIG9iamVjdC5sZW5ndGgpO1xuXG4gICAgY2FzZSBudW1iZXJUYWc6XG4gICAgY2FzZSBzdHJpbmdUYWc6XG4gICAgICByZXR1cm4gbmV3IEN0b3Iob2JqZWN0KTtcblxuICAgIGNhc2UgcmVnZXhwVGFnOlxuICAgICAgdmFyIHJlc3VsdCA9IG5ldyBDdG9yKG9iamVjdC5zb3VyY2UsIHJlRmxhZ3MuZXhlYyhvYmplY3QpKTtcbiAgICAgIHJlc3VsdC5sYXN0SW5kZXggPSBvYmplY3QubGFzdEluZGV4O1xuICB9XG4gIHJldHVybiByZXN1bHQ7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gaW5pdENsb25lQnlUYWc7XG4iXX0= +},{"./bufferClone":95}],118:[function(require,module,exports){ +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + var Ctor = object.constructor; + if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { + Ctor = Object; + } + return new Ctor; +} + +module.exports = initCloneObject; + +},{}],119:[function(require,module,exports){ +var getLength = require('./getLength'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +module.exports = isArrayLike; + +},{"./getLength":112,"./isLength":125}],120:[function(require,module,exports){ +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +var isHostObject = (function() { + try { + Object({ 'toString': 0 } + ''); + } catch(e) { + return function() { return false; }; + } + return function(value) { + // IE < 9 presents many host objects as `Object` objects that can coerce + // to strings despite having improperly defined `toString` methods. + return typeof value.toString != 'function' && typeof (value + '') == 'string'; + }; +}()); + +module.exports = isHostObject; + +},{}],121:[function(require,module,exports){ +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +module.exports = isIndex; + +},{}],122:[function(require,module,exports){ +var isArrayLike = require('./isArrayLike'), + isIndex = require('./isIndex'), + isObject = require('../lang/isObject'); + +/** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; +} + +module.exports = isIterateeCall; + +},{"../lang/isObject":144,"./isArrayLike":119,"./isIndex":121}],123:[function(require,module,exports){ +var isArray = require('../lang/isArray'), + toObject = require('./toObject'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + var type = typeof value; + if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { + return true; + } + if (isArray(value)) { + return false; + } + var result = !reIsDeepProp.test(value); + return result || (object != null && value in toObject(object)); +} + +module.exports = isKey; + +},{"../lang/isArray":140,"./toObject":135}],124:[function(require,module,exports){ +var LazyWrapper = require('./LazyWrapper'), + getData = require('./getData'), + getFuncName = require('./getFuncName'), + lodash = require('../chain/lodash'); + +/** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`. + */ +function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; +} + +module.exports = isLaziable; + +},{"../chain/lodash":51,"./LazyWrapper":60,"./getData":110,"./getFuncName":111}],125:[function(require,module,exports){ +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; + +},{}],126:[function(require,module,exports){ +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +module.exports = isObjectLike; + +},{}],127:[function(require,module,exports){ +var isObject = require('../lang/isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; + +},{"../lang/isObject":144}],128:[function(require,module,exports){ +var arrayCopy = require('./arrayCopy'), + composeArgs = require('./composeArgs'), + composeArgsRight = require('./composeArgsRight'), + replaceHolders = require('./replaceHolders'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + CURRY_BOUND_FLAG = 4, + CURRY_FLAG = 8, + ARY_FLAG = 128, + REARG_FLAG = 256; + +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers required to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg` + * augment function arguments, making the order in which they are executed important, + * preventing the merging of metadata. However, we make an exception for a safe + * common case where curried functions have `_.ary` and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ +function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < ARY_FLAG; + + var isCombo = + (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) || + (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) || + (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value); + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]); + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value); + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]); + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = arrayCopy(value); + } + // Use source `ary` if it's smaller. + if (srcBitmask & ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; +} + +module.exports = mergeData; + +},{"./arrayCopy":62,"./composeArgs":96,"./composeArgsRight":97,"./replaceHolders":132}],129:[function(require,module,exports){ +(function (global){ +var getNative = require('./getNative'); + +/** Native method references. */ +var WeakMap = getNative(global, 'WeakMap'); + +/** Used to store function metadata. */ +var metaMap = WeakMap && new WeakMap; + +module.exports = metaMap; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL21ldGFNYXAuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2V0TmF0aXZlID0gcmVxdWlyZSgnLi9nZXROYXRpdmUnKTtcblxuLyoqIE5hdGl2ZSBtZXRob2QgcmVmZXJlbmNlcy4gKi9cbnZhciBXZWFrTWFwID0gZ2V0TmF0aXZlKGdsb2JhbCwgJ1dlYWtNYXAnKTtcblxuLyoqIFVzZWQgdG8gc3RvcmUgZnVuY3Rpb24gbWV0YWRhdGEuICovXG52YXIgbWV0YU1hcCA9IFdlYWtNYXAgJiYgbmV3IFdlYWtNYXA7XG5cbm1vZHVsZS5leHBvcnRzID0gbWV0YU1hcDtcbiJdfQ== +},{"./getNative":114}],130:[function(require,module,exports){ +/** Used to lookup unminified function names. */ +var realNames = {}; + +module.exports = realNames; + +},{}],131:[function(require,module,exports){ +var arrayCopy = require('./arrayCopy'), + isIndex = require('./isIndex'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ +function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = arrayCopy(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; +} + +module.exports = reorder; + +},{"./arrayCopy":62,"./isIndex":121}],132:[function(require,module,exports){ +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ +function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + if (array[index] === placeholder) { + array[index] = PLACEHOLDER; + result[++resIndex] = index; + } + } + return result; +} + +module.exports = replaceHolders; + +},{}],133:[function(require,module,exports){ +var baseSetData = require('./baseSetData'), + now = require('../date/now'); + +/** Used to detect when a function becomes hot. */ +var HOT_COUNT = 150, + HOT_SPAN = 16; + +/** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity function + * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var setData = (function() { + var count = 0, + lastCalled = 0; + + return function(key, value) { + var stamp = now(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return key; + } + } else { + count = 0; + } + return baseSetData(key, value); + }; +}()); + +module.exports = setData; + +},{"../date/now":57,"./baseSetData":88}],134:[function(require,module,exports){ +var isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isIndex = require('./isIndex'), + isLength = require('./isLength'), + isString = require('../lang/isString'), + keysIn = require('../object/keysIn'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object) || isString(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; +} + +module.exports = shimKeys; + +},{"../lang/isArguments":139,"../lang/isArray":140,"../lang/isString":146,"../object/keysIn":150,"./isIndex":121,"./isLength":125}],135:[function(require,module,exports){ +var isObject = require('../lang/isObject'), + isString = require('../lang/isString'), + support = require('../support'); + +/** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ +function toObject(value) { + if (support.unindexedChars && isString(value)) { + var index = -1, + length = value.length, + result = Object(value); + + while (++index < length) { + result[index] = value.charAt(index); + } + return result; + } + return isObject(value) ? value : Object(value); +} + +module.exports = toObject; + +},{"../lang/isObject":144,"../lang/isString":146,"../support":153}],136:[function(require,module,exports){ +var baseToString = require('./baseToString'), + isArray = require('../lang/isArray'); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `value` to property path array if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ +function toPath(value) { + if (isArray(value)) { + return value; + } + var result = []; + baseToString(value).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +} + +module.exports = toPath; + +},{"../lang/isArray":140,"./baseToString":90}],137:[function(require,module,exports){ +var LazyWrapper = require('./LazyWrapper'), + LodashWrapper = require('./LodashWrapper'), + arrayCopy = require('./arrayCopy'); + +/** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ +function wrapperClone(wrapper) { + return wrapper instanceof LazyWrapper + ? wrapper.clone() + : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__)); +} + +module.exports = wrapperClone; + +},{"./LazyWrapper":60,"./LodashWrapper":61,"./arrayCopy":62}],138:[function(require,module,exports){ +var baseClone = require('../internal/baseClone'), + bindCallback = require('../internal/bindCallback'); + +/** + * Creates a deep clone of `value`. If `customizer` is provided it's invoked + * to produce the cloned values. If `customizer` returns `undefined` cloning + * is handled by the method instead. The `customizer` is bound to `thisArg` + * and invoked with up to three argument; (value [, index|key, object]). + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). + * The enumerable properties of `arguments` objects and objects created by + * constructors other than `Object` are cloned to plain `Object` objects. An + * empty object is returned for uncloneable values such as functions, DOM nodes, + * Maps, Sets, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * var deep = _.cloneDeep(users); + * deep[0] === users[0]; + * // => false + * + * // using a customizer callback + * var el = _.cloneDeep(document.body, function(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * }); + * + * el === document.body + * // => false + * el.nodeName + * // => BODY + * el.childNodes.length; + * // => 20 + */ +function cloneDeep(value, customizer, thisArg) { + return typeof customizer == 'function' + ? baseClone(value, true, bindCallback(customizer, thisArg, 3)) + : baseClone(value, true); +} + +module.exports = cloneDeep; + +},{"../internal/baseClone":68,"../internal/bindCallback":94}],139:[function(require,module,exports){ +var isArrayLike = require('../internal/isArrayLike'), + isObjectLike = require('../internal/isObjectLike'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Native method references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); +} + +module.exports = isArguments; + +},{"../internal/isArrayLike":119,"../internal/isObjectLike":126}],140:[function(require,module,exports){ +var getNative = require('../internal/getNative'), + isLength = require('../internal/isLength'), + isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var arrayTag = '[object Array]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsArray = getNative(Array, 'isArray'); + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ +var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; +}; + +module.exports = isArray; + +},{"../internal/getNative":114,"../internal/isLength":125,"../internal/isObjectLike":126}],141:[function(require,module,exports){ +var isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('../internal/isArrayLike'), + isFunction = require('./isFunction'), + isObjectLike = require('../internal/isObjectLike'), + isString = require('./isString'), + keys = require('../object/keys'); + +/** + * Checks if `value` is empty. A value is considered empty unless it's an + * `arguments` object, array, string, or jQuery-like collection with a length + * greater than `0` or an object with own enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || + (isObjectLike(value) && isFunction(value.splice)))) { + return !value.length; + } + return !keys(value).length; +} + +module.exports = isEmpty; + +},{"../internal/isArrayLike":119,"../internal/isObjectLike":126,"../object/keys":149,"./isArguments":139,"./isArray":140,"./isFunction":142,"./isString":146}],142:[function(require,module,exports){ +var isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var funcTag = '[object Function]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 which returns 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +module.exports = isFunction; + +},{"./isObject":144}],143:[function(require,module,exports){ +var isFunction = require('./isFunction'), + isHostObject = require('../internal/isHostObject'), + isObjectLike = require('../internal/isObjectLike'); + +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var fnToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); +} + +module.exports = isNative; + +},{"../internal/isHostObject":120,"../internal/isObjectLike":126,"./isFunction":142}],144:[function(require,module,exports){ +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + +},{}],145:[function(require,module,exports){ +var baseForIn = require('../internal/baseForIn'), + isArguments = require('./isArguments'), + isHostObject = require('../internal/isHostObject'), + isObjectLike = require('../internal/isObjectLike'), + support = require('../support'); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * **Note:** This method assumes objects created by the `Object` constructor + * have no inherited enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + var Ctor; + + // Exit early for non `Object` objects. + if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) || + (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + var result; + if (support.ownLast) { + baseForIn(value, function(subValue, key, object) { + result = hasOwnProperty.call(object, key); + return false; + }); + return result !== false; + } + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + baseForIn(value, function(subValue, key) { + result = key; + }); + return result === undefined || hasOwnProperty.call(value, result); +} + +module.exports = isPlainObject; + +},{"../internal/baseForIn":75,"../internal/isHostObject":120,"../internal/isObjectLike":126,"../support":153,"./isArguments":139}],146:[function(require,module,exports){ +var isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); +} + +module.exports = isString; + +},{"../internal/isObjectLike":126}],147:[function(require,module,exports){ +var isLength = require('../internal/isLength'), + isObjectLike = require('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dateTag] = typedArrayTags[errorTag] = +typedArrayTags[funcTag] = typedArrayTags[mapTag] = +typedArrayTags[numberTag] = typedArrayTags[objectTag] = +typedArrayTags[regexpTag] = typedArrayTags[setTag] = +typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; +} + +module.exports = isTypedArray; + +},{"../internal/isLength":125,"../internal/isObjectLike":126}],148:[function(require,module,exports){ +/** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +module.exports = isUndefined; + +},{}],149:[function(require,module,exports){ +var getNative = require('../internal/getNative'), + isArrayLike = require('../internal/isArrayLike'), + isObject = require('../lang/isObject'), + shimKeys = require('../internal/shimKeys'), + support = require('../support'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeKeys = getNative(Object, 'keys'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; +}; + +module.exports = keys; + +},{"../internal/getNative":114,"../internal/isArrayLike":119,"../internal/shimKeys":134,"../lang/isObject":144,"../support":153}],150:[function(require,module,exports){ +var arrayEach = require('../internal/arrayEach'), + isArguments = require('../lang/isArguments'), + isArray = require('../lang/isArray'), + isFunction = require('../lang/isFunction'), + isIndex = require('../internal/isIndex'), + isLength = require('../internal/isLength'), + isObject = require('../lang/isObject'), + isString = require('../lang/isString'), + support = require('../support'); + +/** `Object#toString` result references. */ +var arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + +/** Used to fix the JScript `[[DontEnum]]` bug. */ +var shadowProps = [ + 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', + 'toLocaleString', 'toString', 'valueOf' +]; + +/** Used for native method references. */ +var errorProto = Error.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** Used to avoid iterating over non-enumerable properties in IE < 9. */ +var nonEnumProps = {}; +nonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; +nonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true }; +nonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true }; +nonEnumProps[objectTag] = { 'constructor': true }; + +arrayEach(shadowProps, function(key) { + for (var tag in nonEnumProps) { + if (hasOwnProperty.call(nonEnumProps, tag)) { + var props = nonEnumProps[tag]; + props[key] = hasOwnProperty.call(props, key); + } + } +}); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + + length = (length && isLength(length) && + (isArray(object) || isArguments(object) || isString(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + proto = (isFunction(Ctor) && Ctor.prototype) || objectProto, + isProto = proto === object, + result = Array(length), + skipIndexes = length > 0, + skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error), + skipProto = support.enumPrototypes && isFunction(object); + + while (++index < length) { + result[index] = (index + ''); + } + // lodash skips the `constructor` property when it infers it's iterating + // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]` + // attribute of an existing property and the `constructor` property of a + // prototype defaults to non-enumerable. + for (var key in object) { + if (!(skipProto && key == 'prototype') && + !(skipErrorProps && (key == 'message' || key == 'name')) && + !(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + if (support.nonEnumShadows && object !== objectProto) { + var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)), + nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag]; + + if (tag == objectTag) { + proto = objectProto; + } + length = shadowProps.length; + while (length--) { + key = shadowProps[length]; + var nonEnum = nonEnums[key]; + if (!(isProto && nonEnum) && + (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) { + result.push(key); + } + } + } + return result; +} + +module.exports = keysIn; + +},{"../internal/arrayEach":63,"../internal/isIndex":121,"../internal/isLength":125,"../lang/isArguments":139,"../lang/isArray":140,"../lang/isFunction":142,"../lang/isObject":144,"../lang/isString":146,"../support":153}],151:[function(require,module,exports){ +var keys = require('./keys'), + toObject = require('../internal/toObject'); + +/** + * Creates a two dimensional array of the key-value pairs for `object`, + * e.g. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + */ +function pairs(object) { + object = toObject(object); + + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; +} + +module.exports = pairs; + +},{"../internal/toObject":135,"./keys":149}],152:[function(require,module,exports){ +var baseValues = require('../internal/baseValues'), + keys = require('./keys'); + +/** + * Creates an array of the own enumerable property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return baseValues(object, keys(object)); +} + +module.exports = values; + +},{"../internal/baseValues":91,"./keys":149}],153:[function(require,module,exports){ +/** Used for native method references. */ +var arrayProto = Array.prototype, + errorProto = Error.prototype, + objectProto = Object.prototype; + +/** Native method references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/** + * An object environment feature flags. + * + * @static + * @memberOf _ + * @type Object + */ +var support = {}; + +(function(x) { + var Ctor = function() { this.x = x; }, + object = { '0': x, 'length': x }, + props = []; + + Ctor.prototype = { 'valueOf': x, 'y': x }; + for (var key in new Ctor) { props.push(key); } + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default (IE < 9, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || + propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly set the `[[Enumerable]]` value of a function's `prototype` + * property to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype'); + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an object's own properties, shadowing non-enumerable ones, + * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects + * correctly. + * + * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array + * `shift()` and `splice()` functions that fail to remove the last element, + * `value[0]`, of array-like objects even though the "length" property is + * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8, + * while `splice()` is buggy regardless of mode in IE < 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index. IE 8 can only access characters + * by index on string literals, not string objects. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; +}(1, 0)); + +module.exports = support; + +},{}],154:[function(require,module,exports){ +/** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + +},{}],155:[function(require,module,exports){ +/** + * A no-operation function that returns `undefined` regardless of the + * arguments it receives. + * + * @static + * @memberOf _ + * @category Utility + * @example + * + * var object = { 'user': 'fred' }; + * + * _.noop(object) === undefined; + * // => true + */ +function noop() { + // No operation performed. +} + +module.exports = noop; + +},{}],156:[function(require,module,exports){ +var baseProperty = require('../internal/baseProperty'), + basePropertyDeep = require('../internal/basePropertyDeep'), + isKey = require('../internal/isKey'); + +/** + * Creates a function that returns the property value at `path` on a + * given object. + * + * @static + * @memberOf _ + * @category Utility + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + * @example + * + * var objects = [ + * { 'a': { 'b': { 'c': 2 } } }, + * { 'a': { 'b': { 'c': 1 } } } + * ]; + * + * _.map(objects, _.property('a.b.c')); + * // => [2, 1] + * + * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); + * // => [1, 2] + */ +function property(path) { + return isKey(path) ? baseProperty(path) : basePropertyDeep(path); +} + +module.exports = property; + +},{"../internal/baseProperty":86,"../internal/basePropertyDeep":87,"../internal/isKey":123}],157:[function(require,module,exports){ +(function (process){ +// vim:ts=4:sts=4:sw=4: +/*! + * + * Copyright 2009-2012 Kris Kowal under the terms of the MIT + * license found at http://github.com/kriskowal/q/raw/master/LICENSE + * + * With parts by Tyler Close + * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found + * at http://www.opensource.org/licenses/mit-license.html + * Forked at ref_send.js version: 2009-05-11 + * + * With parts by Mark Miller + * Copyright (C) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +(function (definition) { + "use strict"; + + // This file will function properly as a + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + +
      +
      +
      + + + +
      +
      +
      + +
       
      +
      + + +');@output_buffer.to_s + ensure + @virtual_path, @output_buffer = _old_virtual_path, _old_output_buffer + end + +Backtrace: /opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/template.rb:297:in `module_eval' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/template.rb:297:in `compile' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/template.rb:244:in `block in compile!' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/template.rb:232:in `synchronize' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/template.rb:232:in `compile!' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/template.rb:144:in `block in render' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/notifications.rb:125:in `instrument' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/template.rb:143:in `render' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/notifications.rb:123:in `block in instrument' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/notifications/instrumenter.rb:20:in `instrument' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/notifications.rb:123:in `instrument' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/renderer/template_renderer.rb:46:in `block in render_template' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/renderer/template_renderer.rb:45:in `render_template' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/renderer/template_renderer.rb:18:in `render' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/renderer/renderer.rb:36:in `render_template' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_view/renderer/renderer.rb:17:in `render' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/abstract_controller/rendering.rb:110:in `_render_template' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/streaming.rb:225:in `_render_template' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/abstract_controller/rendering.rb:103:in `render_to_body' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/renderers.rb:28:in `render_to_body' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/compatibility.rb:50:in `render_to_body' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/abstract_controller/rendering.rb:88:in `render' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/rendering.rb:16:in `render' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/core_ext/benchmark.rb:5:in `block in ms' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/benchmark.rb:303:in `realtime' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/core_ext/benchmark.rb:5:in `ms' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/instrumentation.rb:40:in `block in render' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-3.2.22/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/instrumentation.rb:39:in `render' +/Users/richie/src/rswag/rswag-ui/app/controllers/rswag/ui/home_controller.rb:12:in `index' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/implicit_render.rb:4:in `send_action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/abstract_controller/base.rb:167:in `process_action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/rendering.rb:10:in `process_action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/abstract_controller/callbacks.rb:18:in `block in process_action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:403:in `_run__1673304781070886449__process_action__2935139650443605045__callbacks' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `__run_callback' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:81:in `run_callbacks' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/abstract_controller/callbacks.rb:17:in `process_action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/rescue.rb:29:in `process_action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/notifications.rb:123:in `block in instrument' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/notifications/instrumenter.rb:20:in `instrument' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/notifications.rb:123:in `instrument' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/instrumentation.rb:29:in `process_action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/params_wrapper.rb:207:in `process_action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-3.2.22/lib/active_record/railties/controller_runtime.rb:18:in `process_action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/abstract_controller/base.rb:121:in `process' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/abstract_controller/rendering.rb:45:in `process' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal.rb:203:in `dispatch' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_controller/metal.rb:246:in `block in action' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/routing/route_set.rb:73:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/routing/route_set.rb:36:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/routing/route_set.rb:608:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-3.2.22/lib/rails/engine.rb:484:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-3.2.22/lib/rails/railtie/configurable.rb:30:in `method_missing' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/routing/route_set.rb:608:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.4.7/lib/rack/etag.rb:23:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.4.7/lib/rack/conditionalget.rb:25:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/head.rb:14:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/params_parser.rb:21:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/flash.rb:242:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:210:in `context' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:205:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/cookies.rb:341:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-3.2.22/lib/active_record/query_cache.rb:64:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `_run__2666093074245582327__call__3202926465750986730__callbacks' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `__run_callback' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:81:in `run_callbacks' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/callbacks.rb:27:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/reloader.rb:65:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-3.2.22/lib/rails/rack/logger.rb:32:in `call_app' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-3.2.22/lib/rails/rack/logger.rb:16:in `block in call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/tagged_logging.rb:22:in `tagged' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-3.2.22/lib/rails/rack/logger.rb:16:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/request_id.rb:22:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.4.7/lib/rack/methodoverride.rb:21:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.4.7/lib/rack/runtime.rb:17:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.22/lib/active_support/cache/strategy/local_cache.rb:72:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.4.7/lib/rack/lock.rb:15:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/static.rb:83:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-3.2.22/lib/rails/engine.rb:484:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-3.2.22/lib/rails/application.rb:231:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.4.7/lib/rack/content_length.rb:14:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-3.2.22/lib/rails/rack/log_tailer.rb:17:in `call' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.4.7/lib/rack/handler/webrick.rb:59:in `service' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run' +/opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread' + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (3.2ms) +Completed 500 Internal Server Error in 4.4ms + +ActionView::Template::Error (/Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb:133: syntax error, unexpected keyword_ensure, expecting keyword_end +/Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb:135: syntax error, unexpected end-of-input, expecting keyword_end): + 130: + 131: + actionpack (3.2.22) lib/action_view/template.rb:297:in `module_eval' + actionpack (3.2.22) lib/action_view/template.rb:297:in `compile' + actionpack (3.2.22) lib/action_view/template.rb:244:in `block in compile!' + actionpack (3.2.22) lib/action_view/template.rb:232:in `synchronize' + actionpack (3.2.22) lib/action_view/template.rb:232:in `compile!' + actionpack (3.2.22) lib/action_view/template.rb:144:in `block in render' + activesupport (3.2.22) lib/active_support/notifications.rb:125:in `instrument' + actionpack (3.2.22) lib/action_view/template.rb:143:in `render' + actionpack (3.2.22) lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template' + actionpack (3.2.22) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' + activesupport (3.2.22) lib/active_support/notifications.rb:123:in `block in instrument' + activesupport (3.2.22) lib/active_support/notifications/instrumenter.rb:20:in `instrument' + activesupport (3.2.22) lib/active_support/notifications.rb:123:in `instrument' + actionpack (3.2.22) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' + actionpack (3.2.22) lib/action_view/renderer/template_renderer.rb:46:in `block in render_template' + actionpack (3.2.22) lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout' + actionpack (3.2.22) lib/action_view/renderer/template_renderer.rb:45:in `render_template' + actionpack (3.2.22) lib/action_view/renderer/template_renderer.rb:18:in `render' + actionpack (3.2.22) lib/action_view/renderer/renderer.rb:36:in `render_template' + actionpack (3.2.22) lib/action_view/renderer/renderer.rb:17:in `render' + actionpack (3.2.22) lib/abstract_controller/rendering.rb:110:in `_render_template' + actionpack (3.2.22) lib/action_controller/metal/streaming.rb:225:in `_render_template' + actionpack (3.2.22) lib/abstract_controller/rendering.rb:103:in `render_to_body' + actionpack (3.2.22) lib/action_controller/metal/renderers.rb:28:in `render_to_body' + actionpack (3.2.22) lib/action_controller/metal/compatibility.rb:50:in `render_to_body' + actionpack (3.2.22) lib/abstract_controller/rendering.rb:88:in `render' + actionpack (3.2.22) lib/action_controller/metal/rendering.rb:16:in `render' + actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render' + activesupport (3.2.22) lib/active_support/core_ext/benchmark.rb:5:in `block in ms' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/benchmark.rb:303:in `realtime' + activesupport (3.2.22) lib/active_support/core_ext/benchmark.rb:5:in `ms' + actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:40:in `block in render' + actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime' + activerecord (3.2.22) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime' + actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:39:in `render' + /Users/richie/src/rswag/rswag-ui/app/controllers/rswag/ui/home_controller.rb:12:in `index' + actionpack (3.2.22) lib/action_controller/metal/implicit_render.rb:4:in `send_action' + actionpack (3.2.22) lib/abstract_controller/base.rb:167:in `process_action' + actionpack (3.2.22) lib/action_controller/metal/rendering.rb:10:in `process_action' + actionpack (3.2.22) lib/abstract_controller/callbacks.rb:18:in `block in process_action' + activesupport (3.2.22) lib/active_support/callbacks.rb:403:in `_run__1673304781070886449__process_action__2935139650443605045__callbacks' + activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `__run_callback' + activesupport (3.2.22) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' + activesupport (3.2.22) lib/active_support/callbacks.rb:81:in `run_callbacks' + actionpack (3.2.22) lib/abstract_controller/callbacks.rb:17:in `process_action' + actionpack (3.2.22) lib/action_controller/metal/rescue.rb:29:in `process_action' + actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' + activesupport (3.2.22) lib/active_support/notifications.rb:123:in `block in instrument' + activesupport (3.2.22) lib/active_support/notifications/instrumenter.rb:20:in `instrument' + activesupport (3.2.22) lib/active_support/notifications.rb:123:in `instrument' + actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:29:in `process_action' + actionpack (3.2.22) lib/action_controller/metal/params_wrapper.rb:207:in `process_action' + activerecord (3.2.22) lib/active_record/railties/controller_runtime.rb:18:in `process_action' + actionpack (3.2.22) lib/abstract_controller/base.rb:121:in `process' + actionpack (3.2.22) lib/abstract_controller/rendering.rb:45:in `process' + actionpack (3.2.22) lib/action_controller/metal.rb:203:in `dispatch' + actionpack (3.2.22) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' + actionpack (3.2.22) lib/action_controller/metal.rb:246:in `block in action' + actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:73:in `call' + actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:73:in `dispatch' + actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:36:in `call' + journey (1.0.4) lib/journey/router.rb:68:in `block in call' + journey (1.0.4) lib/journey/router.rb:56:in `each' + journey (1.0.4) lib/journey/router.rb:56:in `call' + actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:608:in `call' + railties (3.2.22) lib/rails/engine.rb:484:in `call' + railties (3.2.22) lib/rails/railtie/configurable.rb:30:in `method_missing' + journey (1.0.4) lib/journey/router.rb:68:in `block in call' + journey (1.0.4) lib/journey/router.rb:56:in `each' + journey (1.0.4) lib/journey/router.rb:56:in `call' + actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:608:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' + rack (1.4.7) lib/rack/etag.rb:23:in `call' + rack (1.4.7) lib/rack/conditionalget.rb:25:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/head.rb:14:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/params_parser.rb:21:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/flash.rb:242:in `call' + rack (1.4.7) lib/rack/session/abstract/id.rb:210:in `context' + rack (1.4.7) lib/rack/session/abstract/id.rb:205:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/cookies.rb:341:in `call' + activerecord (3.2.22) lib/active_record/query_cache.rb:64:in `call' + activerecord (3.2.22) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' + activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `_run__2666093074245582327__call__3202926465750986730__callbacks' + activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `__run_callback' + activesupport (3.2.22) lib/active_support/callbacks.rb:385:in `_run_call_callbacks' + activesupport (3.2.22) lib/active_support/callbacks.rb:81:in `run_callbacks' + actionpack (3.2.22) lib/action_dispatch/middleware/callbacks.rb:27:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/reloader.rb:65:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/remote_ip.rb:31:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' + railties (3.2.22) lib/rails/rack/logger.rb:32:in `call_app' + railties (3.2.22) lib/rails/rack/logger.rb:16:in `block in call' + activesupport (3.2.22) lib/active_support/tagged_logging.rb:22:in `tagged' + railties (3.2.22) lib/rails/rack/logger.rb:16:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/request_id.rb:22:in `call' + rack (1.4.7) lib/rack/methodoverride.rb:21:in `call' + rack (1.4.7) lib/rack/runtime.rb:17:in `call' + activesupport (3.2.22) lib/active_support/cache/strategy/local_cache.rb:72:in `call' + rack (1.4.7) lib/rack/lock.rb:15:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/static.rb:83:in `call' + railties (3.2.22) lib/rails/engine.rb:484:in `call' + railties (3.2.22) lib/rails/application.rb:231:in `call' + rack (1.4.7) lib/rack/content_length.rb:14:in `call' + railties (3.2.22) lib/rails/rack/log_tailer.rb:17:in `call' + rack (1.4.7) lib/rack/handler/webrick.rb:59:in `service' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread' + + + Rendered /opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.9ms) + Rendered /opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms) + Rendered /opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (15.0ms) + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.5ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:33:50 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (0ms) + + +Started GET "/api-docs/v2/swagger.json" for 127.0.0.1 at 2016-10-07 10:34:00 -0700 + +ActionController::RoutingError (No route matches [GET] "/api-docs/v2/swagger.json"): + actionpack (3.2.22) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' + railties (3.2.22) lib/rails/rack/logger.rb:32:in `call_app' + railties (3.2.22) lib/rails/rack/logger.rb:16:in `block in call' + activesupport (3.2.22) lib/active_support/tagged_logging.rb:22:in `tagged' + railties (3.2.22) lib/rails/rack/logger.rb:16:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/request_id.rb:22:in `call' + rack (1.4.7) lib/rack/methodoverride.rb:21:in `call' + rack (1.4.7) lib/rack/runtime.rb:17:in `call' + activesupport (3.2.22) lib/active_support/cache/strategy/local_cache.rb:72:in `call' + rack (1.4.7) lib/rack/lock.rb:15:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/static.rb:83:in `call' + railties (3.2.22) lib/rails/engine.rb:484:in `call' + railties (3.2.22) lib/rails/application.rb:231:in `call' + rack (1.4.7) lib/rack/content_length.rb:14:in `call' + railties (3.2.22) lib/rails/rack/log_tailer.rb:17:in `call' + rack (1.4.7) lib/rack/handler/webrick.rb:59:in `service' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread' + + + Rendered /opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.4ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:34:02 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:42:39 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:42:40 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:42:40 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:42:40 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:42:40 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:42:40 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:42:40 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:42:40 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:42:40 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:42:40 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (0ms) + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.5ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:43:40 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:43:41 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.0ms) +Completed 200 OK in 1.2ms (Views: 1.1ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:44:06 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:47:11 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (2.1ms) +Completed 200 OK in 7.2ms (Views: 6.8ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (5ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (5ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (1ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:47:12 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:52:03 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.5ms) +Completed 200 OK in 7.9ms (Views: 7.7ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (6ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (3ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (1ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:52:04 -0700 + + +Started GET "/api-docs/v1/swagger.json?api_key=foobar" for 127.0.0.1 at 2016-10-07 10:52:12 -0700 + + +Started GET "/blogs?api_key=foobar" for 127.0.0.1 at 2016-10-07 10:52:17 -0700 +Processing by BlogsController#index as JSON + Parameters: {"api_key"=>"foobar"} + Blog Load (0.3ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 21.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:52:52 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:52:52 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:52:52 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:52:52 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (0ms) + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:53:14 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:53:15 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.5ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (5ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:53:21 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:54:12 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:54:28 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:55:59 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:56:59 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:57:00 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.5ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (6ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:57:08 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:57:22 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:57:23 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (7ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:57:42 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:58:00 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:58:01 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.6ms (Views: 1.4ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:58:15 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.1ms) +Completed 200 OK in 2.5ms (Views: 2.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:58:31 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:58:45 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:58:50 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:58:51 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:59:09 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 10:59:14 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 10:59:15 -0700 + + +Started GET "/api-docs/v2/swagger.json" for 127.0.0.1 at 2016-10-07 11:00:13 -0700 + +ActionController::RoutingError (No route matches [GET] "/api-docs/v2/swagger.json"): + actionpack (3.2.22) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' + railties (3.2.22) lib/rails/rack/logger.rb:32:in `call_app' + railties (3.2.22) lib/rails/rack/logger.rb:16:in `block in call' + activesupport (3.2.22) lib/active_support/tagged_logging.rb:22:in `tagged' + railties (3.2.22) lib/rails/rack/logger.rb:16:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/request_id.rb:22:in `call' + rack (1.4.7) lib/rack/methodoverride.rb:21:in `call' + rack (1.4.7) lib/rack/runtime.rb:17:in `call' + activesupport (3.2.22) lib/active_support/cache/strategy/local_cache.rb:72:in `call' + rack (1.4.7) lib/rack/lock.rb:15:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/static.rb:83:in `call' + railties (3.2.22) lib/rails/engine.rb:484:in `call' + railties (3.2.22) lib/rails/application.rb:231:in `call' + rack (1.4.7) lib/rack/content_length.rb:14:in `call' + railties (3.2.22) lib/rails/rack/log_tailer.rb:17:in `call' + rack (1.4.7) lib/rack/handler/webrick.rb:59:in `service' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread' + + + Rendered /opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.5ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:00:15 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.4ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (6ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:00:39 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:01:06 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:01:07 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.1ms) +Completed 200 OK in 0.8ms (Views: 0.7ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:01:19 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.9ms) +Completed 200 OK in 1.9ms (Views: 1.8ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:01:30 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:01:57 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.5ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:04:18 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:04:31 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.5ms (Views: 1.4ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:04:31 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:04:32 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.8ms (Views: 1.7ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:04:47 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:08:44 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (5ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:09:04 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (5ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:09:26 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:09:44 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:09:51 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:10:14 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.9ms) +Completed 200 OK in 1.9ms (Views: 1.8ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:10:54 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:11:18 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.5ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:11:38 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:11:43 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:11:44 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.5ms (Views: 1.4ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:11:49 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:12:02 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.5ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:12:03 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:12:13 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:12:21 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:12:29 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:12:30 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:12:38 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:12:39 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.1ms) +Completed 200 OK in 0.9ms (Views: 0.8ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:12:45 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.6ms (Views: 1.5ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:12:52 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:12:56 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:12:57 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.7ms) +Completed 200 OK in 1.5ms (Views: 1.4ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:13:07 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:13:26 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.3ms (Views: 1.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:13:27 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:13:43 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:14:06 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:14:07 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.9ms) +Completed 200 OK in 1.9ms (Views: 1.8ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:14:12 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:14:13 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.0ms) +Completed 200 OK in 2.3ms (Views: 2.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:14:26 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:14:27 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:14:32 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:14:32 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:14:32 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:14:32 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:14:32 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:14:32 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:14:32 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:14:32 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:14:33 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.9ms) +Completed 200 OK in 2.4ms (Views: 2.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:15:11 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:15:31 -0700 + + +Started GET "/api-docs/v2/swagger.json" for 127.0.0.1 at 2016-10-07 11:15:34 -0700 + +ActionController::RoutingError (No route matches [GET] "/api-docs/v2/swagger.json"): + actionpack (3.2.22) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' + railties (3.2.22) lib/rails/rack/logger.rb:32:in `call_app' + railties (3.2.22) lib/rails/rack/logger.rb:16:in `block in call' + activesupport (3.2.22) lib/active_support/tagged_logging.rb:22:in `tagged' + railties (3.2.22) lib/rails/rack/logger.rb:16:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/request_id.rb:22:in `call' + rack (1.4.7) lib/rack/methodoverride.rb:21:in `call' + rack (1.4.7) lib/rack/runtime.rb:17:in `call' + activesupport (3.2.22) lib/active_support/cache/strategy/local_cache.rb:72:in `call' + rack (1.4.7) lib/rack/lock.rb:15:in `call' + actionpack (3.2.22) lib/action_dispatch/middleware/static.rb:83:in `call' + railties (3.2.22) lib/rails/engine.rb:484:in `call' + railties (3.2.22) lib/rails/application.rb:231:in `call' + rack (1.4.7) lib/rack/content_length.rb:14:in `call' + railties (3.2.22) lib/rails/rack/log_tailer.rb:17:in `call' + rack (1.4.7) lib/rack/handler/webrick.rb:59:in `service' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run' + /opt/boxen/rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread' + + + Rendered /opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.5ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 11:15:37 -0700 + + +Started GET "/assets/swagger-ui/images/throbber.gif" for 127.0.0.1 at 2016-10-07 11:15:47 -0700 +Served asset /swagger-ui/images/throbber.gif - 200 OK (1ms) + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 13:38:02 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.5ms) +Completed 200 OK in 6.3ms (Views: 6.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (5ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (8ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (1ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 13:38:03 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.6ms) +Completed 200 OK in 1.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (5ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 13:38:28 -0700 + + +Started GET "/assets/swagger-ui/images/throbber.gif" for 127.0.0.1 at 2016-10-07 13:38:35 -0700 +Served asset /swagger-ui/images/throbber.gif - 304 Not Modified (1ms) + + +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:39:11 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"blog 1", "content"=>"foobar", "blog"=>{"content"=>"foobar", "title"=>"blog 1"}} +WARNING: Can't verify CSRF token authenticity +  (0.0ms) begin transaction + SQL (5.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "foobar"], ["created_at", Fri, 07 Oct 2016 20:39:11 UTC +00:00], ["title", "blog 1"], ["updated_at", Fri, 07 Oct 2016 20:39:11 UTC +00:00]] +  (0.7ms) commit transaction +Completed 201 Created in 27.1ms (Views: 2.2ms | ActiveRecord: 0.0ms) + + +Started GET "/blogs" for 127.0.0.1 at 2016-10-07 13:39:16 -0700 +Processing by BlogsController#index as JSON + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 200 OK in 1.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.4ms) +Completed 200 OK in 6.0ms (Views: 5.8ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (10ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (7ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (3ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (1ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 13:43:25 -0700 + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 13:43:31 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 13:43:31 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 13:43:31 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 13:43:31 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (0ms) + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.0ms) +Completed 200 OK in 0.7ms (Views: 0.6ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 13:43:35 -0700 + + +Started GET "/api-docs/v1/swagger.json?api_key=foobar" for 127.0.0.1 at 2016-10-07 13:43:47 -0700 + + +Started GET "/assets/swagger-ui/images/throbber.gif" for 127.0.0.1 at 2016-10-07 13:43:49 -0700 +Served asset /swagger-ui/images/throbber.gif - 200 OK (1ms) + + +Started GET "/blogs?api_key=foobar" for 127.0.0.1 at 2016-10-07 13:43:53 -0700 +Processing by BlogsController#index as JSON + Parameters: {"api_key"=>"foobar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 17.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) + + +Started GET "/blogs?keywords=blah&api_key=foobar" for 127.0.0.1 at 2016-10-07 13:43:57 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"blah", "api_key"=>"foobar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 200 OK in 1.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 13:44:06 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.0ms) +Completed 200 OK in 4.6ms (Views: 4.4ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (5ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 14:45:32 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (2ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 14:45:33 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.0ms) +Completed 200 OK in 4.5ms (Views: 4.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (1ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 15:35:14 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (0.9ms) +Completed 200 OK in 4.5ms (Views: 4.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (6ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (5ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (2ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-07 15:37:19 -0700 +DEPRECATION WARNING: You didn't set `secret_key_base`. Read the upgrade documentation to learn more about this new config option. (called from validate_secret_key_config! at /opt/boxen/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-5.0.0/lib/rails/application.rb:509) +Started GET "/api-docs" for ::1 at 2016-10-08 00:06:03 -0700 +Processing by Rswag::Ui::HomeController#index as HTML + Rendering /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.1ms) +Completed 200 OK in 72ms (Views: 4.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/css/reset.css" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/css/screen.css" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/lodash.min.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/backbone-min.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/swagger-ui.min.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/marked.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/images/logo_small.png" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/css/print.css" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/api-docs/v1/swagger.json" for ::1 at 2016-10-08 00:06:04 -0700 +Started GET "/assets/swagger-ui/images/throbber.gif" for ::1 at 2016-10-08 00:06:12 -0700 +Started GET "/blogs" for ::1 at 2016-10-08 00:06:14 -0700 +Processing by BlogsController#index as JSON + Blog Load (1.2ms) SELECT "blogs".* FROM "blogs" +Completed 200 OK in 31ms (Views: 11.5ms | ActiveRecord: 1.6ms) + + + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-08 20:48:27 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.3ms) +Completed 200 OK in 5.5ms (Views: 5.3ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (6ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (6ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (7ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (6ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (11ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (5ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (3ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-08 20:48:28 -0700 + + +Started GET "/assets/swagger-ui/images/throbber.gif" for 127.0.0.1 at 2016-10-08 20:48:30 -0700 +Served asset /swagger-ui/images/throbber.gif - 200 OK (1ms) + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-10 09:18:30 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.6ms) +Completed 200 OK in 7.4ms (Views: 7.0ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (15ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (6ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (7ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (6ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (7ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (5ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (4ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (8ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (5ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (3ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-10 09:18:31 -0700 + + +Started GET "/assets/swagger-ui/images/throbber.gif" for 127.0.0.1 at 2016-10-10 09:18:33 -0700 +Served asset /swagger-ui/images/throbber.gif - 200 OK (2ms) + + +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:18:44 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"string", "content"=>"string", "blog"=>{"title"=>"string", "content"=>"string"}} +WARNING: Can't verify CSRF token authenticity +  (0.0ms) begin transaction + SQL (3.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "string"], ["created_at", Mon, 10 Oct 2016 16:18:44 UTC +00:00], ["title", "string"], ["updated_at", Mon, 10 Oct 2016 16:18:44 UTC +00:00]] +  (0.6ms) commit transaction +Completed 201 Created in 13.1ms (Views: 1.7ms | ActiveRecord: 0.0ms) + + +Started GET "/blogs/%7Bid%7D" for 127.0.0.1 at 2016-10-10 09:18:53 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"{id}"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 5.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) + + +Started GET "/blogs/2" for 127.0.0.1 at 2016-10-10 09:19:09 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"2"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 2 LIMIT 1 +Completed 200 OK in 1.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.0ms) +Completed 200 OK in 4.6ms (Views: 4.5ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (8ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (5ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (7ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (2ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (1ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-10 09:59:22 -0700 + + +Started GET "/assets/swagger-ui/images/throbber.gif" for 127.0.0.1 at 2016-10-10 09:59:33 -0700 +Served asset /swagger-ui/images/throbber.gif - 200 OK (1ms) + + +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:59:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"id"=>0, "title"=>"string", "content"=>"string", "blog"=>{"id"=>0, "title"=>"string", "content"=>"string"}} +WARNING: Can't verify CSRF token authenticity +Unpermitted parameters: id +  (0.0ms) begin transaction + SQL (3.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "string"], ["created_at", Mon, 10 Oct 2016 16:59:38 UTC +00:00], ["title", "string"], ["updated_at", Mon, 10 Oct 2016 16:59:38 UTC +00:00]] +  (1.1ms) commit transaction +Completed 201 Created in 17.7ms (Views: 1.5ms | ActiveRecord: 0.0ms) + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-10 15:14:01 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.2ms) +Completed 200 OK in 5.3ms (Views: 5.2ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/css/reset.css - 200 OK (52ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/css/typography.css - 200 OK (8ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/css/screen.css - 200 OK (14ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 200 OK (23ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 200 OK (10ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 200 OK (26ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 200 OK (9ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 200 OK (14ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 200 OK (22ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 200 OK (23ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 200 OK (14ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 200 OK (44ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 200 OK (10ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 200 OK (6ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 200 OK (14ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/marked.js - 200 OK (17ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 200 OK (11ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/images/logo_small.png - 200 OK (5ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-10 15:14:02 -0700 +Served asset /swagger-ui/css/print.css - 200 OK (12ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-10 15:14:03 -0700 + + +Started GET "/assets/swagger-ui/images/throbber.gif" for 127.0.0.1 at 2016-10-10 15:14:07 -0700 +Served asset /swagger-ui/images/throbber.gif - 304 Not Modified (2ms) + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.0ms) +Completed 200 OK in 4.5ms (Views: 4.4ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (6ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (3ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (0ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (2ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-10 15:16:45 -0700 + + +Started GET "/api-docs" for 127.0.0.1 at 2016-10-10 17:40:12 -0700 +Connecting to database specified by database.yml +Processing by Rswag::Ui::HomeController#index as HTML + Rendered /Users/richie/src/rswag/rswag-ui/app/views/rswag/ui/home/index.html.erb (1.3ms) +Completed 200 OK in 4.9ms (Views: 4.8ms | ActiveRecord: 0.0ms) + + +Started GET "/assets/swagger-ui/css/screen.css" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/css/screen.css - 304 Not Modified (6ms) + + +Started GET "/assets/swagger-ui/lib/object-assign-pollyfill.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/object-assign-pollyfill.js - 304 Not Modified (2ms) + + +Started GET "/assets/swagger-ui/css/reset.css" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/css/reset.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery-1.8.0.min.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/jquery-1.8.0.min.js - 304 Not Modified (3ms) + + +Started GET "/assets/swagger-ui/lib/jquery.slideto.min.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/jquery.slideto.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/css/typography.css" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/css/typography.css - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jquery.wiggle.min.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/jquery.wiggle.min.js - 304 Not Modified (6ms) + + +Started GET "/assets/swagger-ui/lib/jquery.ba-bbq.min.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/jquery.ba-bbq.min.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/handlebars-4.0.5.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/handlebars-4.0.5.js - 304 Not Modified (6ms) + + +Started GET "/assets/swagger-ui/lib/lodash.min.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/lodash.min.js - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/lib/backbone-min.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/backbone-min.js - 304 Not Modified (3ms) + + +Started GET "/assets/swagger-ui/swagger-ui.min.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/swagger-ui.min.js - 304 Not Modified (10ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/highlight.9.1.0.pack_extended.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/highlight.9.1.0.pack_extended.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/lib/jsoneditor.min.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/jsoneditor.min.js - 304 Not Modified (4ms) + + +Started GET "/assets/swagger-ui/lib/marked.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/marked.js - 304 Not Modified (3ms) + + +Started GET "/assets/swagger-ui/lib/swagger-oauth.js" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/lib/swagger-oauth.js - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/images/logo_small.png" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/images/logo_small.png - 304 Not Modified (1ms) + + +Started GET "/assets/swagger-ui/css/print.css" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 +Served asset /swagger-ui/css/print.css - 304 Not Modified (3ms) + + +Started GET "/api-docs/v1/swagger.json" for 127.0.0.1 at 2016-10-10 17:40:13 -0700 diff --git a/test-app/log/test.log b/test-app/log/test.log new file mode 100644 index 0000000..9e172d6 --- /dev/null +++ b/test-app/log/test.log @@ -0,0 +1,8344 @@ +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:04:08 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:04:08 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:04:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.6ms (Views: 1.9ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:04:08 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.8ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:04:08 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:04:08 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:04:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:04:08 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:04:08 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:06:33 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:06:33 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:06:33 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 19.6ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:06:33 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:06:33 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:06:33 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:06:33 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:06:33 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:06:33 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:08:16 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:08:16 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:08:16 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.0ms (Views: 1.2ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:08:16 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:08:16 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:08:16 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:08:16 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:08:16 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:08:16 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:14:23 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:14:23 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:14:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.9ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:14:23 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.3ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:14:23 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:14:23 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:14:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:14:23 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:14:23 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:24:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 6.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:24:46 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:24:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:24:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.4ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:24:46 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:24:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:24:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:24:46 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:24:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 2.4ms (Views: 1.2ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:25:06 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 10.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:25:06 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:25:06 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:25:06 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 0.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:25:06 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:25:06 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.9ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:25:06 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:25:06 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:25:06 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 2.3ms (Views: 1.0ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:52:09 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:52:09 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:52:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.7ms (Views: 2.9ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:52:09 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:52:10 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:52:10 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:52:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:52:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:52:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:52:55 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:52:55 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:52:55 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.1ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (1.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:52:55 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.0ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:52:55 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:52:55 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:52:55 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:52:55 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:52:55 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:53:29 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 9.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:53:29 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:53:29 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:53:29 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 0.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:53:29 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:53:29 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:53:29 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:53:29 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:53:29 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 2.2ms (Views: 1.0ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:55:09 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:55:09 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:55:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.2ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:55:09 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:55:09 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:55:09 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:55:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:55:09 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:55:09 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:55:41 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:55:41 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:55:41 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.7ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:55:41 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:55:41 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:55:41 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:55:41 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:55:41 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:55:41 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:56:02 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:56:02 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:56:02 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.8ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:56:02 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:56:02 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.2ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:56:02 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:56:02 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:56:02 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:56:03 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:59:07 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:59:07 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:59:07 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.9ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:59:07 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:59:07 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:59:07 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:59:07 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:59:07 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:59:07 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 18:59:34 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 8.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:59:34 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:59:34 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 18:59:34 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 18:59:34 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:59:34 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 18:59:34 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 01:59:34 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 01:59:34 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 2.5ms (Views: 1.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 19:01:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 02:01:39 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 02:01:39 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.6ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 19:01:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 19:01:39 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 02:01:39 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 02:01:39 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 19:01:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 19:01:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 19:02:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 02:02:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 02:02:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.9ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 19:02:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 19:02:38 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.2ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 02:02:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 02:02:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 19:02:38 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 19:02:38 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.4ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 19:03:13 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 02:03:13 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 02:03:13 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.2ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 19:03:13 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 19:03:13 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 02:03:13 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 02:03:13 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 19:03:13 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 19:03:13 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:02:32 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 6.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:02:32 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:02:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:02:32 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:02:32 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:02:32 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:02:32 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:02:32 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:02:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 2.1ms (Views: 1.0ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:02:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 6.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:02:39 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:02:39 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:02:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:02:39 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:02:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.8ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:02:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:02:39 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:02:39 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 2.3ms (Views: 1.0ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:03:24 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:03:24 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:03:24 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:03:24 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:03:24 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:03:24 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:03:24 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:03:24 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:03:24 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:04:33 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 6.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:04:33 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:04:33 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:04:33 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:04:33 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:04:33 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:04:33 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:04:33 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:04:33 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 2.9ms (Views: 1.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:04:43 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:04:43 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:04:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.5ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:04:43 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.2ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:04:43 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:04:43 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:04:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:04:43 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:04:43 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:06:05 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:06:05 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:06:05 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:06:05 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:06:05 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.1ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:06:05 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:06:05 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:06:05 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:06:05 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:07:03 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (3.8ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:07:03 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:07:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 21.2ms (Views: 2.7ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:07:03 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:07:03 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:07:03 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:07:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:07:03 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:07:03 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:07:12 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:07:12 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:07:12 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.2ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:07:12 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:07:12 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:07:12 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:07:12 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:07:12 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:07:12 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:08:05 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:08:05 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:08:05 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.5ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:08:05 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:08:05 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:08:05 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:08:05 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:08:05 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:08:05 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:13:32 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.6ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:13:32 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:13:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.3ms (Views: 3.2ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:13:32 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.9ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:13:32 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:13:32 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:13:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:13:32 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:13:32 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:18:14 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:18:14 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:18:14 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.3ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:18:31 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (4.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:18:31 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:18:31 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.8ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:23:00 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:23:00 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:23:00 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.2ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:23:19 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:23:19 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:23:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.9ms (Views: 2.4ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:26:56 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 6.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:26:56 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:26:56 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:26:56 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 0.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:26:56 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:26:56 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:26:56 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:26:56 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:26:56 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 2.2ms (Views: 1.0ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:29:17 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:29:17 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:29:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.8ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:29:17 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:29:17 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:29:17 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:29:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:29:17 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:29:17 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:29:55 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 8.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:29:55 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:29:55 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:29:55 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.7ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:29:55 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:29:55 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:29:55 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:29:55 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:29:55 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 2.6ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:30:14 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (5.7ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:30:14 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:30:14 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.7ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:30:14 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:30:14 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:30:14 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:30:14 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:30:14 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:30:14 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:32:56 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 7.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:32:56 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:32:56 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:32:56 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:32:56 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.1ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:32:56 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.6ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:32:56 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:32:56 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:32:56 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 2.1ms (Views: 1.0ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:32:59 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:32:59 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:32:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.7ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:32:59 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:32:59 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:32:59 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:32:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:32:59 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:32:59 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:34:05 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (4.8ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:34:05 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:34:05 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:34:05 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.9ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:34:05 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:34:05 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:34:05 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:34:05 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:34:05 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:36:54 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:36:54 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:36:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.6ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:36:54 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.7ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:36:54 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:36:54 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:36:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:36:54 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.3ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:36:54 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:37:10 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:37:10 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:37:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.3ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:37:10 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:37:10 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:37:10 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:37:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:37:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:37:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:40:51 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:40:51 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:40:51 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 20.1ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:40:51 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:40:51 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:40:51 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:40:51 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:40:51 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:40:51 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:41:23 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:41:23 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:41:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.6ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:41:23 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 5.0ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:41:23 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:41:23 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:41:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:41:23 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 4.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:41:23 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:48:51 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:48:51 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:48:51 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.6ms (Views: 1.9ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:48:51 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:48:51 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:48:51 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:48:51 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:48:51 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:48:51 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:53:04 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:53:04 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:53:04 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.8ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:53:04 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 5.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:53:04 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:53:04 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:53:04 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:53:04 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:53:04 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:58:03 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:58:03 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:58:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.9ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 22:58:03 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 22:58:03 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 05:58:03 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 05:58:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 22:58:03 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 22:58:03 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:04:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (4.7ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:04:46 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:04:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.9ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:04:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.9ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:04:46 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:04:46 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:04:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:04:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:04:47 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:05:00 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:05:00 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:05:00 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.1ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:05:00 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:05:00 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.1ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:05:00 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:05:00 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:05:00 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:05:00 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:07:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:07:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:07:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:07:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.7ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:07:38 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.1ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:07:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:07:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:07:38 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:07:38 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.2ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:07:42 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (5.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:07:42 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:07:42 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.1ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:07:42 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:07:42 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.2ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:07:42 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:07:42 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:07:42 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:07:42 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:11:52 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 9.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:11:52 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:11:52 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:11:52 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:11:52 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.1ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:11:52 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:11:52 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:11:52 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:11:52 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 3.4ms (Views: 1.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:12:07 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:12:07 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:12:07 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.8ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:12:07 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:12:07 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:12:07 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:12:07 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:12:07 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:12:07 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:12:17 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:12:17 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:12:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.0ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:12:17 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:12:17 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:12:17 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:12:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:12:17 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.9ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:12:17 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:14:18 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (5.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:14:18 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:14:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.6ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:14:18 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:14:18 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:14:18 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:14:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:14:18 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:14:18 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:15:32 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.8ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:15:32 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:15:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.5ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:15:32 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:15:32 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:15:32 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:15:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:15:32 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:15:32 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:16:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:16:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:16:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.1ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:16:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:16:39 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:16:39 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:16:39 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:16:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:16:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:23:45 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:23:45 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:23:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.0ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-06 23:23:45 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-06 23:23:45 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 06:23:45 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 06:23:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-06 23:23:45 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-06 23:23:45 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:39:36 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 20:39:36 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 20:39:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.8ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:39:36 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 5.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 13:39:36 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 20:39:36 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 20:39:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 13:39:36 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 13:39:36 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:40:17 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 20:40:17 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 20:40:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.0ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:40:17 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 13:40:17 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 20:40:17 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 20:40:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 13:40:17 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 13:40:17 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:40:37 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 20:40:37 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 20:40:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.5ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:40:37 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 13:40:37 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 20:40:37 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 20:40:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 13:40:37 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 13:40:37 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:42:43 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 20:42:43 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 20:42:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.5ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:42:43 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.1ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 13:42:43 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 20:42:43 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 20:42:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 13:42:43 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 13:42:43 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:46:01 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 20:46:01 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 20:46:01 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.5ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 13:46:01 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 13:46:01 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 20:46:01 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 20:46:01 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 13:46:01 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 13:46:01 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 14:44:20 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 21:44:20 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 21:44:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.2ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 14:44:20 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 14:44:20 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.2ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 21:44:20 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 21:44:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 14:44:20 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 14:44:20 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 14:45:24 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 21:45:24 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 21:45:24 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 14:45:24 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 14:45:24 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 21:45:24 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 21:45:24 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 14:45:24 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 14:45:24 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:00:53 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:00:53 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:00:53 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:00:53 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:00:53 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:00:53 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:00:53 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:00:53 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:00:53 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:02:19 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:02:19 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:02:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.2ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:02:19 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:02:19 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:02:19 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:02:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:02:19 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:02:19 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:03:01 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:03:01 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:03:01 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:03:01 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:03:01 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:03:01 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:03:01 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:03:01 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:03:01 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:03:27 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:03:27 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:03:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.1ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:03:27 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:03:27 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:03:27 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:03:27 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:03:27 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:03:27 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.3ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:05:40 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.8ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:05:40 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:05:40 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.1ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:05:40 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:05:40 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:05:40 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:05:40 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:05:40 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:05:40 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:06:10 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:06:10 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:06:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:06:10 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:06:10 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:06:10 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:06:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:06:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:06:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:14:44 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:14:44 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:14:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.8ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:14:44 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:14:44 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:14:44 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:14:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:14:44 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:14:44 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:37 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:37 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.8ms (Views: 1.8ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:37 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:37 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:37 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:37 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:37 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.2ms (Views: 1.8ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:38 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:38 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:38 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:39 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:39 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.2ms (Views: 1.2ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:39 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:39 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:39 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:40 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:40 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:40 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.4ms (Views: 2.2ms | ActiveRecord: 0.0ms) +  (1.2ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:40 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:40 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:40 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:40 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:40 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:40 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:41 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:41 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:41 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:42 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:42 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:42 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:42 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:42 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:42 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:43 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:43 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.2ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:43 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:43 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:43 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:43 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:43 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:44 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:44 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.0ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:44 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.9ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:44 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:44 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:44 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:44 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:45 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:45 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.6ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (1.2ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:45 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.6ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:45 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:45 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:45 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:45 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (4.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:46 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:46 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.3ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:46 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:46 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:47 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:47 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:47 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:47 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:47 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:47 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:47 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:47 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.8ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:47 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:48 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:48 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:48 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.1ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:48 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:48 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:48 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:48 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:48 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:48 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:49 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:49 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:49 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.5ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:49 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:49 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:49 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:49 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:49 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:49 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:50 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:50 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.5ms (Views: 2.2ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:50 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:50 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:50 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:50 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:50 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:51 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:51 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:51 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:51 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:51 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:51 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:51 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:51 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:51 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:52 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:52 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:52 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.4ms (Views: 2.4ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:52 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.9ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:52 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:52 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:52 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:52 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:52 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:53 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:53 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:53 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.1ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:53 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 6.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:53 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:53 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:53 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:53 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:53 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:54 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:54 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.5ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:54 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:54 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:54 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:54 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:54 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:55 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:55 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:55 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.8ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:55 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 5.5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:55 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:55 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:55 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:55 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:55 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:57 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.7ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:57 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:57 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.5ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:57 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:57 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:57 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:57 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:57 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:57 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:58 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:58 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:58 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:18:58 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:18:58 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:18:58 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:18:58 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:18:58 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:18:58 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:17 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:17 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.6ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:17 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:19:17 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:17 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:19:17 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:19:17 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:18 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:18 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:18 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:19:18 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:18 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:19:18 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:19:18 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:19 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:19 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:19 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:19:19 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:19 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:19:19 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:19:19 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:20 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:20 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.6ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:20 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:19:20 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:20 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:19:20 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:19:20 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:21 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:21 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:21 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.9ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:21 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:19:21 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:21 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:21 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:19:21 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:19:21 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:22 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:22 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:22 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.9ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:22 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.5ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:19:22 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:22 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:22 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:19:22 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:19:22 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:23 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:23 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:19:23 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:19:23 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:19:23 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:19:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:19:23 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:19:23 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:39 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:39 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.0ms (Views: 2.5ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:39 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:39 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:39 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.2ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:41 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:41 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:41 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:41 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 5.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:41 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:41 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:41 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:41 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:41 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:42 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:42 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:42 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:42 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:42 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:42 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:42 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:42 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:42 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:43 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:43 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.6ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:43 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 5.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:43 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:43 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:43 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:43 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:44 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:44 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:44 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 5.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:44 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:44 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:44 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:44 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:45 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:45 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:45 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:45 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:45 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:45 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:45 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:46 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.0ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:46 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:46 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:47 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:47 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:47 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.8ms (Views: 2.4ms | ActiveRecord: 0.0ms) +  (0.7ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:47 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:47 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.2ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:47 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:47 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:47 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:47 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:48 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:48 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:48 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.6ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:48 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:48 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.2ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:48 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:48 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:48 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:48 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:49 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:49 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:49 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.6ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:49 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:49 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.2ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:49 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:49 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:49 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:49 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:50 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:50 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.6ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:50 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:50 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:50 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:50 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:50 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.6ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:51 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:51 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:51 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.9ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:51 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:51 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:51 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:51 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:51 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:51 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:52 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:52 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:52 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.4ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:52 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:52 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:52 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:52 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:52 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:52 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:53 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:53 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:53 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.1ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:53 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:53 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:53 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:53 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:53 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:53 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.4ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:54 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:54 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.2ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:54 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:54 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:55 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:55 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:55 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:55 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:56 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:56 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:56 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.6ms (Views: 2.4ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:56 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:56 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:56 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:56 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:56 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:56 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:57 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:57 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:57 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.8ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:57 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:57 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:57 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:57 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:57 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:57 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:58 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:58 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:58 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.5ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:58 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.4ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:58 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:58 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:58 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:58 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:58 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:59 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:59 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.7ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:21:59 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.6ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:21:59 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:21:59 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:21:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:21:59 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:21:59 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:00 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (3.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:00 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:00 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 18.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:00 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.0ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:22:00 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:00 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:00 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:22:00 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:22:00 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:01 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:01 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:01 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:01 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:22:01 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:01 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:01 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:22:01 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:22:01 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.3ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:02 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:02 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:02 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.8ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:02 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:22:02 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:02 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:02 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:22:02 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:22:02 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:03 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.7ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:03 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:03 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.8ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:03 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:22:03 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:03 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:22:03 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:22:03 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:34 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.6ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:34 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:34 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.0ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:34 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:22:34 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:34 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:34 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:22:34 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:22:34 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.3ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:35 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:35 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:35 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.6ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:22:35 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:22:35 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:22:35 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:22:35 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:22:35 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:22:35 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:24:08 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:24:08 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:24:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.8ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:24:08 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:24:08 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:24:08 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:24:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:24:08 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:24:08 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:24:09 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:24:09 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:24:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.6ms (Views: 2.0ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:24:09 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:24:09 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:24:09 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:24:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:24:09 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:24:09 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:24:51 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:24:51 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:24:51 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.1ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:24:51 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:24:51 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:24:51 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:24:51 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:24:51 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 4.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:24:51 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:24:52 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:24:52 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:24:52 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.1ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:24:52 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:24:52 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:24:52 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:24:52 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:24:52 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:24:52 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:24:53 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:24:53 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:24:53 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.7ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:24:53 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:24:53 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:24:53 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:24:53 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:24:53 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:24:53 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:26:34 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:26:34 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:26:34 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.0ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:26:34 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.9ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:26:34 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:26:34 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:26:34 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:26:34 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:26:34 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:26:35 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:26:35 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:26:35 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.5ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:26:35 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:26:35 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:26:35 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:26:35 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:26:35 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:26:35 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:26:36 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:26:36 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:26:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:26:36 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.4ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:26:36 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 2.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:26:36 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:26:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:26:36 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:26:36 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:26:37 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:26:37 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:26:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.1ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:26:37 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:26:37 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:26:37 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:26:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:26:37 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:26:37 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:26:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:26:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:26:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:26:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.0ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:22 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:22 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:22 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:22 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:27:22 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:22 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:22 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:27:22 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:27:22 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:24 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:24 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:24 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:24 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.6ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:27:24 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:24 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:24 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:27:24 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:27:24 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:32 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.6ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:32 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.8ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:32 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:27:32 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:32 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:27:32 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:27:33 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:34 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:34 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:34 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.3ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:34 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:27:34 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:34 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:34 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:27:34 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 4.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:27:34 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:35 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:35 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:35 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.1ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:35 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.2ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:27:35 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:35 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:35 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:27:35 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:27:35 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:36 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:36 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.4ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:36 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:27:36 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:36 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:27:36 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:27:36 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.3ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:37 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.6ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:37 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.9ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:37 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:27:37 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:37 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:27:37 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:27:37 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 11.9ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:27:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:27:38 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:27:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:27:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:27:38 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:27:38 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:31:16 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:31:16 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:31:16 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:31:16 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.4ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:31:16 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:31:16 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:31:16 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:31:16 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:31:16 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:31:17 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:31:17 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:31:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.9ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:31:17 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.2ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:31:17 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:31:17 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:31:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:31:17 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:31:17 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:31:18 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:31:18 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:31:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.6ms (Views: 1.8ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.1ms) rollback transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:31:28 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:31:28 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:31:28 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:31:28 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.6ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:31:28 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:31:28 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:31:28 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:31:28 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:31:28 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:34:10 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:34:10 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:34:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.4ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (1.2ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:34:10 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.3ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:34:10 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:34:10 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:34:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:34:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.5ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:34:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:34:56 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.7ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:34:56 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:34:56 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.0ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:34:56 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.2ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:34:56 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:34:56 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:34:56 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:34:56 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:34:56 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:36:24 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:36:24 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:36:24 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:36:24 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:36:24 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:36:24 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:36:24 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:36:24 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:36:24 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:37:10 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (3.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:37:10 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:37:10 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.9ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (1.2ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:37:10 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:37:10 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:37:10 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:37:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:37:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.7ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:37:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:37:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"content"=>"bar", "title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:37:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:37:38 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 17.1ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 15:37:38 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 15:37:38 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Fri, 07 Oct 2016 22:37:38 UTC +00:00], ["title", "foo"], ["updated_at", Fri, 07 Oct 2016 22:37:38 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 15:37:38 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 15:37:38 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +  (0.3ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 21:19:01 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.3ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 21:19:01 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 21:19:01 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("title", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "foo"], ["content", "bar"], ["created_at", 2016-10-08 04:19:01 UTC], ["updated_at", 2016-10-08 04:19:01 UTC]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 21:19:01 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] +Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.1ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 21:19:01 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.2ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.2ms) +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +  (0.2ms) rollback transaction +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 21:45:07 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.3ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 21:45:07 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 21:45:07 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("title", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "foo"], ["content", "bar"], ["created_at", 2016-10-08 04:45:07 UTC], ["updated_at", 2016-10-08 04:45:07 UTC]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 21:45:07 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] +Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.1ms) +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 21:45:07 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.2ms) rollback transaction +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 22:58:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.3ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 22:58:39 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 22:58:39 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("title", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "foo"], ["content", "bar"], ["created_at", 2016-10-08 05:58:39 UTC], ["updated_at", 2016-10-08 05:58:39 UTC]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 22:58:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] +Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.1ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 22:58:39 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.1ms) rollback transaction +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 22:59:41 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.3ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-07 22:59:41 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-07 22:59:41 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("title", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "foo"], ["content", "bar"], ["created_at", 2016-10-08 05:59:41 UTC], ["updated_at", 2016-10-08 05:59:41 UTC]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-07 22:59:41 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] +Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.1ms) +  (1.2ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-07 22:59:41 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.1ms) rollback transaction +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:01:50 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +Completed 500 Internal Server Error in 2ms +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:01:50 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +Completed 500 Internal Server Error in 0ms +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-08 00:01:50 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} +Completed 500 Internal Server Error in 0ms +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("title", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "foo"], ["content", "bar"], ["created_at", "2016-10-08 07:01:50.949961"], ["updated_at", "2016-10-08 07:01:50.949961"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-08 00:01:50 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT 1 [["id", 1]] +Completed 500 Internal Server Error in 2ms +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-08 00:01:50 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT 1 [["id", 0]] +Completed 500 Internal Server Error in 0ms +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.1ms) rollback transaction +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:02:18 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +Completed 500 Internal Server Error in 2ms +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:02:18 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +Completed 500 Internal Server Error in 0ms +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-08 00:02:18 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("title", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "foo"], ["content", "bar"], ["created_at", "2016-10-08 07:02:18.321728"], ["updated_at", "2016-10-08 07:02:18.321728"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-08 00:02:18 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT 1 [["id", 1]] +Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-08 00:02:18 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT 1 [["id", 0]] +Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.1ms) rollback transaction +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:03:28 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("title", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "foo"], ["content", "bar"], ["created_at", "2016-10-08 07:03:28.606018"], ["updated_at", "2016-10-08 07:03:28.606018"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16ms (Views: 1.0ms | ActiveRecord: 0.6ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:03:28 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-08 00:03:28 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("title", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "foo"], ["content", "bar"], ["created_at", "2016-10-08 07:03:28.638087"], ["updated_at", "2016-10-08 07:03:28.638087"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-08 00:03:28 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT 1 [["id", 1]] +Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-08 00:03:28 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT 1 [["id", 0]] +Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.3ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:05:05 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("title", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "foo"], ["content", "bar"], ["created_at", 2016-10-08 07:05:05 UTC], ["updated_at", 2016-10-08 07:05:05 UTC]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 11ms (Views: 2.2ms | ActiveRecord: 0.8ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:05:05 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 6ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-08 00:05:05 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("title", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "foo"], ["content", "bar"], ["created_at", 2016-10-08 07:05:05 UTC], ["updated_at", 2016-10-08 07:05:05 UTC]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-08 00:05:05 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] +Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 0.1ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-08 00:05:05 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 404 Not Found in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.2ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:06:48 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sat, 08 Oct 2016 07:06:48 UTC +00:00], ["title", "foo"], ["updated_at", Sat, 08 Oct 2016 07:06:48 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.5ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:06:48 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-08 00:06:48 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sat, 08 Oct 2016 07:06:48 UTC +00:00], ["title", "foo"], ["updated_at", Sat, 08 Oct 2016 07:06:48 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-08 00:06:48 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-08 00:06:48 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:09:14 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sat, 08 Oct 2016 07:09:14 UTC +00:00], ["title", "foo"], ["updated_at", Sat, 08 Oct 2016 07:09:14 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.6ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:09:14 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-08 00:09:14 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sat, 08 Oct 2016 07:09:14 UTC +00:00], ["title", "foo"], ["updated_at", Sat, 08 Oct 2016 07:09:14 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-08 00:09:14 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-08 00:09:15 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:09:55 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.7ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sat, 08 Oct 2016 07:09:55 UTC +00:00], ["title", "foo"], ["updated_at", Sat, 08 Oct 2016 07:09:55 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.8ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 00:09:55 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.3ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-08 00:09:55 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sat, 08 Oct 2016 07:09:55 UTC +00:00], ["title", "foo"], ["updated_at", Sat, 08 Oct 2016 07:09:55 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-08 00:09:55 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 4.6ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-08 00:09:55 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 5.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 20:46:10 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (4.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sun, 09 Oct 2016 03:46:10 UTC +00:00], ["title", "foo"], ["updated_at", Sun, 09 Oct 2016 03:46:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 20.2ms (Views: 2.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 20:46:10 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 5.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-08 20:46:10 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sun, 09 Oct 2016 03:46:10 UTC +00:00], ["title", "foo"], ["updated_at", Sun, 09 Oct 2016 03:46:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-08 20:46:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.2ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 5.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-08 20:46:10 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 20:47:50 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sun, 09 Oct 2016 03:47:50 UTC +00:00], ["title", "foo"], ["updated_at", Sun, 09 Oct 2016 03:47:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.7ms (Views: 1.8ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 20:47:50 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.1ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 20:49:00 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sun, 09 Oct 2016 03:49:00 UTC +00:00], ["title", "foo"], ["updated_at", Sun, 09 Oct 2016 03:49:00 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-08 20:49:00 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-08 20:49:00 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Sun, 09 Oct 2016 03:49:00 UTC +00:00], ["title", "foo"], ["updated_at", Sun, 09 Oct 2016 03:49:00 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-08 20:49:00 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-08 20:49:00 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:15:48 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:15:48 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:15:48 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.9ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:15:48 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:15:48 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:15:48 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 09:15:48 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 09:15:48 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:16:01 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:16:01 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:16:01 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:16:01 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:16:01 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:16:01 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 09:16:01 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 09:16:01 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:16:06 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.7ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:16:06 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:16:06 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.4ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:16:06 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.9ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:16:06 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:16:06 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 09:16:06 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 5.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 09:16:06 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:17:57 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:17:57 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:17:57 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.8ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:17:57 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.8ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:17:57 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:17:57 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 09:17:57 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 09:17:57 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:19:45 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:19:45 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:19:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.6ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:19:45 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 09:19:45 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:19:45 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:19:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 09:19:45 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 09:19:45 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:59:12 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (3.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:59:12 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:59:12 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.3ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.2ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 09:59:12 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 09:59:12 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.6ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 16:59:12 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 16:59:12 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 09:59:12 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.0ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 09:59:12 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 13:19:27 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (11.6ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 20:19:27 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 20:19:27 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 61.7ms (Views: 6.2ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 13:19:28 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 15.9ms (Views: 0.4ms | ActiveRecord: 0.2ms) +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 13:19:28 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.3ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 8.2ms (Views: 0.3ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (1.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 20:19:28 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 20:19:28 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 13:19:28 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.3ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 15.3ms (Views: 0.6ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 13:19:28 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.6ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 4.5ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 13:27:34 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (10.8ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 20:27:34 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 20:27:34 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 55.7ms (Views: 5.6ms | ActiveRecord: 0.0ms) +  (1.3ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 13:27:34 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 15.1ms (Views: 0.4ms | ActiveRecord: 0.3ms) +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 13:27:34 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.3ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 5.8ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 20:27:34 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 20:27:34 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 13:27:34 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.3ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 11.1ms (Views: 0.4ms | ActiveRecord: 0.0ms) +  (1.3ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 13:27:34 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.4ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 3.7ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.2ms) rollback transaction +  (0.1ms) begin transaction +Connecting to database specified by database.yml +  (0.3ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 13:28:59 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (10.6ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 20:28:59 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 20:28:59 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 59.4ms (Views: 5.8ms | ActiveRecord: 0.0ms) +  (1.4ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 13:28:59 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 13.8ms (Views: 0.5ms | ActiveRecord: 0.2ms) +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 13:28:59 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.3ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 5.6ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.2ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 20:28:59 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 20:28:59 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 13:28:59 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.3ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 10.7ms (Views: 0.4ms | ActiveRecord: 0.0ms) +  (1.4ms) rollback transaction +  (0.2ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 13:28:59 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.3ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 3.5ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 14:31:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 21:31:46 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 21:31:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 15.9ms (Views: 1.6ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 14:31:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 14:31:46 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 21:31:46 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 21:31:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 14:31:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.3ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 14:31:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) rollback transaction +Connecting to database specified by database.yml +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 15:12:29 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (10.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 22:12:29 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 22:12:29 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 60.1ms (Views: 5.5ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.2ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 15:12:29 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 17.1ms (Views: 0.6ms | ActiveRecord: 0.2ms) +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 15:12:29 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.3ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 6.6ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 22:12:29 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 22:12:29 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 15:12:29 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.2ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 11.7ms (Views: 0.4ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 15:12:29 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.3ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 2.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 15:13:22 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 22:13:22 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 22:13:22 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.8ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.9ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 15:13:22 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.6ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 15:13:22 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 22:13:22 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 22:13:22 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 15:13:22 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 15:13:22 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 15:17:12 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 22:17:12 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 22:17:12 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.6ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 15:17:12 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 15:17:12 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 22:17:12 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 22:17:12 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 15:17:12 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 15:17:12 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 15:40:23 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 22:40:23 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 22:40:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.9ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 15:40:23 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 15:40:23 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 22:40:23 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 22:40:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 15:40:23 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 15:40:23 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 16:42:44 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 23:42:44 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 23:42:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.5ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 16:42:44 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 16:42:44 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Mon, 10 Oct 2016 23:42:44 UTC +00:00], ["title", "foo"], ["updated_at", Mon, 10 Oct 2016 23:42:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 16:42:44 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 16:42:44 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 17:37:15 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 00:37:15 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 00:37:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.1ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 17:37:15 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.6ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 17:37:15 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 00:37:15 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 00:37:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 17:37:15 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 17:37:15 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 17:37:52 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 00:37:52 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 00:37:52 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.2ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 17:37:52 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 17:37:52 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 00:37:52 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 00:37:52 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 17:37:52 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 17:37:52 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 17:39:41 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 00:39:41 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 00:39:41 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 17:39:41 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.6ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 17:39:41 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 00:39:41 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 00:39:41 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 17:39:41 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 17:39:41 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 17:43:31 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 00:43:31 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 00:43:31 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.0ms (Views: 1.5ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 17:43:31 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.5ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 17:43:31 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 00:43:31 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 00:43:31 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 17:43:31 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.2ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.7ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 17:43:31 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +Connecting to database specified by database.yml +  (0.2ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 18:02:04 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.6ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 01:02:04 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 01:02:04 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.6ms (Views: 1.4ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-10 18:02:05 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-10 18:02:05 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 01:02:05 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 01:02:05 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-10 18:02:05 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-10 18:02:05 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (4.8ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 17:51:13 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 17:51:13 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs?foo=bar" for 127.0.0.1 at 2016-10-11 10:51:59 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "foo"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 17:51:59 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 17:51:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 16.2ms (Views: 1.9ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs?foo=bar" for 127.0.0.1 at 2016-10-11 10:51:59 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "foo"=>"bar", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 6.6ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar&foo=bar" for 127.0.0.1 at 2016-10-11 10:51:59 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar", "foo"=>"bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 2.0ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 17:51:59 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 17:51:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1?foo=bar" for 127.0.0.1 at 2016-10-11 10:51:59 -0700 +Processing by BlogsController#show as JSON + Parameters: {"foo"=>"bar", "id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid?foo=bar" for 127.0.0.1 at 2016-10-11 10:51:59 -0700 +Processing by BlogsController#show as JSON + Parameters: {"foo"=>"bar", "id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs?foo=bar" for 127.0.0.1 at 2016-10-11 10:52:27 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "foo"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +Completed 500 Internal Server Error in 0.4ms +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs?foo=bar" for 127.0.0.1 at 2016-10-11 10:52:27 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "foo"=>"bar", "blog"=>{"title"=>"foo"}} +Completed 500 Internal Server Error in 0.1ms +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar&foo=bar" for 127.0.0.1 at 2016-10-11 10:52:27 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar", "foo"=>"bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 200 OK in 5.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 17:52:27 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 17:52:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1?foo=bar" for 127.0.0.1 at 2016-10-11 10:52:27 -0700 +Processing by BlogsController#show as JSON + Parameters: {"foo"=>"bar", "id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.8ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid?foo=bar" for 127.0.0.1 at 2016-10-11 10:52:27 -0700 +Processing by BlogsController#show as JSON + Parameters: {"foo"=>"bar", "id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs?foo=bar" for 127.0.0.1 at 2016-10-11 10:52:40 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "foo"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +Completed 500 Internal Server Error in 0.3ms +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs?foo=bar" for 127.0.0.1 at 2016-10-11 10:52:40 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "foo"=>"bar", "blog"=>{"title"=>"foo"}} +Completed 500 Internal Server Error in 0.1ms +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar&foo=bar" for 127.0.0.1 at 2016-10-11 10:52:40 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar", "foo"=>"bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" +Completed 200 OK in 5.1ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 17:52:40 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 17:52:40 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1?foo=bar" for 127.0.0.1 at 2016-10-11 10:52:40 -0700 +Processing by BlogsController#show as JSON + Parameters: {"foo"=>"bar", "id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.5ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid?foo=bar" for 127.0.0.1 at 2016-10-11 10:52:40 -0700 +Processing by BlogsController#show as JSON + Parameters: {"foo"=>"bar", "id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.8ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 17:59:50 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 17:59:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-11 11:00:08 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 18:00:08 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 18:00:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.5ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-11 11:00:08 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-11 11:00:08 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 18:00:08 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 18:00:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-11 11:00:09 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-11 11:00:09 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-11 11:01:22 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +Completed 500 Internal Server Error in 0.8ms +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-11 11:01:22 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +Completed 500 Internal Server Error in 0.5ms +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-11 11:01:22 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} +Completed 500 Internal Server Error in 0.6ms +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 18:01:22 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 18:01:22 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-11 11:01:22 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} +Completed 500 Internal Server Error in 0.6ms +  (0.9ms) rollback transaction +  (0.1ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-11 11:01:22 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} +Completed 500 Internal Server Error in 0.6ms +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-11 11:01:36 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 18:01:36 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 18:01:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-11 11:01:36 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-11 11:01:36 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.5ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 18:01:36 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 18:01:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-11 11:01:36 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-11 11:01:36 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-11 11:02:19 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 18:02:19 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 18:02:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.1ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-11 11:02:19 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 5.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-11 11:02:19 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 18:02:19 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 18:02:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-11 11:02:19 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-11 11:02:19 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.9ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-11 11:04:50 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 18:04:50 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 18:04:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.2ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs" for 127.0.0.1 at 2016-10-11 11:04:50 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar" for 127.0.0.1 at 2016-10-11 11:04:50 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 18:04:50 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 18:04:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1" for 127.0.0.1 at 2016-10-11 11:04:50 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid" for 127.0.0.1 at 2016-10-11 11:04:50 -0700 +Processing by BlogsController#show as JSON + Parameters: {"id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 19:44:30 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 19:44:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs?api_key=fake_key" for 127.0.0.1 at 2016-10-11 12:50:40 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "api_key"=>"fake_key", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 19:50:40 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 19:50:40 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 14.4ms (Views: 1.7ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs?api_key=fake_key" for 127.0.0.1 at 2016-10-11 12:50:40 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "api_key"=>"fake_key", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar&api_key=fake_key" for 127.0.0.1 at 2016-10-11 12:50:40 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar", "api_key"=>"fake_key"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.3ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Tue, 11 Oct 2016 19:50:40 UTC +00:00], ["title", "foo"], ["updated_at", Tue, 11 Oct 2016 19:50:40 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1?api_key=fake_key" for 127.0.0.1 at 2016-10-11 12:50:40 -0700 +Processing by BlogsController#show as JSON + Parameters: {"api_key"=>"fake_key", "id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid?api_key=fake_key" for 127.0.0.1 at 2016-10-11 12:50:40 -0700 +Processing by BlogsController#show as JSON + Parameters: {"api_key"=>"fake_key", "id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 1.0ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:27:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "api_key"=>"fake_key", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.5ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Wed, 12 Oct 2016 01:27:46 UTC +00:00], ["title", "foo"], ["updated_at", Wed, 12 Oct 2016 01:27:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.0ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:27:46 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "api_key"=>"fake_key", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 4.3ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar&api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:27:46 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar", "api_key"=>"fake_key"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Wed, 12 Oct 2016 01:27:46 UTC +00:00], ["title", "foo"], ["updated_at", Wed, 12 Oct 2016 01:27:46 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:27:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"api_key"=>"fake_key", "id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.6ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:27:46 -0700 +Processing by BlogsController#show as JSON + Parameters: {"api_key"=>"fake_key", "id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.0ms) begin transaction +Started POST "/blogs?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:29:48 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "api_key"=>"fake_key", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Wed, 12 Oct 2016 01:29:48 UTC +00:00], ["title", "foo"], ["updated_at", Wed, 12 Oct 2016 01:29:48 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 13.4ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.0ms) rollback transaction +  (0.0ms) begin transaction +Started POST "/blogs?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:29:48 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "api_key"=>"fake_key", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.7ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar&api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:29:48 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar", "api_key"=>"fake_key"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Wed, 12 Oct 2016 01:29:48 UTC +00:00], ["title", "foo"], ["updated_at", Wed, 12 Oct 2016 01:29:48 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:29:48 -0700 +Processing by BlogsController#show as JSON + Parameters: {"api_key"=>"fake_key", "id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 2.4ms (Views: 0.1ms | ActiveRecord: 0.0ms) +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:29:48 -0700 +Processing by BlogsController#show as JSON + Parameters: {"api_key"=>"fake_key", "id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.7ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction +Started POST "/blogs?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:30:31 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "content"=>"bar", "api_key"=>"fake_key", "blog"=>{"title"=>"foo", "content"=>"bar"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Wed, 12 Oct 2016 01:30:31 UTC +00:00], ["title", "foo"], ["updated_at", Wed, 12 Oct 2016 01:30:31 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Completed 201 Created in 12.3ms (Views: 1.3ms | ActiveRecord: 0.0ms) +  (1.1ms) rollback transaction +  (0.1ms) begin transaction +Started POST "/blogs?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:30:31 -0700 +Processing by BlogsController#create as JSON + Parameters: {"title"=>"foo", "api_key"=>"fake_key", "blog"=>{"title"=>"foo"}} +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 +Completed 422 Unprocessable Entity in 3.8ms (Views: 0.1ms | ActiveRecord: 0.1ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs?keywords=foo+bar&api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:30:31 -0700 +Processing by BlogsController#index as JSON + Parameters: {"keywords"=>"foo bar", "api_key"=>"fake_key"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs"  +Completed 200 OK in 1.4ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "blogs" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["created_at", Wed, 12 Oct 2016 01:30:31 UTC +00:00], ["title", "foo"], ["updated_at", Wed, 12 Oct 2016 01:30:31 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Started GET "/blogs/1?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:30:31 -0700 +Processing by BlogsController#show as JSON + Parameters: {"api_key"=>"fake_key", "id"=>"1"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 1 LIMIT 1 +Completed 200 OK in 3.6ms (Views: 0.2ms | ActiveRecord: 0.0ms) +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +Started GET "/blogs/invalid?api_key=fake_key" for 127.0.0.1 at 2016-10-11 18:30:31 -0700 +Processing by BlogsController#show as JSON + Parameters: {"api_key"=>"fake_key", "id"=>"invalid"} + Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."id" = 0 LIMIT 1 +Completed 404 Not Found in 0.8ms (Views: 0.0ms | ActiveRecord: 0.0ms) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +Connecting to database specified by database.yml +  (0.1ms) rollback transaction diff --git a/test-app/public/404.html b/test-app/public/404.html new file mode 100644 index 0000000..9a48320 --- /dev/null +++ b/test-app/public/404.html @@ -0,0 +1,26 @@ + + + + The page you were looking for doesn't exist (404) + + + + + +
      +

      The page you were looking for doesn't exist.

      +

      You may have mistyped the address or the page may have moved.

      +
      + + diff --git a/test-app/public/422.html b/test-app/public/422.html new file mode 100644 index 0000000..83660ab --- /dev/null +++ b/test-app/public/422.html @@ -0,0 +1,26 @@ + + + + The change you wanted was rejected (422) + + + + + +
      +

      The change you wanted was rejected.

      +

      Maybe you tried to change something you didn't have access to.

      +
      + + diff --git a/test-app/public/500.html b/test-app/public/500.html new file mode 100644 index 0000000..f3648a0 --- /dev/null +++ b/test-app/public/500.html @@ -0,0 +1,25 @@ + + + + We're sorry, but something went wrong (500) + + + + + +
      +

      We're sorry, but something went wrong.

      +
      + + diff --git a/test-app/public/favicon.ico b/test-app/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/test-app/script/rails b/test-app/script/rails new file mode 100755 index 0000000..f8da2cf --- /dev/null +++ b/test-app/script/rails @@ -0,0 +1,6 @@ +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. + +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) +require 'rails/commands' diff --git a/test-app/spec/integration/blogs_spec.rb b/test-app/spec/integration/blogs_spec.rb new file mode 100644 index 0000000..8d5aa41 --- /dev/null +++ b/test-app/spec/integration/blogs_spec.rb @@ -0,0 +1,65 @@ +require 'swagger_helper' + +describe 'Blogs API', type: :request, swagger_doc: 'v1/swagger.json' do + let(:api_key) { 'fake_key' } + + path '/blogs' do + post 'Creates a blog' do + tags 'Blogs' + description 'Creates a new blog from provided data' + operationId 'createBlog' + consumes 'application/json' + parameter name: :blog, :in => :body, schema: { '$ref' => '#/definitions/blog' } + + response '201', 'blog created' do + let(:blog) { { title: 'foo', content: 'bar' } } + run_test! + end + + response '422', 'invalid request' do + schema '$ref' => '#/definitions/errors_object' + + let(:blog) { { title: 'foo' } } + run_test! + end + end + + get 'Searches blogs' do + tags 'Blogs' + description 'Searches blogs by keywords' + operationId 'searchBlogs' + produces 'application/json' + parameter name: :keywords, in: :query, type: 'string' + + response '200', 'success' do + schema type: 'array', items: { '$ref' => '#/definitions/blog' } + + let(:keywords) { 'foo bar' } + run_test! + end + end + end + + path '/blogs/{id}' do + get 'Retrieves a blog' do + tags 'Blogs' + description 'Retrieves a specific blog by id' + operationId 'getBlog' + produces 'application/json' + parameter name: :id, :in => :path, :type => :string + + response '200', 'blog found' do + schema '$ref' => '#/definitions/blog' + + let(:blog) { Blog.create(title: 'foo', content: 'bar') } + let(:id) { blog.id } + run_test! + end + + response '404', 'blog not found' do + let(:id) { 'invalid' } + run_test! + end + end + end +end diff --git a/spec/dummy/spec/rails_helper.rb b/test-app/spec/rails_helper.rb similarity index 87% rename from spec/dummy/spec/rails_helper.rb rename to test-app/spec/rails_helper.rb index 02d4fff..97096a2 100644 --- a/spec/dummy/spec/rails_helper.rb +++ b/test-app/spec/rails_helper.rb @@ -29,7 +29,7 @@ RSpec.configure do |config| # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false # instead of true. - config.use_transactional_fixtures = false + config.use_transactional_fixtures = true # RSpec Rails can automatically mix in different behaviours to your tests # based on their file location, for example enabling you to call `get` and @@ -50,18 +50,4 @@ RSpec.configure do |config| config.filter_rails_from_backtrace! # arbitrary gems may also be filtered via: # config.filter_gems_from_backtrace("gem name") - - config.before(:suite) do - DatabaseCleaner.strategy = :truncation - DatabaseCleaner.clean_with(:truncation) - end - - config.around(:each) do |example| - DatabaseCleaner.cleaning do - example.run - end - end - - require 'swagger_rails/rspec/dsl' - config.extend SwaggerRails::RSpec::DSL end diff --git a/test-app/spec/rake/rswag_specs_swaggerize_spec.rb b/test-app/spec/rake/rswag_specs_swaggerize_spec.rb new file mode 100644 index 0000000..0a590ee --- /dev/null +++ b/test-app/spec/rake/rswag_specs_swaggerize_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' +require 'rake' + +describe 'rswag:specs:swaggerize' do + let(:swagger_root) { Rails.root.to_s + '/swagger' } + before do + TestApp::Application.load_tasks + FileUtils.rm_r(swagger_root) if File.exists?(swagger_root) + end + + it 'generates Swagger JSON files from integration specs' do + expect { Rake::Task['rswag:specs:swaggerize'].invoke }.not_to raise_exception + expect(File).to exist("#{swagger_root}/v1/swagger.json") + end +end diff --git a/spec/dummy/spec/spec_helper.rb b/test-app/spec/spec_helper.rb similarity index 83% rename from spec/dummy/spec/spec_helper.rb rename to test-app/spec/spec_helper.rb index 61e2738..8f698be 100644 --- a/spec/dummy/spec/spec_helper.rb +++ b/test-app/spec/spec_helper.rb @@ -40,15 +40,22 @@ RSpec.configure do |config| mocks.verify_partial_doubles = true end + # This option will default to `:apply_to_host_groups` in RSpec 4 (and will + # have no way to turn it off -- the option exists only for backwards + # compatibility in RSpec 3). It causes shared context metadata to be + # inherited by the metadata hash of host groups and examples, rather than + # triggering implicit auto-inclusion in groups with matching metadata. + config.shared_context_metadata_behavior = :apply_to_host_groups + # The settings below are suggested to provide a good initial experience # with RSpec, but feel free to customize to your heart's content. =begin - # These two settings work together to allow you to limit a spec run - # to individual examples or groups you care about by tagging them with - # `:focus` metadata. When nothing is tagged with `:focus`, all examples - # get run. - config.filter_run :focus - config.run_all_when_everything_filtered = true + # This allows you to limit a spec run to individual examples or groups + # you care about by tagging them with `:focus` metadata. When nothing + # is tagged with `:focus`, all examples get run. RSpec also provides + # aliases for `it`, `describe`, and `context` that include `:focus` + # metadata: `fit`, `fdescribe` and `fcontext`, respectively. + config.filter_run_when_matching :focus # Allows RSpec to persist some state between runs in order to support # the `--only-failures` and `--next-failure` CLI options. We recommend diff --git a/test-app/spec/swagger_helper.rb b/test-app/spec/swagger_helper.rb new file mode 100644 index 0000000..ae18921 --- /dev/null +++ b/test-app/spec/swagger_helper.rb @@ -0,0 +1,59 @@ +require 'rails_helper' + +RSpec.configure do |config| + # Specify a root folder where Swagger JSON files are generated + # NOTE: If you're using the rswag-api to serve API descriptions, you'll need + # to ensure that it's confiugred to server Swagger from the same folder + config.swagger_root = Rails.root.to_s + '/swagger' + + # Define one or more Swagger documents and provide global metadata for each one + # When you run the 'rswag:specs:to_swagger' rake task, the complete Swagger will + # be generated at the provided relative path under swagger_root + # By default, the operations defined in spec files are added to the first + # document below. You can override this behavior by adding a swagger_doc tag to the + # the root example_group in your specs, e.g. describe '...', swagger_doc: 'v2/swagger.json' + config.swagger_docs = { + 'v1/swagger.json' => { + swagger: '2.0', + info: { + title: 'API V1', + version: 'v1' + }, + paths: {}, + definitions: { + errors_object: { + type: 'object', + properties: { + errors: { '$ref' => '#/definitions/errors_map' } + } + }, + errors_map: { + type: 'object', + additionalProperties: { + type: 'array', + items: { type: 'string' } + } + }, + blog: { + type: 'object', + properties: { + id: { type: 'integer' }, + title: { type: 'string' }, + content: { type: 'string' } + }, + required: [ 'id', 'title', 'content' ] + } + }, + securityDefinitions: { + api_key: { + type: :apiKey, + name: 'api_key', + in: :query + } + }, + security: { + api_key: [] + } + } + } +end diff --git a/test-app/swagger/v1/swagger.json b/test-app/swagger/v1/swagger.json new file mode 100644 index 0000000..820a0c3 --- /dev/null +++ b/test-app/swagger/v1/swagger.json @@ -0,0 +1,153 @@ +{ + "swagger": "2.0", + "info": { + "title": "API V1", + "version": "v1" + }, + "paths": { + "/blogs": { + "post": { + "summary": "Creates a blog", + "tags": [ + "Blogs" + ], + "description": "Creates a new blog from provided data", + "operationId": "createBlog", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "name": "blog", + "in": "body", + "schema": { + "$ref": "#/definitions/blog" + } + } + ], + "responses": { + "201": { + "description": "blog created" + }, + "422": { + "description": "invalid request", + "schema": { + "$ref": "#/definitions/errors_object" + } + } + } + }, + "get": { + "summary": "Searches blogs", + "tags": [ + "Blogs" + ], + "description": "Searches blogs by keywords", + "operationId": "searchBlogs", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keywords", + "in": "query", + "type": "string" + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/blog" + } + } + } + } + } + }, + "/blogs/{id}": { + "get": { + "summary": "Retrieves a blog", + "tags": [ + "Blogs" + ], + "description": "Retrieves a specific blog by id", + "operationId": "getBlog", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "blog found", + "schema": { + "$ref": "#/definitions/blog" + } + }, + "404": { + "description": "blog not found" + } + } + } + } + }, + "definitions": { + "errors_object": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/definitions/errors_map" + } + } + }, + "errors_map": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "blog": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "title", + "content" + ] + } + }, + "securityDefinitions": { + "api_key": { + "type": "apiKey", + "name": "api_key", + "in": "query" + } + }, + "security": { + "api_key": [ + + ] + } +} \ No newline at end of file diff --git a/test-app/tmp/cache/assets/C4E/AF0/sprockets%2F7c306050f061626e0f3950e79621e7e4 b/test-app/tmp/cache/assets/C4E/AF0/sprockets%2F7c306050f061626e0f3950e79621e7e4 new file mode 100644 index 0000000..6202a55 Binary files /dev/null and b/test-app/tmp/cache/assets/C4E/AF0/sprockets%2F7c306050f061626e0f3950e79621e7e4 differ diff --git a/test-app/tmp/cache/assets/C64/190/sprockets%2F00050310cc269c318fea8890521c033c b/test-app/tmp/cache/assets/C64/190/sprockets%2F00050310cc269c318fea8890521c033c new file mode 100644 index 0000000..b8e8cb0 Binary files /dev/null and b/test-app/tmp/cache/assets/C64/190/sprockets%2F00050310cc269c318fea8890521c033c differ diff --git a/test-app/tmp/cache/assets/C78/AA0/sprockets%2F7540403ab706922217f46d51cf078d2f b/test-app/tmp/cache/assets/C78/AA0/sprockets%2F7540403ab706922217f46d51cf078d2f new file mode 100644 index 0000000..f32518a Binary files /dev/null and b/test-app/tmp/cache/assets/C78/AA0/sprockets%2F7540403ab706922217f46d51cf078d2f differ diff --git a/test-app/tmp/cache/assets/C80/370/sprockets%2Fab6f8830a4155458f0924245c5765a3c b/test-app/tmp/cache/assets/C80/370/sprockets%2Fab6f8830a4155458f0924245c5765a3c new file mode 100644 index 0000000..3f58d07 Binary files /dev/null and b/test-app/tmp/cache/assets/C80/370/sprockets%2Fab6f8830a4155458f0924245c5765a3c differ diff --git a/test-app/tmp/cache/assets/C87/590/sprockets%2F427498418547e04b26baf60dc45f7922 b/test-app/tmp/cache/assets/C87/590/sprockets%2F427498418547e04b26baf60dc45f7922 new file mode 100644 index 0000000..bf4a61d Binary files /dev/null and b/test-app/tmp/cache/assets/C87/590/sprockets%2F427498418547e04b26baf60dc45f7922 differ diff --git a/test-app/tmp/cache/assets/C87/8C0/sprockets%2F758833f65c3573a325c9b5c293d38d01 b/test-app/tmp/cache/assets/C87/8C0/sprockets%2F758833f65c3573a325c9b5c293d38d01 new file mode 100644 index 0000000..18519a0 Binary files /dev/null and b/test-app/tmp/cache/assets/C87/8C0/sprockets%2F758833f65c3573a325c9b5c293d38d01 differ diff --git a/test-app/tmp/cache/assets/CA2/360/sprockets%2F11fb992712bf941fc5444b1081249ab0 b/test-app/tmp/cache/assets/CA2/360/sprockets%2F11fb992712bf941fc5444b1081249ab0 new file mode 100644 index 0000000..42c5e35 Binary files /dev/null and b/test-app/tmp/cache/assets/CA2/360/sprockets%2F11fb992712bf941fc5444b1081249ab0 differ diff --git a/test-app/tmp/cache/assets/CA4/590/sprockets%2F5a2393364111291ca6ef1b8c60f261e8 b/test-app/tmp/cache/assets/CA4/590/sprockets%2F5a2393364111291ca6ef1b8c60f261e8 new file mode 100644 index 0000000..e838d8d Binary files /dev/null and b/test-app/tmp/cache/assets/CA4/590/sprockets%2F5a2393364111291ca6ef1b8c60f261e8 differ diff --git a/test-app/tmp/cache/assets/CB2/210/sprockets%2F2bd1110ff02ed73884f1e9b559661186 b/test-app/tmp/cache/assets/CB2/210/sprockets%2F2bd1110ff02ed73884f1e9b559661186 new file mode 100644 index 0000000..aaf8394 Binary files /dev/null and b/test-app/tmp/cache/assets/CB2/210/sprockets%2F2bd1110ff02ed73884f1e9b559661186 differ diff --git a/test-app/tmp/cache/assets/CB7/300/sprockets%2F4f47f6c8456b82a92ff54a533567d010 b/test-app/tmp/cache/assets/CB7/300/sprockets%2F4f47f6c8456b82a92ff54a533567d010 new file mode 100644 index 0000000..5d733f3 Binary files /dev/null and b/test-app/tmp/cache/assets/CB7/300/sprockets%2F4f47f6c8456b82a92ff54a533567d010 differ diff --git a/test-app/tmp/cache/assets/CD2/CC0/sprockets%2Fb5f9f7793895a857b56b9c056e41494d b/test-app/tmp/cache/assets/CD2/CC0/sprockets%2Fb5f9f7793895a857b56b9c056e41494d new file mode 100644 index 0000000..c612962 Binary files /dev/null and b/test-app/tmp/cache/assets/CD2/CC0/sprockets%2Fb5f9f7793895a857b56b9c056e41494d differ diff --git a/test-app/tmp/cache/assets/CD8/4F0/sprockets%2F955386f7956a67dd17889fe10ec9193f b/test-app/tmp/cache/assets/CD8/4F0/sprockets%2F955386f7956a67dd17889fe10ec9193f new file mode 100644 index 0000000..6f55022 Binary files /dev/null and b/test-app/tmp/cache/assets/CD8/4F0/sprockets%2F955386f7956a67dd17889fe10ec9193f differ diff --git a/test-app/tmp/cache/assets/CDB/B00/sprockets%2F68c927ba32a73c662b01b349641c9c7b b/test-app/tmp/cache/assets/CDB/B00/sprockets%2F68c927ba32a73c662b01b349641c9c7b new file mode 100644 index 0000000..977cbb5 Binary files /dev/null and b/test-app/tmp/cache/assets/CDB/B00/sprockets%2F68c927ba32a73c662b01b349641c9c7b differ diff --git a/test-app/tmp/cache/assets/CDF/B60/sprockets%2Ffcb3a67d2880b0a9415a61c93366691e b/test-app/tmp/cache/assets/CDF/B60/sprockets%2Ffcb3a67d2880b0a9415a61c93366691e new file mode 100644 index 0000000..367076c Binary files /dev/null and b/test-app/tmp/cache/assets/CDF/B60/sprockets%2Ffcb3a67d2880b0a9415a61c93366691e differ diff --git a/test-app/tmp/cache/assets/CE1/870/sprockets%2Ff2fff22f07d184d50c5e4048e5370393 b/test-app/tmp/cache/assets/CE1/870/sprockets%2Ff2fff22f07d184d50c5e4048e5370393 new file mode 100644 index 0000000..2da88ea Binary files /dev/null and b/test-app/tmp/cache/assets/CE1/870/sprockets%2Ff2fff22f07d184d50c5e4048e5370393 differ diff --git a/test-app/tmp/cache/assets/CE4/180/sprockets%2F1a44ff59443798bfb51541f22882eab3 b/test-app/tmp/cache/assets/CE4/180/sprockets%2F1a44ff59443798bfb51541f22882eab3 new file mode 100644 index 0000000..0a195b3 Binary files /dev/null and b/test-app/tmp/cache/assets/CE4/180/sprockets%2F1a44ff59443798bfb51541f22882eab3 differ diff --git a/test-app/tmp/cache/assets/CEA/580/sprockets%2F00d7be933e59b0847ee792e7e42a5219 b/test-app/tmp/cache/assets/CEA/580/sprockets%2F00d7be933e59b0847ee792e7e42a5219 new file mode 100644 index 0000000..2f29bfb Binary files /dev/null and b/test-app/tmp/cache/assets/CEA/580/sprockets%2F00d7be933e59b0847ee792e7e42a5219 differ diff --git a/test-app/tmp/cache/assets/CED/8A0/sprockets%2Fbb7eb4c24b93d341d1040283200a2c6d b/test-app/tmp/cache/assets/CED/8A0/sprockets%2Fbb7eb4c24b93d341d1040283200a2c6d new file mode 100644 index 0000000..f7f0272 Binary files /dev/null and b/test-app/tmp/cache/assets/CED/8A0/sprockets%2Fbb7eb4c24b93d341d1040283200a2c6d differ diff --git a/test-app/tmp/cache/assets/CFE/FF0/sprockets%2Ffd931ba87c789063c98f549369b0df83 b/test-app/tmp/cache/assets/CFE/FF0/sprockets%2Ffd931ba87c789063c98f549369b0df83 new file mode 100644 index 0000000..c4f75c5 Binary files /dev/null and b/test-app/tmp/cache/assets/CFE/FF0/sprockets%2Ffd931ba87c789063c98f549369b0df83 differ diff --git a/test-app/tmp/cache/assets/D09/E50/sprockets%2F64316d413a73d4addac61374a299a5f7 b/test-app/tmp/cache/assets/D09/E50/sprockets%2F64316d413a73d4addac61374a299a5f7 new file mode 100644 index 0000000..0f4f0e1 Binary files /dev/null and b/test-app/tmp/cache/assets/D09/E50/sprockets%2F64316d413a73d4addac61374a299a5f7 differ diff --git a/test-app/tmp/cache/assets/D0A/4A0/sprockets%2F11f5160dd16d1bce2a4838b5e89719b2 b/test-app/tmp/cache/assets/D0A/4A0/sprockets%2F11f5160dd16d1bce2a4838b5e89719b2 new file mode 100644 index 0000000..3ac3cc1 Binary files /dev/null and b/test-app/tmp/cache/assets/D0A/4A0/sprockets%2F11f5160dd16d1bce2a4838b5e89719b2 differ diff --git a/test-app/tmp/cache/assets/D0D/6B0/sprockets%2Fcdc2c396ea6666925ce18c1a225334a8 b/test-app/tmp/cache/assets/D0D/6B0/sprockets%2Fcdc2c396ea6666925ce18c1a225334a8 new file mode 100644 index 0000000..e3a28c7 Binary files /dev/null and b/test-app/tmp/cache/assets/D0D/6B0/sprockets%2Fcdc2c396ea6666925ce18c1a225334a8 differ diff --git a/test-app/tmp/cache/assets/D10/090/sprockets%2Fbd64bc7457667740f7d4a63c2f28a2a2 b/test-app/tmp/cache/assets/D10/090/sprockets%2Fbd64bc7457667740f7d4a63c2f28a2a2 new file mode 100644 index 0000000..aaa1679 Binary files /dev/null and b/test-app/tmp/cache/assets/D10/090/sprockets%2Fbd64bc7457667740f7d4a63c2f28a2a2 differ diff --git a/test-app/tmp/cache/assets/D10/AF0/sprockets%2F2a62867b314366f2bc2ebe6c10e7c887 b/test-app/tmp/cache/assets/D10/AF0/sprockets%2F2a62867b314366f2bc2ebe6c10e7c887 new file mode 100644 index 0000000..5b0fae7 Binary files /dev/null and b/test-app/tmp/cache/assets/D10/AF0/sprockets%2F2a62867b314366f2bc2ebe6c10e7c887 differ diff --git a/test-app/tmp/cache/assets/D11/D90/sprockets%2Fe2f7cf70954a16a5641a9142f1cd865d b/test-app/tmp/cache/assets/D11/D90/sprockets%2Fe2f7cf70954a16a5641a9142f1cd865d new file mode 100644 index 0000000..3bf6e50 Binary files /dev/null and b/test-app/tmp/cache/assets/D11/D90/sprockets%2Fe2f7cf70954a16a5641a9142f1cd865d differ diff --git a/test-app/tmp/cache/assets/D28/F90/sprockets%2F1453cb26b51cdf2c7b550360fb0f5d23 b/test-app/tmp/cache/assets/D28/F90/sprockets%2F1453cb26b51cdf2c7b550360fb0f5d23 new file mode 100644 index 0000000..d661cb6 Binary files /dev/null and b/test-app/tmp/cache/assets/D28/F90/sprockets%2F1453cb26b51cdf2c7b550360fb0f5d23 differ diff --git a/test-app/tmp/cache/assets/D2E/F40/sprockets%2F3ba0a0bc093c0764a2d1c9a9570e0f89 b/test-app/tmp/cache/assets/D2E/F40/sprockets%2F3ba0a0bc093c0764a2d1c9a9570e0f89 new file mode 100644 index 0000000..2c577f0 Binary files /dev/null and b/test-app/tmp/cache/assets/D2E/F40/sprockets%2F3ba0a0bc093c0764a2d1c9a9570e0f89 differ diff --git a/test-app/tmp/cache/assets/D30/160/sprockets%2F52922cde7c2a2c5051d7be050018efe7 b/test-app/tmp/cache/assets/D30/160/sprockets%2F52922cde7c2a2c5051d7be050018efe7 new file mode 100644 index 0000000..81b3f3c Binary files /dev/null and b/test-app/tmp/cache/assets/D30/160/sprockets%2F52922cde7c2a2c5051d7be050018efe7 differ diff --git a/test-app/tmp/cache/assets/D34/D00/sprockets%2F4d5f0581380207bda4235f633fce2fbd b/test-app/tmp/cache/assets/D34/D00/sprockets%2F4d5f0581380207bda4235f633fce2fbd new file mode 100644 index 0000000..2f90c88 Binary files /dev/null and b/test-app/tmp/cache/assets/D34/D00/sprockets%2F4d5f0581380207bda4235f633fce2fbd differ diff --git a/test-app/tmp/cache/assets/D3D/7B0/sprockets%2Feb7aac183fc50477ae770161df27774a b/test-app/tmp/cache/assets/D3D/7B0/sprockets%2Feb7aac183fc50477ae770161df27774a new file mode 100644 index 0000000..04d10d9 Binary files /dev/null and b/test-app/tmp/cache/assets/D3D/7B0/sprockets%2Feb7aac183fc50477ae770161df27774a differ diff --git a/test-app/tmp/cache/assets/D41/BD0/sprockets%2F1691608e154bc20d7bdef63e73de47c5 b/test-app/tmp/cache/assets/D41/BD0/sprockets%2F1691608e154bc20d7bdef63e73de47c5 new file mode 100644 index 0000000..42e6f69 Binary files /dev/null and b/test-app/tmp/cache/assets/D41/BD0/sprockets%2F1691608e154bc20d7bdef63e73de47c5 differ diff --git a/test-app/tmp/cache/assets/D42/5F0/sprockets%2F42e9a797c5f0e492bdb23764610ecfe0 b/test-app/tmp/cache/assets/D42/5F0/sprockets%2F42e9a797c5f0e492bdb23764610ecfe0 new file mode 100644 index 0000000..21ea99b Binary files /dev/null and b/test-app/tmp/cache/assets/D42/5F0/sprockets%2F42e9a797c5f0e492bdb23764610ecfe0 differ diff --git a/test-app/tmp/cache/assets/D48/8E0/sprockets%2Fb3abb7b107c259387cdc987229fbe547 b/test-app/tmp/cache/assets/D48/8E0/sprockets%2Fb3abb7b107c259387cdc987229fbe547 new file mode 100644 index 0000000..19ed0ed Binary files /dev/null and b/test-app/tmp/cache/assets/D48/8E0/sprockets%2Fb3abb7b107c259387cdc987229fbe547 differ diff --git a/test-app/tmp/cache/assets/D49/540/sprockets%2F5c700ef877e083db25d4996c8dbe414a b/test-app/tmp/cache/assets/D49/540/sprockets%2F5c700ef877e083db25d4996c8dbe414a new file mode 100644 index 0000000..c2d1a0a Binary files /dev/null and b/test-app/tmp/cache/assets/D49/540/sprockets%2F5c700ef877e083db25d4996c8dbe414a differ diff --git a/test-app/tmp/cache/assets/D4B/370/sprockets%2F7cd89d513796f56bb19c3a05daa7f249 b/test-app/tmp/cache/assets/D4B/370/sprockets%2F7cd89d513796f56bb19c3a05daa7f249 new file mode 100644 index 0000000..30a7cfe Binary files /dev/null and b/test-app/tmp/cache/assets/D4B/370/sprockets%2F7cd89d513796f56bb19c3a05daa7f249 differ diff --git a/test-app/tmp/cache/assets/D51/0A0/sprockets%2F4f64ebb7e1c55e37f601d892d16e79b9 b/test-app/tmp/cache/assets/D51/0A0/sprockets%2F4f64ebb7e1c55e37f601d892d16e79b9 new file mode 100644 index 0000000..238064c Binary files /dev/null and b/test-app/tmp/cache/assets/D51/0A0/sprockets%2F4f64ebb7e1c55e37f601d892d16e79b9 differ diff --git a/test-app/tmp/cache/assets/D52/B50/sprockets%2Fc489047dc6d75e7ebde47371785b61af b/test-app/tmp/cache/assets/D52/B50/sprockets%2Fc489047dc6d75e7ebde47371785b61af new file mode 100644 index 0000000..68659d8 Binary files /dev/null and b/test-app/tmp/cache/assets/D52/B50/sprockets%2Fc489047dc6d75e7ebde47371785b61af differ diff --git a/test-app/tmp/cache/assets/D58/B00/sprockets%2Fddd71f3676faf7d597112f758eec0479 b/test-app/tmp/cache/assets/D58/B00/sprockets%2Fddd71f3676faf7d597112f758eec0479 new file mode 100644 index 0000000..d14cb7a Binary files /dev/null and b/test-app/tmp/cache/assets/D58/B00/sprockets%2Fddd71f3676faf7d597112f758eec0479 differ diff --git a/test-app/tmp/cache/assets/D62/150/sprockets%2F5078f84b3f0449a40bef0ac0f6d1c52c b/test-app/tmp/cache/assets/D62/150/sprockets%2F5078f84b3f0449a40bef0ac0f6d1c52c new file mode 100644 index 0000000..7e4e87d Binary files /dev/null and b/test-app/tmp/cache/assets/D62/150/sprockets%2F5078f84b3f0449a40bef0ac0f6d1c52c differ diff --git a/test-app/tmp/cache/assets/D69/420/sprockets%2Fe4a1588aab113dd81f5f3e227477db2e b/test-app/tmp/cache/assets/D69/420/sprockets%2Fe4a1588aab113dd81f5f3e227477db2e new file mode 100644 index 0000000..9d8c2e7 Binary files /dev/null and b/test-app/tmp/cache/assets/D69/420/sprockets%2Fe4a1588aab113dd81f5f3e227477db2e differ diff --git a/test-app/tmp/cache/assets/D6D/070/sprockets%2F6f3c1168b3aafef0781da6472da0c689 b/test-app/tmp/cache/assets/D6D/070/sprockets%2F6f3c1168b3aafef0781da6472da0c689 new file mode 100644 index 0000000..985a1de Binary files /dev/null and b/test-app/tmp/cache/assets/D6D/070/sprockets%2F6f3c1168b3aafef0781da6472da0c689 differ diff --git a/test-app/tmp/cache/assets/D6E/FA0/sprockets%2F9387eef4ddc01a41fb7386f0002f7ab9 b/test-app/tmp/cache/assets/D6E/FA0/sprockets%2F9387eef4ddc01a41fb7386f0002f7ab9 new file mode 100644 index 0000000..6befae5 Binary files /dev/null and b/test-app/tmp/cache/assets/D6E/FA0/sprockets%2F9387eef4ddc01a41fb7386f0002f7ab9 differ diff --git a/test-app/tmp/cache/assets/D72/640/sprockets%2F8a78810bd25bbf77cb24c6fe4424c5d7 b/test-app/tmp/cache/assets/D72/640/sprockets%2F8a78810bd25bbf77cb24c6fe4424c5d7 new file mode 100644 index 0000000..881a39b Binary files /dev/null and b/test-app/tmp/cache/assets/D72/640/sprockets%2F8a78810bd25bbf77cb24c6fe4424c5d7 differ diff --git a/test-app/tmp/cache/assets/D7D/B00/sprockets%2F68cf59942b931ea4643d029ffba6dfd5 b/test-app/tmp/cache/assets/D7D/B00/sprockets%2F68cf59942b931ea4643d029ffba6dfd5 new file mode 100644 index 0000000..317fbc4 Binary files /dev/null and b/test-app/tmp/cache/assets/D7D/B00/sprockets%2F68cf59942b931ea4643d029ffba6dfd5 differ diff --git a/test-app/tmp/cache/assets/D93/240/sprockets%2F0bf174208d2cbe8aad74a7a2c9a19d91 b/test-app/tmp/cache/assets/D93/240/sprockets%2F0bf174208d2cbe8aad74a7a2c9a19d91 new file mode 100644 index 0000000..14badc7 Binary files /dev/null and b/test-app/tmp/cache/assets/D93/240/sprockets%2F0bf174208d2cbe8aad74a7a2c9a19d91 differ diff --git a/test-app/tmp/cache/assets/D96/9C0/sprockets%2F102b13e4fc5fc8eb572f4f3062da5b7f b/test-app/tmp/cache/assets/D96/9C0/sprockets%2F102b13e4fc5fc8eb572f4f3062da5b7f new file mode 100644 index 0000000..689821e Binary files /dev/null and b/test-app/tmp/cache/assets/D96/9C0/sprockets%2F102b13e4fc5fc8eb572f4f3062da5b7f differ diff --git a/test-app/tmp/cache/assets/D9C/F40/sprockets%2Fb4a9b5cff3ed835f9028c49cd0e50d00 b/test-app/tmp/cache/assets/D9C/F40/sprockets%2Fb4a9b5cff3ed835f9028c49cd0e50d00 new file mode 100644 index 0000000..897c160 Binary files /dev/null and b/test-app/tmp/cache/assets/D9C/F40/sprockets%2Fb4a9b5cff3ed835f9028c49cd0e50d00 differ diff --git a/test-app/tmp/cache/assets/D9F/6B0/sprockets%2Fd7b1c1d7f4f4046dba224d4d5e6c9c77 b/test-app/tmp/cache/assets/D9F/6B0/sprockets%2Fd7b1c1d7f4f4046dba224d4d5e6c9c77 new file mode 100644 index 0000000..69221d5 Binary files /dev/null and b/test-app/tmp/cache/assets/D9F/6B0/sprockets%2Fd7b1c1d7f4f4046dba224d4d5e6c9c77 differ diff --git a/test-app/tmp/cache/assets/DA2/B20/sprockets%2Fcd96057c71f9d40539be8a3bbfbaa619 b/test-app/tmp/cache/assets/DA2/B20/sprockets%2Fcd96057c71f9d40539be8a3bbfbaa619 new file mode 100644 index 0000000..9c65fd3 Binary files /dev/null and b/test-app/tmp/cache/assets/DA2/B20/sprockets%2Fcd96057c71f9d40539be8a3bbfbaa619 differ diff --git a/test-app/tmp/cache/assets/DA3/690/sprockets%2Fe7a3e2b664d989f57a1c82ba67eea1c0 b/test-app/tmp/cache/assets/DA3/690/sprockets%2Fe7a3e2b664d989f57a1c82ba67eea1c0 new file mode 100644 index 0000000..c192955 Binary files /dev/null and b/test-app/tmp/cache/assets/DA3/690/sprockets%2Fe7a3e2b664d989f57a1c82ba67eea1c0 differ diff --git a/test-app/tmp/cache/assets/DA6/3D0/sprockets%2Fe227ccc2cf546b7c209f571469f0fdfd b/test-app/tmp/cache/assets/DA6/3D0/sprockets%2Fe227ccc2cf546b7c209f571469f0fdfd new file mode 100644 index 0000000..10f282f Binary files /dev/null and b/test-app/tmp/cache/assets/DA6/3D0/sprockets%2Fe227ccc2cf546b7c209f571469f0fdfd differ diff --git a/test-app/tmp/cache/assets/DB2/820/sprockets%2Fa99e88d06c0e4cb3797ef037a7fbc9c5 b/test-app/tmp/cache/assets/DB2/820/sprockets%2Fa99e88d06c0e4cb3797ef037a7fbc9c5 new file mode 100644 index 0000000..c82d7af Binary files /dev/null and b/test-app/tmp/cache/assets/DB2/820/sprockets%2Fa99e88d06c0e4cb3797ef037a7fbc9c5 differ diff --git a/test-app/tmp/cache/assets/DB9/820/sprockets%2F15cbbf713e1fa1c0acebfe9416f20822 b/test-app/tmp/cache/assets/DB9/820/sprockets%2F15cbbf713e1fa1c0acebfe9416f20822 new file mode 100644 index 0000000..865b3f3 Binary files /dev/null and b/test-app/tmp/cache/assets/DB9/820/sprockets%2F15cbbf713e1fa1c0acebfe9416f20822 differ diff --git a/test-app/tmp/cache/assets/DCC/FC0/sprockets%2F91ddbbd1eb330ac823df75eeb571e469 b/test-app/tmp/cache/assets/DCC/FC0/sprockets%2F91ddbbd1eb330ac823df75eeb571e469 new file mode 100644 index 0000000..4526c44 Binary files /dev/null and b/test-app/tmp/cache/assets/DCC/FC0/sprockets%2F91ddbbd1eb330ac823df75eeb571e469 differ diff --git a/test-app/tmp/cache/assets/DD1/6A0/sprockets%2F488c28f2ccc4b46bf191bfd442b5c8ce b/test-app/tmp/cache/assets/DD1/6A0/sprockets%2F488c28f2ccc4b46bf191bfd442b5c8ce new file mode 100644 index 0000000..e3ad23b Binary files /dev/null and b/test-app/tmp/cache/assets/DD1/6A0/sprockets%2F488c28f2ccc4b46bf191bfd442b5c8ce differ diff --git a/test-app/tmp/cache/assets/DDB/FB0/sprockets%2F2ac4f7f4bdde1a79afeb7783f762664a b/test-app/tmp/cache/assets/DDB/FB0/sprockets%2F2ac4f7f4bdde1a79afeb7783f762664a new file mode 100644 index 0000000..50d28d5 Binary files /dev/null and b/test-app/tmp/cache/assets/DDB/FB0/sprockets%2F2ac4f7f4bdde1a79afeb7783f762664a differ diff --git a/test-app/tmp/cache/assets/DF4/5D0/sprockets%2F8ccbedb61902c4252e51d5bcfba792fa b/test-app/tmp/cache/assets/DF4/5D0/sprockets%2F8ccbedb61902c4252e51d5bcfba792fa new file mode 100644 index 0000000..a5de4b4 Binary files /dev/null and b/test-app/tmp/cache/assets/DF4/5D0/sprockets%2F8ccbedb61902c4252e51d5bcfba792fa differ diff --git a/test-app/tmp/cache/assets/DF6/9A0/sprockets%2Fcc50cd4b22c3bdc9f646932129ebcebe b/test-app/tmp/cache/assets/DF6/9A0/sprockets%2Fcc50cd4b22c3bdc9f646932129ebcebe new file mode 100644 index 0000000..e197839 Binary files /dev/null and b/test-app/tmp/cache/assets/DF6/9A0/sprockets%2Fcc50cd4b22c3bdc9f646932129ebcebe differ diff --git a/test-app/tmp/cache/assets/DFB/100/sprockets%2Fdecdca31df0156ec27e61c68b8f2b46e b/test-app/tmp/cache/assets/DFB/100/sprockets%2Fdecdca31df0156ec27e61c68b8f2b46e new file mode 100644 index 0000000..cd5a04f Binary files /dev/null and b/test-app/tmp/cache/assets/DFB/100/sprockets%2Fdecdca31df0156ec27e61c68b8f2b46e differ diff --git a/test-app/tmp/cache/assets/E2E/9A0/sprockets%2Fdc4cae860ed25cdea928ca3a9d75de33 b/test-app/tmp/cache/assets/E2E/9A0/sprockets%2Fdc4cae860ed25cdea928ca3a9d75de33 new file mode 100644 index 0000000..b6a8c21 Binary files /dev/null and b/test-app/tmp/cache/assets/E2E/9A0/sprockets%2Fdc4cae860ed25cdea928ca3a9d75de33 differ diff --git a/test-app/tmp/cache/assets/E5B/060/sprockets%2Fc9be6e359dfaada1324e3ddaf3158bef b/test-app/tmp/cache/assets/E5B/060/sprockets%2Fc9be6e359dfaada1324e3ddaf3158bef new file mode 100644 index 0000000..59098e3 Binary files /dev/null and b/test-app/tmp/cache/assets/E5B/060/sprockets%2Fc9be6e359dfaada1324e3ddaf3158bef differ diff --git a/test-app/tmp/cache/assets/E7B/B30/sprockets%2Ff9a4ddabcbb1fd40d740c7d1faf82c0b b/test-app/tmp/cache/assets/E7B/B30/sprockets%2Ff9a4ddabcbb1fd40d740c7d1faf82c0b new file mode 100644 index 0000000..7106f49 Binary files /dev/null and b/test-app/tmp/cache/assets/E7B/B30/sprockets%2Ff9a4ddabcbb1fd40d740c7d1faf82c0b differ diff --git a/test-app/tmp/cache/assets/EED/630/sprockets%2F2ec8ea4f9f0fb9b3a1bcb6dadebf7d5e b/test-app/tmp/cache/assets/EED/630/sprockets%2F2ec8ea4f9f0fb9b3a1bcb6dadebf7d5e new file mode 100644 index 0000000..7118812 Binary files /dev/null and b/test-app/tmp/cache/assets/EED/630/sprockets%2F2ec8ea4f9f0fb9b3a1bcb6dadebf7d5e differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/-T/-TfUYkKMSHMTIZRZ3arsYIOT39Pk5Sk16LDI8RIOGjE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/-T/-TfUYkKMSHMTIZRZ3arsYIOT39Pk5Sk16LDI8RIOGjE.cache new file mode 100644 index 0000000..30f7f97 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/-T/-TfUYkKMSHMTIZRZ3arsYIOT39Pk5Sk16LDI8RIOGjE.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/0v/0v1ONTmfvy85EBksq352dlZ9kMuSarIVqiMw3joQKzY.cache b/test-app/tmp/cache/assets/sprockets/v3.0/0v/0v1ONTmfvy85EBksq352dlZ9kMuSarIVqiMw3joQKzY.cache new file mode 100644 index 0000000..9b6f45c --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/0v/0v1ONTmfvy85EBksq352dlZ9kMuSarIVqiMw3joQKzY.cache @@ -0,0 +1 @@ +I"Ã/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/object-assign-pollyfill.js?type=application/javascript&id=5229498770521a363247c60402e9fa84384affc5e47c05b56b2e4ca6894973e9:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/1i/1iKQqsVNaH1HXKv720Gp91YLSpZGv7i9GqmQvggPUNY.cache b/test-app/tmp/cache/assets/sprockets/v3.0/1i/1iKQqsVNaH1HXKv720Gp91YLSpZGv7i9GqmQvggPUNY.cache new file mode 100644 index 0000000..10f663c --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/1i/1iKQqsVNaH1HXKv720Gp91YLSpZGv7i9GqmQvggPUNY.cache @@ -0,0 +1 @@ +"%¨BÓó¶T^T—ò(~ÑYPu7Ÿe%¿óÞWª— \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/1k/1kIm2IvnycK2RhzI2uoY_v73C3L0QhjWGNuZ6xBtlNo.cache b/test-app/tmp/cache/assets/sprockets/v3.0/1k/1kIm2IvnycK2RhzI2uoY_v73C3L0QhjWGNuZ6xBtlNo.cache new file mode 100644 index 0000000..948a90d --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/1k/1kIm2IvnycK2RhzI2uoY_v73C3L0QhjWGNuZ6xBtlNo.cache @@ -0,0 +1 @@ +I"¶/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/swagger-ui.min.js?type=application/javascript&id=a59c808afb12537e5db3623da47efc57c0aed31a859dbb4603019af7f50cbd17:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/2W/2WlO5cq2bv-yK4y2ZFOHCGPJtlo6VHg4cSkBSEYHDnc.cache b/test-app/tmp/cache/assets/sprockets/v3.0/2W/2WlO5cq2bv-yK4y2ZFOHCGPJtlo6VHg4cSkBSEYHDnc.cache new file mode 100644 index 0000000..54eaa14 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/2W/2WlO5cq2bv-yK4y2ZFOHCGPJtlo6VHg4cSkBSEYHDnc.cache @@ -0,0 +1 @@ +"%J@„ËŠ ªúSIÐDX¹'޲+—9îORrk/FfPe“ \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/2h/2hmXinPpyPZTqeUBjN_KOkuS9l5VIiRX3IFdmc2K5Sw.cache b/test-app/tmp/cache/assets/sprockets/v3.0/2h/2hmXinPpyPZTqeUBjN_KOkuS9l5VIiRX3IFdmc2K5Sw.cache new file mode 100644 index 0000000..5aaf85b --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/2h/2hmXinPpyPZTqeUBjN_KOkuS9l5VIiRX3IFdmc2K5Sw.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"pfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.wiggle.min.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/2m/2m-T7rNJfhFi5vQmkns50Q-IHQHCfv-9l9xTEm_-ki0.cache b/test-app/tmp/cache/assets/sprockets/v3.0/2m/2m-T7rNJfhFi5vQmkns50Q-IHQHCfv-9l9xTEm_-ki0.cache new file mode 100644 index 0000000..74a4a5d Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/2m/2m-T7rNJfhFi5vQmkns50Q-IHQHCfv-9l9xTEm_-ki0.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/2u/2uELoQWvYUyWCLHxSW-K-YhgS_0a77xfIjxBlSaeuuw.cache b/test-app/tmp/cache/assets/sprockets/v3.0/2u/2uELoQWvYUyWCLHxSW-K-YhgS_0a77xfIjxBlSaeuuw.cache new file mode 100644 index 0000000..65aa646 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/2u/2uELoQWvYUyWCLHxSW-K-YhgS_0a77xfIjxBlSaeuuw.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/35/35p_RJyk_LQ4gwd7maAX6ITqbsTRJrmeU3nd6sUsCTQ.cache b/test-app/tmp/cache/assets/sprockets/v3.0/35/35p_RJyk_LQ4gwd7maAX6ITqbsTRJrmeU3nd6sUsCTQ.cache new file mode 100644 index 0000000..5888807 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/35/35p_RJyk_LQ4gwd7maAX6ITqbsTRJrmeU3nd6sUsCTQ.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"jfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/typography.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/3h/3hZJZhA0BX-yZFD_tmTwWvFCcCQFl7w_HpoMC4RPK8Y.cache b/test-app/tmp/cache/assets/sprockets/v3.0/3h/3hZJZhA0BX-yZFD_tmTwWvFCcCQFl7w_HpoMC4RPK8Y.cache new file mode 100644 index 0000000..c898dab --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/3h/3hZJZhA0BX-yZFD_tmTwWvFCcCQFl7w_HpoMC4RPK8Y.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"ofile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery-1.8.0.min.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/4M/4M5ebMVeS3C_jl4NZ2lHLSSo1yra6lHGg51Ef6R2JiI.cache b/test-app/tmp/cache/assets/sprockets/v3.0/4M/4M5ebMVeS3C_jl4NZ2lHLSSo1yra6lHGg51Ef6R2JiI.cache new file mode 100644 index 0000000..d2bda8f --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/4M/4M5ebMVeS3C_jl4NZ2lHLSSo1yra6lHGg51Ef6R2JiI.cache @@ -0,0 +1 @@ +I"¼/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery-1.8.0.min.js?type=application/javascript&id=90dcfacd848c923835bcbb5b9f23fa53a6d4b92b299c8dbfcb8babae4358fb27:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/4O/4OLBTVFzH8xWTgMO5u_M9O4xicfTAM0PLC_t2qhaUTE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/4O/4OLBTVFzH8xWTgMO5u_M9O4xicfTAM0PLC_t2qhaUTE.cache new file mode 100644 index 0000000..08479e3 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/4O/4OLBTVFzH8xWTgMO5u_M9O4xicfTAM0PLC_t2qhaUTE.cache @@ -0,0 +1 @@ +I"À/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/marked.js?type=application/javascript&pipeline=self&id=659cce685356901e5137ef20e29d685c53a0793258ab4f0d8c0264b430601392:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/4X/4XihhGszAnIK51olnaezt4SMKQ5-hYTN821lcQ2MtGs.cache b/test-app/tmp/cache/assets/sprockets/v3.0/4X/4XihhGszAnIK51olnaezt4SMKQ5-hYTN821lcQ2MtGs.cache new file mode 100644 index 0000000..ec5aefb --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/4X/4XihhGszAnIK51olnaezt4SMKQ5-hYTN821lcQ2MtGs.cache @@ -0,0 +1 @@ +I"È/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jsoneditor.min.js?type=application/javascript&pipeline=self&id=6b69a9c6c48c05ec4806436c110f31dafabc9110a09ebff88b8a84c9f1dc2bb1:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/4d/4dGwlKI9te1HnfhsQ5usZOHhfYngDuwf794kbxNYrTM.cache b/test-app/tmp/cache/assets/sprockets/v3.0/4d/4dGwlKI9te1HnfhsQ5usZOHhfYngDuwf794kbxNYrTM.cache new file mode 100644 index 0000000..e127a18 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/4d/4dGwlKI9te1HnfhsQ5usZOHhfYngDuwf794kbxNYrTM.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/4v/4vZHE-1k74NbceIcQqTs8hldUBF8xiTFCYIHXvEsVMg.cache b/test-app/tmp/cache/assets/sprockets/v3.0/4v/4vZHE-1k74NbceIcQqTs8hldUBF8xiTFCYIHXvEsVMg.cache new file mode 100644 index 0000000..98c65f9 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/4v/4vZHE-1k74NbceIcQqTs8hldUBF8xiTFCYIHXvEsVMg.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/53/53b0rdhR_vrOJmP0iN4Jew4CA8ps049jy_MIMUqTS2A.cache b/test-app/tmp/cache/assets/sprockets/v3.0/53/53b0rdhR_vrOJmP0iN4Jew4CA8ps049jy_MIMUqTS2A.cache new file mode 100644 index 0000000..8759618 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/53/53b0rdhR_vrOJmP0iN4Jew4CA8ps049jy_MIMUqTS2A.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/5W/5W6yIIGr8CpVcuoxj0O0424U6kltTpzK_umgjwAHQXE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/5W/5W6yIIGr8CpVcuoxj0O0424U6kltTpzK_umgjwAHQXE.cache new file mode 100644 index 0000000..7da6baf --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/5W/5W6yIIGr8CpVcuoxj0O0424U6kltTpzK_umgjwAHQXE.cache @@ -0,0 +1 @@ +I"­/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/images/logo_small.png?type=image/png&id=6cd604278a7d2a3f2201f0c73cd941b39cdfb6e6fb4aa9a38a96a3893e4175c5:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/5X/5XayFNMZdpYC02ECUCHnFIxlNCPVUGRvwund9Xtewo4.cache b/test-app/tmp/cache/assets/sprockets/v3.0/5X/5XayFNMZdpYC02ECUCHnFIxlNCPVUGRvwund9Xtewo4.cache new file mode 100644 index 0000000..951b043 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/5X/5XayFNMZdpYC02ECUCHnFIxlNCPVUGRvwund9Xtewo4.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"efile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/marked.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/6S/6Sgwo9fiP4AlsXfqGaxMbr9uHchampTH5U9yw3Bdx2g.cache b/test-app/tmp/cache/assets/sprockets/v3.0/6S/6Sgwo9fiP4AlsXfqGaxMbr9uHchampTH5U9yw3Bdx2g.cache new file mode 100644 index 0000000..df560ce Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/6S/6Sgwo9fiP4AlsXfqGaxMbr9uHchampTH5U9yw3Bdx2g.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/6t/6t4-k6hj8Ax1NfUrPo8lrDvy7qxybes0ND-bLx68j_o.cache b/test-app/tmp/cache/assets/sprockets/v3.0/6t/6t4-k6hj8Ax1NfUrPo8lrDvy7qxybes0ND-bLx68j_o.cache new file mode 100644 index 0000000..007afbc --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/6t/6t4-k6hj8Ax1NfUrPo8lrDvy7qxybes0ND-bLx68j_o.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"pfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.ba-bbq.min.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/75/75hU8oIX_X9m7sxibJOCQWM_qwXdc1z0beURtdIcUYQ.cache b/test-app/tmp/cache/assets/sprockets/v3.0/75/75hU8oIX_X9m7sxibJOCQWM_qwXdc1z0beURtdIcUYQ.cache new file mode 100644 index 0000000..757332a Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/75/75hU8oIX_X9m7sxibJOCQWM_qwXdc1z0beURtdIcUYQ.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/7D/7D3WKj4JXEuX5QZGzLI2s8HnrS_XPxEHIq858Cj3_5Q.cache b/test-app/tmp/cache/assets/sprockets/v3.0/7D/7D3WKj4JXEuX5QZGzLI2s8HnrS_XPxEHIq858Cj3_5Q.cache new file mode 100644 index 0000000..b009c7e Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/7D/7D3WKj4JXEuX5QZGzLI2s8HnrS_XPxEHIq858Cj3_5Q.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/7w/7wkzuoAnHC12M0J4CMcGdwpfxjV0OMbK-SLwKMe4zTo.cache b/test-app/tmp/cache/assets/sprockets/v3.0/7w/7wkzuoAnHC12M0J4CMcGdwpfxjV0OMbK-SLwKMe4zTo.cache new file mode 100644 index 0000000..1364926 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/7w/7wkzuoAnHC12M0J4CMcGdwpfxjV0OMbK-SLwKMe4zTo.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"jfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/typography.css;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/8R/8R839cUoQX8tKI44ZUocDieu8rsyi2TkMaDotqvEVQQ.cache b/test-app/tmp/cache/assets/sprockets/v3.0/8R/8R839cUoQX8tKI44ZUocDieu8rsyi2TkMaDotqvEVQQ.cache new file mode 100644 index 0000000..1262eab --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/8R/8R839cUoQX8tKI44ZUocDieu8rsyi2TkMaDotqvEVQQ.cache @@ -0,0 +1 @@ +I"Ä/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/swagger-ui.min.js?type=application/javascript&pipeline=self&id=ff01759c5c0f6451a160fcdf7e4dfce05b0ba9728211aba574341a8c906e137b:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/8y/8yz-zAhtr6khXijMX_XYY-me6MZIdM1Quv-tUvGbPBI.cache b/test-app/tmp/cache/assets/sprockets/v3.0/8y/8yz-zAhtr6khXijMX_XYY-me6MZIdM1Quv-tUvGbPBI.cache new file mode 100644 index 0000000..56876c2 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/8y/8yz-zAhtr6khXijMX_XYY-me6MZIdM1Quv-tUvGbPBI.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"efile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/print.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/AF/AF2B7X5uhZqq4NFKYvbERnBIuwyL9jmzN26Tqfdjk-Q.cache b/test-app/tmp/cache/assets/sprockets/v3.0/AF/AF2B7X5uhZqq4NFKYvbERnBIuwyL9jmzN26Tqfdjk-Q.cache new file mode 100644 index 0000000..287ead0 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/AF/AF2B7X5uhZqq4NFKYvbERnBIuwyL9jmzN26Tqfdjk-Q.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/AN/ANELXr02iyUwMQO5hPtpThbaoxRuKXE_P87TVWg_IJU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/AN/ANELXr02iyUwMQO5hPtpThbaoxRuKXE_P87TVWg_IJU.cache new file mode 100644 index 0000000..b814334 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/AN/ANELXr02iyUwMQO5hPtpThbaoxRuKXE_P87TVWg_IJU.cache @@ -0,0 +1 @@ +I"É/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack_extended.js?type=application/javascript&id=b57bdfe539697b5bd9fe38096b38cca3c194240a8194e0ab706d15cf0b401273:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Ai/AiVqU_GM86p-_JYDWZugzD4ihdbhsjdwKrRaUTF5nyU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Ai/AiVqU_GM86p-_JYDWZugzD4ihdbhsjdwKrRaUTF5nyU.cache new file mode 100644 index 0000000..ac45c10 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/Ai/AiVqU_GM86p-_JYDWZugzD4ihdbhsjdwKrRaUTF5nyU.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Ak/AkFsU9OQZM1UBgnscrldY2nxlLphnE1mMcffFHHpTo4.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Ak/AkFsU9OQZM1UBgnscrldY2nxlLphnE1mMcffFHHpTo4.cache new file mode 100644 index 0000000..279eeb2 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Ak/AkFsU9OQZM1UBgnscrldY2nxlLphnE1mMcffFHHpTo4.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"|file-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack_extended.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Ax/AxHTmqIFLxrR4Q6obLQXmK7SKpCbIbLxzCgEdtuEemQ.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Ax/AxHTmqIFLxrR4Q6obLQXmK7SKpCbIbLxzCgEdtuEemQ.cache new file mode 100644 index 0000000..31c2462 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Ax/AxHTmqIFLxrR4Q6obLQXmK7SKpCbIbLxzCgEdtuEemQ.cache @@ -0,0 +1 @@ +I"«/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/images/throbber.gif?type=image/gif&id=92fd1b3458d8c7906690bdf143febba2efad10324ac9bdaa670ae9679cd5dcd7:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/BZ/BZh4ur30TSLaPDerUJvyj7h_7yua17w3NFWBXrpk4-8.cache b/test-app/tmp/cache/assets/sprockets/v3.0/BZ/BZh4ur30TSLaPDerUJvyj7h_7yua17w3NFWBXrpk4-8.cache new file mode 100644 index 0000000..01cc856 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/BZ/BZh4ur30TSLaPDerUJvyj7h_7yua17w3NFWBXrpk4-8.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/CB/CBu2LfZ0AhiAmy6B9X9riEMt8P3QPQ-9glxclOpq2HU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/CB/CBu2LfZ0AhiAmy6B9X9riEMt8P3QPQ-9glxclOpq2HU.cache new file mode 100644 index 0000000..515c6f0 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/CB/CBu2LfZ0AhiAmy6B9X9riEMt8P3QPQ-9glxclOpq2HU.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Eo/EohYG_xq8OARDftwZNkEkzV0es51BqPQErJmiH9eoLc.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Eo/EohYG_xq8OARDftwZNkEkzV0es51BqPQErJmiH9eoLc.cache new file mode 100644 index 0000000..833785c --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Eo/EohYG_xq8OARDftwZNkEkzV0es51BqPQErJmiH9eoLc.cache @@ -0,0 +1 @@ +I"º/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jsoneditor.min.js?type=application/javascript&id=1020e726765355e8762e6fb1b879fdafcf3b4aa34ac5ca52ac2eaa135278d83f:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/FD/FDnS4rs3Qq1aRHBH0cBzT1FmNHZlLLzCUQJyADCZqC8.cache b/test-app/tmp/cache/assets/sprockets/v3.0/FD/FDnS4rs3Qq1aRHBH0cBzT1FmNHZlLLzCUQJyADCZqC8.cache new file mode 100644 index 0000000..193d601 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/FD/FDnS4rs3Qq1aRHBH0cBzT1FmNHZlLLzCUQJyADCZqC8.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/FU/FU9uG6mlGYNlUB7qvsTYA__8nuwVfFo8V1IRNWBijNk.cache b/test-app/tmp/cache/assets/sprockets/v3.0/FU/FU9uG6mlGYNlUB7qvsTYA__8nuwVfFo8V1IRNWBijNk.cache new file mode 100644 index 0000000..3d64346 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/FU/FU9uG6mlGYNlUB7qvsTYA__8nuwVfFo8V1IRNWBijNk.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"kfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/backbone-min.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Fn/Fn4iVqPepDqEGd0GdRVmKJ8vh63hNftsKC-atFsoYLU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Fn/Fn4iVqPepDqEGd0GdRVmKJ8vh63hNftsKC-atFsoYLU.cache new file mode 100644 index 0000000..21ba84c --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Fn/Fn4iVqPepDqEGd0GdRVmKJ8vh63hNftsKC-atFsoYLU.cache @@ -0,0 +1,2 @@ +"%ŒWN +9múpd¸´`àä¨ÕÐtŒJ¦n²äïßËFÚK1 \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/H_/H_CvrXPH5m9l1rKkqQr28R4_VDnn09MAJSp6XnB2UmE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/H_/H_CvrXPH5m9l1rKkqQr28R4_VDnn09MAJSp6XnB2UmE.cache new file mode 100644 index 0000000..b2f1fd4 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/H_/H_CvrXPH5m9l1rKkqQr28R4_VDnn09MAJSp6XnB2UmE.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"ifile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/lodash.min.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Hs/Hsl2l11txotmeXpqOnLn9uBw_HQyQqCJLlaZ7p0ERoE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Hs/Hsl2l11txotmeXpqOnLn9uBw_HQyQqCJLlaZ7p0ERoE.cache new file mode 100644 index 0000000..8795913 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Hs/Hsl2l11txotmeXpqOnLn9uBw_HQyQqCJLlaZ7p0ERoE.cache @@ -0,0 +1 @@ +I"¤/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/print.css?type=text/css&id=fbd5e5bb108f96ba6d6af2c1dcc167cb3e1c4d8f91600e45f289bced8f91b179:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/IC/ICoeFSiKk-djrANYoPQ_IexE0De1b7eMGMrwGRaR7RU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/IC/ICoeFSiKk-djrANYoPQ_IexE0De1b7eMGMrwGRaR7RU.cache new file mode 100644 index 0000000..6d9daaa --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/IC/ICoeFSiKk-djrANYoPQ_IexE0De1b7eMGMrwGRaR7RU.cache @@ -0,0 +1 @@ +I"¾/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.slideto.min.js?type=application/javascript&id=ee9e8ac009f99d78f1a820ab3533c7d928e5667f187f10f37de6cc4f7fede551:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/IZ/IZvE-uc8bQfwYf42hROM24uOYU9cWr_0MfDuOIpNQrY.cache b/test-app/tmp/cache/assets/sprockets/v3.0/IZ/IZvE-uc8bQfwYf42hROM24uOYU9cWr_0MfDuOIpNQrY.cache new file mode 100644 index 0000000..15b3eff --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/IZ/IZvE-uc8bQfwYf42hROM24uOYU9cWr_0MfDuOIpNQrY.cache @@ -0,0 +1 @@ +I"²/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/reset.css?type=text/css&pipeline=self&id=7d7e080d41b1b34d0c66d0b1e0a6d6029a2c48d6a0d8d47a12e3d53ec68e4e9b:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Iv/IvxOEtSKbSek1n9vUXAu_TNT1HGZgudxaabCxdZOBy0.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Iv/IvxOEtSKbSek1n9vUXAu_TNT1HGZgudxaabCxdZOBy0.cache new file mode 100644 index 0000000..51d6996 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/Iv/IvxOEtSKbSek1n9vUXAu_TNT1HGZgudxaabCxdZOBy0.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Iv/ivDZdCjIS_VJLtS4NwA8sXV9eiY8xJ3oJxmFPXimBA0.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Iv/ivDZdCjIS_VJLtS4NwA8sXV9eiY8xJ3oJxmFPXimBA0.cache new file mode 100644 index 0000000..c2171dd --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Iv/ivDZdCjIS_VJLtS4NwA8sXV9eiY8xJ3oJxmFPXimBA0.cache @@ -0,0 +1 @@ +I"Ê/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/handlebars-4.0.5.js?type=application/javascript&pipeline=self&id=29fd4c2c31d9160362f17f734a2e109b79147227b13d441c20c70be72b343d51:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/JS/JSXzsLgtWO5PBTmu9MNUXI5qTfb3MUQv_tvWAXGmmN8.cache b/test-app/tmp/cache/assets/sprockets/v3.0/JS/JSXzsLgtWO5PBTmu9MNUXI5qTfb3MUQv_tvWAXGmmN8.cache new file mode 100644 index 0000000..b2fec88 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/JS/JSXzsLgtWO5PBTmu9MNUXI5qTfb3MUQv_tvWAXGmmN8.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"ffile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/screen.css;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/JT/JTSffA7hb9zN13uy5O7PlpQ3qDZyQGgxfZ-7x3bRnVk.cache b/test-app/tmp/cache/assets/sprockets/v3.0/JT/JTSffA7hb9zN13uy5O7PlpQ3qDZyQGgxfZ-7x3bRnVk.cache new file mode 100644 index 0000000..9e75ab4 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/JT/JTSffA7hb9zN13uy5O7PlpQ3qDZyQGgxfZ-7x3bRnVk.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"qfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.slideto.min.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Jm/JmIzdDwcn1o_2r6HmKZaANeHpMkKucZ65gbxTWUz66M.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Jm/JmIzdDwcn1o_2r6HmKZaANeHpMkKucZ65gbxTWUz66M.cache new file mode 100644 index 0000000..6cbf87b --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Jm/JmIzdDwcn1o_2r6HmKZaANeHpMkKucZ65gbxTWUz66M.cache @@ -0,0 +1 @@ +I"Ñ/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/object-assign-pollyfill.js?type=application/javascript&pipeline=self&id=bf22a345dd5ed57f1062a5116e4b6d3c39837ad805e4c8091a87dd487aabefac:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/KK/KKIjkgVUSdwRQvf9UTlga4r3yJ2xre5pmLZweDkJL0s.cache b/test-app/tmp/cache/assets/sprockets/v3.0/KK/KKIjkgVUSdwRQvf9UTlga4r3yJ2xre5pmLZweDkJL0s.cache new file mode 100644 index 0000000..2620726 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/KK/KKIjkgVUSdwRQvf9UTlga4r3yJ2xre5pmLZweDkJL0s.cache @@ -0,0 +1 @@ +I"×/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack_extended.js?type=application/javascript&pipeline=self&id=336df5deadc645c563e6183d99402b387d46a318850b4ef88a777f68d1741a91:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/LP/LPF2tHTl8QLGOm0dm4LGZtrzHG2H6VfjZEWx9jdpfOU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/LP/LPF2tHTl8QLGOm0dm4LGZtrzHG2H6VfjZEWx9jdpfOU.cache new file mode 100644 index 0000000..668f8d7 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/LP/LPF2tHTl8QLGOm0dm4LGZtrzHG2H6VfjZEWx9jdpfOU.cache @@ -0,0 +1 @@ +I"²/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/marked.js?type=application/javascript&id=7544e84e1d870c88b743f12c50d6d08d718458e7c9b921f465c800c51340a9a5:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/LU/LUTqrINdwqs3fe4Fjificw2INCC_B3ClDtFCzNRTM_o.cache b/test-app/tmp/cache/assets/sprockets/v3.0/LU/LUTqrINdwqs3fe4Fjificw2INCC_B3ClDtFCzNRTM_o.cache new file mode 100644 index 0000000..9257f9f --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/LU/LUTqrINdwqs3fe4Fjificw2INCC_B3ClDtFCzNRTM_o.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"|file-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack_extended.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/MR/MRndOg0czdRhylYUw4ivW0mdL1MQmhRd_ugcirhvlL0.cache b/test-app/tmp/cache/assets/sprockets/v3.0/MR/MRndOg0czdRhylYUw4ivW0mdL1MQmhRd_ugcirhvlL0.cache new file mode 100644 index 0000000..65c864f --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/MR/MRndOg0czdRhylYUw4ivW0mdL1MQmhRd_ugcirhvlL0.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"lfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/swagger-oauth.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/N8/N8izuhHJYPxDdKROhXzErPbYnB8uQSqmOC0fkpICQC4.cache b/test-app/tmp/cache/assets/sprockets/v3.0/N8/N8izuhHJYPxDdKROhXzErPbYnB8uQSqmOC0fkpICQC4.cache new file mode 100644 index 0000000..6fba682 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/N8/N8izuhHJYPxDdKROhXzErPbYnB8uQSqmOC0fkpICQC4.cache @@ -0,0 +1 @@ +"%z0®B°uÈŠ_îÔTdB‚¡OÛ¶ææ½/œç'ešŽA \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Na/NaxTKLRwaHiv8ljQoILjlLavJlEhGibSd7P6Au3oWiQ.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Na/NaxTKLRwaHiv8ljQoILjlLavJlEhGibSd7P6Au3oWiQ.cache new file mode 100644 index 0000000..a106e5c Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/Na/NaxTKLRwaHiv8ljQoILjlLavJlEhGibSd7P6Au3oWiQ.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/O1/O11ox3E0XURQYRJVc4Ajy5CAoTqvPntWnn7QOCvF_N0.cache b/test-app/tmp/cache/assets/sprockets/v3.0/O1/O11ox3E0XURQYRJVc4Ajy5CAoTqvPntWnn7QOCvF_N0.cache new file mode 100644 index 0000000..a854518 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/O1/O11ox3E0XURQYRJVc4Ajy5CAoTqvPntWnn7QOCvF_N0.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/O6/O6XL1DtzTI1lZHoB5L2X_rdNxV1C2vYon1c09HDNOb4.cache b/test-app/tmp/cache/assets/sprockets/v3.0/O6/O6XL1DtzTI1lZHoB5L2X_rdNxV1C2vYon1c09HDNOb4.cache new file mode 100644 index 0000000..d2e791b --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/O6/O6XL1DtzTI1lZHoB5L2X_rdNxV1C2vYon1c09HDNOb4.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"mfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jsoneditor.min.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/OG/OG9uGHaeC8r8KobSJXnHbTjBgbttO62WuyzRehyx-gs.cache b/test-app/tmp/cache/assets/sprockets/v3.0/OG/OG9uGHaeC8r8KobSJXnHbTjBgbttO62WuyzRehyx-gs.cache new file mode 100644 index 0000000..8f87ec6 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/OG/OG9uGHaeC8r8KobSJXnHbTjBgbttO62WuyzRehyx-gs.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"2processors:type=image/png&file_type=image/png;TTI"mfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/images/logo_small.png;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/OS/OSST0O3KT7hPeDyKIXIHWon6EQKwd4m1fwnAuJPUyfA.cache b/test-app/tmp/cache/assets/sprockets/v3.0/OS/OSST0O3KT7hPeDyKIXIHWon6EQKwd4m1fwnAuJPUyfA.cache new file mode 100644 index 0000000..628438d --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/OS/OSST0O3KT7hPeDyKIXIHWon6EQKwd4m1fwnAuJPUyfA.cache @@ -0,0 +1 @@ +"%ìòê¿7#³P?A¥f5ÉOÄÊzRvJß±âáØ!V \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/OS/oS5xhiDYEtPGUin3F4RDDxXD8x8rcr6sbVxyccrqLCA.cache b/test-app/tmp/cache/assets/sprockets/v3.0/OS/oS5xhiDYEtPGUin3F4RDDxXD8x8rcr6sbVxyccrqLCA.cache new file mode 100644 index 0000000..b7b4db4 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/OS/oS5xhiDYEtPGUin3F4RDDxXD8x8rcr6sbVxyccrqLCA.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Oa/OaRoX0UHm6BCpM-f5XPgRE6zdp_tjRGRaIs_dG0MXEo.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Oa/OaRoX0UHm6BCpM-f5XPgRE6zdp_tjRGRaIs_dG0MXEo.cache new file mode 100644 index 0000000..5b1c871 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/Oa/OaRoX0UHm6BCpM-f5XPgRE6zdp_tjRGRaIs_dG0MXEo.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/P7/P7cRQ0OwcSKapRJAHMTkTt2pBqw5eGwhKw1VykhMkrs.cache b/test-app/tmp/cache/assets/sprockets/v3.0/P7/P7cRQ0OwcSKapRJAHMTkTt2pBqw5eGwhKw1VykhMkrs.cache new file mode 100644 index 0000000..2a71278 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/P7/P7cRQ0OwcSKapRJAHMTkTt2pBqw5eGwhKw1VykhMkrs.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"ifile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/swagger-ui.min.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/PK/PKieAG9AeATLE3UbtWwTCuvpn0h17Fl-cog1_JiWRqc.cache b/test-app/tmp/cache/assets/sprockets/v3.0/PK/PKieAG9AeATLE3UbtWwTCuvpn0h17Fl-cog1_JiWRqc.cache new file mode 100644 index 0000000..036817a Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/PK/PKieAG9AeATLE3UbtWwTCuvpn0h17Fl-cog1_JiWRqc.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/PZ/PZmg7NtMtDtxpld-5yjlzuilJmfMjfE1pPoa3yBbPrE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/PZ/PZmg7NtMtDtxpld-5yjlzuilJmfMjfE1pPoa3yBbPrE.cache new file mode 100644 index 0000000..93ceeeb --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/PZ/PZmg7NtMtDtxpld-5yjlzuilJmfMjfE1pPoa3yBbPrE.cache @@ -0,0 +1 @@ +I"Æ/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/backbone-min.js?type=application/javascript&pipeline=self&id=75c1abbd146872189a890789f2c6ca4065e20baaf7f1c259b37043d46ac9382d:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/QW/QWVQ6AqNWTj7PLKkigjJwFzYsC2gHLpnEDq-JBLALOE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/QW/QWVQ6AqNWTj7PLKkigjJwFzYsC2gHLpnEDq-JBLALOE.cache new file mode 100644 index 0000000..ce83407 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/QW/QWVQ6AqNWTj7PLKkigjJwFzYsC2gHLpnEDq-JBLALOE.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"ofile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/handlebars-4.0.5.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/RI/RImd_G27OlI5tNPRlNBpRWGHm6lZ9e5uaNtEcn09vMQ.cache b/test-app/tmp/cache/assets/sprockets/v3.0/RI/RImd_G27OlI5tNPRlNBpRWGHm6lZ9e5uaNtEcn09vMQ.cache new file mode 100644 index 0000000..a07d4df --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/RI/RImd_G27OlI5tNPRlNBpRWGHm6lZ9e5uaNtEcn09vMQ.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"mfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jsoneditor.min.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Ra/RaywOtR5jBWDGVHKg_SQHczy6qUzYXUplV1OXTd4F8Q.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Ra/RaywOtR5jBWDGVHKg_SQHczy6qUzYXUplV1OXTd4F8Q.cache new file mode 100644 index 0000000..bfd34b9 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Ra/RaywOtR5jBWDGVHKg_SQHczy6qUzYXUplV1OXTd4F8Q.cache @@ -0,0 +1 @@ +I"²/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/print.css?type=text/css&pipeline=self&id=d40db40230d33d33b44cb0b5e216257b6ba43d97b5dd59f319b23f3866d440e7:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/SG/SGtvfET419Y_Ur63YtpWNYglQZQPRO_OBnVS9xH9NwI.cache b/test-app/tmp/cache/assets/sprockets/v3.0/SG/SGtvfET419Y_Ur63YtpWNYglQZQPRO_OBnVS9xH9NwI.cache new file mode 100644 index 0000000..740b778 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/SG/SGtvfET419Y_Ur63YtpWNYglQZQPRO_OBnVS9xH9NwI.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Sc/ScIs1PTad7Xs9tPWRHlLP9L2EFtqpwhBMaTpLQVG0Ng.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Sc/ScIs1PTad7Xs9tPWRHlLP9L2EFtqpwhBMaTpLQVG0Ng.cache new file mode 100644 index 0000000..fbf89ae Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/Sc/ScIs1PTad7Xs9tPWRHlLP9L2EFtqpwhBMaTpLQVG0Ng.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/T1/T1kZg-Ut2Bv3EBo0ANWpTAro8vFWbLoZpNELZaZ3usk.cache b/test-app/tmp/cache/assets/sprockets/v3.0/T1/T1kZg-Ut2Bv3EBo0ANWpTAro8vFWbLoZpNELZaZ3usk.cache new file mode 100644 index 0000000..9ddf9da Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/T1/T1kZg-Ut2Bv3EBo0ANWpTAro8vFWbLoZpNELZaZ3usk.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/T2/T23n6RFh41g5Hxi4qxltv0mHMBPgRPxyRRvLxa89JQ0.cache b/test-app/tmp/cache/assets/sprockets/v3.0/T2/T23n6RFh41g5Hxi4qxltv0mHMBPgRPxyRRvLxa89JQ0.cache new file mode 100644 index 0000000..59ae6d2 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/T2/T23n6RFh41g5Hxi4qxltv0mHMBPgRPxyRRvLxa89JQ0.cache @@ -0,0 +1 @@ +I"Ç/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/swagger-oauth.js?type=application/javascript&pipeline=self&id=972099a5b34055c3e726ddab70ae2efb3fd4faebecd34de3630c809fa36e89ab:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/T7/T7_iT6DBTW8CbaAxzRmHbVERtvIzeEUYcOw0QXeXCQw.cache b/test-app/tmp/cache/assets/sprockets/v3.0/T7/T7_iT6DBTW8CbaAxzRmHbVERtvIzeEUYcOw0QXeXCQw.cache new file mode 100644 index 0000000..0c345bf --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/T7/T7_iT6DBTW8CbaAxzRmHbVERtvIzeEUYcOw0QXeXCQw.cache @@ -0,0 +1 @@ +I"¼/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/handlebars-4.0.5.js?type=application/javascript&id=12d88e2038592d9068d20fabfd326455a455667bdfdaaf93846db3012d48cf6d:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/TB/TBk2EMiQ6qy45zmSv1JsIj4ocITUk7Vy_ph8WVNczjU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/TB/TBk2EMiQ6qy45zmSv1JsIj4ocITUk7Vy_ph8WVNczjU.cache new file mode 100644 index 0000000..6ccc8f6 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/TB/TBk2EMiQ6qy45zmSv1JsIj4ocITUk7Vy_ph8WVNczjU.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/TC/TCxEziIwkURjDq2tV-yG53zfh2fYRGQ4j7HFrjWm3c4.cache b/test-app/tmp/cache/assets/sprockets/v3.0/TC/TCxEziIwkURjDq2tV-yG53zfh2fYRGQ4j7HFrjWm3c4.cache new file mode 100644 index 0000000..4075b86 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/TC/TCxEziIwkURjDq2tV-yG53zfh2fYRGQ4j7HFrjWm3c4.cache @@ -0,0 +1 @@ +I"Ä/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/lodash.min.js?type=application/javascript&pipeline=self&id=22b4e3788440965a13943a606a394d03d73db3d003af947eb49fd540f76c913e:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/TG/TGf-TNdFvzGuTtlds_v0iarosDMcYisn4yM7w2qa91Q.cache b/test-app/tmp/cache/assets/sprockets/v3.0/TG/TGf-TNdFvzGuTtlds_v0iarosDMcYisn4yM7w2qa91Q.cache new file mode 100644 index 0000000..a3f52ef Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/TG/TGf-TNdFvzGuTtlds_v0iarosDMcYisn4yM7w2qa91Q.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/U0/U0TKpkBjuBdoIF9K53GJk9D-gB5u2d6YtS_IBNp3PJs.cache b/test-app/tmp/cache/assets/sprockets/v3.0/U0/U0TKpkBjuBdoIF9K53GJk9D-gB5u2d6YtS_IBNp3PJs.cache new file mode 100644 index 0000000..609ce4e Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/U0/U0TKpkBjuBdoIF9K53GJk9D-gB5u2d6YtS_IBNp3PJs.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Ui/UiM9WFY5qNWlMG3rY6YGQJiGihk7SAJy9hyg0vNtZKA.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Ui/UiM9WFY5qNWlMG3rY6YGQJiGihk7SAJy9hyg0vNtZKA.cache new file mode 100644 index 0000000..0ea44f3 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Ui/UiM9WFY5qNWlMG3rY6YGQJiGihk7SAJy9hyg0vNtZKA.cache @@ -0,0 +1 @@ +"%gÜ)š•IÞ¹<äbo!ÂËÉÙ• ’Þ/²@*¼wàã É \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/V4/V410_f-SJc9XxwFPBKZW8p8Uc3P1Bvq2qxkv-aZ4tkU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/V4/V410_f-SJc9XxwFPBKZW8p8Uc3P1Bvq2qxkv-aZ4tkU.cache new file mode 100644 index 0000000..8a20f6f Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/V4/V410_f-SJc9XxwFPBKZW8p8Uc3P1Bvq2qxkv-aZ4tkU.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/W2/W2nemvkTWNYYLONS6fbAM0uhPIRRWV8o4Sd85OX8BUk.cache b/test-app/tmp/cache/assets/sprockets/v3.0/W2/W2nemvkTWNYYLONS6fbAM0uhPIRRWV8o4Sd85OX8BUk.cache new file mode 100644 index 0000000..61b3056 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/W2/W2nemvkTWNYYLONS6fbAM0uhPIRRWV8o4Sd85OX8BUk.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"qfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.slideto.min.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/WC/WCUxguY757q-Wy3Be-qvM7zjMZc4ESkr1yRDRlsdRTE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/WC/WCUxguY757q-Wy3Be-qvM7zjMZc4ESkr1yRDRlsdRTE.cache new file mode 100644 index 0000000..2c6d1a1 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/WC/WCUxguY757q-Wy3Be-qvM7zjMZc4ESkr1yRDRlsdRTE.cache @@ -0,0 +1 @@ +"%@x[ªì¸öü5…@ƒƒ€ ‡=”QÀêÿA8 \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/WG/WGwRdpxbnB0VZhIVa_aNzEJWCUbeet84vndtfNuKAkU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/WG/WGwRdpxbnB0VZhIVa_aNzEJWCUbeet84vndtfNuKAkU.cache new file mode 100644 index 0000000..0fa680e --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/WG/WGwRdpxbnB0VZhIVa_aNzEJWCUbeet84vndtfNuKAkU.cache @@ -0,0 +1 @@ +"%¾ýÁ1㪦⑹ÐÍêøé×ÃDŽ^D«b!öi \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Wj/WjWQRyUvliAqx37gkKdBH1lr9K1jE4O41gwhFEhgwfM.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Wj/WjWQRyUvliAqx37gkKdBH1lr9K1jE4O41gwhFEhgwfM.cache new file mode 100644 index 0000000..18d1a1d --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Wj/WjWQRyUvliAqx37gkKdBH1lr9K1jE4O41gwhFEhgwfM.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"sfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/XM/XMMMkUald7cxuqGMPZwOvPqfOQrOVheg_GDMhkpH9yE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/XM/XMMMkUald7cxuqGMPZwOvPqfOQrOVheg_GDMhkpH9yE.cache new file mode 100644 index 0000000..6b3ffe6 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/XM/XMMMkUald7cxuqGMPZwOvPqfOQrOVheg_GDMhkpH9yE.cache @@ -0,0 +1 @@ +I"¶/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/lodash.min.js?type=application/javascript&id=499f2e7b09ab0cec63924668caafa3920efa3b1a725fcfb5979760e15d44733a:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/XS/XSENHRCnssM_Y8Dkp3zEEWWATOJVMNj_pGeD8Rv34cc.cache b/test-app/tmp/cache/assets/sprockets/v3.0/XS/XSENHRCnssM_Y8Dkp3zEEWWATOJVMNj_pGeD8Rv34cc.cache new file mode 100644 index 0000000..72f4178 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/XS/XSENHRCnssM_Y8Dkp3zEEWWATOJVMNj_pGeD8Rv34cc.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"ofile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery-1.8.0.min.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Xe/Xe62azGGJPFGIw_N1o-D5la8ZAgH90hVoio8bhHKl48.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Xe/Xe62azGGJPFGIw_N1o-D5la8ZAgH90hVoio8bhHKl48.cache new file mode 100644 index 0000000..cf59592 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/Xe/Xe62azGGJPFGIw_N1o-D5la8ZAgH90hVoio8bhHKl48.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Yk/YkwZjRDPHItNLaVZGbP0Jix7jeECwtZ7wpj-lqoNAZA.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Yk/YkwZjRDPHItNLaVZGbP0Jix7jeECwtZ7wpj-lqoNAZA.cache new file mode 100644 index 0000000..d901330 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Yk/YkwZjRDPHItNLaVZGbP0Jix7jeECwtZ7wpj-lqoNAZA.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"2processors:type=image/gif&file_type=image/gif;TTI"kfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/images/throbber.gif;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Z7/Z7zYD5mMwrHIXKlzNRat74NSBENLLB4ErCouNjViheA.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Z7/Z7zYD5mMwrHIXKlzNRat74NSBENLLB4ErCouNjViheA.cache new file mode 100644 index 0000000..152ac6c Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/Z7/Z7zYD5mMwrHIXKlzNRat74NSBENLLB4ErCouNjViheA.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/ZM/ZMI-bUi_I8I2xiUNtlP_OzboarE3oXrbQCD_H65lTnw.cache b/test-app/tmp/cache/assets/sprockets/v3.0/ZM/ZMI-bUi_I8I2xiUNtlP_OzboarE3oXrbQCD_H65lTnw.cache new file mode 100644 index 0000000..0887d7a Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/ZM/ZMI-bUi_I8I2xiUNtlP_OzboarE3oXrbQCD_H65lTnw.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/ZU/ZU__N44kUg3TKffUlHdwJBAD3C4kPxKzuBCI32KHeck.cache b/test-app/tmp/cache/assets/sprockets/v3.0/ZU/ZU__N44kUg3TKffUlHdwJBAD3C4kPxKzuBCI32KHeck.cache new file mode 100644 index 0000000..da44270 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/ZU/ZU__N44kUg3TKffUlHdwJBAD3C4kPxKzuBCI32KHeck.cache @@ -0,0 +1 @@ +I"Ì/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.slideto.min.js?type=application/javascript&pipeline=self&id=14799d86f262cedb143f2bc6e2360478c8f9f164261c88791141b3ff1accbdaf:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/ZY/ZY1jV5RgoTpugHi5lRn274P8ga74AznZma2x9SE7gnU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/ZY/ZY1jV5RgoTpugHi5lRn274P8ga74AznZma2x9SE7gnU.cache new file mode 100644 index 0000000..736e4ae --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/ZY/ZY1jV5RgoTpugHi5lRn274P8ga74AznZma2x9SE7gnU.cache @@ -0,0 +1 @@ +I"½/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.ba-bbq.min.js?type=application/javascript&id=1adef06b3fa45427aa02108736219fd32a3ed074c54efec7b75b199ff2c933cf:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/Zk/ZkI8AtESeSitt1zU53EKOl1v6vx8B4mqgUmw3u8z7xM.cache b/test-app/tmp/cache/assets/sprockets/v3.0/Zk/ZkI8AtESeSitt1zU53EKOl1v6vx8B4mqgUmw3u8z7xM.cache new file mode 100644 index 0000000..75355e2 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/Zk/ZkI8AtESeSitt1zU53EKOl1v6vx8B4mqgUmw3u8z7xM.cache @@ -0,0 +1 @@ +I"¤/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/reset.css?type=text/css&id=2e9aa648329b293db782159c291c1377f9348077db9d8ab6a0f246b5a3100826:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/_9/_9ctPYBMEUDgTapaeCAlokGoXQw5Gw9TZ7HOXo6wK8s.cache b/test-app/tmp/cache/assets/sprockets/v3.0/_9/_9ctPYBMEUDgTapaeCAlokGoXQw5Gw9TZ7HOXo6wK8s.cache new file mode 100644 index 0000000..e042399 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/_9/_9ctPYBMEUDgTapaeCAlokGoXQw5Gw9TZ7HOXo6wK8s.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"efile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/print.css;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/_g/_g5y0yCpQNDZzFw_jyeQphmfPPLNgGykUzp4MHJUMsk.cache b/test-app/tmp/cache/assets/sprockets/v3.0/_g/_g5y0yCpQNDZzFw_jyeQphmfPPLNgGykUzp4MHJUMsk.cache new file mode 100644 index 0000000..4498b13 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/_g/_g5y0yCpQNDZzFw_jyeQphmfPPLNgGykUzp4MHJUMsk.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"ifile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/swagger-ui.min.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/bI/bIolJsq1TIvOun3lZYFrvxDJx2znvH3ml-yzwrrwC5o.cache b/test-app/tmp/cache/assets/sprockets/v3.0/bI/bIolJsq1TIvOun3lZYFrvxDJx2znvH3ml-yzwrrwC5o.cache new file mode 100644 index 0000000..2697863 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/bI/bIolJsq1TIvOun3lZYFrvxDJx2znvH3ml-yzwrrwC5o.cache @@ -0,0 +1 @@ +I"½/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.wiggle.min.js?type=application/javascript&id=f5daac1e0594eda70df5a8d463a89e3122b6cdef609c0d897871c0e3816fd53b:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/bb/bbGc584Re4k91_hCoUilorWyIRBL-LE8Ep30ueKDqEU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/bb/bbGc584Re4k91_hCoUilorWyIRBL-LE8Ep30ueKDqEU.cache new file mode 100644 index 0000000..101dbe8 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/bb/bbGc584Re4k91_hCoUilorWyIRBL-LE8Ep30ueKDqEU.cache @@ -0,0 +1 @@ +I"³/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/screen.css?type=text/css&pipeline=self&id=f9cea9f2cca6f0edd7545df94e9db94b530e5d8d5c601f2417fa91444b7c1208:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/bv/bvb6c1TZq7yjR7D2huDarYAO-2nIoHiVc-DL6ptR454.cache b/test-app/tmp/cache/assets/sprockets/v3.0/bv/bvb6c1TZq7yjR7D2huDarYAO-2nIoHiVc-DL6ptR454.cache new file mode 100644 index 0000000..3815315 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/bv/bvb6c1TZq7yjR7D2huDarYAO-2nIoHiVc-DL6ptR454.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"sfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/dV/dVKP2nv7tbbr1cyL5HPznumqNv0DrlnldsosP6-jEso.cache b/test-app/tmp/cache/assets/sprockets/v3.0/dV/dVKP2nv7tbbr1cyL5HPznumqNv0DrlnldsosP6-jEso.cache new file mode 100644 index 0000000..531d4eb --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/dV/dVKP2nv7tbbr1cyL5HPznumqNv0DrlnldsosP6-jEso.cache @@ -0,0 +1 @@ +I"Î/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack.js?type=application/javascript&pipeline=self&id=96ed67c19adf6e2eead32602318d58d6917e7bae34eeff57f0a058a0ed5253e2:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/de/deyI2Tzru2cPQZ3FrxJZKVk5W9q-3LZwfCKlGrg4kLs.cache b/test-app/tmp/cache/assets/sprockets/v3.0/de/deyI2Tzru2cPQZ3FrxJZKVk5W9q-3LZwfCKlGrg4kLs.cache new file mode 100644 index 0000000..fe831f6 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/de/deyI2Tzru2cPQZ3FrxJZKVk5W9q-3LZwfCKlGrg4kLs.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"efile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/marked.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/dy/dy1YgVnd0lW0bwaUQWyw7iznP9KxQdk2HkDIzc2H8Sw.cache b/test-app/tmp/cache/assets/sprockets/v3.0/dy/dy1YgVnd0lW0bwaUQWyw7iznP9KxQdk2HkDIzc2H8Sw.cache new file mode 100644 index 0000000..88b03ba Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/dy/dy1YgVnd0lW0bwaUQWyw7iznP9KxQdk2HkDIzc2H8Sw.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/eY/eYyyS68PIe5uyAXrk5UGy3MAvWuS4vy3oqg94VuOuew.cache b/test-app/tmp/cache/assets/sprockets/v3.0/eY/eYyyS68PIe5uyAXrk5UGy3MAvWuS4vy3oqg94VuOuew.cache new file mode 100644 index 0000000..6b8865f --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/eY/eYyyS68PIe5uyAXrk5UGy3MAvWuS4vy3oqg94VuOuew.cache @@ -0,0 +1 @@ +"%ôYûN4_[Üu´cLøä2ó´”26 f°Öê~¨ \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/gK/gKHvQOeMniLw7ja2OCF_nwbTy8OcudWnthCudwmzjFk.cache b/test-app/tmp/cache/assets/sprockets/v3.0/gK/gKHvQOeMniLw7ja2OCF_nwbTy8OcudWnthCudwmzjFk.cache new file mode 100644 index 0000000..bb78b3b --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/gK/gKHvQOeMniLw7ja2OCF_nwbTy8OcudWnthCudwmzjFk.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"efile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/reset.css;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/gq/gQ2gj-uTLrvctplyB-3jZX1xE4FnLxIVFQlATnKxpGI.cache b/test-app/tmp/cache/assets/sprockets/v3.0/gq/gQ2gj-uTLrvctplyB-3jZX1xE4FnLxIVFQlATnKxpGI.cache new file mode 100644 index 0000000..a149383 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/gq/gQ2gj-uTLrvctplyB-3jZX1xE4FnLxIVFQlATnKxpGI.cache @@ -0,0 +1 @@ +I"¸/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/backbone-min.js?type=application/javascript&id=ba99c37b53ac41e2ef41e2992ca29ba38bdd4cc6e617502b26806a99b440a9a7:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/gq/gqOi5JB-EW5ckTa4WPtlIsZQrmJhSvlqq0wphCdquo0.cache b/test-app/tmp/cache/assets/sprockets/v3.0/gq/gqOi5JB-EW5ckTa4WPtlIsZQrmJhSvlqq0wphCdquo0.cache new file mode 100644 index 0000000..f2d361e --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/gq/gqOi5JB-EW5ckTa4WPtlIsZQrmJhSvlqq0wphCdquo0.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"efile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/reset.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/h1/h1NkBlkWUXcK6aEG7wPPHJkkX8D-TscozIMmwk_-pIU.cache b/test-app/tmp/cache/assets/sprockets/v3.0/h1/h1NkBlkWUXcK6aEG7wPPHJkkX8D-TscozIMmwk_-pIU.cache new file mode 100644 index 0000000..767fb75 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/h1/h1NkBlkWUXcK6aEG7wPPHJkkX8D-TscozIMmwk_-pIU.cache @@ -0,0 +1 @@ +I"©/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/typography.css?type=text/css&id=2713f9ffd9861446047fc0440054d7001b6a34b5f5abeed9be519333f37ea34b:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/iO/iO8VElIL-lYIa3kPnwi8hwRitZldAsJlF0GA1yLPW2I.cache b/test-app/tmp/cache/assets/sprockets/v3.0/iO/iO8VElIL-lYIa3kPnwi8hwRitZldAsJlF0GA1yLPW2I.cache new file mode 100644 index 0000000..3e6048b Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/iO/iO8VElIL-lYIa3kPnwi8hwRitZldAsJlF0GA1yLPW2I.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/jr/jrPAWq1Tmic8O1ULEIytPdC-s2a3W-ome5_yPV2THH4.cache b/test-app/tmp/cache/assets/sprockets/v3.0/jr/jrPAWq1Tmic8O1ULEIytPdC-s2a3W-ome5_yPV2THH4.cache new file mode 100644 index 0000000..25a7ea2 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/jr/jrPAWq1Tmic8O1ULEIytPdC-s2a3W-ome5_yPV2THH4.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/k9/k9SVZrt-rhYeNNXrEFNtCCkPxYPn-11MacKVjd9lp9M.cache b/test-app/tmp/cache/assets/sprockets/v3.0/k9/k9SVZrt-rhYeNNXrEFNtCCkPxYPn-11MacKVjd9lp9M.cache new file mode 100644 index 0000000..add6696 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/k9/k9SVZrt-rhYeNNXrEFNtCCkPxYPn-11MacKVjd9lp9M.cache @@ -0,0 +1 @@ +"%ÞfcyFÓpð9“ﮥœæ€¦ËhûGpG* ,‰2Óè É \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/kO/kOHCcxg_41A5QGfXDXyFVCVx5sLeRS6Kw9x70_y6Ciw.cache b/test-app/tmp/cache/assets/sprockets/v3.0/kO/kOHCcxg_41A5QGfXDXyFVCVx5sLeRS6Kw9x70_y6Ciw.cache new file mode 100644 index 0000000..fee8bb0 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/kO/kOHCcxg_41A5QGfXDXyFVCVx5sLeRS6Kw9x70_y6Ciw.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/kR/Krphgd_z5C2Z4nD_ndnTJ_bI1wmnXn70nNsATLfA5_E.cache b/test-app/tmp/cache/assets/sprockets/v3.0/kR/Krphgd_z5C2Z4nD_ndnTJ_bI1wmnXn70nNsATLfA5_E.cache new file mode 100644 index 0000000..5a7ceb9 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/kR/Krphgd_z5C2Z4nD_ndnTJ_bI1wmnXn70nNsATLfA5_E.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/kR/kR67XDov7pmnvvGN0ylShdhibaAC3VFMkyH26JkOJSk.cache b/test-app/tmp/cache/assets/sprockets/v3.0/kR/kR67XDov7pmnvvGN0ylShdhibaAC3VFMkyH26JkOJSk.cache new file mode 100644 index 0000000..aaa6031 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/kR/kR67XDov7pmnvvGN0ylShdhibaAC3VFMkyH26JkOJSk.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"vfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/object-assign-pollyfill.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/ku/kuHal3FzFQqClBLCq2N85DiTd8xLl12RG8uRfRmKLbQ.cache b/test-app/tmp/cache/assets/sprockets/v3.0/ku/kuHal3FzFQqClBLCq2N85DiTd8xLl12RG8uRfRmKLbQ.cache new file mode 100644 index 0000000..329abdd Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/ku/kuHal3FzFQqClBLCq2N85DiTd8xLl12RG8uRfRmKLbQ.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/kx/kxR1WBMiNEJJB5c5CAcppl7c-Q5tL7E4X7coarmN9_k.cache b/test-app/tmp/cache/assets/sprockets/v3.0/kx/kxR1WBMiNEJJB5c5CAcppl7c-Q5tL7E4X7coarmN9_k.cache new file mode 100644 index 0000000..440018d Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/kx/kxR1WBMiNEJJB5c5CAcppl7c-Q5tL7E4X7coarmN9_k.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/lF/lFxlr-_l3_UESGZifD7F0nCUxZywqwEnsTJBctqkATc.cache b/test-app/tmp/cache/assets/sprockets/v3.0/lF/lFxlr-_l3_UESGZifD7F0nCUxZywqwEnsTJBctqkATc.cache new file mode 100644 index 0000000..fbe9a0f --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/lF/lFxlr-_l3_UESGZifD7F0nCUxZywqwEnsTJBctqkATc.cache @@ -0,0 +1 @@ +"%!\ãAµÿXÂɹM¬³—ÓJ{Ëö1$û˜! b © \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/lq/lqpoJFMrmwWIcESwk6xMcpxSGCg87TUndiE3yUaWXyw.cache b/test-app/tmp/cache/assets/sprockets/v3.0/lq/lqpoJFMrmwWIcESwk6xMcpxSGCg87TUndiE3yUaWXyw.cache new file mode 100644 index 0000000..3c3d0c1 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/lq/lqpoJFMrmwWIcESwk6xMcpxSGCg87TUndiE3yUaWXyw.cache @@ -0,0 +1 @@ +"%ŽéëÜ߇c_ñ¡ëâXa/Ù |²ßÊy’Œ;†ÙÜ \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/mK/mK-pQ7Y8vx5YvHrGdzFUZadOj7gYU2ob6bS66uLMRBA.cache b/test-app/tmp/cache/assets/sprockets/v3.0/mK/mK-pQ7Y8vx5YvHrGdzFUZadOj7gYU2ob6bS66uLMRBA.cache new file mode 100644 index 0000000..e9ca311 Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/mK/mK-pQ7Y8vx5YvHrGdzFUZadOj7gYU2ob6bS66uLMRBA.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/mc/mcjZfI65nyzyxZFoh0ExQmRNrjD6c0q3TlNbNuAl5zQ.cache b/test-app/tmp/cache/assets/sprockets/v3.0/mc/mcjZfI65nyzyxZFoh0ExQmRNrjD6c0q3TlNbNuAl5zQ.cache new file mode 100644 index 0000000..24e008b --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/mc/mcjZfI65nyzyxZFoh0ExQmRNrjD6c0q3TlNbNuAl5zQ.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"vfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/object-assign-pollyfill.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/mn/mnRkw00oC-jGuXKZkjSBH5vzcYw1YALeD0ebws0Z6-k.cache b/test-app/tmp/cache/assets/sprockets/v3.0/mn/mnRkw00oC-jGuXKZkjSBH5vzcYw1YALeD0ebws0Z6-k.cache new file mode 100644 index 0000000..151ea9e --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/mn/mnRkw00oC-jGuXKZkjSBH5vzcYw1YALeD0ebws0Z6-k.cache @@ -0,0 +1,5 @@ +{:uriI"´file:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/images/logo_small.png?type=image/png&id=6cd604278a7d2a3f2201f0c73cd941b39cdfb6e6fb4aa9a38a96a3893e4175c5:ET:load_pathI">/Users/richie/src/rswag/rswag-ui/vendor/assets/components;T: filenameI"_/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/images/logo_small.png;T: nameI"!swagger-ui/images/logo_small;T:logical_pathI"%swagger-ui/images/logo_small.png;T:content_typeI"image/png;T: source0: metadata{: digest"%Ñã,½½cVîtNÆ"ñ_òvš97ÑLÕbñ¾ÖÏ: lengthiÇ:dependencieso:Set: +@hash{ +I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"2processors:type=image/png&file_type=image/png;TTI"mfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/images/logo_small.png;TT:dependencies_digest"%8éàM†©å ,Ër¢t»Ý—Ò +ÿ²“Mðï‚S"íc:idI"E6cd604278a7d2a3f2201f0c73cd941b39cdfb6e6fb4aa9a38a96a3893e4175c5;F: +mtimel+ Ø÷W \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/nX/nXgEOftu7xA6bpMnHc--ipxfZMu4yCJMiU4NKL_mlos.cache b/test-app/tmp/cache/assets/sprockets/v3.0/nX/nXgEOftu7xA6bpMnHc--ipxfZMu4yCJMiU4NKL_mlos.cache new file mode 100644 index 0000000..9d8fbb1 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/nX/nXgEOftu7xA6bpMnHc--ipxfZMu4yCJMiU4NKL_mlos.cache @@ -0,0 +1 @@ +I"¹/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/swagger-oauth.js?type=application/javascript&id=78dd5896eb795db0bb7b2673ddfd8ff2b5ab148c0836c8fa66e12537cab50490:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/nZ/nZ9flIV4ipJ3xBPmLHwSWhpt7OhY3ufuFLvqvLrv_uI.cache b/test-app/tmp/cache/assets/sprockets/v3.0/nZ/nZ9flIV4ipJ3xBPmLHwSWhpt7OhY3ufuFLvqvLrv_uI.cache new file mode 100644 index 0000000..ca049cd --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/nZ/nZ9flIV4ipJ3xBPmLHwSWhpt7OhY3ufuFLvqvLrv_uI.cache @@ -0,0 +1 @@ +"%L7q¬šêMe/gzÕÙØ2ç·×â d"žÀUô \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/nb/nb5sTMc1sqUaFmyyvTgBAQJE2c5z4Y1LkFBOJ6Ow2K0.cache b/test-app/tmp/cache/assets/sprockets/v3.0/nb/nb5sTMc1sqUaFmyyvTgBAQJE2c5z4Y1LkFBOJ6Ow2K0.cache new file mode 100644 index 0000000..4575338 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/nb/nb5sTMc1sqUaFmyyvTgBAQJE2c5z4Y1LkFBOJ6Ow2K0.cache @@ -0,0 +1 @@ +I"Ë/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.wiggle.min.js?type=application/javascript&pipeline=self&id=a80c6ca294ee3bd74795c938d5b5c0ab8422aae8121453ec194dd48a07aa86b0:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/oe/oeE0hX76Av73DaWS3YGck4xFDX4jGDdIsE-7TQNwr_Q.cache b/test-app/tmp/cache/assets/sprockets/v3.0/oe/oeE0hX76Av73DaWS3YGck4xFDX4jGDdIsE-7TQNwr_Q.cache new file mode 100644 index 0000000..e6981bb Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/oe/oeE0hX76Av73DaWS3YGck4xFDX4jGDdIsE-7TQNwr_Q.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/q3/q3SEkL-krNQFj3RpAXgANR38tlmtCoE3gvFs3cJSWB0.cache b/test-app/tmp/cache/assets/sprockets/v3.0/q3/q3SEkL-krNQFj3RpAXgANR38tlmtCoE3gvFs3cJSWB0.cache new file mode 100644 index 0000000..c697114 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/q3/q3SEkL-krNQFj3RpAXgANR38tlmtCoE3gvFs3cJSWB0.cache @@ -0,0 +1 @@ +"%%mN`ÓÉݪ{[{˜í…ŽiD OBXŽDãÌnn9ºÍœ \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/q9/q9j-4PChQy7_Eg7Pox07YjNO2E8PDOB3c5jjJXUnRK4.cache b/test-app/tmp/cache/assets/sprockets/v3.0/q9/q9j-4PChQy7_Eg7Pox07YjNO2E8PDOB3c5jjJXUnRK4.cache new file mode 100644 index 0000000..74a50ca --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/q9/q9j-4PChQy7_Eg7Pox07YjNO2E8PDOB3c5jjJXUnRK4.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"kfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/backbone-min.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/qL/qLVY0YArYZIRqTcXxAvcpDIoCkGwydv2oRVHOwX-b9c.cache b/test-app/tmp/cache/assets/sprockets/v3.0/qL/qLVY0YArYZIRqTcXxAvcpDIoCkGwydv2oRVHOwX-b9c.cache new file mode 100644 index 0000000..ea62ee3 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/qL/qLVY0YArYZIRqTcXxAvcpDIoCkGwydv2oRVHOwX-b9c.cache @@ -0,0 +1 @@ +I"·/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/typography.css?type=text/css&pipeline=self&id=ff0956e7129d4cbe211f1c12f119192837af96ec58ccc2945d456e8f861c6c8a:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/qZ/qZqIXzhRVfrWL6qBhVL3Dkozr_6vlMGDfKtbmZ8MrXk.cache b/test-app/tmp/cache/assets/sprockets/v3.0/qZ/qZqIXzhRVfrWL6qBhVL3Dkozr_6vlMGDfKtbmZ8MrXk.cache new file mode 100644 index 0000000..bc59b79 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/qZ/qZqIXzhRVfrWL6qBhVL3Dkozr_6vlMGDfKtbmZ8MrXk.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"ifile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/lodash.min.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/qk/qk9_CfYx8m75xdzgrkhA8vhQmPGk2qaGqkIDjCQ7Qdc.cache b/test-app/tmp/cache/assets/sprockets/v3.0/qk/qk9_CfYx8m75xdzgrkhA8vhQmPGk2qaGqkIDjCQ7Qdc.cache new file mode 100644 index 0000000..9b49bc6 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/qk/qk9_CfYx8m75xdzgrkhA8vhQmPGk2qaGqkIDjCQ7Qdc.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"ofile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/handlebars-4.0.5.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/rW/rW-0m-SifvGE1h3yL9PP3ks7pqk05zlHwDpIn9douXI.cache b/test-app/tmp/cache/assets/sprockets/v3.0/rW/rW-0m-SifvGE1h3yL9PP3ks7pqk05zlHwDpIn9douXI.cache new file mode 100644 index 0000000..2cdba6e --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/rW/rW-0m-SifvGE1h3yL9PP3ks7pqk05zlHwDpIn9douXI.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"ffile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/screen.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/rY/rYZFf_Gas2MSD9kB0tLZh4zQacG-wNeuQdHBnMGvC1s.cache b/test-app/tmp/cache/assets/sprockets/v3.0/rY/rYZFf_Gas2MSD9kB0tLZh4zQacG-wNeuQdHBnMGvC1s.cache new file mode 100644 index 0000000..ab72852 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/rY/rYZFf_Gas2MSD9kB0tLZh4zQacG-wNeuQdHBnMGvC1s.cache @@ -0,0 +1 @@ +I"À/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/highlight.9.1.0.pack.js?type=application/javascript&id=fae62d163818a6d62e0e4aa0121b7e735d50b65a811791c1bc3fddcc97ca62d5:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/s7/s7yzMGKzCD1r_zS3DMMX4u_4_xrNCHXWPrAsCWnFVdc.cache b/test-app/tmp/cache/assets/sprockets/v3.0/s7/s7yzMGKzCD1r_zS3DMMX4u_4_xrNCHXWPrAsCWnFVdc.cache new file mode 100644 index 0000000..f6f7e4e --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/s7/s7yzMGKzCD1r_zS3DMMX4u_4_xrNCHXWPrAsCWnFVdc.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"pfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.wiggle.min.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/tI/tI0HNOcTNdbHY9GTEtSktihb--UacCef319epJGucmw.cache b/test-app/tmp/cache/assets/sprockets/v3.0/tI/tI0HNOcTNdbHY9GTEtSktihb--UacCef319epJGucmw.cache new file mode 100644 index 0000000..b7f56a5 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/tI/tI0HNOcTNdbHY9GTEtSktihb--UacCef319epJGucmw.cache @@ -0,0 +1,3 @@ +[o:Set: +@hash{ +I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"pfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.ba-bbq.min.js;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/tp/tpSiX-xHFGGCDq9uOpbefot50KhxX4owOJqkUSdTl8E.cache b/test-app/tmp/cache/assets/sprockets/v3.0/tp/tpSiX-xHFGGCDq9uOpbefot50KhxX4owOJqkUSdTl8E.cache new file mode 100644 index 0000000..586ce4e --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/tp/tpSiX-xHFGGCDq9uOpbefot50KhxX4owOJqkUSdTl8E.cache @@ -0,0 +1,2 @@ +[o:Set: +@hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"lfile-digest:///Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/swagger-oauth.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TT \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/ud/ud4SNIsQXRtsMeotM9wkfvtXQwFzlnlGroXMdfRmKKk.cache b/test-app/tmp/cache/assets/sprockets/v3.0/ud/ud4SNIsQXRtsMeotM9wkfvtXQwFzlnlGroXMdfRmKKk.cache new file mode 100644 index 0000000..e6a127b --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/ud/ud4SNIsQXRtsMeotM9wkfvtXQwFzlnlGroXMdfRmKKk.cache @@ -0,0 +1 @@ +I"¥/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/css/screen.css?type=text/css&id=12f99f2ad980616277b9b47e1de8ffc6dce3a1e276c46eddef5bbaaafbb9e19e:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/v3/v3OUqzxgM6Thu0ODRnQo3coGAM5TAyrDP9khQasIUPI.cache b/test-app/tmp/cache/assets/sprockets/v3.0/v3/v3OUqzxgM6Thu0ODRnQo3coGAM5TAyrDP9khQasIUPI.cache new file mode 100644 index 0000000..7a24378 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/v3/v3OUqzxgM6Thu0ODRnQo3coGAM5TAyrDP9khQasIUPI.cache @@ -0,0 +1 @@ +I"Ë/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery.ba-bbq.min.js?type=application/javascript&pipeline=self&id=f93a66d30241de3318b3dbaabbb06eab41b7fdff88df3eec94932d12ed9ec1d5:ET \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/wz/wzFbU2kMPIfwnpouD1N2jm0PY7NOcW5jEhd-TxvTo6k.cache b/test-app/tmp/cache/assets/sprockets/v3.0/wz/wzFbU2kMPIfwnpouD1N2jm0PY7NOcW5jEhd-TxvTo6k.cache new file mode 100644 index 0000000..6af95af Binary files /dev/null and b/test-app/tmp/cache/assets/sprockets/v3.0/wz/wzFbU2kMPIfwnpouD1N2jm0PY7NOcW5jEhd-TxvTo6k.cache differ diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/xn/xnwxfmw846xN4WfJnzOAflrLQfid6sBwZQQu_YX72Wk.cache b/test-app/tmp/cache/assets/sprockets/v3.0/xn/xnwxfmw846xN4WfJnzOAflrLQfid6sBwZQQu_YX72Wk.cache new file mode 100644 index 0000000..354c364 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/xn/xnwxfmw846xN4WfJnzOAflrLQfid6sBwZQQu_YX72Wk.cache @@ -0,0 +1 @@ +"%JÅZ3«ùï­ß\‘r4 §>K<™¡Í. Ûh~H \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/y4/y4NGH_-sGDYixTRXfmGaAERQvEVYgJ8bntrK1RYngeQ.cache b/test-app/tmp/cache/assets/sprockets/v3.0/y4/y4NGH_-sGDYixTRXfmGaAERQvEVYgJ8bntrK1RYngeQ.cache new file mode 100644 index 0000000..9edf30e --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/y4/y4NGH_-sGDYixTRXfmGaAERQvEVYgJ8bntrK1RYngeQ.cache @@ -0,0 +1 @@ +"%bJ[lDðrüÁ*f¸ÚùÀ°Ñ‘VwöÁ§ÓØ?àÈó \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/zX/zXTuF0gpCWb1cV0rm6TFeLPYpdoNPq8rH_X5X-rMZXE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/zX/zXTuF0gpCWb1cV0rm6TFeLPYpdoNPq8rH_X5X-rMZXE.cache new file mode 100644 index 0000000..dc307e4 --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/zX/zXTuF0gpCWb1cV0rm6TFeLPYpdoNPq8rH_X5X-rMZXE.cache @@ -0,0 +1 @@ +"%Ñã,½½cVîtNÆ"ñ_òvš97ÑLÕbñ¾ÖÏ \ No newline at end of file diff --git a/test-app/tmp/cache/assets/sprockets/v3.0/zb/zbYNO3K3pWsAxTzs-zMe7TRrlu644MDeNAgVTIIrOYE.cache b/test-app/tmp/cache/assets/sprockets/v3.0/zb/zbYNO3K3pWsAxTzs-zMe7TRrlu644MDeNAgVTIIrOYE.cache new file mode 100644 index 0000000..904696a --- /dev/null +++ b/test-app/tmp/cache/assets/sprockets/v3.0/zb/zbYNO3K3pWsAxTzs-zMe7TRrlu644MDeNAgVTIIrOYE.cache @@ -0,0 +1 @@ +I"Ê/Users/richie/src/rswag/rswag-ui/vendor/assets/components/swagger-ui/lib/jquery-1.8.0.min.js?type=application/javascript&pipeline=self&id=674289cfb408ea5bdd2e657fd98c6d9e51005069726396f35ac003a3376bdb04:ET \ No newline at end of file diff --git a/vendor/assets/components/swagger-ui/css/typography.css b/vendor/assets/components/swagger-ui/css/typography.css deleted file mode 100644 index 27c3751..0000000 --- a/vendor/assets/components/swagger-ui/css/typography.css +++ /dev/null @@ -1,26 +0,0 @@ -/* droid-sans-regular - latin */ -@font-face { - font-family: 'Droid Sans'; - font-style: normal; - font-weight: 400; - src: url('../fonts/droid-sans-v6-latin-regular.eot'); /* IE9 Compat Modes */ - src: local('Droid Sans'), local('DroidSans'), - url('../fonts/droid-sans-v6-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/droid-sans-v6-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/droid-sans-v6-latin-regular.woff') format('woff'), /* Modern Browsers */ - url('../fonts/droid-sans-v6-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/droid-sans-v6-latin-regular.svg#DroidSans') format('svg'); /* Legacy iOS */ -} -/* droid-sans-700 - latin */ -@font-face { - font-family: 'Droid Sans'; - font-style: normal; - font-weight: 700; - src: url('../fonts/droid-sans-v6-latin-700.eot'); /* IE9 Compat Modes */ - src: local('Droid Sans Bold'), local('DroidSans-Bold'), - url('../fonts/droid-sans-v6-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/droid-sans-v6-latin-700.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/droid-sans-v6-latin-700.woff') format('woff'), /* Modern Browsers */ - url('../fonts/droid-sans-v6-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/droid-sans-v6-latin-700.svg#DroidSans') format('svg'); /* Legacy iOS */ -} diff --git a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.eot b/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.eot deleted file mode 100644 index d852498..0000000 Binary files a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.eot and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.svg b/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.svg deleted file mode 100644 index a54bbbb..0000000 --- a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.svg +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.woff b/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.woff deleted file mode 100644 index 67e3e25..0000000 Binary files a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.woff and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.woff2 b/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.woff2 deleted file mode 100644 index 1e726a7..0000000 Binary files a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-700.woff2 and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.eot b/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.eot deleted file mode 100644 index ac2698e..0000000 Binary files a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.eot and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.svg b/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.svg deleted file mode 100644 index d9f2a21..0000000 --- a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.svg +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.woff b/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.woff deleted file mode 100644 index abf1989..0000000 Binary files a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.woff and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.woff2 b/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.woff2 deleted file mode 100644 index 9f93f74..0000000 Binary files a/vendor/assets/components/swagger-ui/fonts/droid-sans-v6-latin-regular.woff2 and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/images/explorer_icons.png b/vendor/assets/components/swagger-ui/images/explorer_icons.png deleted file mode 100644 index ed9d2ff..0000000 Binary files a/vendor/assets/components/swagger-ui/images/explorer_icons.png and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/images/favicon-16x16.png b/vendor/assets/components/swagger-ui/images/favicon-16x16.png deleted file mode 100755 index 66b1a5b..0000000 Binary files a/vendor/assets/components/swagger-ui/images/favicon-16x16.png and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/images/favicon-32x32.png b/vendor/assets/components/swagger-ui/images/favicon-32x32.png deleted file mode 100755 index 32f319f..0000000 Binary files a/vendor/assets/components/swagger-ui/images/favicon-32x32.png and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/images/logo_small.png b/vendor/assets/components/swagger-ui/images/logo_small.png deleted file mode 100644 index 5496a65..0000000 Binary files a/vendor/assets/components/swagger-ui/images/logo_small.png and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/images/pet_store_api.png b/vendor/assets/components/swagger-ui/images/pet_store_api.png deleted file mode 100644 index f9f9cd4..0000000 Binary files a/vendor/assets/components/swagger-ui/images/pet_store_api.png and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/images/wordnik_api.png b/vendor/assets/components/swagger-ui/images/wordnik_api.png deleted file mode 100644 index dca4f14..0000000 Binary files a/vendor/assets/components/swagger-ui/images/wordnik_api.png and /dev/null differ diff --git a/vendor/assets/components/swagger-ui/lib/handlebars-2.0.0.js b/vendor/assets/components/swagger-ui/lib/handlebars-2.0.0.js deleted file mode 100644 index 53cf921..0000000 --- a/vendor/assets/components/swagger-ui/lib/handlebars-2.0.0.js +++ /dev/null @@ -1,28 +0,0 @@ -/*! - - handlebars v2.0.0 - -Copyright (C) 2011-2014 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -@license -*/ -!function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Handlebars=a.Handlebars||b()}(this,function(){var a=function(){"use strict";function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){"use strict";function b(a){return i[a]}function c(a){for(var b=1;b":">",'"':""","'":"'","`":"`"},j=/[&<>"'`]/g,k=/[&<>"'`]/;g.extend=c;var l=Object.prototype.toString;g.toString=l;var m=function(a){return"function"==typeof a};m(/x/)&&(m=function(a){return"function"==typeof a&&"[object Function]"===l.call(a)});var m;g.isFunction=m;var n=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===l.call(a):!1};return g.isArray=n,g.escapeExpression=d,g.isEmpty=e,g.appendContextPath=f,g}(a),c=function(){"use strict";function a(a,b){var d;b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):d(this);if(c.data&&c.ids){var g=q(c.data);g.contextPath=f.appendContextPath(c.data.contextPath,c.name),c={data:g}}return e(b,c)}),a.registerHelper("each",function(a,b){if(!b)throw new g("Must pass iterator to #each");var c,d,e=b.fn,h=b.inverse,i=0,j="";if(b.data&&b.ids&&(d=f.appendContextPath(b.data.contextPath,b.ids[0])+"."),l(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(k(a))for(var m=a.length;m>i;i++)c&&(c.index=i,c.first=0===i,c.last=i===a.length-1,d&&(c.contextPath=d+i)),j+=e(a[i],{data:c});else for(var n in a)a.hasOwnProperty(n)&&(c&&(c.key=n,c.index=i,c.first=0===i,d&&(c.contextPath=d+n)),j+=e(a[n],{data:c}),i++);return 0===i&&(j=h(this)),j}),a.registerHelper("if",function(a,b){return l(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||f.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){l(a)&&(a=a.call(this));var c=b.fn;if(f.isEmpty(a))return b.inverse(this);if(b.data&&b.ids){var d=q(b.data);d.contextPath=f.appendContextPath(b.data.contextPath,b.ids[0]),b={data:d}}return c(a,b)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)}),a.registerHelper("lookup",function(a,b){return a&&a[b]})}var e={},f=a,g=b,h="2.0.0";e.VERSION=h;var i=6;e.COMPILER_REVISION=i;var j={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};e.REVISION_CHANGES=j;var k=f.isArray,l=f.isFunction,m=f.toString,n="[object Object]";e.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:o,log:p,registerHelper:function(a,b){if(m.call(a)===n){if(b)throw new g("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){m.call(a)===n?f.extend(this.partials,a):this.partials[a]=b},unregisterPartial:function(a){delete this.partials[a]}};var o={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(o.level<=a){var c=o.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};e.logger=o;var p=o.log;e.log=p;var q=function(a){var b=f.extend({},a);return b._parent=a,b};return e.createFrame=q,e}(b,c),e=function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new l("No environment passed to template");if(!a||!a.main)throw new l("Unknown template object: "+typeof a);b.VM.checkRevision(a.compiler);var c=function(c,d,e,f,g,h,i,j,m){g&&(f=k.extend({},f,g));var n=b.VM.invokePartial.call(this,c,e,f,h,i,j,m);if(null==n&&b.compile){var o={helpers:h,partials:i,data:j,depths:m};i[e]=b.compile(c,{data:void 0!==j,compat:a.compat},b),n=i[e](f,o)}if(null!=n){if(d){for(var p=n.split("\n"),q=0,r=p.length;r>q&&(p[q]||q+1!==r);q++)p[q]=d+p[q];n=p.join("\n")}return n}throw new l("The partial "+e+" could not be compiled when running in runtime-only mode")},d={lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:k.escapeExpression,invokePartial:c,fn:function(b){return a[b]},programs:[],program:function(a,b,c){var d=this.programs[a],e=this.fn(a);return b||c?d=f(this,a,e,b,c):d||(d=this.programs[a]=f(this,a,e)),d},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=k.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler},e=function(b,c){c=c||{};var f=c.data;e._setup(c),!c.partial&&a.useData&&(f=i(b,f));var g;return a.useDepths&&(g=c.depths?[b].concat(c.depths):[b]),a.main.call(d,b,d.helpers,d.partials,f,g)};return e.isTop=!0,e._setup=function(c){c.partial?(d.helpers=c.helpers,d.partials=c.partials):(d.helpers=d.merge(c.helpers,b.helpers),a.usePartial&&(d.partials=d.merge(c.partials,b.partials)))},e._child=function(b,c,e){if(a.useDepths&&!e)throw new l("must pass parent depths");return f(d,b,a[b],c,e)},e}function f(a,b,c,d,e){var f=function(b,f){return f=f||{},c.call(a,b,a.helpers,a.partials,f.data||d,e&&[b].concat(e))};return f.program=b,f.depth=e?e.length:0,f}function g(a,b,c,d,e,f,g){var h={partial:!0,helpers:d,partials:e,data:f,depths:g};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,h):void 0}function h(){return""}function i(a,b){return b&&"root"in b||(b=b?o(b):{},b.root=a),b}var j={},k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES,o=c.createFrame;return j.checkRevision=d,j.template=e,j.program=f,j.invokePartial=g,j.noop=h,j}(b,c,d),f=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.escapeExpression=j.escapeExpression,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,m["default"]=m,f=m}(d,a,c,b,e),g=function(a){"use strict";function b(a){a=a||{},this.firstLine=a.first_line,this.firstColumn=a.first_column,this.lastColumn=a.last_column,this.lastLine=a.last_line}var c,d=a,e={ProgramNode:function(a,c,d){b.call(this,d),this.type="program",this.statements=a,this.strip=c},MustacheNode:function(a,c,d,f,g){if(b.call(this,g),this.type="mustache",this.strip=f,null!=d&&d.charAt){var h=d.charAt(3)||d.charAt(2);this.escaped="{"!==h&&"&"!==h}else this.escaped=!!d;this.sexpr=a instanceof e.SexprNode?a:new e.SexprNode(a,c),this.id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(a,c,d){b.call(this,d),this.type="sexpr",this.hash=c;var e=this.id=a[0],f=this.params=a.slice(1);this.isHelper=!(!f.length&&!c),this.eligibleHelper=this.isHelper||e.isSimple},PartialNode:function(a,c,d,e,f){b.call(this,f),this.type="partial",this.partialName=a,this.context=c,this.hash=d,this.strip=e,this.strip.inlineStandalone=!0},BlockNode:function(a,c,d,e,f){b.call(this,f),this.type="block",this.mustache=a,this.program=c,this.inverse=d,this.strip=e,d&&!c&&(this.isInverse=!0)},RawBlockNode:function(a,c,f,g){if(b.call(this,g),a.sexpr.id.original!==f)throw new d(a.sexpr.id.original+" doesn't match "+f,this);c=new e.ContentNode(c,g),this.type="block",this.mustache=a,this.program=new e.ProgramNode([c],{},g)},ContentNode:function(a,c){b.call(this,c),this.type="content",this.original=this.string=a},HashNode:function(a,c){b.call(this,c),this.type="hash",this.pairs=a},IdNode:function(a,c){b.call(this,c),this.type="ID";for(var e="",f=[],g=0,h="",i=0,j=a.length;j>i;i++){var k=a[i].part;if(e+=(a[i].separator||"")+k,".."===k||"."===k||"this"===k){if(f.length>0)throw new d("Invalid path: "+e,this);".."===k?(g++,h+="../"):this.isScoped=!0}else f.push(k)}this.original=e,this.parts=f,this.string=f.join("."),this.depth=g,this.idName=h+this.string,this.isSimple=1===a.length&&!this.isScoped&&0===g,this.stringModeValue=this.string},PartialNameNode:function(a,c){b.call(this,c),this.type="PARTIAL_NAME",this.name=a.original},DataNode:function(a,c){b.call(this,c),this.type="DATA",this.id=a,this.stringModeValue=a.stringModeValue,this.idName="@"+a.stringModeValue},StringNode:function(a,c){b.call(this,c),this.type="STRING",this.original=this.string=this.stringModeValue=a},NumberNode:function(a,c){b.call(this,c),this.type="NUMBER",this.original=this.number=a,this.stringModeValue=Number(a)},BooleanNode:function(a,c){b.call(this,c),this.type="BOOLEAN",this.bool=a,this.stringModeValue="true"===a},CommentNode:function(a,c){b.call(this,c),this.type="comment",this.comment=a,this.strip={inlineStandalone:!0}}};return c=e}(c),h=function(){"use strict";var a,b=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,CONTENT:12,COMMENT:13,openRawBlock:14,END_RAW_BLOCK:15,OPEN_RAW_BLOCK:16,sexpr:17,CLOSE_RAW_BLOCK:18,openBlock:19,block_option0:20,closeBlock:21,openInverse:22,block_option1:23,OPEN_BLOCK:24,CLOSE:25,OPEN_INVERSE:26,inverseAndProgram:27,INVERSE:28,OPEN_ENDBLOCK:29,path:30,OPEN:31,OPEN_UNESCAPED:32,CLOSE_UNESCAPED:33,OPEN_PARTIAL:34,partialName:35,param:36,partial_option0:37,partial_option1:38,sexpr_repetition0:39,sexpr_option0:40,dataName:41,STRING:42,NUMBER:43,BOOLEAN:44,OPEN_SEXPR:45,CLOSE_SEXPR:46,hash:47,hash_repetition_plus0:48,hashSegment:49,ID:50,EQUALS:51,DATA:52,pathSegments:53,SEP:54,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",12:"CONTENT",13:"COMMENT",15:"END_RAW_BLOCK",16:"OPEN_RAW_BLOCK",18:"CLOSE_RAW_BLOCK",24:"OPEN_BLOCK",25:"CLOSE",26:"OPEN_INVERSE",28:"INVERSE",29:"OPEN_ENDBLOCK",31:"OPEN",32:"OPEN_UNESCAPED",33:"CLOSE_UNESCAPED",34:"OPEN_PARTIAL",42:"STRING",43:"NUMBER",44:"BOOLEAN",45:"OPEN_SEXPR",46:"CLOSE_SEXPR",50:"ID",51:"EQUALS",52:"DATA",54:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[10,3],[14,3],[9,4],[9,4],[19,3],[22,3],[27,2],[21,3],[8,3],[8,3],[11,5],[11,4],[17,3],[17,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,3],[47,1],[49,3],[35,1],[35,1],[35,1],[41,2],[30,1],[53,3],[53,1],[6,0],[6,2],[20,0],[20,1],[23,0],[23,1],[37,0],[37,1],[38,0],[38,1],[39,0],[39,2],[40,0],[40,1],[48,1],[48,2]],performAction:function(a,b,c,d,e,f){var g=f.length-1;switch(e){case 1:return d.prepareProgram(f[g-1].statements,!0),f[g-1];case 2:this.$=new d.ProgramNode(d.prepareProgram(f[g]),{},this._$);break;case 3:this.$=f[g];break;case 4:this.$=f[g];break;case 5:this.$=f[g];break;case 6:this.$=f[g];break;case 7:this.$=new d.ContentNode(f[g],this._$);break;case 8:this.$=new d.CommentNode(f[g],this._$);break;case 9:this.$=new d.RawBlockNode(f[g-2],f[g-1],f[g],this._$);break;case 10:this.$=new d.MustacheNode(f[g-1],null,"","",this._$);break;case 11:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!1,this._$);break;case 12:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!0,this._$);break;case 13:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 14:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 15:this.$={strip:d.stripFlags(f[g-1],f[g-1]),program:f[g]};break;case 16:this.$={path:f[g-1],strip:d.stripFlags(f[g-2],f[g])};break;case 17:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 18:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 19:this.$=new d.PartialNode(f[g-3],f[g-2],f[g-1],d.stripFlags(f[g-4],f[g]),this._$);break;case 20:this.$=new d.PartialNode(f[g-2],void 0,f[g-1],d.stripFlags(f[g-3],f[g]),this._$);break;case 21:this.$=new d.SexprNode([f[g-2]].concat(f[g-1]),f[g],this._$);break;case 22:this.$=new d.SexprNode([f[g]],null,this._$);break;case 23:this.$=f[g];break;case 24:this.$=new d.StringNode(f[g],this._$);break;case 25:this.$=new d.NumberNode(f[g],this._$);break;case 26:this.$=new d.BooleanNode(f[g],this._$);break;case 27:this.$=f[g];break;case 28:f[g-1].isHelper=!0,this.$=f[g-1];break;case 29:this.$=new d.HashNode(f[g],this._$);break;case 30:this.$=[f[g-2],f[g]];break;case 31:this.$=new d.PartialNameNode(f[g],this._$);break;case 32:this.$=new d.PartialNameNode(new d.StringNode(f[g],this._$),this._$);break;case 33:this.$=new d.PartialNameNode(new d.NumberNode(f[g],this._$));break;case 34:this.$=new d.DataNode(f[g],this._$);break;case 35:this.$=new d.IdNode(f[g],this._$);break;case 36:f[g-2].push({part:f[g],separator:f[g-1]}),this.$=f[g-2];break;case 37:this.$=[{part:f[g]}];break;case 38:this.$=[];break;case 39:f[g-1].push(f[g]);break;case 48:this.$=[];break;case 49:f[g-1].push(f[g]);break;case 52:this.$=[f[g]];break;case 53:f[g-1].push(f[g])}},table:[{3:1,4:2,5:[2,38],6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],31:[2,38],32:[2,38],34:[2,38]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:[1,10],13:[1,11],14:16,16:[1,20],19:14,22:15,24:[1,18],26:[1,19],28:[2,2],29:[2,2],31:[1,12],32:[1,13],34:[1,17]},{1:[2,1]},{5:[2,39],12:[2,39],13:[2,39],16:[2,39],24:[2,39],26:[2,39],28:[2,39],29:[2,39],31:[2,39],32:[2,39],34:[2,39]},{5:[2,3],12:[2,3],13:[2,3],16:[2,3],24:[2,3],26:[2,3],28:[2,3],29:[2,3],31:[2,3],32:[2,3],34:[2,3]},{5:[2,4],12:[2,4],13:[2,4],16:[2,4],24:[2,4],26:[2,4],28:[2,4],29:[2,4],31:[2,4],32:[2,4],34:[2,4]},{5:[2,5],12:[2,5],13:[2,5],16:[2,5],24:[2,5],26:[2,5],28:[2,5],29:[2,5],31:[2,5],32:[2,5],34:[2,5]},{5:[2,6],12:[2,6],13:[2,6],16:[2,6],24:[2,6],26:[2,6],28:[2,6],29:[2,6],31:[2,6],32:[2,6],34:[2,6]},{5:[2,7],12:[2,7],13:[2,7],16:[2,7],24:[2,7],26:[2,7],28:[2,7],29:[2,7],31:[2,7],32:[2,7],34:[2,7]},{5:[2,8],12:[2,8],13:[2,8],16:[2,8],24:[2,8],26:[2,8],28:[2,8],29:[2,8],31:[2,8],32:[2,8],34:[2,8]},{17:21,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:27,30:22,41:23,50:[1,26],52:[1,25],53:24},{4:28,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{4:29,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{12:[1,30]},{30:32,35:31,42:[1,33],43:[1,34],50:[1,26],53:24},{17:35,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:36,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:37,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[1,38]},{18:[2,48],25:[2,48],33:[2,48],39:39,42:[2,48],43:[2,48],44:[2,48],45:[2,48],46:[2,48],50:[2,48],52:[2,48]},{18:[2,22],25:[2,22],33:[2,22],46:[2,22]},{18:[2,35],25:[2,35],33:[2,35],42:[2,35],43:[2,35],44:[2,35],45:[2,35],46:[2,35],50:[2,35],52:[2,35],54:[1,40]},{30:41,50:[1,26],53:24},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],52:[2,37],54:[2,37]},{33:[1,42]},{20:43,27:44,28:[1,45],29:[2,40]},{23:46,27:47,28:[1,45],29:[2,42]},{15:[1,48]},{25:[2,46],30:51,36:49,38:50,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],47:57,48:58,49:60,50:[1,59],52:[1,25],53:24},{25:[2,31],42:[2,31],43:[2,31],44:[2,31],45:[2,31],50:[2,31],52:[2,31]},{25:[2,32],42:[2,32],43:[2,32],44:[2,32],45:[2,32],50:[2,32],52:[2,32]},{25:[2,33],42:[2,33],43:[2,33],44:[2,33],45:[2,33],50:[2,33],52:[2,33]},{25:[1,61]},{25:[1,62]},{18:[1,63]},{5:[2,17],12:[2,17],13:[2,17],16:[2,17],24:[2,17],26:[2,17],28:[2,17],29:[2,17],31:[2,17],32:[2,17],34:[2,17]},{18:[2,50],25:[2,50],30:51,33:[2,50],36:65,40:64,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],46:[2,50],47:66,48:58,49:60,50:[1,59],52:[1,25],53:24},{50:[1,67]},{18:[2,34],25:[2,34],33:[2,34],42:[2,34],43:[2,34],44:[2,34],45:[2,34],46:[2,34],50:[2,34],52:[2,34]},{5:[2,18],12:[2,18],13:[2,18],16:[2,18],24:[2,18],26:[2,18],28:[2,18],29:[2,18],31:[2,18],32:[2,18],34:[2,18]},{21:68,29:[1,69]},{29:[2,41]},{4:70,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{21:71,29:[1,69]},{29:[2,43]},{5:[2,9],12:[2,9],13:[2,9],16:[2,9],24:[2,9],26:[2,9],28:[2,9],29:[2,9],31:[2,9],32:[2,9],34:[2,9]},{25:[2,44],37:72,47:73,48:58,49:60,50:[1,74]},{25:[1,75]},{18:[2,23],25:[2,23],33:[2,23],42:[2,23],43:[2,23],44:[2,23],45:[2,23],46:[2,23],50:[2,23],52:[2,23]},{18:[2,24],25:[2,24],33:[2,24],42:[2,24],43:[2,24],44:[2,24],45:[2,24],46:[2,24],50:[2,24],52:[2,24]},{18:[2,25],25:[2,25],33:[2,25],42:[2,25],43:[2,25],44:[2,25],45:[2,25],46:[2,25],50:[2,25],52:[2,25]},{18:[2,26],25:[2,26],33:[2,26],42:[2,26],43:[2,26],44:[2,26],45:[2,26],46:[2,26],50:[2,26],52:[2,26]},{18:[2,27],25:[2,27],33:[2,27],42:[2,27],43:[2,27],44:[2,27],45:[2,27],46:[2,27],50:[2,27],52:[2,27]},{17:76,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[2,47]},{18:[2,29],25:[2,29],33:[2,29],46:[2,29],49:77,50:[1,74]},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],51:[1,78],52:[2,37],54:[2,37]},{18:[2,52],25:[2,52],33:[2,52],46:[2,52],50:[2,52]},{12:[2,13],13:[2,13],16:[2,13],24:[2,13],26:[2,13],28:[2,13],29:[2,13],31:[2,13],32:[2,13],34:[2,13]},{12:[2,14],13:[2,14],16:[2,14],24:[2,14],26:[2,14],28:[2,14],29:[2,14],31:[2,14],32:[2,14],34:[2,14]},{12:[2,10]},{18:[2,21],25:[2,21],33:[2,21],46:[2,21]},{18:[2,49],25:[2,49],33:[2,49],42:[2,49],43:[2,49],44:[2,49],45:[2,49],46:[2,49],50:[2,49],52:[2,49]},{18:[2,51],25:[2,51],33:[2,51],46:[2,51]},{18:[2,36],25:[2,36],33:[2,36],42:[2,36],43:[2,36],44:[2,36],45:[2,36],46:[2,36],50:[2,36],52:[2,36],54:[2,36]},{5:[2,11],12:[2,11],13:[2,11],16:[2,11],24:[2,11],26:[2,11],28:[2,11],29:[2,11],31:[2,11],32:[2,11],34:[2,11]},{30:79,50:[1,26],53:24},{29:[2,15]},{5:[2,12],12:[2,12],13:[2,12],16:[2,12],24:[2,12],26:[2,12],28:[2,12],29:[2,12],31:[2,12],32:[2,12],34:[2,12]},{25:[1,80]},{25:[2,45]},{51:[1,78]},{5:[2,20],12:[2,20],13:[2,20],16:[2,20],24:[2,20],26:[2,20],28:[2,20],29:[2,20],31:[2,20],32:[2,20],34:[2,20]},{46:[1,81]},{18:[2,53],25:[2,53],33:[2,53],46:[2,53],50:[2,53]},{30:51,36:82,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],50:[1,26],52:[1,25],53:24},{25:[1,83]},{5:[2,19],12:[2,19],13:[2,19],16:[2,19],24:[2,19],26:[2,19],28:[2,19],29:[2,19],31:[2,19],32:[2,19],34:[2,19]},{18:[2,28],25:[2,28],33:[2,28],42:[2,28],43:[2,28],44:[2,28],45:[2,28],46:[2,28],50:[2,28],52:[2,28]},{18:[2,30],25:[2,30],33:[2,30],46:[2,30],50:[2,30]},{5:[2,16],12:[2,16],13:[2,16],16:[2,16],24:[2,16],26:[2,16],28:[2,16],29:[2,16],31:[2,16],32:[2,16],34:[2,16]}],defaultActions:{4:[2,1],44:[2,41],47:[2,43],57:[2,47],63:[2,10],70:[2,15],73:[2,45]},parseError:function(a){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 12;break;case 1:return 12;case 2:return this.popState(),12;case 3:return b.yytext=b.yytext.substr(5,b.yyleng-9),this.popState(),15;case 4:return 12;case 5:return e(0,4),this.popState(),13;case 6:return 45;case 7:return 46;case 8:return 16;case 9:return this.popState(),this.begin("raw"),18;case 10:return 34;case 11:return 24;case 12:return 29;case 13:return this.popState(),28;case 14:return this.popState(),28;case 15:return 26;case 16:return 26;case 17:return 32;case 18:return 31;case 19:this.popState(),this.begin("com");break;case 20:return e(3,5),this.popState(),13;case 21:return 31;case 22:return 51;case 23:return 50;case 24:return 50;case 25:return 54;case 26:break;case 27:return this.popState(),33;case 28:return this.popState(),25;case 29:return b.yytext=e(1,2).replace(/\\"/g,'"'),42;case 30:return b.yytext=e(1,2).replace(/\\'/g,"'"),42;case 31:return 52;case 32:return 44;case 33:return 44;case 34:return 43;case 35:return 50;case 36:return b.yytext=e(1,2),50;case 37:return"INVALID";case 38:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[5],inclusive:!1},raw:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,38],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();return a=b}(),i=function(a){"use strict";function b(a,b){return{left:"~"===a.charAt(2),right:"~"===b.charAt(b.length-3)}}function c(a,b,c,d,i,k){if(a.sexpr.id.original!==d.path.original)throw new j(a.sexpr.id.original+" doesn't match "+d.path.original,a);var l=c&&c.program,m={left:a.strip.left,right:d.strip.right,openStandalone:f(b.statements),closeStandalone:e((l||b).statements)};if(a.strip.right&&g(b.statements,null,!0),l){var n=c.strip;n.left&&h(b.statements,null,!0),n.right&&g(l.statements,null,!0),d.strip.left&&h(l.statements,null,!0),e(b.statements)&&f(l.statements)&&(h(b.statements),g(l.statements))}else d.strip.left&&h(b.statements,null,!0);return i?new this.BlockNode(a,l,b,m,k):new this.BlockNode(a,b,l,m,k)}function d(a,b){for(var c=0,d=a.length;d>c;c++){var i=a[c],j=i.strip;if(j){var k=e(a,c,b,"partial"===i.type),l=f(a,c,b),m=j.openStandalone&&k,n=j.closeStandalone&&l,o=j.inlineStandalone&&k&&l;j.right&&g(a,c,!0),j.left&&h(a,c,!0),o&&(g(a,c),h(a,c)&&"partial"===i.type&&(i.indent=/([ \t]+$)/.exec(a[c-1].original)?RegExp.$1:"")),m&&(g((i.program||i.inverse).statements),h(a,c)),n&&(g(a,c),h((i.inverse||i.program).statements))}}return a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"content"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"content"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"content"===d.type&&(c||!d.rightStripped)){var e=d.string;d.string=d.string.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.string!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"content"===d.type&&(c||!d.leftStripped)){var e=d.string;return d.string=d.string.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.string!==e,d.leftStripped}}var i={},j=a;return i.stripFlags=b,i.prepareBlock=c,i.prepareProgram=d,i}(c),j=function(a,b,c,d){"use strict";function e(a){return a.constructor===h.ProgramNode?a:(g.yy=k,g.parse(a))}var f={},g=a,h=b,i=c,j=d.extend;f.parser=g;var k={};return j(k,i,h),f.parse=e,f}(h,g,i,b),k=function(a,b){"use strict";function c(){}function d(a,b,c){if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function e(a,b,c){function d(){var d=c.parse(a),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var e,f=function(a,b){return e||(e=d()),e.call(this,a,b)};return f._setup=function(a){return e||(e=d()),e._setup(a)},f._child=function(a,b,c){return e||(e=d()),e._child(a,b,c)},f}function f(a,b){if(a===b)return!0;if(i(a)&&i(b)&&a.length===b.length){for(var c=0;cc;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!f(d.args,e.args))return!1}for(b=this.children.length,c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds;var c=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.accept(a)},accept:function(a){return this[a.type](a)},program:function(a){for(var b=a.statements,c=0,d=b.length;d>c;c++)this.accept(b[c]);return this.isSimple=1===d,this.depths.list=this.depths.list.sort(function(a,b){return a-b}),this},compileProgram:function(a){var b,c=(new this.compiler).compile(a,this.options),d=this.guid++; -this.usePartial=this.usePartial||c.usePartial,this.children[d]=c;for(var e=0,f=c.depths.list.length;f>e;e++)b=c.depths.list[e],2>b||this.addDepth(b-1);return d},block:function(a){var b=a.mustache,c=a.program,d=a.inverse;c&&(c=this.compileProgram(c)),d&&(d=this.compileProgram(d));var e=b.sexpr,f=this.classifySexpr(e);"helper"===f?this.helperSexpr(e,c,d):"simple"===f?(this.simpleSexpr(e),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("blockValue",e.id.original)):(this.ambiguousSexpr(e,c,d),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(a){var b,c,d=a.pairs;for(this.opcode("pushHash"),b=0,c=d.length;c>b;b++)this.pushParam(d[b][1]);for(;b--;)this.opcode("assignToHash",d[b][0]);this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=!0,a.hash?this.accept(a.hash):this.opcode("push","undefined"),a.context?this.accept(a.context):(this.opcode("getContext",0),this.opcode("pushContext")),this.opcode("invokePartial",b.name,a.indent||""),this.opcode("append")},content:function(a){a.string&&this.opcode("appendContent",a.string)},mustache:function(a){this.sexpr(a.sexpr),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousSexpr:function(a,b,c){var d=a.id,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.ID(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.id;"DATA"===b.type?this.DATA(b):b.parts.length?this.ID(b):(this.addDepth(b.depth),this.opcode("getContext",b.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.id,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new h("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.falsy=!0,this.ID(e),this.opcode("invokeHelper",d.length,e.original,e.isSimple)}},sexpr:function(a){var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ID:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0];b?this.opcode("lookupOnContext",a.parts,a.falsy,a.isScoped):this.opcode("pushContext")},DATA:function(a){this.options.data=!0,this.opcode("lookupData",a.id.depth,a.id.parts)},STRING:function(a){this.opcode("pushString",a.string)},NUMBER:function(a){this.opcode("pushLiteral",a.number)},BOOLEAN:function(a){this.opcode("pushLiteral",a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,args:j.call(arguments,1)})},addDepth:function(a){0!==a&&(this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a)))},classifySexpr:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;if(c&&!b){var e=a.id.parts[0];d.knownHelpers[e]?b=!0:d.knownHelpersOnly&&(c=!1)}return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){this.stringParams?(a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",a.stringModeValue,a.type),"sexpr"===a.type&&this.sexpr(a)):(this.trackIds&&this.opcode("pushId",a.type,a.idName||a.stringModeValue),this.accept(a))},setupFullMustacheParams:function(a,b,c){var d=a.params;return this.pushParams(d),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.hash(a.hash):this.opcode("emptyHash"),d}},g.precompile=d,g.compile=e,g}(c,b),l=function(a,b){"use strict";function c(a){this.value=a}function d(){}var e,f=a.COMPILER_REVISION,g=a.REVISION_CHANGES,h=b;d.prototype={nameLookup:function(a,b){return d.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']"},depthedLookup:function(a){return this.aliases.lookup="this.lookup",'lookup(depths, "'+a+'")'},compilerInfo:function(){var a=f,b=g[a];return[a,b]},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.depths.list.length||this.options.compat;var e,f,g,i=a.opcodes;for(f=0,g=i.length;g>f;f++)e=i[f],this[e.opcode].apply(this,e.args);if(this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new h("Compile completed with content left on stack");var j=this.createFunctionContext(d);if(this.isChild)return j;var k={compiler:this.compilerInfo(),main:j},l=this.context.programs;for(f=0,g=l.length;g>f;f++)l[f]&&(k[f]=l[f]);return this.environment.usePartial&&(k.usePartial=!0),this.options.data&&(k.useData=!0),this.useDepths&&(k.useDepths=!0),this.options.compat&&(k.compat=!0),d||(k.compiler=JSON.stringify(k.compiler),k=this.objectLiteral(k)),k},preamble:function(){this.lastContext=0,this.source=[]},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));for(var d in this.aliases)this.aliases.hasOwnProperty(d)&&(b+=", "+d+"="+this.aliases[d]);var e=["depth0","helpers","partials","data"];this.useDepths&&e.push("depths");var f=this.mergeSource(b);return a?(e.push(f),Function.apply(this,e)):"function("+e.join(",")+") {\n "+f+"}"},mergeSource:function(a){for(var b,c,d="",e=!this.forceBuffer,f=0,g=this.source.length;g>f;f++){var h=this.source[f];h.appendToBuffer?b=b?b+"\n + "+h.content:h.content:(b&&(d?d+="buffer += "+b+";\n ":(c=!0,d=b+";\n "),b=void 0),d+=h+"\n ",this.environment.isSimple||(e=!1))}return e?(b||!d)&&(d+="return "+(b||'""')+";\n"):(a+=", buffer = "+(c?"":this.initializeBuffer()),d+=b?"return buffer + "+b+";\n":"return buffer;\n"),a&&(d="var "+a.substring(2)+(c?"":";\n ")+d),d},blockValue:function(a){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var b=[this.contextName(0)];this.setupParams(a,0,b);var c=this.popStack();b.splice(1,0,c),this.push("blockHelperMissing.call("+b.join(", ")+")")},ambiguousBlockValue:function(){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=[this.contextName(0)];this.setupParams("",0,a,!0),this.flushInline();var b=this.topStack();a.splice(1,0,b),this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a),this.pendingContent=a},append:function(){this.flushInline();var a=this.popStack();this.pushSource("if ("+a+" != null) { "+this.appendToBuffer(a)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c){var d=0,e=a.length;for(c||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[d++]));e>d;d++)this.replaceStack(function(c){var e=this.nameLookup(c,a[d],"context");return b?" && "+e:" != null ? "+e+" : "+c})},lookupData:function(a,b){a?this.pushStackLiteral("this.data(data, "+a+")"):this.pushStackLiteral("data");for(var c=b.length,d=0;c>d;d++)this.replaceStack(function(a){return" && "+this.nameLookup(a,b[d],"data")})},resolvePossibleLambda:function(){this.aliases.lambda="this.lambda",this.push("lambda("+this.popStack()+", "+this.contextName(0)+")")},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"sexpr"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(){this.pushStackLiteral("{}"),this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push("{"+a.ids.join(",")+"}"),this.stringParams&&(this.push("{"+a.contexts.join(",")+"}"),this.push("{"+a.types.join(",")+"}")),this.push("{\n "+a.values.join(",\n ")+"\n }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){return this.inlineStack.push(a),a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},invokeHelper:function(a,b,c){this.aliases.helperMissing="helpers.helperMissing";var d=this.popStack(),e=this.setupHelper(a,b),f=(c?e.name+" || ":"")+d+" || helperMissing";this.push("(("+f+").call("+e.callParams+"))")},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.aliases.functionType='"function"',this.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper");this.push("((helper = (helper = "+e+" || "+c+") != null ? helper : helperMissing"+(d.paramsInit?"),("+d.paramsInit:"")+"),(typeof helper === functionType ? helper.call("+d.callParams+") : helper))")},invokePartial:function(a,b){var c=[this.nameLookup("partials",a,"partial"),"'"+b+"'","'"+a+"'",this.popStack(),this.popStack(),"helpers","partials"];this.options.data?c.push("data"):this.options.compat&&c.push("undefined"),this.options.compat&&c.push("depths"),this.push("this.invokePartial("+c.join(", ")+")")},assignToHash:function(a){var b,c,d,e=this.popStack();this.trackIds&&(d=this.popStack()),this.stringParams&&(c=this.popStack(),b=this.popStack());var f=this.hash;b&&f.contexts.push("'"+a+"': "+b),c&&f.types.push("'"+a+"': "+c),d&&f.ids.push("'"+a+"': "+d),f.values.push("'"+a+"': ("+e+")")},pushId:function(a,b){"ID"===a||"DATA"===a?this.pushString(b):"sexpr"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:d,compileChildren:function(a,b){for(var c,d,e=a.children,f=0,g=e.length;g>f;f++){c=e[f],d=new this.compiler;var h=this.matchExistingProgram(c);null==h?(this.context.programs.push(""),h=this.context.programs.length,c.index=h,c.name="program"+h,this.context.programs[h]=d.compile(c,b,this.context,!this.precompile),this.context.environments[h]=c,this.useDepths=this.useDepths||d.useDepths):(c.index=h,c.name="program"+h)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=(b.depths.list,this.useDepths),d=[b.index,"data"];return c&&d.push("depths"),"this.program("+d.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new c(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();return this.pushSource(b+" = "+a+";"),this.compileStack.push(b),b},replaceStack:function(a){{var b,d,e,f="";this.isInline()}if(!this.isInline())throw new h("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof c)f=b=g.value,e=!0;else{d=!this.stackSlot;var i=d?this.incrStack():this.topStackName();f="("+this.push(i)+" = "+g+")",b=this.topStack()}var j=a.call(this,b);e||this.popStack(),d&&this.stackSlot--,this.push("("+f+j+")")},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,d=a.length;d>b;b++){var e=a[b];e instanceof c?this.compileStack.push(e):this.pushStack(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),d=(b?this.inlineStack:this.compileStack).pop();if(!a&&d instanceof c)return d.value;if(!b){if(!this.stackSlot)throw new h("Invalid stack pop");this.stackSlot--}return d},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof c?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(this.quotedString(c)+":"+a[c]);return"{"+b.join(",")+"}"},setupHelper:function(a,b,c){var d=[],e=this.setupParams(b,a,d,c),f=this.nameLookup("helpers",b,"helper");return{params:d,paramsInit:e,name:f,callParams:[this.contextName(0)].concat(d).join(", ")}},setupOptions:function(a,b,c){var d,e,f,g={},h=[],i=[],j=[];g.name=this.quotedString(a),g.hash=this.popStack(),this.trackIds&&(g.hashIds=this.popStack()),this.stringParams&&(g.hashTypes=this.popStack(),g.hashContexts=this.popStack()),e=this.popStack(),f=this.popStack(),(f||e)&&(f||(f="this.noop"),e||(e="this.noop"),g.fn=f,g.inverse=e);for(var k=b;k--;)d=this.popStack(),c[k]=d,this.trackIds&&(j[k]=this.popStack()),this.stringParams&&(i[k]=this.popStack(),h[k]=this.popStack());return this.trackIds&&(g.ids="["+j.join(",")+"]"),this.stringParams&&(g.types="["+i.join(",")+"]",g.contexts="["+h.join(",")+"]"),this.options.data&&(g.data="data"),g},setupParams:function(a,b,c,d){var e=this.objectLiteral(this.setupOptions(a,b,c));return d?(this.useRegister("options"),c.push("options"),"options="+e):(c.push(e),"")}};for(var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),j=d.RESERVED_WORDS={},k=0,l=i.length;l>k;k++)j[i[k]]=!0;return d.isValidJavaScriptVariableName=function(a){return!d.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},e=d}(d,c),m=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c.parser,j=c.parse,k=d.Compiler,l=d.compile,m=d.precompile,n=e,o=g.create,p=function(){var a=o();return a.compile=function(b,c){return l(b,c,a)},a.precompile=function(b,c){return m(b,c,a)},a.AST=h,a.Compiler=k,a.JavaScriptCompiler=n,a.Parser=i,a.parse=j,a};return g=p(),g.create=p,g["default"]=g,f=g}(f,g,j,k,l);return m}); \ No newline at end of file diff --git a/vendor/assets/components/swagger-ui/lib/highlight.7.3.pack.js b/vendor/assets/components/swagger-ui/lib/highlight.7.3.pack.js deleted file mode 100644 index 9a95a75..0000000 --- a/vendor/assets/components/swagger-ui/lib/highlight.7.3.pack.js +++ /dev/null @@ -1 +0,0 @@ -var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(//gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("")}while(o!=u.node);r.splice(q,1);while(q'+L[0]+""}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return''+r.value+""}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+=""}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"
      ")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs); \ No newline at end of file diff --git a/vendor/assets/components/swagger-ui/lib/underscore-min.js b/vendor/assets/components/swagger-ui/lib/underscore-min.js deleted file mode 100644 index 11f1d96..0000000 --- a/vendor/assets/components/swagger-ui/lib/underscore-min.js +++ /dev/null @@ -1,6 +0,0 @@ -// Underscore.js 1.7.0 -// http://underscorejs.org -// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. -(function(){var n=this,t=n._,r=Array.prototype,e=Object.prototype,u=Function.prototype,i=r.push,a=r.slice,o=r.concat,l=e.toString,c=e.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports._=h):n._=h,h.VERSION="1.7.0";var g=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}};h.iteratee=function(n,t,r){return null==n?h.identity:h.isFunction(n)?g(n,t,r):h.isObject(n)?h.matches(n):h.property(n)},h.each=h.forEach=function(n,t,r){if(null==n)return n;t=g(t,r);var e,u=n.length;if(u===+u)for(e=0;u>e;e++)t(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,t,r){if(null==n)return[];t=h.iteratee(t,r);for(var e,u=n.length!==+n.length&&h.keys(n),i=(u||n).length,a=Array(i),o=0;i>o;o++)e=u?u[o]:o,a[o]=t(n[e],e,n);return a};var v="Reduce of empty array with no initial value";h.reduce=h.foldl=h.inject=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length,o=0;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[o++]:o++]}for(;a>o;o++)u=i?i[o]:o,r=t(r,n[u],u,n);return r},h.reduceRight=h.foldr=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[--a]:--a]}for(;a--;)u=i?i[a]:a,r=t(r,n[u],u,n);return r},h.find=h.detect=function(n,t,r){var e;return t=h.iteratee(t,r),h.some(n,function(n,r,u){return t(n,r,u)?(e=n,!0):void 0}),e},h.filter=h.select=function(n,t,r){var e=[];return null==n?e:(t=h.iteratee(t,r),h.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e)},h.reject=function(n,t,r){return h.filter(n,h.negate(h.iteratee(t)),r)},h.every=h.all=function(n,t,r){if(null==n)return!0;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,!t(n[u],u,n))return!1;return!0},h.some=h.any=function(n,t,r){if(null==n)return!1;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,t(n[u],u,n))return!0;return!1},h.contains=h.include=function(n,t){return null==n?!1:(n.length!==+n.length&&(n=h.values(n)),h.indexOf(n,t)>=0)},h.invoke=function(n,t){var r=a.call(arguments,2),e=h.isFunction(t);return h.map(n,function(n){return(e?t:n[t]).apply(n,r)})},h.pluck=function(n,t){return h.map(n,h.property(t))},h.where=function(n,t){return h.filter(n,h.matches(t))},h.findWhere=function(n,t){return h.find(n,h.matches(t))},h.max=function(n,t,r){var e,u,i=-1/0,a=-1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],e>i&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(u>a||u===-1/0&&i===-1/0)&&(i=n,a=u)});return i},h.min=function(n,t,r){var e,u,i=1/0,a=1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],i>e&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(a>u||1/0===u&&1/0===i)&&(i=n,a=u)});return i},h.shuffle=function(n){for(var t,r=n&&n.length===+n.length?n:h.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=h.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},h.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=h.values(n)),n[h.random(n.length-1)]):h.shuffle(n).slice(0,Math.max(0,t))},h.sortBy=function(n,t,r){return t=h.iteratee(t,r),h.pluck(h.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var m=function(n){return function(t,r,e){var u={};return r=h.iteratee(r,e),h.each(t,function(e,i){var a=r(e,i,t);n(u,e,a)}),u}};h.groupBy=m(function(n,t,r){h.has(n,r)?n[r].push(t):n[r]=[t]}),h.indexBy=m(function(n,t,r){n[r]=t}),h.countBy=m(function(n,t,r){h.has(n,r)?n[r]++:n[r]=1}),h.sortedIndex=function(n,t,r,e){r=h.iteratee(r,e,1);for(var u=r(t),i=0,a=n.length;a>i;){var o=i+a>>>1;r(n[o])t?[]:a.call(n,0,t)},h.initial=function(n,t,r){return a.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},h.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:a.call(n,Math.max(n.length-t,0))},h.rest=h.tail=h.drop=function(n,t,r){return a.call(n,null==t||r?1:t)},h.compact=function(n){return h.filter(n,h.identity)};var y=function(n,t,r,e){if(t&&h.every(n,h.isArray))return o.apply(e,n);for(var u=0,a=n.length;a>u;u++){var l=n[u];h.isArray(l)||h.isArguments(l)?t?i.apply(e,l):y(l,t,r,e):r||e.push(l)}return e};h.flatten=function(n,t){return y(n,t,!1,[])},h.without=function(n){return h.difference(n,a.call(arguments,1))},h.uniq=h.unique=function(n,t,r,e){if(null==n)return[];h.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=h.iteratee(r,e));for(var u=[],i=[],a=0,o=n.length;o>a;a++){var l=n[a];if(t)a&&i===l||u.push(l),i=l;else if(r){var c=r(l,a,n);h.indexOf(i,c)<0&&(i.push(c),u.push(l))}else h.indexOf(u,l)<0&&u.push(l)}return u},h.union=function(){return h.uniq(y(arguments,!0,!0,[]))},h.intersection=function(n){if(null==n)return[];for(var t=[],r=arguments.length,e=0,u=n.length;u>e;e++){var i=n[e];if(!h.contains(t,i)){for(var a=1;r>a&&h.contains(arguments[a],i);a++);a===r&&t.push(i)}}return t},h.difference=function(n){var t=y(a.call(arguments,1),!0,!0,[]);return h.filter(n,function(n){return!h.contains(t,n)})},h.zip=function(n){if(null==n)return[];for(var t=h.max(arguments,"length").length,r=Array(t),e=0;t>e;e++)r[e]=h.pluck(arguments,e);return r},h.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},h.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=h.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}for(;u>e;e++)if(n[e]===t)return e;return-1},h.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},h.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var d=function(){};h.bind=function(n,t){var r,e;if(p&&n.bind===p)return p.apply(n,a.call(arguments,1));if(!h.isFunction(n))throw new TypeError("Bind must be called on a function");return r=a.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(a.call(arguments)));d.prototype=n.prototype;var u=new d;d.prototype=null;var i=n.apply(u,r.concat(a.call(arguments)));return h.isObject(i)?i:u}},h.partial=function(n){var t=a.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===h&&(e[u]=arguments[r++]);for(;r=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=h.bind(n[r],n);return n},h.memoize=function(n,t){var r=function(e){var u=r.cache,i=t?t.apply(this,arguments):e;return h.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},h.delay=function(n,t){var r=a.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},h.defer=function(n){return h.delay.apply(h,[n,1].concat(a.call(arguments,1)))},h.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var l=function(){o=r.leading===!1?0:h.now(),a=null,i=n.apply(e,u),a||(e=u=null)};return function(){var c=h.now();o||r.leading!==!1||(o=c);var f=t-(c-o);return e=this,u=arguments,0>=f||f>t?(clearTimeout(a),a=null,o=c,i=n.apply(e,u),a||(e=u=null)):a||r.trailing===!1||(a=setTimeout(l,f)),i}},h.debounce=function(n,t,r){var e,u,i,a,o,l=function(){var c=h.now()-a;t>c&&c>0?e=setTimeout(l,t-c):(e=null,r||(o=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,a=h.now();var c=r&&!e;return e||(e=setTimeout(l,t)),c&&(o=n.apply(i,u),i=u=null),o}},h.wrap=function(n,t){return h.partial(t,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},h.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},h.before=function(n,t){var r;return function(){return--n>0?r=t.apply(this,arguments):t=null,r}},h.once=h.partial(h.before,2),h.keys=function(n){if(!h.isObject(n))return[];if(s)return s(n);var t=[];for(var r in n)h.has(n,r)&&t.push(r);return t},h.values=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},h.pairs=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},h.invert=function(n){for(var t={},r=h.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},h.functions=h.methods=function(n){var t=[];for(var r in n)h.isFunction(n[r])&&t.push(r);return t.sort()},h.extend=function(n){if(!h.isObject(n))return n;for(var t,r,e=1,u=arguments.length;u>e;e++){t=arguments[e];for(r in t)c.call(t,r)&&(n[r]=t[r])}return n},h.pick=function(n,t,r){var e,u={};if(null==n)return u;if(h.isFunction(t)){t=g(t,r);for(e in n){var i=n[e];t(i,e,n)&&(u[e]=i)}}else{var l=o.apply([],a.call(arguments,1));n=new Object(n);for(var c=0,f=l.length;f>c;c++)e=l[c],e in n&&(u[e]=n[e])}return u},h.omit=function(n,t,r){if(h.isFunction(t))t=h.negate(t);else{var e=h.map(o.apply([],a.call(arguments,1)),String);t=function(n,t){return!h.contains(e,t)}}return h.pick(n,t,r)},h.defaults=function(n){if(!h.isObject(n))return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,t){return t(n),n};var b=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof h&&(n=n._wrapped),t instanceof h&&(t=t._wrapped);var u=l.call(n);if(u!==l.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]===n)return e[i]===t;var a=n.constructor,o=t.constructor;if(a!==o&&"constructor"in n&&"constructor"in t&&!(h.isFunction(a)&&a instanceof a&&h.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c,f;if("[object Array]"===u){if(c=n.length,f=c===t.length)for(;c--&&(f=b(n[c],t[c],r,e)););}else{var s,p=h.keys(n);if(c=p.length,f=h.keys(t).length===c)for(;c--&&(s=p[c],f=h.has(t,s)&&b(n[s],t[s],r,e)););}return r.pop(),e.pop(),f};h.isEqual=function(n,t){return b(n,t,[],[])},h.isEmpty=function(n){if(null==n)return!0;if(h.isArray(n)||h.isString(n)||h.isArguments(n))return 0===n.length;for(var t in n)if(h.has(n,t))return!1;return!0},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=f||function(n){return"[object Array]"===l.call(n)},h.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp"],function(n){h["is"+n]=function(t){return l.call(t)==="[object "+n+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return h.has(n,"callee")}),"function"!=typeof/./&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&n!==+n},h.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===l.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return n===void 0},h.has=function(n,t){return null!=n&&c.call(n,t)},h.noConflict=function(){return n._=t,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(n){return function(t){return t[n]}},h.matches=function(n){var t=h.pairs(n),r=t.length;return function(n){if(null==n)return!r;n=new Object(n);for(var e=0;r>e;e++){var u=t[e],i=u[0];if(u[1]!==n[i]||!(i in n))return!1}return!0}},h.times=function(n,t,r){var e=Array(Math.max(0,n));t=g(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},h.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var _={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},w=h.invert(_),j=function(n){var t=function(t){return n[t]},r="(?:"+h.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=j(_),h.unescape=j(w),h.result=function(n,t){if(null==n)return void 0;var r=n[t];return h.isFunction(r)?n[t]():r};var x=0;h.uniqueId=function(n){var t=++x+"";return n?n+t:t},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,k={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,F=function(n){return"\\"+k[n]};h.template=function(n,t,r){!t&&r&&(t=r),t=h.defaults({},t,h.templateSettings);var e=RegExp([(t.escape||A).source,(t.interpolate||A).source,(t.evaluate||A).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(O,F),u=o+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=new Function(t.variable||"obj","_",i)}catch(o){throw o.source=i,o}var l=function(n){return a.call(this,n,h)},c=t.variable||"obj";return l.source="function("+c+"){\n"+i+"}",l},h.chain=function(n){var t=h(n);return t._chain=!0,t};var E=function(n){return this._chain?h(n).chain():n};h.mixin=function(n){h.each(h.functions(n),function(t){var r=h[t]=n[t];h.prototype[t]=function(){var n=[this._wrapped];return i.apply(n,arguments),E.call(this,r.apply(h,n))}})},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=r[n];h.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],E.call(this,r)}}),h.each(["concat","join","slice"],function(n){var t=r[n];h.prototype[n]=function(){return E.call(this,t.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}).call(this); -//# sourceMappingURL=underscore-min.map \ No newline at end of file diff --git a/vendor/assets/components/swagger-ui/lib/underscore-min.map b/vendor/assets/components/swagger-ui/lib/underscore-min.map deleted file mode 100644 index b31e435..0000000 --- a/vendor/assets/components/swagger-ui/lib/underscore-min.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"underscore-min.js","sources":["underscore.js"],"names":["createReduce","dir","iterator","obj","iteratee","memo","keys","index","length","currentKey","context","optimizeCb","isArrayLike","_","arguments","createIndexFinder","array","predicate","cb","collectNonEnumProps","nonEnumIdx","nonEnumerableProps","constructor","proto","isFunction","prototype","ObjProto","prop","has","contains","push","root","this","previousUnderscore","ArrayProto","Array","Object","FuncProto","Function","slice","toString","hasOwnProperty","nativeIsArray","isArray","nativeKeys","nativeBind","bind","nativeCreate","create","Ctor","_wrapped","exports","module","VERSION","func","argCount","value","call","other","collection","accumulator","apply","identity","isObject","matcher","property","Infinity","createAssigner","keysFunc","undefinedOnly","source","l","i","key","baseCreate","result","MAX_ARRAY_INDEX","Math","pow","each","forEach","map","collect","results","reduce","foldl","inject","reduceRight","foldr","find","detect","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","includes","include","target","fromIndex","values","indexOf","invoke","method","args","isFunc","pluck","where","attrs","findWhere","max","computed","lastComputed","min","shuffle","rand","set","shuffled","random","sample","n","guard","sortBy","criteria","sort","left","right","a","b","group","behavior","groupBy","indexBy","countBy","toArray","size","partition","pass","fail","first","head","take","initial","last","rest","tail","drop","compact","flatten","input","shallow","strict","startIndex","output","idx","isArguments","j","len","without","difference","uniq","unique","isSorted","isBoolean","seen","union","intersection","argsLength","item","zip","unzip","object","sortedIndex","isNaN","lastIndexOf","from","findLastIndex","low","high","mid","floor","range","start","stop","step","ceil","executeBound","sourceFunc","boundFunc","callingContext","self","TypeError","bound","concat","partial","boundArgs","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","remaining","clearTimeout","trailing","debounce","immediate","timestamp","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","allKeys","mapObject","pairs","invert","functions","methods","names","extend","extendOwn","assign","pick","oiteratee","omit","String","defaults","clone","tap","interceptor","isMatch","eq","aStack","bStack","className","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isString","isElement","nodeType","type","name","Int8Array","isFinite","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","&","<",">","\"","'","`","unescapeMap","createEscaper","escaper","match","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","
","
","escapeChar","template","text","settings","oldSettings","offset","variable","render","e","data","argument","chain","instance","_chain","mixin","valueOf","toJSON","define","amd"],"mappings":";;;;CAKC,WAoKC,QAASA,GAAaC,GAGpB,QAASC,GAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,GAClD,KAAOD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAAK,CACjD,GAAIQ,GAAaH,EAAOA,EAAKC,GAASA,CACtCF,GAAOD,EAASC,EAAMF,EAAIM,GAAaA,EAAYN,GAErD,MAAOE,GAGT,MAAO,UAASF,EAAKC,EAAUC,EAAMK,GACnCN,EAAWO,EAAWP,EAAUM,EAAS,EACzC,IAAIJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvBD,EAAQN,EAAM,EAAI,EAAIO,EAAS,CAMnC,OAJIM,WAAUN,OAAS,IACrBH,EAAOF,EAAIG,EAAOA,EAAKC,GAASA,GAChCA,GAASN,GAEJC,EAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,IA+btD,QAASO,GAAkBd,GACzB,MAAO,UAASe,EAAOC,EAAWP,GAChCO,EAAYC,EAAGD,EAAWP,EAG1B,KAFA,GAAIF,GAAkB,MAATQ,GAAiBA,EAAMR,OAChCD,EAAQN,EAAM,EAAI,EAAIO,EAAS,EAC5BD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAC5C,GAAIgB,EAAUD,EAAMT,GAAQA,EAAOS,GAAQ,MAAOT,EAEpD,QAAQ,GAgQZ,QAASY,GAAoBhB,EAAKG,GAChC,GAAIc,GAAaC,EAAmBb,OAChCc,EAAcnB,EAAImB,YAClBC,EAASV,EAAEW,WAAWF,IAAgBA,EAAYG,WAAcC,EAGhEC,EAAO,aAGX,KAFId,EAAEe,IAAIzB,EAAKwB,KAAUd,EAAEgB,SAASvB,EAAMqB,IAAOrB,EAAKwB,KAAKH,GAEpDP,KACLO,EAAON,EAAmBD,GACtBO,IAAQxB,IAAOA,EAAIwB,KAAUJ,EAAMI,KAAUd,EAAEgB,SAASvB,EAAMqB,IAChErB,EAAKwB,KAAKH,GAt4BhB,GAAII,GAAOC,KAGPC,EAAqBF,EAAKlB,EAG1BqB,EAAaC,MAAMV,UAAWC,EAAWU,OAAOX,UAAWY,EAAYC,SAASb,UAIlFK,EAAmBI,EAAWJ,KAC9BS,EAAmBL,EAAWK,MAC9BC,EAAmBd,EAASc,SAC5BC,EAAmBf,EAASe,eAK5BC,EAAqBP,MAAMQ,QAC3BC,EAAqBR,OAAO9B,KAC5BuC,EAAqBR,EAAUS,KAC/BC,EAAqBX,OAAOY,OAG1BC,EAAO,aAGPpC,EAAI,SAASV,GACf,MAAIA,aAAeU,GAAUV,EACvB6B,eAAgBnB,QACtBmB,KAAKkB,SAAW/C,GADiB,GAAIU,GAAEV,GAOlB,oBAAZgD,UACa,mBAAXC,SAA0BA,OAAOD,UAC1CA,QAAUC,OAAOD,QAAUtC,GAE7BsC,QAAQtC,EAAIA,GAEZkB,EAAKlB,EAAIA,EAIXA,EAAEwC,QAAU,OAKZ,IAAI1C,GAAa,SAAS2C,EAAM5C,EAAS6C,GACvC,GAAI7C,QAAiB,GAAG,MAAO4C,EAC/B,QAAoB,MAAZC,EAAmB,EAAIA,GAC7B,IAAK,GAAG,MAAO,UAASC,GACtB,MAAOF,GAAKG,KAAK/C,EAAS8C,GAE5B,KAAK,GAAG,MAAO,UAASA,EAAOE,GAC7B,MAAOJ,GAAKG,KAAK/C,EAAS8C,EAAOE,GAEnC,KAAK,GAAG,MAAO,UAASF,EAAOjD,EAAOoD,GACpC,MAAOL,GAAKG,KAAK/C,EAAS8C,EAAOjD,EAAOoD,GAE1C,KAAK,GAAG,MAAO,UAASC,EAAaJ,EAAOjD,EAAOoD,GACjD,MAAOL,GAAKG,KAAK/C,EAASkD,EAAaJ,EAAOjD,EAAOoD,IAGzD,MAAO,YACL,MAAOL,GAAKO,MAAMnD,EAASI,aAO3BI,EAAK,SAASsC,EAAO9C,EAAS6C,GAChC,MAAa,OAATC,EAAsB3C,EAAEiD,SACxBjD,EAAEW,WAAWgC,GAAe7C,EAAW6C,EAAO9C,EAAS6C,GACvD1C,EAAEkD,SAASP,GAAe3C,EAAEmD,QAAQR,GACjC3C,EAAEoD,SAAST,GAEpB3C,GAAET,SAAW,SAASoD,EAAO9C,GAC3B,MAAOQ,GAAGsC,EAAO9C,EAASwD,KAI5B,IAAIC,GAAiB,SAASC,EAAUC,GACtC,MAAO,UAASlE,GACd,GAAIK,GAASM,UAAUN,MACvB,IAAa,EAATA,GAAqB,MAAPL,EAAa,MAAOA,EACtC,KAAK,GAAII,GAAQ,EAAWC,EAARD,EAAgBA,IAIlC,IAAK,GAHD+D,GAASxD,UAAUP,GACnBD,EAAO8D,EAASE,GAChBC,EAAIjE,EAAKE,OACJgE,EAAI,EAAOD,EAAJC,EAAOA,IAAK,CAC1B,GAAIC,GAAMnE,EAAKkE,EACVH,IAAiBlE,EAAIsE,SAAc,KAAGtE,EAAIsE,GAAOH,EAAOG,IAGjE,MAAOtE,KAKPuE,EAAa,SAASjD,GACxB,IAAKZ,EAAEkD,SAAStC,GAAY,QAC5B,IAAIsB,EAAc,MAAOA,GAAatB,EACtCwB,GAAKxB,UAAYA,CACjB,IAAIkD,GAAS,GAAI1B,EAEjB,OADAA,GAAKxB,UAAY,KACVkD,GAMLC,EAAkBC,KAAKC,IAAI,EAAG,IAAM,EACpClE,EAAc,SAAS+C,GACzB,GAAInD,GAASmD,GAAcA,EAAWnD,MACtC,OAAwB,gBAAVA,IAAsBA,GAAU,GAAeoE,GAAVpE,EASrDK,GAAEkE,KAAOlE,EAAEmE,QAAU,SAAS7E,EAAKC,EAAUM,GAC3CN,EAAWO,EAAWP,EAAUM,EAChC,IAAI8D,GAAGhE,CACP,IAAII,EAAYT,GACd,IAAKqE,EAAI,EAAGhE,EAASL,EAAIK,OAAYA,EAAJgE,EAAYA,IAC3CpE,EAASD,EAAIqE,GAAIA,EAAGrE,OAEjB,CACL,GAAIG,GAAOO,EAAEP,KAAKH,EAClB,KAAKqE,EAAI,EAAGhE,EAASF,EAAKE,OAAYA,EAAJgE,EAAYA,IAC5CpE,EAASD,EAAIG,EAAKkE,IAAKlE,EAAKkE,GAAIrE,GAGpC,MAAOA,IAITU,EAAEoE,IAAMpE,EAAEqE,QAAU,SAAS/E,EAAKC,EAAUM,GAC1CN,EAAWc,EAAGd,EAAUM,EAIxB,KAAK,GAHDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvB2E,EAAUhD,MAAM3B,GACXD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC4E,GAAQ5E,GAASH,EAASD,EAAIM,GAAaA,EAAYN,GAEzD,MAAOgF,IA+BTtE,EAAEuE,OAASvE,EAAEwE,MAAQxE,EAAEyE,OAAStF,EAAa,GAG7Ca,EAAE0E,YAAc1E,EAAE2E,MAAQxF,GAAc,GAGxCa,EAAE4E,KAAO5E,EAAE6E,OAAS,SAASvF,EAAKc,EAAWP,GAC3C,GAAI+D,EAMJ,OAJEA,GADE7D,EAAYT,GACRU,EAAE8E,UAAUxF,EAAKc,EAAWP,GAE5BG,EAAE+E,QAAQzF,EAAKc,EAAWP,GAE9B+D,QAAa,IAAKA,KAAS,EAAUtE,EAAIsE,GAA7C,QAKF5D,EAAEgF,OAAShF,EAAEiF,OAAS,SAAS3F,EAAKc,EAAWP,GAC7C,GAAIyE,KAKJ,OAJAlE,GAAYC,EAAGD,EAAWP,GAC1BG,EAAEkE,KAAK5E,EAAK,SAASqD,EAAOjD,EAAOwF,GAC7B9E,EAAUuC,EAAOjD,EAAOwF,IAAOZ,EAAQrD,KAAK0B,KAE3C2B,GAITtE,EAAEmF,OAAS,SAAS7F,EAAKc,EAAWP,GAClC,MAAOG,GAAEgF,OAAO1F,EAAKU,EAAEoF,OAAO/E,EAAGD,IAAaP,IAKhDG,EAAEqF,MAAQrF,EAAEsF,IAAM,SAAShG,EAAKc,EAAWP,GACzCO,EAAYC,EAAGD,EAAWP,EAG1B,KAAK,GAFDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OAClBD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC,KAAKU,EAAUd,EAAIM,GAAaA,EAAYN,GAAM,OAAO,EAE3D,OAAO,GAKTU,EAAEuF,KAAOvF,EAAEwF,IAAM,SAASlG,EAAKc,EAAWP,GACxCO,EAAYC,EAAGD,EAAWP,EAG1B,KAAK,GAFDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OAClBD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC,IAAIU,EAAUd,EAAIM,GAAaA,EAAYN,GAAM,OAAO,EAE1D,OAAO,GAKTU,EAAEgB,SAAWhB,EAAEyF,SAAWzF,EAAE0F,QAAU,SAASpG,EAAKqG,EAAQC,GAE1D,MADK7F,GAAYT,KAAMA,EAAMU,EAAE6F,OAAOvG,IAC/BU,EAAE8F,QAAQxG,EAAKqG,EAA4B,gBAAbC,IAAyBA,IAAc,GAI9E5F,EAAE+F,OAAS,SAASzG,EAAK0G,GACvB,GAAIC,GAAOvE,EAAMkB,KAAK3C,UAAW,GAC7BiG,EAASlG,EAAEW,WAAWqF,EAC1B,OAAOhG,GAAEoE,IAAI9E,EAAK,SAASqD,GACzB,GAAIF,GAAOyD,EAASF,EAASrD,EAAMqD,EACnC,OAAe,OAARvD,EAAeA,EAAOA,EAAKO,MAAML,EAAOsD,MAKnDjG,EAAEmG,MAAQ,SAAS7G,EAAKsE,GACtB,MAAO5D,GAAEoE,IAAI9E,EAAKU,EAAEoD,SAASQ,KAK/B5D,EAAEoG,MAAQ,SAAS9G,EAAK+G,GACtB,MAAOrG,GAAEgF,OAAO1F,EAAKU,EAAEmD,QAAQkD,KAKjCrG,EAAEsG,UAAY,SAAShH,EAAK+G,GAC1B,MAAOrG,GAAE4E,KAAKtF,EAAKU,EAAEmD,QAAQkD,KAI/BrG,EAAEuG,IAAM,SAASjH,EAAKC,EAAUM,GAC9B,GACI8C,GAAO6D,EADP1C,GAAUT,IAAUoD,GAAgBpD,GAExC,IAAgB,MAAZ9D,GAA2B,MAAPD,EAAa,CACnCA,EAAMS,EAAYT,GAAOA,EAAMU,EAAE6F,OAAOvG,EACxC,KAAK,GAAIqE,GAAI,EAAGhE,EAASL,EAAIK,OAAYA,EAAJgE,EAAYA,IAC/ChB,EAAQrD,EAAIqE,GACRhB,EAAQmB,IACVA,EAASnB,OAIbpD,GAAWc,EAAGd,EAAUM,GACxBG,EAAEkE,KAAK5E,EAAK,SAASqD,EAAOjD,EAAOwF,GACjCsB,EAAWjH,EAASoD,EAAOjD,EAAOwF,IAC9BsB,EAAWC,GAAgBD,KAAcnD,KAAYS,KAAYT,OACnES,EAASnB,EACT8D,EAAeD,IAIrB,OAAO1C,IAIT9D,EAAE0G,IAAM,SAASpH,EAAKC,EAAUM,GAC9B,GACI8C,GAAO6D,EADP1C,EAAST,IAAUoD,EAAepD,GAEtC,IAAgB,MAAZ9D,GAA2B,MAAPD,EAAa,CACnCA,EAAMS,EAAYT,GAAOA,EAAMU,EAAE6F,OAAOvG,EACxC,KAAK,GAAIqE,GAAI,EAAGhE,EAASL,EAAIK,OAAYA,EAAJgE,EAAYA,IAC/ChB,EAAQrD,EAAIqE,GACAG,EAARnB,IACFmB,EAASnB,OAIbpD,GAAWc,EAAGd,EAAUM,GACxBG,EAAEkE,KAAK5E,EAAK,SAASqD,EAAOjD,EAAOwF,GACjCsB,EAAWjH,EAASoD,EAAOjD,EAAOwF,IACnBuB,EAAXD,GAAwCnD,MAAbmD,GAAoCnD,MAAXS,KACtDA,EAASnB,EACT8D,EAAeD,IAIrB,OAAO1C,IAKT9D,EAAE2G,QAAU,SAASrH,GAInB,IAAK,GAAesH,GAHhBC,EAAM9G,EAAYT,GAAOA,EAAMU,EAAE6F,OAAOvG,GACxCK,EAASkH,EAAIlH,OACbmH,EAAWxF,MAAM3B,GACZD,EAAQ,EAAiBC,EAARD,EAAgBA,IACxCkH,EAAO5G,EAAE+G,OAAO,EAAGrH,GACfkH,IAASlH,IAAOoH,EAASpH,GAASoH,EAASF,IAC/CE,EAASF,GAAQC,EAAInH,EAEvB,OAAOoH,IAMT9G,EAAEgH,OAAS,SAAS1H,EAAK2H,EAAGC,GAC1B,MAAS,OAALD,GAAaC,GACVnH,EAAYT,KAAMA,EAAMU,EAAE6F,OAAOvG,IAC/BA,EAAIU,EAAE+G,OAAOzH,EAAIK,OAAS,KAE5BK,EAAE2G,QAAQrH,GAAKoC,MAAM,EAAGsC,KAAKuC,IAAI,EAAGU,KAI7CjH,EAAEmH,OAAS,SAAS7H,EAAKC,EAAUM,GAEjC,MADAN,GAAWc,EAAGd,EAAUM,GACjBG,EAAEmG,MAAMnG,EAAEoE,IAAI9E,EAAK,SAASqD,EAAOjD,EAAOwF,GAC/C,OACEvC,MAAOA,EACPjD,MAAOA,EACP0H,SAAU7H,EAASoD,EAAOjD,EAAOwF,MAElCmC,KAAK,SAASC,EAAMC,GACrB,GAAIC,GAAIF,EAAKF,SACTK,EAAIF,EAAMH,QACd,IAAII,IAAMC,EAAG,CACX,GAAID,EAAIC,GAAKD,QAAW,GAAG,MAAO,EAClC,IAAQC,EAAJD,GAASC,QAAW,GAAG,OAAQ,EAErC,MAAOH,GAAK5H,MAAQ6H,EAAM7H,QACxB,SAIN,IAAIgI,GAAQ,SAASC,GACnB,MAAO,UAASrI,EAAKC,EAAUM,GAC7B,GAAIiE,KAMJ,OALAvE,GAAWc,EAAGd,EAAUM,GACxBG,EAAEkE,KAAK5E,EAAK,SAASqD,EAAOjD,GAC1B,GAAIkE,GAAMrE,EAASoD,EAAOjD,EAAOJ,EACjCqI,GAAS7D,EAAQnB,EAAOiB,KAEnBE,GAMX9D,GAAE4H,QAAUF,EAAM,SAAS5D,EAAQnB,EAAOiB,GACpC5D,EAAEe,IAAI+C,EAAQF,GAAME,EAAOF,GAAK3C,KAAK0B,GAAamB,EAAOF,IAAQjB,KAKvE3C,EAAE6H,QAAUH,EAAM,SAAS5D,EAAQnB,EAAOiB,GACxCE,EAAOF,GAAOjB,IAMhB3C,EAAE8H,QAAUJ,EAAM,SAAS5D,EAAQnB,EAAOiB,GACpC5D,EAAEe,IAAI+C,EAAQF,GAAME,EAAOF,KAAaE,EAAOF,GAAO,IAI5D5D,EAAE+H,QAAU,SAASzI,GACnB,MAAKA,GACDU,EAAE8B,QAAQxC,GAAaoC,EAAMkB,KAAKtD,GAClCS,EAAYT,GAAaU,EAAEoE,IAAI9E,EAAKU,EAAEiD,UACnCjD,EAAE6F,OAAOvG,OAIlBU,EAAEgI,KAAO,SAAS1I,GAChB,MAAW,OAAPA,EAAoB,EACjBS,EAAYT,GAAOA,EAAIK,OAASK,EAAEP,KAAKH,GAAKK,QAKrDK,EAAEiI,UAAY,SAAS3I,EAAKc,EAAWP,GACrCO,EAAYC,EAAGD,EAAWP,EAC1B,IAAIqI,MAAWC,IAIf,OAHAnI,GAAEkE,KAAK5E,EAAK,SAASqD,EAAOiB,EAAKtE,IAC9Bc,EAAUuC,EAAOiB,EAAKtE,GAAO4I,EAAOC,GAAMlH,KAAK0B,MAE1CuF,EAAMC,IAShBnI,EAAEoI,MAAQpI,EAAEqI,KAAOrI,EAAEsI,KAAO,SAASnI,EAAO8G,EAAGC,GAC7C,MAAa,OAAT/G,MAA2B,GACtB,MAAL8G,GAAaC,EAAc/G,EAAM,GAC9BH,EAAEuI,QAAQpI,EAAOA,EAAMR,OAASsH,IAMzCjH,EAAEuI,QAAU,SAASpI,EAAO8G,EAAGC,GAC7B,MAAOxF,GAAMkB,KAAKzC,EAAO,EAAG6D,KAAKuC,IAAI,EAAGpG,EAAMR,QAAe,MAALsH,GAAaC,EAAQ,EAAID,MAKnFjH,EAAEwI,KAAO,SAASrI,EAAO8G,EAAGC,GAC1B,MAAa,OAAT/G,MAA2B,GACtB,MAAL8G,GAAaC,EAAc/G,EAAMA,EAAMR,OAAS,GAC7CK,EAAEyI,KAAKtI,EAAO6D,KAAKuC,IAAI,EAAGpG,EAAMR,OAASsH,KAMlDjH,EAAEyI,KAAOzI,EAAE0I,KAAO1I,EAAE2I,KAAO,SAASxI,EAAO8G,EAAGC,GAC5C,MAAOxF,GAAMkB,KAAKzC,EAAY,MAAL8G,GAAaC,EAAQ,EAAID,IAIpDjH,EAAE4I,QAAU,SAASzI,GACnB,MAAOH,GAAEgF,OAAO7E,EAAOH,EAAEiD,UAI3B,IAAI4F,GAAU,SAASC,EAAOC,EAASC,EAAQC,GAE7C,IAAK,GADDC,MAAaC,EAAM,EACdxF,EAAIsF,GAAc,EAAGtJ,EAASmJ,GAASA,EAAMnJ,OAAYA,EAAJgE,EAAYA,IAAK,CAC7E,GAAIhB,GAAQmG,EAAMnF,EAClB,IAAI5D,EAAY4C,KAAW3C,EAAE8B,QAAQa,IAAU3C,EAAEoJ,YAAYzG,IAAS,CAE/DoG,IAASpG,EAAQkG,EAAQlG,EAAOoG,EAASC,GAC9C,IAAIK,GAAI,EAAGC,EAAM3G,EAAMhD,MAEvB,KADAuJ,EAAOvJ,QAAU2J,EACNA,EAAJD,GACLH,EAAOC,KAASxG,EAAM0G,SAEdL,KACVE,EAAOC,KAASxG,GAGpB,MAAOuG,GAITlJ,GAAE6I,QAAU,SAAS1I,EAAO4I,GAC1B,MAAOF,GAAQ1I,EAAO4I,GAAS,IAIjC/I,EAAEuJ,QAAU,SAASpJ,GACnB,MAAOH,GAAEwJ,WAAWrJ,EAAOuB,EAAMkB,KAAK3C,UAAW,KAMnDD,EAAEyJ,KAAOzJ,EAAE0J,OAAS,SAASvJ,EAAOwJ,EAAUpK,EAAUM,GACtD,GAAa,MAATM,EAAe,QACdH,GAAE4J,UAAUD,KACf9J,EAAUN,EACVA,EAAWoK,EACXA,GAAW,GAEG,MAAZpK,IAAkBA,EAAWc,EAAGd,EAAUM,GAG9C,KAAK,GAFDiE,MACA+F,KACKlG,EAAI,EAAGhE,EAASQ,EAAMR,OAAYA,EAAJgE,EAAYA,IAAK,CACtD,GAAIhB,GAAQxC,EAAMwD,GACd6C,EAAWjH,EAAWA,EAASoD,EAAOgB,EAAGxD,GAASwC,CAClDgH,IACGhG,GAAKkG,IAASrD,GAAU1C,EAAO7C,KAAK0B,GACzCkH,EAAOrD,GACEjH,EACJS,EAAEgB,SAAS6I,EAAMrD,KACpBqD,EAAK5I,KAAKuF,GACV1C,EAAO7C,KAAK0B,IAEJ3C,EAAEgB,SAAS8C,EAAQnB,IAC7BmB,EAAO7C,KAAK0B,GAGhB,MAAOmB,IAKT9D,EAAE8J,MAAQ,WACR,MAAO9J,GAAEyJ,KAAKZ,EAAQ5I,WAAW,GAAM,KAKzCD,EAAE+J,aAAe,SAAS5J,GACxB,GAAa,MAATA,EAAe,QAGnB,KAAK,GAFD2D,MACAkG,EAAa/J,UAAUN,OAClBgE,EAAI,EAAGhE,EAASQ,EAAMR,OAAYA,EAAJgE,EAAYA,IAAK,CACtD,GAAIsG,GAAO9J,EAAMwD,EACjB,KAAI3D,EAAEgB,SAAS8C,EAAQmG,GAAvB,CACA,IAAK,GAAIZ,GAAI,EAAOW,EAAJX,GACTrJ,EAAEgB,SAASf,UAAUoJ,GAAIY,GADAZ,KAG5BA,IAAMW,GAAYlG,EAAO7C,KAAKgJ,IAEpC,MAAOnG,IAKT9D,EAAEwJ,WAAa,SAASrJ,GACtB,GAAIsI,GAAOI,EAAQ5I,WAAW,GAAM,EAAM,EAC1C,OAAOD,GAAEgF,OAAO7E,EAAO,SAASwC,GAC9B,OAAQ3C,EAAEgB,SAASyH,EAAM9F,MAM7B3C,EAAEkK,IAAM,WACN,MAAOlK,GAAEmK,MAAMlK,YAKjBD,EAAEmK,MAAQ,SAAShK,GAIjB,IAAK,GAHDR,GAASQ,GAASH,EAAEuG,IAAIpG,EAAO,UAAUR,QAAU,EACnDmE,EAASxC,MAAM3B,GAEVD,EAAQ,EAAWC,EAARD,EAAgBA,IAClCoE,EAAOpE,GAASM,EAAEmG,MAAMhG,EAAOT,EAEjC,OAAOoE,IAMT9D,EAAEoK,OAAS,SAASlF,EAAMW,GAExB,IAAK,GADD/B,MACKH,EAAI,EAAGhE,EAASuF,GAAQA,EAAKvF,OAAYA,EAAJgE,EAAYA,IACpDkC,EACF/B,EAAOoB,EAAKvB,IAAMkC,EAAOlC,GAEzBG,EAAOoB,EAAKvB,GAAG,IAAMuB,EAAKvB,GAAG,EAGjC,OAAOG,IAOT9D,EAAE8F,QAAU,SAAS3F,EAAO8J,EAAMN,GAChC,GAAIhG,GAAI,EAAGhE,EAASQ,GAASA,EAAMR,MACnC,IAAuB,gBAAZgK,GACThG,EAAe,EAAXgG,EAAe3F,KAAKuC,IAAI,EAAG5G,EAASgK,GAAYA,MAC/C,IAAIA,GAAYhK,EAErB,MADAgE,GAAI3D,EAAEqK,YAAYlK,EAAO8J,GAClB9J,EAAMwD,KAAOsG,EAAOtG,GAAK,CAElC,IAAIsG,IAASA,EACX,MAAOjK,GAAE8E,UAAUpD,EAAMkB,KAAKzC,EAAOwD,GAAI3D,EAAEsK,MAE7C,MAAW3K,EAAJgE,EAAYA,IAAK,GAAIxD,EAAMwD,KAAOsG,EAAM,MAAOtG,EACtD,QAAQ,GAGV3D,EAAEuK,YAAc,SAASpK,EAAO8J,EAAMO,GACpC,GAAIrB,GAAMhJ,EAAQA,EAAMR,OAAS,CAIjC,IAHmB,gBAAR6K,KACTrB,EAAa,EAAPqB,EAAWrB,EAAMqB,EAAO,EAAIxG,KAAK0C,IAAIyC,EAAKqB,EAAO,IAErDP,IAASA,EACX,MAAOjK,GAAEyK,cAAc/I,EAAMkB,KAAKzC,EAAO,EAAGgJ,GAAMnJ,EAAEsK,MAEtD,QAASnB,GAAO,GAAG,GAAIhJ,EAAMgJ,KAASc,EAAM,MAAOd,EACnD,QAAQ,GAiBVnJ,EAAE8E,UAAY5E,EAAkB,GAEhCF,EAAEyK,cAAgBvK,GAAmB,GAIrCF,EAAEqK,YAAc,SAASlK,EAAOb,EAAKC,EAAUM,GAC7CN,EAAWc,EAAGd,EAAUM,EAAS,EAGjC,KAFA,GAAI8C,GAAQpD,EAASD,GACjBoL,EAAM,EAAGC,EAAOxK,EAAMR,OACbgL,EAAND,GAAY,CACjB,GAAIE,GAAM5G,KAAK6G,OAAOH,EAAMC,GAAQ,EAChCpL,GAASY,EAAMyK,IAAQjI,EAAO+H,EAAME,EAAM,EAAQD,EAAOC,EAE/D,MAAOF,IAMT1K,EAAE8K,MAAQ,SAASC,EAAOC,EAAMC,GAC1BhL,UAAUN,QAAU,IACtBqL,EAAOD,GAAS,EAChBA,EAAQ,GAEVE,EAAOA,GAAQ,CAKf,KAAK,GAHDtL,GAASqE,KAAKuC,IAAIvC,KAAKkH,MAAMF,EAAOD,GAASE,GAAO,GACpDH,EAAQxJ,MAAM3B,GAETwJ,EAAM,EAASxJ,EAANwJ,EAAcA,IAAO4B,GAASE,EAC9CH,EAAM3B,GAAO4B,CAGf,OAAOD,GAQT,IAAIK,GAAe,SAASC,EAAYC,EAAWxL,EAASyL,EAAgBrF,GAC1E,KAAMqF,YAA0BD,IAAY,MAAOD,GAAWpI,MAAMnD,EAASoG,EAC7E,IAAIsF,GAAO1H,EAAWuH,EAAWxK,WAC7BkD,EAASsH,EAAWpI,MAAMuI,EAAMtF,EACpC,OAAIjG,GAAEkD,SAASY,GAAgBA,EACxByH,EAMTvL,GAAEiC,KAAO,SAASQ,EAAM5C,GACtB,GAAImC,GAAcS,EAAKR,OAASD,EAAY,MAAOA,GAAWgB,MAAMP,EAAMf,EAAMkB,KAAK3C,UAAW,GAChG,KAAKD,EAAEW,WAAW8B,GAAO,KAAM,IAAI+I,WAAU,oCAC7C,IAAIvF,GAAOvE,EAAMkB,KAAK3C,UAAW,GAC7BwL,EAAQ,WACV,MAAON,GAAa1I,EAAMgJ,EAAO5L,EAASsB,KAAM8E,EAAKyF,OAAOhK,EAAMkB,KAAK3C,aAEzE,OAAOwL,IAMTzL,EAAE2L,QAAU,SAASlJ,GACnB,GAAImJ,GAAYlK,EAAMkB,KAAK3C,UAAW,GAClCwL,EAAQ,WAGV,IAAK,GAFDI,GAAW,EAAGlM,EAASiM,EAAUjM,OACjCsG,EAAO3E,MAAM3B,GACRgE,EAAI,EAAOhE,EAAJgE,EAAYA,IAC1BsC,EAAKtC,GAAKiI,EAAUjI,KAAO3D,EAAIC,UAAU4L,KAAcD,EAAUjI,EAEnE,MAAOkI,EAAW5L,UAAUN,QAAQsG,EAAKhF,KAAKhB,UAAU4L,KACxD,OAAOV,GAAa1I,EAAMgJ,EAAOtK,KAAMA,KAAM8E,GAE/C,OAAOwF,IAMTzL,EAAE8L,QAAU,SAASxM,GACnB,GAAIqE,GAA8BC,EAA3BjE,EAASM,UAAUN,MAC1B,IAAc,GAAVA,EAAa,KAAM,IAAIoM,OAAM,wCACjC,KAAKpI,EAAI,EAAOhE,EAAJgE,EAAYA,IACtBC,EAAM3D,UAAU0D,GAChBrE,EAAIsE,GAAO5D,EAAEiC,KAAK3C,EAAIsE,GAAMtE,EAE9B,OAAOA,IAITU,EAAEgM,QAAU,SAASvJ,EAAMwJ,GACzB,GAAID,GAAU,SAASpI,GACrB,GAAIsI,GAAQF,EAAQE,MAChBC,EAAU,IAAMF,EAASA,EAAOjJ,MAAM7B,KAAMlB,WAAa2D,EAE7D,OADK5D,GAAEe,IAAImL,EAAOC,KAAUD,EAAMC,GAAW1J,EAAKO,MAAM7B,KAAMlB,YACvDiM,EAAMC,GAGf,OADAH,GAAQE,SACDF,GAKThM,EAAEoM,MAAQ,SAAS3J,EAAM4J,GACvB,GAAIpG,GAAOvE,EAAMkB,KAAK3C,UAAW,EACjC,OAAOqM,YAAW,WAChB,MAAO7J,GAAKO,MAAM,KAAMiD,IACvBoG,IAKLrM,EAAEuM,MAAQvM,EAAE2L,QAAQ3L,EAAEoM,MAAOpM,EAAG,GAOhCA,EAAEwM,SAAW,SAAS/J,EAAM4J,EAAMI,GAChC,GAAI5M,GAASoG,EAAMnC,EACf4I,EAAU,KACVC,EAAW,CACVF,KAASA,KACd,IAAIG,GAAQ,WACVD,EAAWF,EAAQI,WAAY,EAAQ,EAAI7M,EAAE8M,MAC7CJ,EAAU,KACV5I,EAASrB,EAAKO,MAAMnD,EAASoG,GACxByG,IAAS7M,EAAUoG,EAAO,MAEjC,OAAO,YACL,GAAI6G,GAAM9M,EAAE8M,KACPH,IAAYF,EAAQI,WAAY,IAAOF,EAAWG,EACvD,IAAIC,GAAYV,GAAQS,EAAMH,EAc9B,OAbA9M,GAAUsB,KACV8E,EAAOhG,UACU,GAAb8M,GAAkBA,EAAYV,GAC5BK,IACFM,aAAaN,GACbA,EAAU,MAEZC,EAAWG,EACXhJ,EAASrB,EAAKO,MAAMnD,EAASoG,GACxByG,IAAS7M,EAAUoG,EAAO,OACrByG,GAAWD,EAAQQ,YAAa,IAC1CP,EAAUJ,WAAWM,EAAOG,IAEvBjJ,IAQX9D,EAAEkN,SAAW,SAASzK,EAAM4J,EAAMc,GAChC,GAAIT,GAASzG,EAAMpG,EAASuN,EAAWtJ,EAEnC8I,EAAQ,WACV,GAAIpE,GAAOxI,EAAE8M,MAAQM,CAEVf,GAAP7D,GAAeA,GAAQ,EACzBkE,EAAUJ,WAAWM,EAAOP,EAAO7D,IAEnCkE,EAAU,KACLS,IACHrJ,EAASrB,EAAKO,MAAMnD,EAASoG,GACxByG,IAAS7M,EAAUoG,EAAO,QAKrC,OAAO,YACLpG,EAAUsB,KACV8E,EAAOhG,UACPmN,EAAYpN,EAAE8M,KACd,IAAIO,GAAUF,IAAcT,CAO5B,OANKA,KAASA,EAAUJ,WAAWM,EAAOP,IACtCgB,IACFvJ,EAASrB,EAAKO,MAAMnD,EAASoG,GAC7BpG,EAAUoG,EAAO,MAGZnC,IAOX9D,EAAEsN,KAAO,SAAS7K,EAAM8K,GACtB,MAAOvN,GAAE2L,QAAQ4B,EAAS9K,IAI5BzC,EAAEoF,OAAS,SAAShF,GAClB,MAAO,YACL,OAAQA,EAAU4C,MAAM7B,KAAMlB,aAMlCD,EAAEwN,QAAU,WACV,GAAIvH,GAAOhG,UACP8K,EAAQ9E,EAAKtG,OAAS,CAC1B,OAAO,YAGL,IAFA,GAAIgE,GAAIoH,EACJjH,EAASmC,EAAK8E,GAAO/H,MAAM7B,KAAMlB,WAC9B0D,KAAKG,EAASmC,EAAKtC,GAAGf,KAAKzB,KAAM2C,EACxC,OAAOA,KAKX9D,EAAEyN,MAAQ,SAASC,EAAOjL,GACxB,MAAO,YACL,QAAMiL,EAAQ,EACLjL,EAAKO,MAAM7B,KAAMlB,WAD1B,SAOJD,EAAE2N,OAAS,SAASD,EAAOjL,GACzB,GAAIjD,EACJ,OAAO,YAKL,QAJMkO,EAAQ,IACZlO,EAAOiD,EAAKO,MAAM7B,KAAMlB,YAEb,GAATyN,IAAYjL,EAAO,MAChBjD,IAMXQ,EAAE4N,KAAO5N,EAAE2L,QAAQ3L,EAAE2N,OAAQ,EAM7B,IAAIE,KAAelM,SAAU,MAAMmM,qBAAqB,YACpDtN,GAAsB,UAAW,gBAAiB,WAClC,uBAAwB,iBAAkB,iBAqB9DR,GAAEP,KAAO,SAASH,GAChB,IAAKU,EAAEkD,SAAS5D,GAAM,QACtB,IAAIyC,EAAY,MAAOA,GAAWzC,EAClC,IAAIG,KACJ,KAAK,GAAImE,KAAOtE,GAASU,EAAEe,IAAIzB,EAAKsE,IAAMnE,EAAKwB,KAAK2C,EAGpD,OADIiK,IAAYvN,EAAoBhB,EAAKG,GAClCA,GAITO,EAAE+N,QAAU,SAASzO,GACnB,IAAKU,EAAEkD,SAAS5D,GAAM,QACtB,IAAIG,KACJ,KAAK,GAAImE,KAAOtE,GAAKG,EAAKwB,KAAK2C,EAG/B,OADIiK,IAAYvN,EAAoBhB,EAAKG,GAClCA,GAITO,EAAE6F,OAAS,SAASvG,GAIlB,IAAK,GAHDG,GAAOO,EAAEP,KAAKH,GACdK,EAASF,EAAKE,OACdkG,EAASvE,MAAM3B,GACVgE,EAAI,EAAOhE,EAAJgE,EAAYA,IAC1BkC,EAAOlC,GAAKrE,EAAIG,EAAKkE,GAEvB,OAAOkC,IAKT7F,EAAEgO,UAAY,SAAS1O,EAAKC,EAAUM,GACpCN,EAAWc,EAAGd,EAAUM,EAKtB,KAAK,GADDD,GAHFH,EAAQO,EAAEP,KAAKH,GACbK,EAASF,EAAKE,OACd2E,KAEK5E,EAAQ,EAAWC,EAARD,EAAgBA,IAClCE,EAAaH,EAAKC,GAClB4E,EAAQ1E,GAAcL,EAASD,EAAIM,GAAaA,EAAYN,EAE9D,OAAOgF,IAIXtE,EAAEiO,MAAQ,SAAS3O,GAIjB,IAAK,GAHDG,GAAOO,EAAEP,KAAKH,GACdK,EAASF,EAAKE,OACdsO,EAAQ3M,MAAM3B,GACTgE,EAAI,EAAOhE,EAAJgE,EAAYA,IAC1BsK,EAAMtK,IAAMlE,EAAKkE,GAAIrE,EAAIG,EAAKkE,IAEhC,OAAOsK,IAITjO,EAAEkO,OAAS,SAAS5O,GAGlB,IAAK,GAFDwE,MACArE,EAAOO,EAAEP,KAAKH,GACTqE,EAAI,EAAGhE,EAASF,EAAKE,OAAYA,EAAJgE,EAAYA,IAChDG,EAAOxE,EAAIG,EAAKkE,KAAOlE,EAAKkE,EAE9B,OAAOG,IAKT9D,EAAEmO,UAAYnO,EAAEoO,QAAU,SAAS9O,GACjC,GAAI+O,KACJ,KAAK,GAAIzK,KAAOtE,GACVU,EAAEW,WAAWrB,EAAIsE,KAAOyK,EAAMpN,KAAK2C,EAEzC,OAAOyK,GAAMhH,QAIfrH,EAAEsO,OAAShL,EAAetD,EAAE+N,SAI5B/N,EAAEuO,UAAYvO,EAAEwO,OAASlL,EAAetD,EAAEP,MAG1CO,EAAE+E,QAAU,SAASzF,EAAKc,EAAWP,GACnCO,EAAYC,EAAGD,EAAWP,EAE1B,KAAK,GADmB+D,GAApBnE,EAAOO,EAAEP,KAAKH,GACTqE,EAAI,EAAGhE,EAASF,EAAKE,OAAYA,EAAJgE,EAAYA,IAEhD,GADAC,EAAMnE,EAAKkE,GACPvD,EAAUd,EAAIsE,GAAMA,EAAKtE,GAAM,MAAOsE,IAK9C5D,EAAEyO,KAAO,SAASrE,EAAQsE,EAAW7O,GACnC,GAA+BN,GAAUE,EAArCqE,KAAaxE,EAAM8K,CACvB,IAAW,MAAP9K,EAAa,MAAOwE,EACpB9D,GAAEW,WAAW+N,IACfjP,EAAOO,EAAE+N,QAAQzO,GACjBC,EAAWO,EAAW4O,EAAW7O,KAEjCJ,EAAOoJ,EAAQ5I,WAAW,GAAO,EAAO,GACxCV,EAAW,SAASoD,EAAOiB,EAAKtE,GAAO,MAAOsE,KAAOtE,IACrDA,EAAMiC,OAAOjC,GAEf,KAAK,GAAIqE,GAAI,EAAGhE,EAASF,EAAKE,OAAYA,EAAJgE,EAAYA,IAAK,CACrD,GAAIC,GAAMnE,EAAKkE,GACXhB,EAAQrD,EAAIsE,EACZrE,GAASoD,EAAOiB,EAAKtE,KAAMwE,EAAOF,GAAOjB,GAE/C,MAAOmB,IAIT9D,EAAE2O,KAAO,SAASrP,EAAKC,EAAUM,GAC/B,GAAIG,EAAEW,WAAWpB,GACfA,EAAWS,EAAEoF,OAAO7F,OACf,CACL,GAAIE,GAAOO,EAAEoE,IAAIyE,EAAQ5I,WAAW,GAAO,EAAO,GAAI2O,OACtDrP,GAAW,SAASoD,EAAOiB,GACzB,OAAQ5D,EAAEgB,SAASvB,EAAMmE,IAG7B,MAAO5D,GAAEyO,KAAKnP,EAAKC,EAAUM,IAI/BG,EAAE6O,SAAWvL,EAAetD,EAAE+N,SAAS,GAGvC/N,EAAE8O,MAAQ,SAASxP,GACjB,MAAKU,GAAEkD,SAAS5D,GACTU,EAAE8B,QAAQxC,GAAOA,EAAIoC,QAAU1B,EAAEsO,UAAWhP,GADtBA,GAO/BU,EAAE+O,IAAM,SAASzP,EAAK0P,GAEpB,MADAA,GAAY1P,GACLA,GAITU,EAAEiP,QAAU,SAAS7E,EAAQ/D,GAC3B,GAAI5G,GAAOO,EAAEP,KAAK4G,GAAQ1G,EAASF,EAAKE,MACxC,IAAc,MAAVyK,EAAgB,OAAQzK,CAE5B,KAAK,GADDL,GAAMiC,OAAO6I,GACRzG,EAAI,EAAOhE,EAAJgE,EAAYA,IAAK,CAC/B,GAAIC,GAAMnE,EAAKkE,EACf,IAAI0C,EAAMzC,KAAStE,EAAIsE,MAAUA,IAAOtE,IAAM,OAAO,EAEvD,OAAO,EAKT,IAAI4P,GAAK,SAAS1H,EAAGC,EAAG0H,EAAQC,GAG9B,GAAI5H,IAAMC,EAAG,MAAa,KAAND,GAAW,EAAIA,IAAM,EAAIC,CAE7C,IAAS,MAALD,GAAkB,MAALC,EAAW,MAAOD,KAAMC,CAErCD,aAAaxH,KAAGwH,EAAIA,EAAEnF,UACtBoF,YAAazH,KAAGyH,EAAIA,EAAEpF,SAE1B,IAAIgN,GAAY1N,EAASiB,KAAK4E,EAC9B,IAAI6H,IAAc1N,EAASiB,KAAK6E,GAAI,OAAO,CAC3C,QAAQ4H,GAEN,IAAK,kBAEL,IAAK,kBAGH,MAAO,GAAK7H,GAAM,GAAKC,CACzB,KAAK,kBAGH,OAAKD,KAAOA,GAAWC,KAAOA,EAEhB,KAAND,EAAU,GAAKA,IAAM,EAAIC,GAAKD,KAAOC,CAC/C,KAAK,gBACL,IAAK,mBAIH,OAAQD,KAAOC,EAGnB,GAAI6H,GAA0B,mBAAdD,CAChB,KAAKC,EAAW,CACd,GAAgB,gBAAL9H,IAA6B,gBAALC,GAAe,OAAO,CAIzD,IAAI8H,GAAQ/H,EAAE/G,YAAa+O,EAAQ/H,EAAEhH,WACrC,IAAI8O,IAAUC,KAAWxP,EAAEW,WAAW4O,IAAUA,YAAiBA,IACxCvP,EAAEW,WAAW6O,IAAUA,YAAiBA,KACzC,eAAiBhI,IAAK,eAAiBC,GAC7D,OAAO,EAQX0H,EAASA,MACTC,EAASA,KAET,KADA,GAAIzP,GAASwP,EAAOxP,OACbA,KAGL,GAAIwP,EAAOxP,KAAY6H,EAAG,MAAO4H,GAAOzP,KAAY8H,CAQtD,IAJA0H,EAAOlO,KAAKuG,GACZ4H,EAAOnO,KAAKwG,GAGR6H,EAAW,CAGb,GADA3P,EAAS6H,EAAE7H,OACPA,IAAW8H,EAAE9H,OAAQ,OAAO,CAEhC,MAAOA,KACL,IAAKuP,EAAG1H,EAAE7H,GAAS8H,EAAE9H,GAASwP,EAAQC,GAAS,OAAO,MAEnD,CAEL,GAAsBxL,GAAlBnE,EAAOO,EAAEP,KAAK+H,EAGlB,IAFA7H,EAASF,EAAKE,OAEVK,EAAEP,KAAKgI,GAAG9H,SAAWA,EAAQ,OAAO,CACxC,MAAOA,KAGL,GADAiE,EAAMnE,EAAKE,IACLK,EAAEe,IAAI0G,EAAG7D,KAAQsL,EAAG1H,EAAE5D,GAAM6D,EAAE7D,GAAMuL,EAAQC,GAAU,OAAO,EAMvE,MAFAD,GAAOM,MACPL,EAAOK,OACA,EAITzP,GAAE0P,QAAU,SAASlI,EAAGC,GACtB,MAAOyH,GAAG1H,EAAGC,IAKfzH,EAAE2P,QAAU,SAASrQ,GACnB,MAAW,OAAPA,GAAoB,EACpBS,EAAYT,KAASU,EAAE8B,QAAQxC,IAAQU,EAAE4P,SAAStQ,IAAQU,EAAEoJ,YAAY9J,IAA6B,IAAfA,EAAIK,OAChE,IAAvBK,EAAEP,KAAKH,GAAKK,QAIrBK,EAAE6P,UAAY,SAASvQ,GACrB,SAAUA,GAAwB,IAAjBA,EAAIwQ,WAKvB9P,EAAE8B,QAAUD,GAAiB,SAASvC,GACpC,MAA8B,mBAAvBqC,EAASiB,KAAKtD,IAIvBU,EAAEkD,SAAW,SAAS5D,GACpB,GAAIyQ,SAAczQ,EAClB,OAAgB,aAATyQ,GAAgC,WAATA,KAAuBzQ,GAIvDU,EAAEkE,MAAM,YAAa,WAAY,SAAU,SAAU,OAAQ,SAAU,SAAU,SAAS8L,GACxFhQ,EAAE,KAAOgQ,GAAQ,SAAS1Q,GACxB,MAAOqC,GAASiB,KAAKtD,KAAS,WAAa0Q,EAAO,OAMjDhQ,EAAEoJ,YAAYnJ,aACjBD,EAAEoJ,YAAc,SAAS9J,GACvB,MAAOU,GAAEe,IAAIzB,EAAK,YAMJ,kBAAP,KAAyC,gBAAb2Q,aACrCjQ,EAAEW,WAAa,SAASrB,GACtB,MAAqB,kBAAPA,KAAqB,IAKvCU,EAAEkQ,SAAW,SAAS5Q,GACpB,MAAO4Q,UAAS5Q,KAASgL,MAAM6F,WAAW7Q,KAI5CU,EAAEsK,MAAQ,SAAShL,GACjB,MAAOU,GAAEoQ,SAAS9Q,IAAQA,KAASA,GAIrCU,EAAE4J,UAAY,SAAStK,GACrB,MAAOA,MAAQ,GAAQA,KAAQ,GAAgC,qBAAvBqC,EAASiB,KAAKtD,IAIxDU,EAAEqQ,OAAS,SAAS/Q,GAClB,MAAe,QAARA,GAITU,EAAEsQ,YAAc,SAAShR,GACvB,MAAOA,SAAa,IAKtBU,EAAEe,IAAM,SAASzB,EAAKsE,GACpB,MAAc,OAAPtE,GAAesC,EAAegB,KAAKtD,EAAKsE,IAQjD5D,EAAEuQ,WAAa,WAEb,MADArP,GAAKlB,EAAIoB,EACFD,MAITnB,EAAEiD,SAAW,SAASN,GACpB,MAAOA,IAIT3C,EAAEwQ,SAAW,SAAS7N,GACpB,MAAO,YACL,MAAOA,KAIX3C,EAAEyQ,KAAO,aAETzQ,EAAEoD,SAAW,SAASQ,GACpB,MAAO,UAAStE,GACd,MAAc,OAAPA,MAAmB,GAAIA,EAAIsE,KAKtC5D,EAAE0Q,WAAa,SAASpR,GACtB,MAAc,OAAPA,EAAc,aAAe,SAASsE,GAC3C,MAAOtE,GAAIsE,KAMf5D,EAAEmD,QAAUnD,EAAE2Q,QAAU,SAAStK,GAE/B,MADAA,GAAQrG,EAAEuO,aAAclI,GACjB,SAAS/G,GACd,MAAOU,GAAEiP,QAAQ3P,EAAK+G,KAK1BrG,EAAE0N,MAAQ,SAASzG,EAAG1H,EAAUM,GAC9B,GAAI+Q,GAAQtP,MAAM0C,KAAKuC,IAAI,EAAGU,GAC9B1H,GAAWO,EAAWP,EAAUM,EAAS,EACzC,KAAK,GAAI8D,GAAI,EAAOsD,EAAJtD,EAAOA,IAAKiN,EAAMjN,GAAKpE,EAASoE,EAChD,OAAOiN,IAIT5Q,EAAE+G,OAAS,SAASL,EAAKH,GAKvB,MAJW,OAAPA,IACFA,EAAMG,EACNA,EAAM,GAEDA,EAAM1C,KAAK6G,MAAM7G,KAAK+C,UAAYR,EAAMG,EAAM,KAIvD1G,EAAE8M,IAAM+D,KAAK/D,KAAO,WAClB,OAAO,GAAI+D,OAAOC,UAIpB,IAAIC,IACFC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAEHC,EAActR,EAAEkO,OAAO6C,GAGvBQ,EAAgB,SAASnN,GAC3B,GAAIoN,GAAU,SAASC,GACrB,MAAOrN,GAAIqN,IAGThO,EAAS,MAAQzD,EAAEP,KAAK2E,GAAKsN,KAAK,KAAO,IACzCC,EAAaC,OAAOnO,GACpBoO,EAAgBD,OAAOnO,EAAQ,IACnC,OAAO,UAASqO,GAEd,MADAA,GAAmB,MAAVA,EAAiB,GAAK,GAAKA,EAC7BH,EAAWI,KAAKD,GAAUA,EAAOE,QAAQH,EAAeL,GAAWM,GAG9E9R,GAAEiS,OAASV,EAAcR,GACzB/Q,EAAEkS,SAAWX,EAAcD,GAI3BtR,EAAE8D,OAAS,SAASsG,EAAQhH,EAAU+O,GACpC,GAAIxP,GAAkB,MAAVyH,MAAsB,GAAIA,EAAOhH,EAI7C,OAHIT,SAAe,KACjBA,EAAQwP,GAEHnS,EAAEW,WAAWgC,GAASA,EAAMC,KAAKwH,GAAUzH,EAKpD,IAAIyP,GAAY,CAChBpS,GAAEqS,SAAW,SAASC,GACpB,GAAIC,KAAOH,EAAY,EACvB,OAAOE,GAASA,EAASC,EAAKA,GAKhCvS,EAAEwS,kBACAC,SAAc,kBACdC,YAAc,mBACdT,OAAc,mBAMhB,IAAIU,GAAU,OAIVC,GACFxB,IAAU,IACVyB,KAAU,KACVC,KAAU,IACVC,KAAU,IACVC,SAAU,QACVC,SAAU,SAGRzB,EAAU,4BAEV0B,EAAa,SAASzB,GACxB,MAAO,KAAOmB,EAAQnB,GAOxBzR,GAAEmT,SAAW,SAASC,EAAMC,EAAUC,IAC/BD,GAAYC,IAAaD,EAAWC,GACzCD,EAAWrT,EAAE6O,YAAawE,EAAUrT,EAAEwS,iBAGtC,IAAIrP,GAAUyO,SACXyB,EAASpB,QAAUU,GAASlP,QAC5B4P,EAASX,aAAeC,GAASlP,QACjC4P,EAASZ,UAAYE,GAASlP,QAC/BiO,KAAK,KAAO,KAAM,KAGhBhS,EAAQ,EACR+D,EAAS,QACb2P,GAAKpB,QAAQ7O,EAAS,SAASsO,EAAOQ,EAAQS,EAAaD,EAAUc,GAanE,MAZA9P,IAAU2P,EAAK1R,MAAMhC,EAAO6T,GAAQvB,QAAQR,EAAS0B,GACrDxT,EAAQ6T,EAAS9B,EAAM9R,OAEnBsS,EACFxO,GAAU,cAAgBwO,EAAS,iCAC1BS,EACTjP,GAAU,cAAgBiP,EAAc,uBAC/BD,IACThP,GAAU,OAASgP,EAAW,YAIzBhB,IAEThO,GAAU,OAGL4P,EAASG,WAAU/P,EAAS,mBAAqBA,EAAS,OAE/DA,EAAS,2CACP,oDACAA,EAAS,eAEX,KACE,GAAIgQ,GAAS,GAAIhS,UAAS4R,EAASG,UAAY,MAAO,IAAK/P,GAC3D,MAAOiQ,GAEP,KADAA,GAAEjQ,OAASA,EACLiQ,EAGR,GAAIP,GAAW,SAASQ,GACtB,MAAOF,GAAO7Q,KAAKzB,KAAMwS,EAAM3T,IAI7B4T,EAAWP,EAASG,UAAY,KAGpC,OAFAL,GAAS1P,OAAS,YAAcmQ,EAAW,OAASnQ,EAAS,IAEtD0P,GAITnT,EAAE6T,MAAQ,SAASvU,GACjB,GAAIwU,GAAW9T,EAAEV,EAEjB,OADAwU,GAASC,QAAS,EACXD,EAUT,IAAIhQ,GAAS,SAASgQ,EAAUxU,GAC9B,MAAOwU,GAASC,OAAS/T,EAAEV,GAAKuU,QAAUvU,EAI5CU,GAAEgU,MAAQ,SAAS1U,GACjBU,EAAEkE,KAAKlE,EAAEmO,UAAU7O,GAAM,SAAS0Q,GAChC,GAAIvN,GAAOzC,EAAEgQ,GAAQ1Q,EAAI0Q,EACzBhQ,GAAEY,UAAUoP,GAAQ,WAClB,GAAI/J,IAAQ9E,KAAKkB,SAEjB,OADApB,GAAK+B,MAAMiD,EAAMhG,WACV6D,EAAO3C,KAAMsB,EAAKO,MAAMhD,EAAGiG,QAMxCjG,EAAEgU,MAAMhU,GAGRA,EAAEkE,MAAM,MAAO,OAAQ,UAAW,QAAS,OAAQ,SAAU,WAAY,SAAS8L,GAChF,GAAIhK,GAAS3E,EAAW2O,EACxBhQ,GAAEY,UAAUoP,GAAQ,WAClB,GAAI1Q,GAAM6B,KAAKkB,QAGf,OAFA2D,GAAOhD,MAAM1D,EAAKW,WACJ,UAAT+P,GAA6B,WAATA,GAAqC,IAAf1Q,EAAIK,cAAqBL,GAAI,GACrEwE,EAAO3C,KAAM7B,MAKxBU,EAAEkE,MAAM,SAAU,OAAQ,SAAU,SAAS8L,GAC3C,GAAIhK,GAAS3E,EAAW2O,EACxBhQ,GAAEY,UAAUoP,GAAQ,WAClB,MAAOlM,GAAO3C,KAAM6E,EAAOhD,MAAM7B,KAAKkB,SAAUpC,eAKpDD,EAAEY,UAAU+B,MAAQ,WAClB,MAAOxB,MAAKkB,UAKdrC,EAAEY,UAAUqT,QAAUjU,EAAEY,UAAUsT,OAASlU,EAAEY,UAAU+B,MAEvD3C,EAAEY,UAAUe,SAAW,WACrB,MAAO,GAAKR,KAAKkB,UAUG,kBAAX8R,SAAyBA,OAAOC,KACzCD,OAAO,gBAAkB,WACvB,MAAOnU,OAGX4C,KAAKzB"} \ No newline at end of file diff --git a/vendor/assets/components/swagger-ui/swagger-ui.js b/vendor/assets/components/swagger-ui/swagger-ui.js deleted file mode 100644 index 0b8a10b..0000000 --- a/vendor/assets/components/swagger-ui/swagger-ui.js +++ /dev/null @@ -1,32187 +0,0 @@ -/** - * swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API - * @version v2.1.2 - * @link http://swagger.io - * @license Apache-2.0 - */ -(function(){'use strict'; - -window.SwaggerUi = Backbone.Router.extend({ - - dom_id: 'swagger_ui', - - // Attributes - options: null, - api: null, - headerView: null, - mainView: null, - - // SwaggerUi accepts all the same options as SwaggerApi - initialize: function(options) { - options = options || {}; - if(!options.highlightSizeThreshold) { - options.highlightSizeThreshold = 100000; - } - - // Allow dom_id to be overridden - if (options.dom_id) { - this.dom_id = options.dom_id; - delete options.dom_id; - } - - if (!options.supportedSubmitMethods){ - options.supportedSubmitMethods = [ - 'get', - 'put', - 'post', - 'delete', - 'head', - 'options', - 'patch' - ]; - } - - if (typeof options.oauth2RedirectUrl === 'string') { - window.oAuthRedirectUrl = options.redirectUrl; - } - - // Create an empty div which contains the dom_id - if (! $('#' + this.dom_id).length){ - $('body').append('
      ') ; - } - - this.options = options; - - // set marked options - marked.setOptions({gfm: true}); - - // Set the callbacks - var that = this; - this.options.success = function() { return that.render(); }; - this.options.progress = function(d) { return that.showMessage(d); }; - this.options.failure = function(d) { return that.onLoadFailure(d); }; - - // Create view to handle the header inputs - this.headerView = new SwaggerUi.Views.HeaderView({el: $('#header')}); - - // Event handler for when the baseUrl/apiKey is entered by user - this.headerView.on('update-swagger-ui', function(data) { - return that.updateSwaggerUi(data); - }); - }, - - // Set an option after initializing - setOption: function(option, value) { - this.options[option] = value; - }, - - // Get the value of a previously set option - getOption: function(option) { - return this.options[option]; - }, - - // Event handler for when url/key is received from user - updateSwaggerUi: function(data){ - this.options.url = data.url; - this.load(); - }, - - // Create an api and render - load: function(){ - // Initialize the API object - if (this.mainView) { - this.mainView.clear(); - } - var url = this.options.url; - if (url && url.indexOf('http') !== 0) { - url = this.buildUrl(window.location.href.toString(), url); - } - if(this.api) { - this.options.authorizations = this.api.clientAuthorizations.authz; - } - this.options.url = url; - this.headerView.update(url); - - this.api = new SwaggerClient(this.options); - }, - - // collapse all sections - collapseAll: function(){ - Docs.collapseEndpointListForResource(''); - }, - - // list operations for all sections - listAll: function(){ - Docs.collapseOperationsForResource(''); - }, - - // expand operations for all sections - expandAll: function(){ - Docs.expandOperationsForResource(''); - }, - - // This is bound to success handler for SwaggerApi - // so it gets called when SwaggerApi completes loading - render: function(){ - this.showMessage('Finished Loading Resource Information. Rendering Swagger UI...'); - this.mainView = new SwaggerUi.Views.MainView({ - model: this.api, - el: $('#' + this.dom_id), - swaggerOptions: this.options, - router: this - }).render(); - this.showMessage(); - switch (this.options.docExpansion) { - case 'full': - this.expandAll(); break; - case 'list': - this.listAll(); break; - default: - break; - } - this.renderGFM(); - - if (this.options.onComplete){ - this.options.onComplete(this.api, this); - } - - setTimeout(Docs.shebang.bind(this), 100); - }, - - buildUrl: function(base, url){ - if (url.indexOf('/') === 0) { - var parts = base.split('/'); - base = parts[0] + '//' + parts[2]; - return base + url; - } else { - var endOfPath = base.length; - - if (base.indexOf('?') > -1){ - endOfPath = Math.min(endOfPath, base.indexOf('?')); - } - - if (base.indexOf('#') > -1){ - endOfPath = Math.min(endOfPath, base.indexOf('#')); - } - - base = base.substring(0, endOfPath); - - if (base.indexOf('/', base.length - 1 ) !== -1){ - return base + url; - } - - return base + '/' + url; - } - }, - - // Shows message on topbar of the ui - showMessage: function(data){ - if (data === undefined) { - data = ''; - } - var $msgbar = $('#message-bar'); - $msgbar.removeClass('message-fail'); - $msgbar.addClass('message-success'); - $msgbar.html(data); - if(window.SwaggerTranslator) { - window.SwaggerTranslator.translate($msgbar); - } - }, - - // shows message in red - onLoadFailure: function(data){ - if (data === undefined) { - data = ''; - } - $('#message-bar').removeClass('message-success'); - $('#message-bar').addClass('message-fail'); - - var val = $('#message-bar').text(data); - - if (this.options.onFailure) { - this.options.onFailure(data); - } - - return val; - }, - - // Renders GFM for elements with 'markdown' class - renderGFM: function(){ - $('.markdown').each(function(){ - $(this).html(marked($(this).html())); - }); - - $('.propDesc', '.model-signature .description').each(function () { - $(this).html(marked($(this).html())).addClass('markdown'); - }); - } - -}); - -window.SwaggerUi.Views = {}; - -// don't break backward compatibility with previous versions and warn users to upgrade their code -(function(){ - window.authorizations = { - add: function() { - warn('Using window.authorizations is deprecated. Please use SwaggerUi.api.clientAuthorizations.add().'); - - if (typeof window.swaggerUi === 'undefined') { - throw new TypeError('window.swaggerUi is not defined'); - } - - if (window.swaggerUi instanceof SwaggerUi) { - window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations, arguments); - } - } - }; - - window.ApiKeyAuthorization = function() { - warn('window.ApiKeyAuthorization is deprecated. Please use SwaggerClient.ApiKeyAuthorization.'); - SwaggerClient.ApiKeyAuthorization.apply(window, arguments); - }; - - window.PasswordAuthorization = function() { - warn('window.PasswordAuthorization is deprecated. Please use SwaggerClient.PasswordAuthorization.'); - SwaggerClient.PasswordAuthorization.apply(window, arguments); - }; - - function warn(message) { - if ('console' in window && typeof window.console.warn === 'function') { - console.warn(message); - } - } -})(); - - -// UMD -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['b'], function (b) { - return (root.SwaggerUi = factory(b)); - }); - } else if (typeof exports === 'object') { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(require('b')); - } else { - // Browser globals - root.SwaggerUi = factory(root.b); - } -}(this, function () { - return SwaggerUi; -})); - -this["Handlebars"] = this["Handlebars"] || {}; -this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {}; -this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return "\n
      \n
      \n
      \n \n \n
      \n
      \n"; -},"useData":true}); -this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - return "
      \n
      \n
      \n
      \n \n
      \n \n \n
      \n
      \n\n"; - },"useData":true}); -this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, buffer = " \n"; -},"4":function(depth0,helpers,partials,data) { - return " \n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n"; -},"useData":true}); -'use strict'; - - -$(function() { - - // Helper function for vertically aligning DOM elements - // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/ - $.fn.vAlign = function() { - return this.each(function(){ - var ah = $(this).height(); - var ph = $(this).parent().height(); - var mh = (ph - ah) / 2; - $(this).css('margin-top', mh); - }); - }; - - $.fn.stretchFormtasticInputWidthToParent = function() { - return this.each(function(){ - var p_width = $(this).closest("form").innerWidth(); - var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest('form').css('padding-right'), 10); - var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10); - $(this).css('width', p_width - p_padding - this_padding); - }); - }; - - $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent(); - - // Vertically center these paragraphs - // Parent may need a min-height for this to work.. - $('ul.downplayed li div.content p').vAlign(); - - // When a sandbox form is submitted.. - $("form.sandbox").submit(function(){ - - var error_free = true; - - // Cycle through the forms required inputs - $(this).find("input.required").each(function() { - - // Remove any existing error styles from the input - $(this).removeClass('error'); - - // Tack the error style on if the input is empty.. - if ($(this).val() === '') { - $(this).addClass('error'); - $(this).wiggle(); - error_free = false; - } - - }); - - return error_free; - }); - -}); - -function clippyCopiedCallback() { - $('#api_key_copied').fadeIn().delay(1000).fadeOut(); - - // var b = $("#clippy_tooltip_" + a); - // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() { - // b.attr("title", "copy to clipboard") - // }, - // 500)) -} - -// Logging function that accounts for browsers that don't have window.console -function log(){ - log.history = log.history || []; - log.history.push(arguments); - if(this.console){ - console.log( Array.prototype.slice.call(arguments)[0] ); - } -} - -// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913) -if (Function.prototype.bind && console && typeof console.log === "object") { - [ - "log","info","warn","error","assert","dir","clear","profile","profileEnd" - ].forEach(function (method) { - console[method] = this.bind(console[method], console); - }, Function.prototype.call); -} - -window.Docs = { - - shebang: function() { - - // If shebang has an operation nickname in it.. - // e.g. /docs/#!/words/get_search - var fragments = $.param.fragment().split('/'); - fragments.shift(); // get rid of the bang - - switch (fragments.length) { - case 1: - if (fragments[0].length > 0) { // prevent matching "#/" - // Expand all operations for the resource and scroll to it - var dom_id = 'resource_' + fragments[0]; - - Docs.expandEndpointListForResource(fragments[0]); - $("#"+dom_id).slideto({highlight: false}); - } - break; - case 2: - // Refer to the endpoint DOM element, e.g. #words_get_search - - // Expand Resource - Docs.expandEndpointListForResource(fragments[0]); - $("#"+dom_id).slideto({highlight: false}); - - // Expand operation - var li_dom_id = fragments.join('_'); - var li_content_dom_id = li_dom_id + "_content"; - - - Docs.expandOperation($('#'+li_content_dom_id)); - $('#'+li_dom_id).slideto({highlight: false}); - break; - } - - }, - - toggleEndpointListForResource: function(resource) { - var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints'); - if (elem.is(':visible')) { - Docs.collapseEndpointListForResource(resource); - } else { - Docs.expandEndpointListForResource(resource); - } - }, - - // Expand resource - expandEndpointListForResource: function(resource) { - var resource = Docs.escapeResourceName(resource); - if (resource == '') { - $('.resource ul.endpoints').slideDown(); - return; - } - - $('li#resource_' + resource).addClass('active'); - - var elem = $('li#resource_' + resource + ' ul.endpoints'); - elem.slideDown(); - }, - - // Collapse resource and mark as explicitly closed - collapseEndpointListForResource: function(resource) { - var resource = Docs.escapeResourceName(resource); - if (resource == '') { - $('.resource ul.endpoints').slideUp(); - return; - } - - $('li#resource_' + resource).removeClass('active'); - - var elem = $('li#resource_' + resource + ' ul.endpoints'); - elem.slideUp(); - }, - - expandOperationsForResource: function(resource) { - // Make sure the resource container is open.. - Docs.expandEndpointListForResource(resource); - - if (resource == '') { - $('.resource ul.endpoints li.operation div.content').slideDown(); - return; - } - - $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { - Docs.expandOperation($(this)); - }); - }, - - collapseOperationsForResource: function(resource) { - // Make sure the resource container is open.. - Docs.expandEndpointListForResource(resource); - - if (resource == '') { - $('.resource ul.endpoints li.operation div.content').slideUp(); - return; - } - - $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { - Docs.collapseOperation($(this)); - }); - }, - - escapeResourceName: function(resource) { - return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&"); - }, - - expandOperation: function(elem) { - elem.slideDown(); - }, - - collapseOperation: function(elem) { - elem.slideUp(); - } -}; - -'use strict'; - -Handlebars.registerHelper('sanitize', function(html) { - // Strip the script tags from the html, and return it as a Handlebars.SafeString - html = html.replace(/)<[^<]*)*<\/script>/gi, ''); - return new Handlebars.SafeString(html); -}); - -Handlebars.registerHelper('renderTextParam', function(param) { - var result, type = 'text', idAtt = ''; - var isArray = param.type.toLowerCase() === 'array' || param.allowMultiple; - var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default; - - var dataVendorExtensions = Object.keys(param).filter(function(property) { - // filter X-data- properties - return property.match(/^X-data-/i) !== null; - }).reduce(function(result, property) { - // remove X- from property name, so it results in html attributes like data-foo='bar' - return result += ' ' + property.substring(2, property.length) + '=\'' + param[property] + '\''; - }, ''); - - if (typeof defaultValue === 'undefined') { - defaultValue = ''; - } - - if(param.format && param.format === 'password') { - type = 'password'; - } - - if(param.valueId) { - idAtt = ' id=\'' + param.valueId + '\''; - } - - if(isArray) { - result = ''; - } else { - var parameterClass = 'parameter'; - if(param.required) { - parameterClass += ' required'; - } - result = ''; - } - return new Handlebars.SafeString(result); -}); - -this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "
      " - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0)) - + "
      \n
      "; - stack1 = lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1), depth0); - if (stack1 != null) { buffer += stack1; } - buffer += "
      \n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.externalDocs : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += " "; - stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), {"name":"if","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), {"name":"if","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1), {"name":"if","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + "\n"; -},"2":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return "

      " - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.description : stack1), depth0)) - + "

      \n " - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1), depth0)) - + "\n"; -},"4":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return ""; -},"6":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return "
      Created by " - + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), depth0)) - + "
      "; -},"8":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return ""; -},"10":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return ""; -},"12":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return ""; -},"14":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return " , api version: " - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0)) - + "\n "; -},"16":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n \n"; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "
      \n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.info : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "
      \n
      \n
        \n\n
        \n

        [ base url: " - + escapeExpression(((helper = (helper = helpers.basePath || (depth0 != null ? depth0.basePath : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"basePath","hash":{},"data":data}) : helper))) - + "\n"; - stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), {"name":"if","hash":{},"fn":this.program(14, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "]\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.validatorUrl : depth0), {"name":"if","hash":{},"fn":this.program(16, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + "

        \n
        \n
        \n"; -},"useData":true}); -this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - return "deprecated"; - },"3":function(depth0,helpers,partials,data) { - return "

        Warning: Deprecated

        \n"; - },"5":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "

        Implementation Notes

        \n
        "; - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "
        \n"; -},"7":function(depth0,helpers,partials,data) { - return "
        \n "; - },"9":function(depth0,helpers,partials,data) { - var stack1, buffer = "
        \n"; - stack1 = helpers.each.call(depth0, depth0, {"name":"each","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + "
        \n"; -},"10":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "
        " - + escapeExpression(lambda((depth0 != null ? depth0.scope : depth0), depth0)) - + "
        \n"; -},"12":function(depth0,helpers,partials,data) { - return "
        "; - },"14":function(depth0,helpers,partials,data) { - return "
        \n \n
        \n"; - },"16":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return "

        Response Class (Status " - + escapeExpression(((helper = (helper = helpers.successCode || (depth0 != null ? depth0.successCode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successCode","hash":{},"data":data}) : helper))) - + ")

        \n

        \n
        \n
        \n"; -},"18":function(depth0,helpers,partials,data) { - return "

        Parameters

        \n \n \n \n \n \n \n \n \n \n \n \n\n \n
        ParameterValueDescriptionParameter TypeData Type
        \n"; - },"20":function(depth0,helpers,partials,data) { - return "
        \n

        Response Messages

        \n \n \n \n \n \n \n \n \n \n \n\n \n
        HTTP Status CodeReasonResponse ModelHeaders
        \n"; - },"22":function(depth0,helpers,partials,data) { - return ""; -},"24":function(depth0,helpers,partials,data) { - return "
        \n \n \n \n
        \n"; - },"26":function(depth0,helpers,partials,data) { - return "

        Request Headers

        \n
        \n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "\n
          \n
        • \n \n \n
        • \n
        \n"; -},"useData":true}); -this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
        \n"; -},"4":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"5":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
        \n
        \n"; -},"7":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
        \n
        \n"; -},"9":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(10, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"10":function(depth0,helpers,partials,data) { - var stack1, helperMissing=helpers.helperMissing, buffer = ""; - stack1 = ((helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helperMissing).call(depth0, depth0, {"name":"renderTextParam","hash":{},"fn":this.program(11, data),"inverse":this.noop,"data":data})); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"11":function(depth0,helpers,partials,data) { - return ""; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n\n"; - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "\n"; - stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "\n\n \n\n"; -},"useData":true}); -this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - return " required"; - },"3":function(depth0,helpers,partials,data) { - return " multiple=\"multiple\""; - },"5":function(depth0,helpers,partials,data) { - return " required "; - },"7":function(depth0,helpers,partials,data) { - var stack1, buffer = " \n"; -},"8":function(depth0,helpers,partials,data) { - return " selected=\"\" "; - },"10":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n \n\n"; -},"11":function(depth0,helpers,partials,data) { - return " selected=\"\" "; - },"13":function(depth0,helpers,partials,data) { - return " (default) "; - },"15":function(depth0,helpers,partials,data) { - return ""; - },"17":function(depth0,helpers,partials,data) { - return ""; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "\n\n \n\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(15, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(17, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n"; - stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "\n\n"; -},"useData":true}); -this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n"; -},"3":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"4":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " " - + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper))) - + "\n"; -},"6":function(depth0,helpers,partials,data) { - return " (empty)\n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n"; - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "\n"; - stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "\n\n"; -},"useData":true}); -this["Handlebars"]["templates"]["param_readonly_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n"; -},"3":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"4":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " " - + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper))) - + "\n"; -},"6":function(depth0,helpers,partials,data) { - return " (empty)\n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n"; - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "\n"; - stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "\n\n"; -},"useData":true}); -this["Handlebars"]["templates"]["param_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n"; -},"4":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"5":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
        \n
        \n"; -},"7":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
        \n
        \n"; -},"9":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"10":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n"; -},"12":function(depth0,helpers,partials,data) { - var stack1, helperMissing=helpers.helperMissing, buffer = ""; - stack1 = ((helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helperMissing).call(depth0, depth0, {"name":"renderTextParam","hash":{},"fn":this.program(13, data),"inverse":this.noop,"data":data})); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"13":function(depth0,helpers,partials,data) { - return ""; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n\n "; - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "\n\n"; - stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "\n\n"; -},"useData":true}); -this["Handlebars"]["templates"]["parameter_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, buffer = " \n"; -},"4":function(depth0,helpers,partials,data) { - return " \n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n"; -},"useData":true}); -this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - return " : "; - },"3":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return "
      • \n Raw\n
      • \n"; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "
        \n

        \n " - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + " "; - stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(options={"name":"summary","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.summary) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"summary","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "\n

        \n
          \n
        • \n Show/Hide\n
        • \n
        • \n \n List Operations\n \n
        • \n
        • \n \n Expand Operations\n \n
        • \n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.url : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + "
        \n
        \n\n"; -},"useData":true}); -this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, buffer = " \n"; -},"4":function(depth0,helpers,partials,data) { - return " \n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n"; -},"useData":true}); -this["Handlebars"]["templates"]["signature"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "
        \n\n
        \n\n
        \n
        \n "; - stack1 = ((helper = (helper = helpers.signature || (depth0 != null ? depth0.signature : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signature","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "\n
        \n\n
        \n
        "
        -    + escapeExpression(((helper = (helper = helpers.sampleJSON || (depth0 != null ? depth0.sampleJSON : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleJSON","hash":{},"data":data}) : helper)))
        -    + "
        \n \n
        \n
        \n\n"; -},"useData":true}); -this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var lambda=this.lambda, escapeExpression=this.escapeExpression; - return " \n " - + escapeExpression(lambda((data && data.key), depth0)) - + "\n " - + escapeExpression(lambda((depth0 != null ? depth0.description : depth0), depth0)) - + "\n " - + escapeExpression(lambda((depth0 != null ? depth0.type : depth0), depth0)) - + "\n \n"; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "" - + escapeExpression(((helper = (helper = helpers.code || (depth0 != null ? depth0.code : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"code","hash":{},"data":data}) : helper))) - + "\n"; - stack1 = ((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"message","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "\n\n\n \n \n"; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.headers : depth0), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + " \n
        \n"; -},"useData":true}); -/** - * swagger-client - swagger-client is a javascript client for use with swaggering APIs. - * @version v2.1.3 - * @link http://swagger.io - * @license Apache-2.0 - */ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SwaggerClient = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0) { - obj.url = obj.url + '&' + this.name + '=' + this.value; - } else { - obj.url = obj.url + '?' + this.name + '=' + this.value; - } - - return true; - } else if (this.type === 'header') { - if(typeof obj.headers[this.name] === 'undefined') { - obj.headers[this.name] = this.value; - } - - return true; - } -}; - -var CookieAuthorization = module.exports.CookieAuthorization = function (cookie) { - this.cookie = cookie; -}; - -CookieAuthorization.prototype.apply = function (obj) { - obj.cookieJar = obj.cookieJar || new CookieJar(); - obj.cookieJar.setCookie(this.cookie); - - return true; -}; - -/** - * Password Authorization is a basic auth implementation - */ -var PasswordAuthorization = module.exports.PasswordAuthorization = function (username, password) { - if (arguments.length === 3) { - helpers.log('PasswordAuthorization: the \'name\' argument has been removed, pass only username and password'); - username = arguments[1]; - password = arguments[2]; - } - this.username = username; - this.password = password; -}; - -PasswordAuthorization.prototype.apply = function (obj) { - if(typeof obj.headers.Authorization === 'undefined') { - obj.headers.Authorization = 'Basic ' + btoa(this.username + ':' + this.password); - } - - return true; -}; - -},{"./helpers":4,"btoa":18,"cookiejar":19,"lodash-compat/collection/each":55,"lodash-compat/collection/includes":58,"lodash-compat/lang/isArray":143,"lodash-compat/lang/isObject":147}],3:[function(require,module,exports){ -'use strict'; - -var _ = { - bind: require('lodash-compat/function/bind'), - cloneDeep: require('lodash-compat/lang/cloneDeep'), - find: require('lodash-compat/collection/find'), - forEach: require('lodash-compat/collection/forEach'), - indexOf: require('lodash-compat/array/indexOf'), - isArray: require('lodash-compat/lang/isArray'), - isObject: require('lodash-compat/lang/isObject'), - isFunction: require('lodash-compat/lang/isFunction'), - isPlainObject: require('lodash-compat/lang/isPlainObject'), - isUndefined: require('lodash-compat/lang/isUndefined') -}; -var auth = require('./auth'); -var helpers = require('./helpers'); -var Model = require('./types/model'); -var Operation = require('./types/operation'); -var OperationGroup = require('./types/operationGroup'); -var Resolver = require('./resolver'); -var SwaggerHttp = require('./http'); -var SwaggerSpecConverter = require('./spec-converter'); - -// We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the -// following usage: 'client.{tagName}' -var reservedClientTags = [ - 'apis', - 'authorizationScheme', - 'authorizations', - 'basePath', - 'build', - 'buildFrom1_1Spec', - 'buildFrom1_2Spec', - 'buildFromSpec', - 'clientAuthorizations', - 'convertInfo', - 'debug', - 'defaultErrorCallback', - 'defaultSuccessCallback', - 'fail', - 'failure', - 'finish', - 'help', - 'idFromOp', - 'info', - 'initialize', - 'isBuilt', - 'isValid', - 'modelPropertyMacro', - 'models', - 'modelsArray', - 'options', - 'parameterMacro', - 'parseUri', - 'progress', - 'resourceCount', - 'sampleModels', - 'selfReflect', - 'setConsolidatedModels', - 'spec', - 'supportedSubmitMethods', - 'swaggerRequestHeaders', - 'tagFromLabel', - 'url', - 'useJQuery' -]; -// We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the -// following usage: 'client.apis.{tagName}' -var reservedApiTags = [ - 'apis', - 'asCurl', - 'description', - 'externalDocs', - 'help', - 'label', - 'name', - 'operation', - 'operations', - 'operationsArray', - 'path', - 'tag' -]; -var supportedOperationMethods = ['delete', 'get', 'head', 'options', 'patch', 'post', 'put']; -var SwaggerClient = module.exports = function (url, options) { - this.authorizations = null; - this.authorizationScheme = null; - this.basePath = null; - this.debug = false; - this.info = null; - this.isBuilt = false; - this.isValid = false; - this.modelsArray = []; - this.resourceCount = 0; - this.url = null; - this.useJQuery = false; - this.swaggerObject = {} - - this.clientAuthorizations = new auth.SwaggerAuthorizations(); - - if (typeof url !== 'undefined') { - return this.initialize(url, options); - } else { - return this; - } -}; - -SwaggerClient.prototype.initialize = function (url, options) { - this.models = {}; - this.sampleModels = {}; - - if (typeof url === 'string') { - this.url = url; - } else if (_.isObject(url)) { - options = url; - this.url = options.url; - } - - options = options || {}; - this.clientAuthorizations.add(options.authorizations); - this.swaggerRequestHeaders = options.swaggerRequestHeaders || 'application/json;charset=utf-8,*/*'; - this.defaultSuccessCallback = options.defaultSuccessCallback || null; - this.defaultErrorCallback = options.defaultErrorCallback || null; - this.modelPropertyMacro = options.modelPropertyMacro || null; - this.parameterMacro = options.parameterMacro || null; - - if (typeof options.success === 'function') { - this.success = options.success; - } - - if (options.useJQuery) { - this.useJQuery = options.useJQuery; - } - - this.options = options || {}; - - this.supportedSubmitMethods = options.supportedSubmitMethods || []; - this.failure = options.failure || function () {}; - this.progress = options.progress || function () {}; - this.spec = _.cloneDeep(options.spec); // Clone so we do not alter the provided document - - if (typeof options.success === 'function') { - this.ready = true; - this.build(); - } -}; - -SwaggerClient.prototype.build = function (mock) { - if (this.isBuilt) { - return this; - } - - var self = this; - - this.progress('fetching resource list: ' + this.url); - - var obj = { - useJQuery: this.useJQuery, - url: this.url, - method: 'get', - headers: { - accept: this.swaggerRequestHeaders - }, - on: { - error: function (response) { - if (self.url.substring(0, 4) !== 'http') { - return self.fail('Please specify the protocol for ' + self.url); - } else if (response.status === 0) { - return self.fail('Can\'t read from server. It may not have the appropriate access-control-origin settings.'); - } else if (response.status === 404) { - return self.fail('Can\'t read swagger JSON from ' + self.url); - } else { - return self.fail(response.status + ' : ' + response.statusText + ' ' + self.url); - } - }, - response: function (resp) { - - var responseObj = resp.obj; - if(!responseObj) { - return self.fail('failed to parse JSON/YAML response'); - } - - self.swaggerVersion = responseObj.swaggerVersion; - self.swaggerObject = responseObj - - if (responseObj.swagger && parseInt(responseObj.swagger) === 2) { - self.swaggerVersion = responseObj.swagger; - - new Resolver().resolve(responseObj, self.url, self.buildFromSpec, self); - - self.isValid = true; - } else { - var converter = new SwaggerSpecConverter(); - self.oldSwaggerObject = self.swaggerObject - - converter.setDocumentationLocation(self.url); - converter.convert(responseObj, self.clientAuthorizations, function(spec) { - self.swaggerObject = spec - new Resolver().resolve(spec, self.url, self.buildFromSpec, self); - self.isValid = true; - }); - } - } - } - }; - - if (this.spec) { - self.swaggerObject = this.spec - setTimeout(function () { - new Resolver().resolve(self.spec, self.buildFromSpec, self); - }, 10); - } else { - this.clientAuthorizations.apply(obj); - - if (mock) { - return obj; - } - - new SwaggerHttp().execute(obj, this.options); - } - - return this; -}; - -SwaggerClient.prototype.buildFromSpec = function (response) { - if (this.isBuilt) { - return this; - } - - this.apis = {}; - this.apisArray = []; - this.basePath = response.basePath || ''; - this.consumes = response.consumes; - this.host = response.host || ''; - this.info = response.info || {}; - this.produces = response.produces; - this.schemes = response.schemes || []; - this.securityDefinitions = response.securityDefinitions; - this.title = response.title || ''; - - if (response.externalDocs) { - this.externalDocs = response.externalDocs; - } - - // legacy support - this.authSchemes = response.securityDefinitions; - - var definedTags = {}; - var k; - - if (Array.isArray(response.tags)) { - definedTags = {}; - - for (k = 0; k < response.tags.length; k++) { - var t = response.tags[k]; - definedTags[t.name] = t; - } - } - - var location; - - if (typeof this.url === 'string') { - location = this.parseUri(this.url); - if (typeof this.schemes === 'undefined' || this.schemes.length === 0) { - this.scheme = location.scheme || 'http'; - } else { - this.scheme = this.schemes[0]; - } - - if (typeof this.host === 'undefined' || this.host === '') { - this.host = location.host; - - if (location.port) { - this.host = this.host + ':' + location.port; - } - } - } - else { - if (typeof this.schemes === 'undefined' || this.schemes.length === 0) { - this.scheme = 'http'; - } - else { - this.scheme = this.schemes[0]; - } - } - - this.definitions = response.definitions; - - var key; - - for (key in this.definitions) { - var model = new Model(key, this.definitions[key], this.models, this.modelPropertyMacro); - - if (model) { - this.models[key] = model; - } - } - - // get paths, create functions for each operationId - var self = this; - - // Bind help to 'client.apis' - self.apis.help = _.bind(self.help, self); - - _.forEach(response.paths, function (pathObj, path) { - // Only process a path if it's an object - if (!_.isPlainObject(pathObj)) { - return; - } - - _.forEach(supportedOperationMethods, function (method) { - var operation = pathObj[method]; - - if (_.isUndefined(operation)) { - // Operation does not exist - return; - } else if (!_.isPlainObject(operation)) { - // Operation exists but it is not an Operation Object. Since this is invalid, log it. - helpers.log('The \'' + method + '\' operation for \'' + path + '\' path is not an Operation Object'); - - return; - } - - var tags = operation.tags; - - if (_.isUndefined(tags) || !_.isArray(tags) || tags.length === 0) { - tags = operation.tags = [ 'default' ]; - } - - var operationId = self.idFromOp(path, method, operation); - var operationObject = new Operation(self, - operation.scheme, - operationId, - method, - path, - operation, - self.definitions, - self.models, - self.clientAuthorizations); - - // bind self operation's execute command to the api - _.forEach(tags, function (tag) { - var clientProperty = _.indexOf(reservedClientTags, tag) > -1 ? '_' + tag : tag; - var apiProperty = _.indexOf(reservedApiTags, tag) > -1 ? '_' + tag : tag; - var operationGroup = self[clientProperty]; - - if (clientProperty !== tag) { - helpers.log('The \'' + tag + '\' tag conflicts with a SwaggerClient function/property name. Use \'client.' + - clientProperty + '\' or \'client.apis.' + tag + '\' instead of \'client.' + tag + '\'.'); - } - - if (apiProperty !== tag) { - helpers.log('The \'' + tag + '\' tag conflicts with a SwaggerClient operation function/property name. Use ' + - '\'client.apis.' + apiProperty + '\' instead of \'client.apis.' + tag + '\'.'); - } - - if (_.indexOf(reservedApiTags, operationId) > -1) { - helpers.log('The \'' + operationId + '\' operationId conflicts with a SwaggerClient operation ' + - 'function/property name. Use \'client.apis.' + apiProperty + '._' + operationId + - '\' instead of \'client.apis.' + apiProperty + '.' + operationId + '\'.'); - - operationId = '_' + operationId; - operationObject.nickname = operationId; // So 'client.apis.[tag].operationId.help() works properly - } - - if (_.isUndefined(operationGroup)) { - operationGroup = self[clientProperty] = self.apis[apiProperty] = {}; - - operationGroup.operations = {}; - operationGroup.label = apiProperty; - operationGroup.apis = {}; - - var tagDef = definedTags[tag]; - - if (!_.isUndefined(tagDef)) { - operationGroup.description = tagDef.description; - operationGroup.externalDocs = tagDef.externalDocs; - } - - self[clientProperty].help = _.bind(self.help, operationGroup); - self.apisArray.push(new OperationGroup(tag, operationGroup.description, operationGroup.externalDocs, operationObject)); - } - - // Bind tag help - if (!_.isFunction(operationGroup.help)) { - operationGroup.help = _.bind(self.help, operationGroup); - } - - // bind to the apis object - self.apis[apiProperty][operationId] = operationGroup[operationId] = _.bind(operationObject.execute, - operationObject); - self.apis[apiProperty][operationId].help = operationGroup[operationId].help = _.bind(operationObject.help, - operationObject); - self.apis[apiProperty][operationId].asCurl = operationGroup[operationId].asCurl = _.bind(operationObject.asCurl, - operationObject); - - operationGroup.apis[operationId] = operationGroup.operations[operationId] = operationObject; - - // legacy UI feature - var api = _.find(self.apisArray, function (api) { - return api.tag === tag; - }); - - if (api) { - api.operationsArray.push(operationObject); - } - }); - }); - }); - - this.isBuilt = true; - - if (this.success) { - this.isValid = true; - this.isBuilt = true; - this.success(); - } - - return this; -}; - -SwaggerClient.prototype.parseUri = function (uri) { - var urlParseRE = /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/; - var parts = urlParseRE.exec(uri); - - return { - scheme: parts[4].replace(':',''), - host: parts[11], - port: parts[12], - path: parts[15] - }; -}; - -SwaggerClient.prototype.help = function (dontPrint) { - var output = ''; - - if (this instanceof SwaggerClient) { - _.forEach(this.apis, function (api, name) { - if (_.isPlainObject(api)) { - output += 'operations for the \'' + name + '\' tag\n'; - - _.forEach(api.operations, function (operation, name) { - output += ' * ' + name + ': ' + operation.summary + '\n'; - }); - } - }); - } else if (this instanceof OperationGroup || _.isPlainObject(this)) { - output += 'operations for the \'' + this.label + '\' tag\n'; - - _.forEach(this.apis, function (operation, name) { - output += ' * ' + name + ': ' + operation.summary + '\n'; - }); - } - - if (dontPrint) { - return output; - } else { - helpers.log(output); - - return output; - } -}; - -SwaggerClient.prototype.tagFromLabel = function (label) { - return label; -}; - -SwaggerClient.prototype.idFromOp = function (path, httpMethod, op) { - if(!op || !op.operationId) { - op = op || {}; - op.operationId = httpMethod + '_' + path; - } - var opId = op.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g, '_') || (path.substring(1) + '_' + httpMethod); - - opId = opId.replace(/((_){2,})/g, '_'); - opId = opId.replace(/^(_)*/g, ''); - opId = opId.replace(/([_])*$/g, ''); - return opId; -}; - -SwaggerClient.prototype.setHost = function (host) { - this.host = host; - - if(this.apis) { - _.forEach(this.apis, function(api) { - if(api.operations) { - _.forEach(api.operations, function(operation) { - operation.host = host; - }); - } - }); - } -}; - -SwaggerClient.prototype.setBasePath = function (basePath) { - this.basePath = basePath; - - if(this.apis) { - _.forEach(this.apis, function(api) { - if(api.operations) { - _.forEach(api.operations, function(operation) { - operation.basePath = basePath; - }); - } - }); - } -}; - -SwaggerClient.prototype.fail = function (message) { - this.failure(message); - - throw message; -}; -},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":52,"lodash-compat/collection/find":56,"lodash-compat/collection/forEach":57,"lodash-compat/function/bind":61,"lodash-compat/lang/cloneDeep":141,"lodash-compat/lang/isArray":143,"lodash-compat/lang/isFunction":145,"lodash-compat/lang/isObject":147,"lodash-compat/lang/isPlainObject":148,"lodash-compat/lang/isUndefined":151}],4:[function(require,module,exports){ -(function (process){ -'use strict'; - -var _ = { - isPlainObject: require('lodash-compat/lang/isPlainObject'), - indexOf: require('lodash-compat/array/indexOf') -}; - -module.exports.__bind = function (fn, me) { - return function(){ - return fn.apply(me, arguments); - }; -}; - -var log = module.exports.log = function() { - // Only log if available and we're not testing - if (console && process.env.NODE_ENV !== 'test') { - console.log(Array.prototype.slice.call(arguments)[0]); - } -}; - -module.exports.fail = function (message) { - log(message); -}; - -var optionHtml = module.exports.optionHtml = function (label, value) { - return '' + label + ':' + value + ''; -}; - -var resolveSchema = module.exports.resolveSchema = function (schema) { - if (_.isPlainObject(schema.schema)) { - schema = resolveSchema(schema.schema); - } - - return schema; -}; - -var simpleRef = module.exports.simpleRef = function (name) { - if (typeof name === 'undefined') { - return null; - } - - if (name.indexOf('#/definitions/') === 0) { - return name.substring('#/definitions/'.length); - } else { - return name; - } -}; - - -}).call(this,require('_process')) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9oZWxwZXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG52YXIgXyA9IHtcbiAgaXNQbGFpbk9iamVjdDogcmVxdWlyZSgnbG9kYXNoLWNvbXBhdC9sYW5nL2lzUGxhaW5PYmplY3QnKSxcbiAgaW5kZXhPZjogcmVxdWlyZSgnbG9kYXNoLWNvbXBhdC9hcnJheS9pbmRleE9mJylcbn07XG5cbm1vZHVsZS5leHBvcnRzLl9fYmluZCA9IGZ1bmN0aW9uIChmbiwgbWUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uKCl7XG4gICAgcmV0dXJuIGZuLmFwcGx5KG1lLCBhcmd1bWVudHMpO1xuICB9O1xufTtcblxudmFyIGxvZyA9IG1vZHVsZS5leHBvcnRzLmxvZyA9IGZ1bmN0aW9uKCkge1xuICAvLyBPbmx5IGxvZyBpZiBhdmFpbGFibGUgYW5kIHdlJ3JlIG5vdCB0ZXN0aW5nXG4gIGlmIChjb25zb2xlICYmIHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAndGVzdCcpIHtcbiAgICBjb25zb2xlLmxvZyhBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpWzBdKTtcbiAgfVxufTtcblxubW9kdWxlLmV4cG9ydHMuZmFpbCA9IGZ1bmN0aW9uIChtZXNzYWdlKSB7XG4gIGxvZyhtZXNzYWdlKTtcbn07XG5cbnZhciBvcHRpb25IdG1sID0gbW9kdWxlLmV4cG9ydHMub3B0aW9uSHRtbCA9IGZ1bmN0aW9uIChsYWJlbCwgdmFsdWUpIHtcbiAgcmV0dXJuICc8dHI+PHRkIGNsYXNzPVwib3B0aW9uTmFtZVwiPicgKyBsYWJlbCArICc6PC90ZD48dGQ+JyArIHZhbHVlICsgJzwvdGQ+PC90cj4nO1xufTtcblxudmFyIHJlc29sdmVTY2hlbWEgPSBtb2R1bGUuZXhwb3J0cy5yZXNvbHZlU2NoZW1hID0gZnVuY3Rpb24gKHNjaGVtYSkge1xuICBpZiAoXy5pc1BsYWluT2JqZWN0KHNjaGVtYS5zY2hlbWEpKSB7XG4gICAgc2NoZW1hID0gcmVzb2x2ZVNjaGVtYShzY2hlbWEuc2NoZW1hKTtcbiAgfVxuXG4gIHJldHVybiBzY2hlbWE7XG59O1xuXG52YXIgc2ltcGxlUmVmID0gbW9kdWxlLmV4cG9ydHMuc2ltcGxlUmVmID0gZnVuY3Rpb24gKG5hbWUpIHtcbiAgaWYgKHR5cGVvZiBuYW1lID09PSAndW5kZWZpbmVkJykge1xuICAgIHJldHVybiBudWxsO1xuICB9XG5cbiAgaWYgKG5hbWUuaW5kZXhPZignIy9kZWZpbml0aW9ucy8nKSA9PT0gMCkge1xuICAgIHJldHVybiBuYW1lLnN1YnN0cmluZygnIy9kZWZpbml0aW9ucy8nLmxlbmd0aCk7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIG5hbWU7XG4gIH1cbn07XG5cbiJdfQ== -},{"_process":17,"lodash-compat/array/indexOf":52,"lodash-compat/lang/isPlainObject":148}],5:[function(require,module,exports){ -'use strict'; - -var helpers = require('./helpers'); -var jQuery = require('jquery'); -var request = require('superagent'); -var jsyaml = require('js-yaml'); -var _ = { - isObject: require('lodash-compat/lang/isObject') -}; - -/* - * JQueryHttpClient is a light-weight, node or browser HTTP client - */ -var JQueryHttpClient = function () {}; - -/* - * SuperagentHttpClient is a light-weight, node or browser HTTP client - */ -var SuperagentHttpClient = function () {}; - -/** - * SwaggerHttp is a wrapper for executing requests - */ -var SwaggerHttp = module.exports = function () {}; - -SwaggerHttp.prototype.execute = function (obj, opts) { - var client; - - if(opts && opts.client) { - client = opts.client; - } - else { - client = new SuperagentHttpClient(opts); - } - - // legacy support - if ((obj && obj.useJQuery === true) || this.isInternetExplorer()) { - client = new JQueryHttpClient(opts); - } - - var success = obj.on.response; - - var responseInterceptor = function(data) { - if(opts && opts.responseInterceptor) { - data = opts.responseInterceptor.apply(data); - } - success(data); - }; - - obj.on.response = function(data) { - responseInterceptor(data); - }; - - - if (_.isObject(obj) && _.isObject(obj.body)) { - // special processing for file uploads via jquery - if (obj.body.type && obj.body.type === 'formData'){ - obj.contentType = false; - obj.processData = false; - - delete obj.headers['Content-Type']; - } else { - obj.body = JSON.stringify(obj.body); - } - } - client.execute(obj); -}; - -SwaggerHttp.prototype.isInternetExplorer = function () { - var detectedIE = false; - - if (typeof navigator !== 'undefined' && navigator.userAgent) { - var nav = navigator.userAgent.toLowerCase(); - - if (nav.indexOf('msie') !== -1) { - var version = parseInt(nav.split('msie')[1]); - - if (version <= 8) { - detectedIE = true; - } - } - } - - return detectedIE; -}; - -JQueryHttpClient.prototype.execute = function (obj) { - var cb = obj.on; - var request = obj; - - obj.type = obj.method; - obj.cache = false; - delete obj.useJQuery; - - /* - obj.beforeSend = function (xhr) { - var key, results; - if (obj.headers) { - results = []; - for (key in obj.headers) { - if (key.toLowerCase() === 'content-type') { - results.push(obj.contentType = obj.headers[key]); - } else if (key.toLowerCase() === 'accept') { - results.push(obj.accepts = obj.headers[key]); - } else { - results.push(xhr.setRequestHeader(key, obj.headers[key])); - } - } - return results; - } - };*/ - - obj.data = obj.body; - - delete obj.body; - - obj.complete = function (response) { - var headers = {}; - var headerArray = response.getAllResponseHeaders().split('\n'); - - for (var i = 0; i < headerArray.length; i++) { - var toSplit = headerArray[i].trim(); - - if (toSplit.length === 0) { - continue; - } - - var separator = toSplit.indexOf(':'); - - if (separator === -1) { - // Name but no value in the header - headers[toSplit] = null; - - continue; - } - - var name = toSplit.substring(0, separator).trim(); - var value = toSplit.substring(separator + 1).trim(); - - headers[name] = value; - } - - var out = { - url: request.url, - method: request.method, - status: response.status, - statusText: response.statusText, - data: response.responseText, - headers: headers - }; - - try { - var possibleObj = response.responseJSON || jsyaml.safeLoad(response.responseText); - out.obj = (typeof possibleObj === 'string') ? {} : possibleObj; - } catch (ex) { - // do not set out.obj - helpers.log('unable to parse JSON/YAML content'); - } - - // I can throw, or parse null? - out.obj = out.obj || null; - - if (response.status >= 200 && response.status < 300) { - cb.response(out); - } else if (response.status === 0 || (response.status >= 400 && response.status < 599)) { - cb.error(out); - } else { - return cb.response(out); - } - }; - - jQuery.support.cors = true; - - return jQuery.ajax(obj); -}; - -SuperagentHttpClient.prototype.execute = function (obj) { - var method = obj.method.toLowerCase(); - - if (method === 'delete') { - method = 'del'; - } - var headers = obj.headers || {}; - var r = request[method](obj.url); - var name; - for (name in headers) { - r.set(name, headers[name]); - } - - if (obj.body) { - r.send(obj.body); - } - - if(typeof r.buffer === 'function') { - r.buffer(); // force superagent to populate res.text with the raw response data - } - - r.end(function (err, res) { - res = res || { - status: 0, - headers: {error: 'no response from server'} - }; - var response = { - url: obj.url, - method: obj.method, - headers: res.headers - }; - var cb; - - if (!err && res.error) { - err = res.error; - } - - if (err && obj.on && obj.on.error) { - response.obj = err; - response.status = res ? res.status : 500; - response.statusText = res ? res.text : err.message; - cb = obj.on.error; - } else if (res && obj.on && obj.on.response) { - var possibleObj; - - // Already parsed by by superagent? - if(res.body && Object.keys(res.body).length > 0) { - possibleObj = res.body; - } else { - try { - possibleObj = jsyaml.safeLoad(res.text); - // can parse into a string... which we don't need running around in the system - possibleObj = (typeof possibleObj === 'string') ? null : possibleObj; - } catch(e) { - helpers.log('cannot parse JSON/YAML content'); - } - } - - // null means we can't parse into object - response.obj = possibleObj || null; - - response.status = res.status; - response.statusText = res.text; - cb = obj.on.response; - } - response.data = response.statusText; - - if (cb) { - cb(response); - } - }); -}; - -},{"./helpers":4,"jquery":20,"js-yaml":21,"lodash-compat/lang/isObject":147,"superagent":160}],6:[function(require,module,exports){ -'use strict'; - -var SwaggerHttp = require('./http'); -var _ = { - isObject: require('lodash-compat/lang/isObject'), - isArray: require('lodash-compat/lang/isArray') -}; - - -/** - * Resolves a spec's remote references - */ -var Resolver = module.exports = function () {}; - -Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { - var root = arg1, callback = arg2, scope = arg3, location, i; - if(typeof arg1 === 'function') { - root = null; - callback = arg1; - scope = arg2; - } - var _root = root; - this.scope = (scope || this); - this.iteration = this.iteration || 0; - - var name, path, property, propertyName; - var processedCalls = 0, resolvedRefs = {}, unresolvedRefs = {}; - var resolutionTable = []; // store objects for dereferencing - - // definitions - for (name in spec.definitions) { - var definition = spec.definitions[name]; - for (propertyName in definition.properties) { - property = definition.properties[propertyName]; - this.resolveTo(root, property, resolutionTable, '/definitions'); - } - - if(definition.allOf) { - definition['x-resolved-from'] = [ '#/definitions/' + name ]; - var allOf = definition.allOf; - // the refs go first - allOf.sort(function(a, b) { - if(a.$ref && b.$ref) { return 0; } - else if(a.$ref) { return -1; } - else { return 1; } - }); - for (i = 0; i < allOf.length; i++) { - property = allOf[i]; - location = '/definitions/' + name + '/allOf'; - this.resolveInline(null, spec, property, resolutionTable, unresolvedRefs, location); - } - } - } - - // operations - for (name in spec.paths) { - var method, operation, responseCode; - path = spec.paths[name]; - - for (method in path) { - // operation reference - if(method === '$ref') { - // location = path[method]; - location = '/paths' + name; - this.resolveInline(root, spec, path, resolutionTable, unresolvedRefs, location); - } - else { - operation = path[method]; - - var parameters = operation.parameters; - for (i in parameters) { - var parameter = parameters[i]; - location = '/paths' + name + '/' + method + '/parameters'; - - if (parameter.in === 'body' && parameter.schema) { - this.resolveTo(root, parameter.schema, resolutionTable, location); - } - - if (parameter.$ref) { - // parameter reference - this.resolveInline(root, spec, parameter, resolutionTable, unresolvedRefs, parameter.$ref); - } - } - - for (responseCode in operation.responses) { - var response = operation.responses[responseCode]; - location = '/paths' + name + '/' + method + '/responses/' + responseCode; - - if(_.isObject(response)) { - if(response.$ref) { - // response reference - this.resolveInline(root, spec, response, resolutionTable, unresolvedRefs, location); - } - if (response.schema) { - this.resolveTo(root, response.schema, resolutionTable, location); - } - } - } - } - } - } - - var expectedCalls = 0, toResolve = []; - // if the root is same as obj[i].root we can resolve locally - var all = resolutionTable; - - for(i = 0; i < all.length; i++) { - var a = all[i]; - if(root === a.root) { - if(a.resolveAs === 'ref') { - // resolve any path walking - var joined = ((a.root || '') + '/' + a.key).split('/'); - var normalized = []; - var url = ''; - var k; - - if(a.key.indexOf('../') >= 0) { - for(var j = 0; j < joined.length; j++) { - if(joined[j] === '..') { - normalized = normalized.slice(0, normalized.length-1); - } - else { - normalized.push(joined[j]); - } - } - for(k = 0; k < normalized.length; k ++) { - if(k > 0) { - url += '/'; - } - url += normalized[k]; - } - // we now have to remote resolve this because the path has changed - a.root = url; - toResolve.push(a); - } - else { - var parts = a.key.split('#'); - if(parts.length === 2) { - if(parts[0].indexOf('http://') === 0 || parts[0].indexOf('https://') === 0) { - a.root = parts[0]; - } - location = parts[1].split('/'); - var r; - var s = spec; - for(k = 0; k < location.length; k++) { - var part = location[k]; - if(part !== '') { - s = s[part]; - if(typeof s !== 'undefined') { - r = s; - } - else { - r = null; - break; - } - } - } - if(r === null) { - // must resolve this too - toResolve.push(a); - } - } - } - } - else { - if (a.resolveAs === 'inline') { - toResolve.push(a); - } - } - } - else { - toResolve.push(a); - } - } - expectedCalls = toResolve.length; - - // resolve anything that is local - for(var ii = 0; ii < toResolve.length; ii++) { - (function(item, self) { - if(item.root === null) { - // local resolve - self.resolveItem(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, item); - processedCalls += 1; - - if(processedCalls === expectedCalls) { - self.finish(spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback); - } - } - else { - var obj = { - useJQuery: false, // TODO - url: item.root, - method: 'get', - headers: { - accept: self.scope.swaggerRequestHeaders || 'application/json' - }, - on: { - error: function () { - processedCalls += 1; - unresolvedRefs[item.key] = null; - - if (processedCalls === expectedCalls) { - self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); - } - }, // jshint ignore:line - response: function (response) { - var swagger = response.obj; - self.resolveItem(swagger, _root, resolutionTable, resolvedRefs, unresolvedRefs, item); - processedCalls += 1; - - if (processedCalls === expectedCalls) { - self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); - } - } - } // jshint ignore:line - }; - - if (scope && scope.clientAuthorizations) { - scope.clientAuthorizations.apply(obj); - } - new SwaggerHttp().execute(obj); - } - }(toResolve[ii], this)); - } - - if (Object.keys(toResolve).length === 0) { - this.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); - } -}; - -Resolver.prototype.resolveItem = function(spec, root, resolutionTable, resolvedRefs, unresolvedRefs, item) { - var path = item.location; - var location = spec, parts = path.split('/'); - for (var j = 0; j < parts.length; j++) { - var segment = parts[j]; - if(segment.indexOf('~1') !== -1) { - segment = parts[j].replace(/~0/g, '~').replace(/~1/g, '/'); - if(segment.charAt(0) !== '/') { - segment = '/' + segment; - } - } - if (typeof location === 'undefined' || location === null) { - break; - } - if(segment === '' && j === (parts.length - 1) && parts.length > 1) { - location = null; - break; - } - if (segment.length > 0) { - location = location[segment]; - } - } - var resolved = item.key; - parts = item.key.split('/'); - var resolvedName = parts[parts.length-1]; - - if(resolvedName.indexOf('#') >= 0) { - resolvedName = resolvedName.split('#')[1]; - } - - if (location !== null && typeof location !== 'undefined') { - resolvedRefs[resolved] = { - name: resolvedName, - obj: location, - key: item.key, - root: item.root - }; - } else { - unresolvedRefs[resolved] = { - root: item.root, - location: item.location - }; - } -}; - -Resolver.prototype.finish = function (spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback) { - // walk resolution table and replace with resolved refs - var ref; - for (ref in resolutionTable) { - var item = resolutionTable[ref]; - - var key = item.key; - var resolvedTo = resolvedRefs[key]; - if (resolvedTo) { - spec.definitions = spec.definitions || {}; - if (item.resolveAs === 'ref') { - spec.definitions[resolvedTo.name] = resolvedTo.obj; - item.obj.$ref = '#/definitions/' + resolvedTo.name; - } else if (item.resolveAs === 'inline') { - var targetObj = item.obj; - targetObj['x-resolved-from'] = [ item.key ]; - delete targetObj.$ref; - - for (key in resolvedTo.obj) { - var abs = this.retainRoot(resolvedTo.obj[key], item.root); - targetObj[key] = abs; - } - } - } - } - var existingUnresolved = this.countUnresolvedRefs(spec); - - if(existingUnresolved.length === 0 || this.iteration > 5) { - this.resolveAllOf(spec.definitions); - callback.call(this.scope, spec, unresolvedRefs); - } - else { - this.iteration += 1; - this.resolve(spec, root, callback, this.scope); - } -}; - -Resolver.prototype.countUnresolvedRefs = function(spec) { - var i; - var refs = this.getRefs(spec); - var keys = []; - var unresolvedKeys = []; - for(i in refs) { - if(i.indexOf('#') === 0) { - keys.push(i.substring(1)); - } - else { - unresolvedKeys.push(i); - } - } - - // verify possible keys - for (i = 0; i < keys.length; i++) { - var part = keys[i]; - var parts = part.split('/'); - var obj = spec; - - for (var k = 0; k < parts.length; k++) { - var key = parts[k]; - if(key !== '') { - obj = obj[key]; - if(typeof obj === 'undefined') { - unresolvedKeys.push(part); - break; - } - } - } - } - return unresolvedKeys.length; -}; - -Resolver.prototype.getRefs = function(spec, obj) { - obj = obj || spec; - var output = {}; - for(var key in obj) { - var item = obj[key]; - if(key === '$ref' && typeof item === 'string') { - output[item] = null; - } - else if(_.isObject(item)) { - var o = this.getRefs(item); - for(var k in o) { - output[k] = null; - } - } - } - return output; -}; - -Resolver.prototype.retainRoot = function(obj, root) { - // walk object and look for relative $refs - for(var key in obj) { - var item = obj[key]; - if(key === '$ref' && typeof item === 'string') { - // stop and inspect - if(item.indexOf('http://') !== 0 && item.indexOf('https://') !== 0) { - if(item.indexOf('#') !== 0) { - item = '#' + item; - } - item = (root || '') + item; - obj[key] = item; - } - } - else if(_.isObject(item)) { - this.retainRoot(item, root); - } - } - return obj; -}; - -/** - * immediately in-lines local refs, queues remote refs - * for inline resolution - */ -Resolver.prototype.resolveInline = function (root, spec, property, resolutionTable, unresolvedRefs, location) { - var key = property.$ref, ref = property.$ref, i, p, p2, rs; - var rootTrimmed = false; - if (ref) { - if(ref.indexOf('../') === 0) { - // reset root - p = ref.split('../'); - p2 = root.split('/'); - ref = ''; - for(i = 0; i < p.length; i++) { - if(p[i] === '') { - p2 = p2.slice(0, p2.length-1); - } - else { - ref += p[i]; - } - } - root = ''; - for(i = 0; i < p2.length - 1; i++) { - if(i > 0) { root += '/'; } - root += p2[i]; - } - rootTrimmed = true; - } - if(ref.indexOf('#') >= 0) { - if(ref.indexOf('/') === 0) { - rs = ref.split('#'); - p = root.split('//'); - p2 = p[1].split('/'); - root = p[0] + '//' + p2[0] + rs[0]; - location = rs[1]; - } - else { - rs = ref.split('#'); - if(rs[0] !== '') { - p2 = root.split('/'); - p2 = p2.slice(0, p2.length - 1); - if(!rootTrimmed) { - root = ''; - for (var k = 0; k < p2.length; k++) { - if(k > 0) { root += '/'; } - root += p2[k]; - } - } - root += '/' + ref.split('#')[0]; - } - location = rs[1]; - } - } - if (ref.indexOf('http') === 0) { - if(ref.indexOf('#') >= 0) { - root = ref.split('#')[0]; - location = ref.split('#')[1]; - } - else { - root = ref; - location = ''; - } - resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); - } else if (ref.indexOf('#') === 0) { - location = ref.split('#')[1]; - resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); - } - else { - resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); - } - } else if (property.type === 'array') { - this.resolveTo(root, property.items, resolutionTable, location); - } -}; - -Resolver.prototype.resolveTo = function (root, property, resolutionTable, location) { - var ref = property.$ref; - - if (ref) { - if(ref.indexOf('#') >= 0) { - location = ref.split('#')[1]; - } - resolutionTable.push({ - obj: property, resolveAs: 'ref', root: root, key: ref, location: location - }); - } else if (property.type === 'array') { - var items = property.items; - this.resolveTo(root, items, resolutionTable, location); - } -}; - -Resolver.prototype.resolveAllOf = function(spec, obj, depth) { - depth = depth || 0; - obj = obj || spec; - var name; - for(var key in obj) { - var item = obj[key]; - if(item === null) { - throw new TypeError("Swagger 2.0 does not support null types (" + obj + "). See https://github.com/swagger-api/swagger-spec/issues/229.") - } - if(typeof item === 'object') { - this.resolveAllOf(spec, item, depth + 1); - } - if(item && typeof item.allOf !== 'undefined') { - var allOf = item.allOf; - if(_.isArray(allOf)) { - var output = {}; - output['x-composed'] = true; - if (typeof item['x-resolved-from'] !== 'undefined') { - output['x-resolved-from'] = item['x-resolved-from']; - } - output.properties = {}; - for(var i = 0; i < allOf.length; i++) { - var component = allOf[i]; - var source = 'self'; - if(typeof component['x-resolved-from'] !== 'undefined') { - source = component['x-resolved-from'][0]; - } - - for(var part in component) { - if(!output.hasOwnProperty(part)) { - output[part] = JSON.parse(JSON.stringify(component[part])); - if(part === 'properties') { - for(name in output[part]) { - output[part][name]['x-resolved-from'] = source; - } - } - } - else { - if(part === 'properties') { - var properties = component[part]; - for(name in properties) { - output.properties[name] = JSON.parse(JSON.stringify(properties[name])); - var resolvedFrom = properties[name]['x-resolved-from']; - if (typeof resolvedFrom === 'undefined' || resolvedFrom === 'self') { - resolvedFrom = source; - } - output.properties[name]['x-resolved-from'] = resolvedFrom; - } - } - else if(part === 'required') { - // merge & dedup the required array - var a = output.required.concat(component[part]); - for(var k = 0; k < a.length; ++k) { - for(var j = k + 1; j < a.length; ++j) { - if(a[k] === a[j]) { a.splice(j--, 1); } - } - } - output.required = a; - } - else if(part === 'x-resolved-from') { - output['x-resolved-from'].push(source); - } - else { - // TODO: need to merge this property - // console.log('what to do with ' + part) - } - } - } - } - obj[key] = output; - } - } - if(_.isObject(item)) { - this.resolveAllOf(spec, item, depth + 1); - } - } -}; - -},{"./http":5,"lodash-compat/lang/isArray":143,"lodash-compat/lang/isObject":147}],7:[function(require,module,exports){ -'use strict'; - -var Helpers = require('./helpers'); - -var _ = { - isPlainObject: require('lodash-compat/lang/isPlainObject'), - isUndefined: require('lodash-compat/lang/isUndefined'), - isArray: require('lodash-compat/lang/isArray'), - isObject: require('lodash-compat/lang/isObject'), - isEmpty: require('lodash-compat/lang/isEmpty'), - map: require('lodash-compat/collection/map'), - indexOf: require('lodash-compat/array/indexOf'), - cloneDeep: require('lodash-compat/lang/cloneDeep'), - keys: require('lodash-compat/object/keys'), - forEach: require('lodash-compat/collection/forEach') -}; - -module.exports.optionHtml = optionHtml; -module.exports.typeFromJsonSchema = typeFromJsonSchema; -module.exports.getStringSignature = getStringSignature; -module.exports.schemaToHTML = schemaToHTML; -module.exports.schemaToJSON = schemaToJSON; - -function optionHtml(label, value) { - return '' + label + ':' + value + ''; -}; - -function typeFromJsonSchema(type, format) { - var str; - - if (type === 'integer' && format === 'int32') { - str = 'integer'; - } else if (type === 'integer' && format === 'int64') { - str = 'long'; - } else if (type === 'integer' && typeof format === 'undefined') { - str = 'long'; - } else if (type === 'string' && format === 'date-time') { - str = 'date-time'; - } else if (type === 'string' && format === 'date') { - str = 'date'; - } else if (type === 'number' && format === 'float') { - str = 'float'; - } else if (type === 'number' && format === 'double') { - str = 'double'; - } else if (type === 'number' && typeof format === 'undefined') { - str = 'double'; - } else if (type === 'boolean') { - str = 'boolean'; - } else if (type === 'string') { - str = 'string'; - } - - return str; -}; - -function getStringSignature(obj, baseComponent) { - var str = ''; - - if (typeof obj.$ref !== 'undefined') { - str += Helpers.simpleRef(obj.$ref); - } else if (typeof obj.type === 'undefined') { - str += 'object'; - } else if (obj.type === 'array') { - if (baseComponent) { - str += getStringSignature((obj.items || obj.$ref || {})); - } else { - str += 'Array['; - str += getStringSignature((obj.items || obj.$ref || {})); - str += ']'; - } - } else if (obj.type === 'integer' && obj.format === 'int32') { - str += 'integer'; - } else if (obj.type === 'integer' && obj.format === 'int64') { - str += 'long'; - } else if (obj.type === 'integer' && typeof obj.format === 'undefined') { - str += 'long'; - } else if (obj.type === 'string' && obj.format === 'date-time') { - str += 'date-time'; - } else if (obj.type === 'string' && obj.format === 'date') { - str += 'date'; - } else if (obj.type === 'string' && typeof obj.format === 'undefined') { - str += 'string'; - } else if (obj.type === 'number' && obj.format === 'float') { - str += 'float'; - } else if (obj.type === 'number' && obj.format === 'double') { - str += 'double'; - } else if (obj.type === 'number' && typeof obj.format === 'undefined') { - str += 'double'; - } else if (obj.type === 'boolean') { - str += 'boolean'; - } else if (obj.$ref) { - str += Helpers.simpleRef(obj.$ref); - } else { - str += obj.type; - } - - return str; -}; - -function schemaToJSON(schema, models, modelsToIgnore, modelPropertyMacro) { - // Resolve the schema (Handle nested schemas) - schema = Helpers.resolveSchema(schema); - - if(typeof modelPropertyMacro !== 'function') { - modelPropertyMacro = function(prop){ - return (prop || {}).default; - } - } - - modelsToIgnore= modelsToIgnore || {}; - - var type = schema.type || 'object'; - var format = schema.format; - var model; - var output; - - if (schema.example) { - output = schema.example; - } else if (_.isUndefined(schema.items) && _.isArray(schema.enum)) { - output = schema.enum[0]; - } - - if (_.isUndefined(output)) { - if (schema.$ref) { - model = models[Helpers.simpleRef(schema.$ref)]; - - if (!_.isUndefined(model)) { - if (_.isUndefined(modelsToIgnore[model.name])) { - modelsToIgnore[model.name] = model; - output = schemaToJSON(model.definition, models, modelsToIgnore, modelPropertyMacro); - delete modelsToIgnore[model.name]; - } else { - if (model.type === 'array') { - output = []; - } else { - output = {}; - } - } - } - } else if (!_.isUndefined(schema.default)) { - output = schema.default; - } else if (type === 'string') { - if (format === 'date-time') { - output = new Date().toISOString(); - } else if (format === 'date') { - output = new Date().toISOString().split('T')[0]; - } else { - output = 'string'; - } - } else if (type === 'integer') { - output = 0; - } else if (type === 'number') { - output = 0.0; - } else if (type === 'boolean') { - output = true; - } else if (type === 'object') { - output = {}; - - _.forEach(schema.properties, function (property, name) { - var cProperty = _.cloneDeep(property); - - // Allow macro to set the default value - cProperty.default = modelPropertyMacro(property); - - output[name] = schemaToJSON(cProperty, models, modelsToIgnore, modelPropertyMacro); - }); - } else if (type === 'array') { - output = []; - - if (_.isArray(schema.items)) { - _.forEach(schema.items, function (item) { - output.push(schemaToJSON(item, models, modelsToIgnore, modelPropertyMacro)); - }); - } else if (_.isPlainObject(schema.items)) { - output.push(schemaToJSON(schema.items, models, modelsToIgnore, modelPropertyMacro)); - } else if (_.isUndefined(schema.items)) { - output.push({}); - } else { - Helpers.log('Array type\'s \'items\' property is not an array or an object, cannot process'); - } - } - } - - return output; -}; - -function schemaToHTML(name, schema, models, modelPropertyMacro) { - - var strongOpen = ''; - var strongClose = ''; - - // Allow for ignoring the 'name' argument.... shifting the rest - if(_.isObject(arguments[0])) { - name = void 0; - schema = arguments[0]; - models = arguments[1]; - modelPropertyMacro = arguments[2]; - } - - models = models || {}; - - // Resolve the schema (Handle nested schemas) - schema = Helpers.resolveSchema(schema); - - // Return for empty object - if(_.isEmpty(schema)) { - return strongOpen + 'Empty' + strongClose; - } - - // Dereference $ref from 'models' - if(typeof schema.$ref === 'string') { - name = Helpers.simpleRef(schema.$ref); - schema = models[name]; - if(typeof schema === 'undefined') - { - return strongOpen + name + ' is not defined!' + strongClose; - } - } - - if(typeof name !== 'string') { - name = schema.title || 'Inline Model'; - } - - // If we are a Model object... adjust accordingly - if(schema.definition) { - schema = schema.definition; - } - - if(typeof modelPropertyMacro !== 'function') { - modelPropertyMacro = function(prop){ - return (prop || {}).default; - } - } - - var references = {}; - var seenModels = []; - var inlineModels = 0; - - - - // Generate current HTML - var html = processModel(schema, name); - - // Generate references HTML - while (_.keys(references).length > 0) { - /* jshint ignore:start */ - _.forEach(references, function (schema, name) { - var seenModel = _.indexOf(seenModels, name) > -1; - - delete references[name]; - - if (!seenModel) { - seenModels.push(name); - - html += '
        ' + processModel(schema, name); - } - }); - /* jshint ignore:end */ - } - - return html; - - ///////////////////////////////// - - function addReference(schema, name, skipRef) { - var modelName = name; - var model; - - if (schema.$ref) { - modelName = schema.title || Helpers.simpleRef(schema.$ref); - model = models[modelName]; - } else if (_.isUndefined(name)) { - modelName = schema.title || 'Inline Model ' + (++inlineModels); - model = {definition: schema}; - } - - if (skipRef !== true) { - references[modelName] = _.isUndefined(model) ? {} : model.definition; - } - - return modelName; - }; - - function primitiveToHTML(schema) { - var html = ''; - var type = schema.type || 'object'; - - if (schema.$ref) { - html += addReference(schema, Helpers.simpleRef(schema.$ref)); - } else if (type === 'object') { - if (!_.isUndefined(schema.properties)) { - html += addReference(schema); - } else { - html += 'object'; - } - } else if (type === 'array') { - html += 'Array['; - - if (_.isArray(schema.items)) { - html += _.map(schema.items, addReference).join(','); - } else if (_.isPlainObject(schema.items)) { - if (_.isUndefined(schema.items.$ref)) { - if (!_.isUndefined(schema.items.type) && _.indexOf(['array', 'object'], schema.items.type) === -1) { - html += schema.items.type; - } else { - html += addReference(schema.items); - } - } else { - html += addReference(schema.items, Helpers.simpleRef(schema.items.$ref)); - } - } else { - Helpers.log('Array type\'s \'items\' schema is not an array or an object, cannot process'); - html += 'object'; - } - - html += ']'; - } else { - html += schema.type; - } - - html += ''; - - return html; - }; - function primitiveToOptionsHTML(schema, html) { - var options = ''; - var type = schema.type || 'object'; - var isArray = type === 'array'; - - if (isArray) { - if (_.isPlainObject(schema.items) && !_.isUndefined(schema.items.type)) { - type = schema.items.type; - } else { - type = 'object'; - } - } - - if (!_.isUndefined(schema.default)) { - options += optionHtml('Default', schema.default); - } - - switch (type) { - case 'string': - if (schema.minLength) { - options += optionHtml('Min. Length', schema.minLength); - } - - if (schema.maxLength) { - options += optionHtml('Max. Length', schema.maxLength); - } - - if (schema.pattern) { - options += optionHtml('Reg. Exp.', schema.pattern); - } - break; - case 'integer': - case 'number': - if (schema.minimum) { - options += optionHtml('Min. Value', schema.minimum); - } - - if (schema.exclusiveMinimum) { - options += optionHtml('Exclusive Min.', 'true'); - } - - if (schema.maximum) { - options += optionHtml('Max. Value', schema.maximum); - } - - if (schema.exclusiveMaximum) { - options += optionHtml('Exclusive Max.', 'true'); - } - - if (schema.multipleOf) { - options += optionHtml('Multiple Of', schema.multipleOf); - } - - break; - } - - if (isArray) { - if (schema.minItems) { - options += optionHtml('Min. Items', schema.minItems); - } - - if (schema.maxItems) { - options += optionHtml('Max. Items', schema.maxItems); - } - - if (schema.uniqueItems) { - options += optionHtml('Unique Items', 'true'); - } - - if (schema.collectionFormat) { - options += optionHtml('Coll. Format', schema.collectionFormat); - } - } - - if (_.isUndefined(schema.items)) { - if (_.isArray(schema.enum)) { - var enumString; - - if (type === 'number' || type === 'integer') { - enumString = schema.enum.join(', '); - } else { - enumString = '"' + schema.enum.join('", "') + '"'; - } - - options += optionHtml('Enum', enumString); - } - } - - if (options.length > 0) { - html = '' + html + '' + options + '
        ' + type + '
        '; - } - - return html; - }; - function processModel(schema, name) { - var type = schema.type || 'object'; - var isArray = schema.type === 'array'; - var html = strongOpen + name + ' ' + (isArray ? '[' : '{') + strongClose; - - if (name) { - seenModels.push(name); - } - - if (isArray) { - if (_.isArray(schema.items)) { - html += '
        ' + _.map(schema.items, function (item) { - var type = item.type || 'object'; - - if (_.isUndefined(item.$ref)) { - if (_.indexOf(['array', 'object'], type) > -1) { - if (type === 'object' && _.isUndefined(item.properties)) { - return 'object'; - } else { - return addReference(item); - } - } else { - return primitiveToOptionsHTML(item, type); - } - } else { - return addReference(item, Helpers.simpleRef(item.$ref)); - } - }).join(',
        '); - } else if (_.isPlainObject(schema.items)) { - if (_.isUndefined(schema.items.$ref)) { - if (_.indexOf(['array', 'object'], schema.items.type || 'object') > -1) { - if ((_.isUndefined(schema.items.type) || schema.items.type === 'object') && _.isUndefined(schema.items.properties)) { - html += '
        object
        '; - } else { - html += '
        ' + addReference(schema.items) + '
        '; - } - } else { - html += '
        ' + primitiveToOptionsHTML(schema.items, schema.items.type) + '
        '; - } - } else { - html += '
        ' + addReference(schema.items, Helpers.simpleRef(schema.items.$ref)) + '
        '; - } - } else { - Helpers.log('Array type\'s \'items\' property is not an array or an object, cannot process'); - html += '
        object
        '; - } - } else { - if (schema.$ref) { - html += '
        ' + addReference(schema, name) + '
        '; - } else if (type === 'object') { - html += '
        '; - - if (_.isPlainObject(schema.properties)) { - html += _.map(schema.properties, function (property, name) { - var propertyIsRequired = (_.indexOf(schema.required, name) >= 0); - var cProperty = _.cloneDeep(property); - - var requiredClass = propertyIsRequired ? 'required' : ''; - var html = '' + name + ' ('; - var model; - - // Allow macro to set the default value - cProperty.default = modelPropertyMacro(cProperty); - - // Resolve the schema (Handle nested schemas) - cProperty = Helpers.resolveSchema(cProperty); - - // We need to handle property references to primitives (Issue 339) - if (!_.isUndefined(cProperty.$ref)) { - model = models[Helpers.simpleRef(cProperty.$ref)]; - - if (!_.isUndefined(model) && _.indexOf([undefined, 'array', 'object'], model.definition.type) === -1) { - // Use referenced schema - cProperty = Helpers.resolveSchema(model.definition); - } - } - - html += primitiveToHTML(cProperty); - - if(!propertyIsRequired) { - html += ', optional'; - } - - html += ')'; - - if (!_.isUndefined(cProperty.description)) { - html += ': ' + '' + cProperty.description + ''; - } - - if (cProperty.enum) { - html += ' = [\'' + cProperty.enum.join('\', \'') + '\']'; - } - - return primitiveToOptionsHTML(cProperty, html); - }).join(',
        '); - } - - html += '
        '; - } else { - html += '
        ' + primitiveToOptionsHTML(schema, type) + '
        '; - } - } - - return html + strongOpen + (isArray ? ']' : '}') + strongClose; - }; - -}; - -},{"./helpers":4,"lodash-compat/array/indexOf":52,"lodash-compat/collection/forEach":57,"lodash-compat/collection/map":59,"lodash-compat/lang/cloneDeep":141,"lodash-compat/lang/isArray":143,"lodash-compat/lang/isEmpty":144,"lodash-compat/lang/isObject":147,"lodash-compat/lang/isPlainObject":148,"lodash-compat/lang/isUndefined":151,"lodash-compat/object/keys":152}],8:[function(require,module,exports){ -'use strict'; - -var SwaggerHttp = require('./http'); -var _ = { - isObject: require('lodash-compat/lang/isObject') -}; - -var SwaggerSpecConverter = module.exports = function () { - this.errors = []; - this.warnings = []; - this.modelMap = {}; -}; - -SwaggerSpecConverter.prototype.setDocumentationLocation = function (location) { - this.docLocation = location; -}; - -/** - * converts a resource listing OR api declaration - **/ -SwaggerSpecConverter.prototype.convert = function (obj, clientAuthorizations, callback) { - // not a valid spec - if(!obj || !Array.isArray(obj.apis)) { - return this.finish(callback, null); - } - this.clientAuthorizations = clientAuthorizations; - - // create a new swagger object to return - var swagger = { swagger: '2.0' }; - - swagger.originalVersion = obj.swaggerVersion; - - // add the info - this.apiInfo(obj, swagger); - - // add security definitions - this.securityDefinitions(obj, swagger); - - // take basePath into account - if (obj.basePath) { - this.setDocumentationLocation(obj.basePath); - } - - // see if this is a single-file swagger definition - var isSingleFileSwagger = false; - var i; - for(i = 0; i < obj.apis.length; i++) { - var api = obj.apis[i]; - if(Array.isArray(api.operations)) { - isSingleFileSwagger = true; - } - } - if(isSingleFileSwagger) { - this.declaration(obj, swagger); - this.finish(callback, swagger); - } - else { - this.resourceListing(obj, swagger, callback); - } -}; - -SwaggerSpecConverter.prototype.declaration = function(obj, swagger) { - var name, i, p, pos; - if(!obj.apis) { - return; - } - - if (obj.basePath.indexOf('http://') === 0) { - p = obj.basePath.substring('http://'.length); - pos = p.indexOf('/'); - if (pos > 0) { - swagger.host = p.substring(0, pos); - swagger.basePath = p.substring(pos); - } - else { - swagger.host = p; - swagger.basePath = '/'; - } - } else if (obj.basePath.indexOf('https://') === 0) { - p = obj.basePath.substring('https://'.length); - pos = p.indexOf('/'); - if (pos > 0) { - swagger.host = p.substring(0, pos); - swagger.basePath = p.substring(pos); - } - else { - swagger.host = p; - swagger.basePath = '/'; - } - } else { - swagger.basePath = obj.basePath; - } - - var resourceLevelAuth; - if(obj.authorizations) { - resourceLevelAuth = obj.authorizations; - } - if(obj.consumes) { - swagger.consumes = obj.consumes; - } - if(obj.produces) { - swagger.produces = obj.produces; - } - - // build a mapping of id to name for 1.0 model resolutions - if(_.isObject(obj)) { - for(name in obj.models) { - var existingModel = obj.models[name]; - var key = (existingModel.id || name); - this.modelMap[key] = name; - } - } - - for(i = 0; i < obj.apis.length; i++) { - var api = obj.apis[i]; - var path = api.path; - var operations = api.operations; - this.operations(path, obj.resourcePath, operations, resourceLevelAuth, swagger); - } - - var models = obj.models || {}; - this.models(models, swagger); -}; - -SwaggerSpecConverter.prototype.models = function(obj, swagger) { - if(!_.isObject(obj)) { - return; - } - var name; - - swagger.definitions = swagger.definitions || {}; - for(name in obj) { - var existingModel = obj[name]; - var _enum = []; - var schema = { properties: {}}; - var propertyName; - for(propertyName in existingModel.properties) { - var existingProperty = existingModel.properties[propertyName]; - var property = {}; - this.dataType(existingProperty, property); - if(existingProperty.description) { - property.description = existingProperty.description; - } - if(existingProperty['enum']) { - property['enum'] = existingProperty['enum']; - } - if(typeof existingProperty.required === 'boolean' && existingProperty.required === true) { - _enum.push(propertyName); - } - if(typeof existingProperty.required === 'string' && existingProperty.required === 'true') { - _enum.push(propertyName); - } - schema.properties[propertyName] = property; - } - if(_enum.length > 0) { - schema['enum'] = _enum; - } - - schema.required = existingModel.required; - swagger.definitions[name] = schema; - } -}; - -SwaggerSpecConverter.prototype.extractTag = function(resourcePath) { - var pathString = resourcePath || 'default'; - if(pathString.indexOf('http:') === 0 || pathString.indexOf('https:') === 0) { - pathString = pathString.split(['/']); - pathString = pathString[pathString.length -1].substring(); - } - if(pathString.endsWith('.json')) { - pathString = pathString.substring(0, pathString.length - '.json'.length); - } - return pathString.replace('/',''); -}; - -SwaggerSpecConverter.prototype.operations = function(path, resourcePath, obj, resourceLevelAuth, swagger) { - if(!Array.isArray(obj)) { - return; - } - var i; - - if(!swagger.paths) { - swagger.paths = {}; - } - - var pathObj = swagger.paths[path] || {}; - var tag = this.extractTag(resourcePath); - swagger.tags = swagger.tags || []; - var matched = false; - for(i = 0; i < swagger.tags.length; i++) { - var tagObject = swagger.tags[i]; - if(tagObject.name === tag) { - matched = true; - } - } - if(!matched) { - swagger.tags.push({name: tag}); - } - - for(i = 0; i < obj.length; i++) { - var existingOperation = obj[i]; - var method = (existingOperation.method || existingOperation.httpMethod).toLowerCase(); - var operation = {tags: [tag]}; - var existingAuthorizations = existingOperation.authorizations; - - if(existingAuthorizations && Object.keys(existingAuthorizations).length === 0) { - existingAuthorizations = resourceLevelAuth; - } - - if(typeof existingAuthorizations !== 'undefined') { - var scopesObject; - for(var key in existingAuthorizations) { - operation.security = operation.security || []; - var scopes = existingAuthorizations[key]; - if(scopes) { - var securityScopes = []; - for(var j in scopes) { - securityScopes.push(scopes[j].scope); - } - scopesObject = {}; - scopesObject[key] = securityScopes; - operation.security.push(scopesObject); - } - else { - scopesObject = {}; - scopesObject[key] = []; - operation.security.push(scopesObject); - } - } - } - - if(existingOperation.consumes) { - operation.consumes = existingOperation.consumes; - } - else if(swagger.consumes) { - operation.consumes = swagger.consumes; - } - if(existingOperation.produces) { - operation.produces = existingOperation.produces; - } - else if(swagger.produces) { - operation.produces = swagger.produces; - } - if(existingOperation.summary) { - operation.summary = existingOperation.summary; - } - if(existingOperation.notes) { - operation.description = existingOperation.notes; - } - if(existingOperation.nickname) { - operation.operationId = existingOperation.nickname; - } - if(existingOperation.deprecated) { - operation.deprecated = existingOperation.deprecated; - } - - this.authorizations(existingAuthorizations, swagger); - this.parameters(operation, existingOperation.parameters, swagger); - this.responseMessages(operation, existingOperation, swagger); - - pathObj[method] = operation; - } - - swagger.paths[path] = pathObj; -}; - -SwaggerSpecConverter.prototype.responseMessages = function(operation, existingOperation) { - if(!_.isObject(existingOperation)) { - return; - } - // build default response from the operation (1.x) - var defaultResponse = {}; - this.dataType(existingOperation, defaultResponse); - // TODO: look into the real problem of rendering responses in swagger-ui - // ....should reponseType have an implicit schema? - if(!defaultResponse.schema && defaultResponse.type) { - defaultResponse = {schema: defaultResponse}; - } - - operation.responses = operation.responses || {}; - - // grab from responseMessages (1.2) - var has200 = false; - if(Array.isArray(existingOperation.responseMessages)) { - var i; - var existingResponses = existingOperation.responseMessages; - for(i = 0; i < existingResponses.length; i++) { - var existingResponse = existingResponses[i]; - var response = { description: existingResponse.message }; - if(existingResponse.code === 200) { - has200 = true; - } - // Convert responseModel -> schema{$ref: responseModel} - if(existingResponse.responseModel) { - response.schema = {'$ref': existingResponse.responseModel}; - } - operation.responses['' + existingResponse.code] = response; - } - } - - if(has200) { - operation.responses['default'] = defaultResponse; - } - else { - operation.responses['200'] = defaultResponse; - } -}; - -SwaggerSpecConverter.prototype.authorizations = function(obj) { - // TODO - if(!_.isObject(obj)) { - return; - } -}; - -SwaggerSpecConverter.prototype.parameters = function(operation, obj) { - if(!Array.isArray(obj)) { - return; - } - var i; - for(i = 0; i < obj.length; i++) { - var existingParameter = obj[i]; - var parameter = {}; - parameter.name = existingParameter.name; - parameter.description = existingParameter.description; - parameter.required = existingParameter.required; - parameter.in = existingParameter.paramType; - - // per #168 - if(parameter.in === 'body') { - parameter.name = 'body'; - } - if(parameter.in === 'form') { - parameter.in = 'formData'; - } - - if(existingParameter.enum) { - parameter.enum = existingParameter.enum; - } - - if(existingParameter.allowMultiple === true || existingParameter.allowMultiple === 'true') { - var innerType = {}; - this.dataType(existingParameter, innerType); - parameter.type = 'array'; - parameter.items = innerType; - - if(existingParameter.allowableValues) { - var av = existingParameter.allowableValues; - if(av.valueType === 'LIST') { - parameter['enum'] = av.values; - } - } - } - else { - this.dataType(existingParameter, parameter); - } - - operation.parameters = operation.parameters || []; - operation.parameters.push(parameter); - } -}; - -SwaggerSpecConverter.prototype.dataType = function(source, target) { - if(!_.isObject(source)) { - return; - } - - if(source.minimum) { - target.minimum = source.minimum; - } - if(source.maximum) { - target.maximum = source.maximum; - } - if (source.format) { - target.format = source.format; - } - - // default can be 'false' - if(typeof source.defaultValue !== 'undefined') { - target.default = source.defaultValue; - } - - var jsonSchemaType = this.toJsonSchema(source); - if(jsonSchemaType) { - target = target || {}; - if(jsonSchemaType.type) { - target.type = jsonSchemaType.type; - } - if(jsonSchemaType.format) { - target.format = jsonSchemaType.format; - } - if(jsonSchemaType.$ref) { - target.schema = {$ref: jsonSchemaType.$ref}; - } - if(jsonSchemaType.items) { - target.items = jsonSchemaType.items; - } - } -}; - -SwaggerSpecConverter.prototype.toJsonSchema = function(source) { - if(!source) { - return 'object'; - } - var detectedType = (source.type || source.dataType || source.responseClass || ''); - var lcType = detectedType.toLowerCase(); - var format = (source.format || '').toLowerCase(); - - if(lcType.indexOf('list[') === 0) { - var innerType = detectedType.substring(5, detectedType.length - 1); - var jsonType = this.toJsonSchema({type: innerType}); - return {type: 'array', items: jsonType}; - } - else if(lcType === 'int' || (lcType === 'integer' && format === 'int32')) - {return {type: 'integer', format: 'int32'};} - else if(lcType === 'long' || (lcType === 'integer' && format === 'int64')) - {return {type: 'integer', format: 'int64'};} - else if(lcType === 'integer') - {return {type: 'integer', format: 'int64'};} - else if(lcType === 'float' || (lcType === 'number' && format === 'float')) - {return {type: 'number', format: 'float'};} - else if(lcType === 'double' || (lcType === 'number' && format === 'double')) - {return {type: 'number', format: 'double'};} - else if((lcType === 'string' && format === 'date-time') || (lcType === 'date')) - {return {type: 'string', format: 'date-time'};} - else if(lcType === 'string') - {return {type: 'string'};} - else if(lcType === 'file') - {return {type: 'file'};} - else if(lcType === 'boolean') - {return {type: 'boolean'};} - else if(lcType === 'array' || lcType === 'list') { - if(source.items) { - var it = this.toJsonSchema(source.items); - return {type: 'array', items: it}; - } - else { - return {type: 'array', items: {type: 'object'}}; - } - } - else if(source.$ref) { - return {$ref: '#/definitions/' + this.modelMap[source.$ref] || source.$ref}; - } - else if(lcType === 'void' || lcType === '') - {return {};} - else { - return {$ref: '#/definitions/' + this.modelMap[source.type] || source.type}; - } -}; - -SwaggerSpecConverter.prototype.resourceListing = function(obj, swagger, callback) { - var i; - var processedCount = 0; // jshint ignore:line - var self = this; // jshint ignore:line - var expectedCount = obj.apis.length; - var _swagger = swagger; // jshint ignore:line - - if(expectedCount === 0) { - this.finish(callback, swagger); - } - - for(i = 0; i < expectedCount; i++) { - var api = obj.apis[i]; - var path = api.path; - var absolutePath = this.getAbsolutePath(obj.swaggerVersion, this.docLocation, path); - - if(api.description) { - swagger.tags = swagger.tags || []; - swagger.tags.push({ - name : this.extractTag(api.path), - description : api.description || '' - }); - } - var http = { - url: absolutePath, - headers: {accept: 'application/json'}, - on: {}, - method: 'get' - }; - /* jshint ignore:start */ - http.on.response = function(data) { - processedCount += 1; - var obj = data.obj; - if(obj) { - self.declaration(obj, _swagger); - } - if(processedCount === expectedCount) { - self.finish(callback, _swagger); - } - }; - http.on.error = function(data) { - console.error(data); - processedCount += 1; - if(processedCount === expectedCount) { - self.finish(callback, _swagger); - } - }; - /* jshint ignore:end */ - - if(this.clientAuthorizations && typeof this.clientAuthorizations.apply === 'function') { - this.clientAuthorizations.apply(http); - } - - new SwaggerHttp().execute(http); - } -}; - -SwaggerSpecConverter.prototype.getAbsolutePath = function(version, docLocation, path) { - if(version === '1.0') { - if(docLocation.endsWith('.json')) { - // get root path - var pos = docLocation.lastIndexOf('/'); - if(pos > 0) { - docLocation = docLocation.substring(0, pos); - } - } - } - - var location = docLocation; - if(path.indexOf('http://') === 0 || path.indexOf('https://') === 0) { - location = path; - } - else { - if(docLocation.endsWith('/')) { - location = docLocation.substring(0, docLocation.length - 1); - } - location += path; - } - location = location.replace('{format}', 'json'); - return location; -}; - -SwaggerSpecConverter.prototype.securityDefinitions = function(obj, swagger) { - if(obj.authorizations) { - var name; - for(name in obj.authorizations) { - var isValid = false; - var securityDefinition = {}; - var definition = obj.authorizations[name]; - if(definition.type === 'apiKey') { - securityDefinition.type = 'apiKey'; - securityDefinition.in = definition.passAs; - securityDefinition.name = definition.keyname || name; - isValid = true; - } - else if(definition.type === 'oauth2') { - var existingScopes = definition.scopes || []; - var scopes = {}; - var i; - for(i in existingScopes) { - var scope = existingScopes[i]; - scopes[scope.scope] = scope.description; - } - securityDefinition.type = 'oauth2'; - if(i > 0) { - securityDefinition.scopes = scopes; - } - if(definition.grantTypes) { - if(definition.grantTypes.implicit) { - var implicit = definition.grantTypes.implicit; - securityDefinition.flow = 'implicit'; - securityDefinition.authorizationUrl = implicit.loginEndpoint; - isValid = true; - } - /* jshint ignore:start */ - if(definition.grantTypes['authorization_code']) { - if(!securityDefinition.flow) { - // cannot set if flow is already defined - var authCode = definition.grantTypes['authorization_code']; - securityDefinition.flow = 'accessCode'; - securityDefinition.authorizationUrl = authCode.tokenRequestEndpoint.url; - securityDefinition.tokenUrl = authCode.tokenEndpoint.url; - isValid = true; - } - } - /* jshint ignore:end */ - } - } - if(isValid) { - swagger.securityDefinitions = swagger.securityDefinitions || {}; - swagger.securityDefinitions[name] = securityDefinition; - } - } - } -}; - -SwaggerSpecConverter.prototype.apiInfo = function(obj, swagger) { - // info section - if(obj.info) { - var info = obj.info; - swagger.info = {}; - - if(info.contact) { - swagger.info.contact = {}; - swagger.info.contact.email = info.contact; - } - if(info.description) { - swagger.info.description = info.description; - } - if(info.title) { - swagger.info.title = info.title; - } - if(info.termsOfServiceUrl) { - swagger.info.termsOfService = info.termsOfServiceUrl; - } - if(info.license || info.licenseUrl) { - swagger.license = {}; - if(info.license) { - swagger.license.name = info.license; - } - if(info.licenseUrl) { - swagger.license.url = info.licenseUrl; - } - } - } - else { - this.warnings.push('missing info section'); - } -}; - -SwaggerSpecConverter.prototype.finish = function (callback, obj) { - callback(obj); -}; - -},{"./http":5,"lodash-compat/lang/isObject":147}],9:[function(require,module,exports){ -'use strict'; - -var _ = { - isPlainObject: require('lodash-compat/lang/isPlainObject'), - isString: require('lodash-compat/lang/isString'), -}; - -var SchemaMarkup = require('../schema-markup.js'); -var jsyaml = require('js-yaml'); - -var Model = module.exports = function (name, definition, models, modelPropertyMacro) { - this.definition = definition || {}; - this.isArray = definition.type === 'array'; - this.models = models || {}; - this.name = definition.title || name || 'Inline Model'; - this.modelPropertyMacro = modelPropertyMacro || function (property) { - return property.default; - }; - - return this; -}; - -Model.prototype.createJSONSample = Model.prototype.getSampleValue = function (modelsToIgnore) { - modelsToIgnore = modelsToIgnore || {}; - - modelsToIgnore[this.name] = this; - - // Response support - if (this.examples && _.isPlainObject(this.examples) && this.examples['application/json']) { - this.definition.example = this.examples['application/json']; - - if (_.isString(this.definition.example)) { - this.definition.example = jsyaml.safeLoad(this.definition.example); - } - } else if (!this.definition.example) { - this.definition.example = this.examples; - } - - return SchemaMarkup.schemaToJSON(this.definition, this.models, modelsToIgnore, this.modelPropertyMacro); -}; - -Model.prototype.getMockSignature = function () { - return SchemaMarkup.schemaToHTML(this.name, this.definition, this.models, this.modelPropertyMacro); -}; - -},{"../schema-markup.js":7,"js-yaml":21,"lodash-compat/lang/isPlainObject":148,"lodash-compat/lang/isString":149}],10:[function(require,module,exports){ -'use strict'; - -var _ = { - cloneDeep: require('lodash-compat/lang/cloneDeep'), - isUndefined: require('lodash-compat/lang/isUndefined'), - isEmpty: require('lodash-compat/lang/isEmpty'), - isObject: require('lodash-compat/lang/isObject') -}; -var helpers = require('../helpers'); -var Model = require('./model'); -var SwaggerHttp = require('../http'); - -var Operation = module.exports = function (parent, scheme, operationId, httpMethod, path, args, definitions, models, clientAuthorizations) { - var errors = []; - - parent = parent || {}; - args = args || {}; - - if(parent && parent.options) { - this.client = parent.options.client || null; - this.responseInterceptor = parent.options.responseInterceptor || null; - } - this.authorizations = args.security; - this.basePath = parent.basePath || '/'; - this.clientAuthorizations = clientAuthorizations; - this.consumes = args.consumes || parent.consumes || ['application/json']; - this.produces = args.produces || parent.produces || ['application/json']; - this.deprecated = args.deprecated; - this.description = args.description; - this.host = parent.host || 'localhost'; - this.method = (httpMethod || errors.push('Operation ' + operationId + ' is missing method.')); - this.models = models || {}; - this.nickname = (operationId || errors.push('Operations must have a nickname.')); - this.operation = args; - this.operations = {}; - this.parameters = args !== null ? (args.parameters || []) : {}; - this.parent = parent; - this.path = (path || errors.push('Operation ' + this.nickname + ' is missing path.')); - this.responses = (args.responses || {}); - this.scheme = scheme || parent.scheme || 'http'; - this.schemes = args.schemes || parent.schemes; - this.security = args.security; - this.summary = args.summary || ''; - this.type = null; - this.useJQuery = parent.useJQuery; - this.parameterMacro = parent.parameterMacro || function (operation, parameter) { - return parameter.default; - }; - - this.inlineModels = []; - - if (typeof this.deprecated === 'string') { - switch(this.deprecated.toLowerCase()) { - case 'true': case 'yes': case '1': { - this.deprecated = true; - break; - } - - case 'false': case 'no': case '0': case null: { - this.deprecated = false; - break; - } - - default: this.deprecated = Boolean(this.deprecated); - } - } - - var i, model; - - if (definitions) { - // add to global models - var key; - - for (key in definitions) { - model = new Model(key, definitions[key], this.models, parent.modelPropertyMacro); - - if (model) { - this.models[key] = model; - } - } - } - - for (i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - - // Allow macro to set the default value - param.default = this.parameterMacro(this, param); - - if (param.type === 'array') { - param.isList = true; - param.allowMultiple = true; - // the enum can be defined at the items level - if (param.items && param.items.enum) { - param['enum'] = param.items.enum; - } - } - - var innerType = this.getType(param); - - if (innerType && innerType.toString().toLowerCase() === 'boolean') { - param.allowableValues = {}; - param.isList = true; - param['enum'] = [true, false]; // use actual primitives - } - - if (typeof param['enum'] !== 'undefined') { - var id; - - param.allowableValues = {}; - param.allowableValues.values = []; - param.allowableValues.descriptiveValues = []; - - for (id = 0; id < param['enum'].length; id++) { - var value = param['enum'][id]; - var isDefault = (value === param.default || value+'' === param.default); - - param.allowableValues.values.push(value); - // Always have string for descriptive values.... - param.allowableValues.descriptiveValues.push({value : value+'', isDefault: isDefault}); - } - } - - if (param.type === 'array') { - innerType = [innerType]; - - if (typeof param.allowableValues === 'undefined') { - // can't show as a list if no values to select from - delete param.isList; - delete param.allowMultiple; - } - } - - param.signature = this.getModelSignature(innerType, this.models).toString(); - param.sampleJSON = this.getModelSampleJSON(innerType, this.models); - param.responseClassSignature = param.signature; - } - - var defaultResponseCode, response, responses = this.responses; - - if (responses['200']) { - response = responses['200']; - defaultResponseCode = '200'; - } else if (responses['201']) { - response = responses['201']; - defaultResponseCode = '201'; - } else if (responses['202']) { - response = responses['202']; - defaultResponseCode = '202'; - } else if (responses['203']) { - response = responses['203']; - defaultResponseCode = '203'; - } else if (responses['204']) { - response = responses['204']; - defaultResponseCode = '204'; - } else if (responses['205']) { - response = responses['205']; - defaultResponseCode = '205'; - } else if (responses['206']) { - response = responses['206']; - defaultResponseCode = '206'; - } else if (responses['default']) { - response = responses['default']; - defaultResponseCode = 'default'; - } - - if (response && response.schema) { - var resolvedModel = this.resolveModel(response.schema, definitions); - var successResponse; - - delete responses[defaultResponseCode]; - - if (resolvedModel) { - this.successResponse = {}; - successResponse = this.successResponse[defaultResponseCode] = resolvedModel; - } else if (!response.schema.type || response.schema.type === 'object' || response.schema.type === 'array') { - // Inline model - this.successResponse = {}; - successResponse = this.successResponse[defaultResponseCode] = new Model(undefined, response.schema || {}, this.models, parent.modelPropertyMacro); - } else { - // Primitive - this.successResponse = {}; - successResponse = this.successResponse[defaultResponseCode] = response.schema; - } - - if (successResponse) { - // Attach response properties - if (response.description) { - successResponse.description = response.description; - } - - if (response.examples) { - successResponse.examples = response.examples; - } - - if (response.headers) { - successResponse.headers = response.headers; - } - } - - this.type = response; - } - - if (errors.length > 0) { - if (this.resource && this.resource.api && this.resource.api.fail) { - this.resource.api.fail(errors); - } - } - - return this; -}; - -Operation.prototype.isDefaultArrayItemValue = function(value, param) { - if (param.default && Array.isArray(param.default)) { - return param.default.indexOf(value) !== -1; - } - return value === param.default; -}; - -Operation.prototype.getType = function (param) { - var type = param.type; - var format = param.format; - var isArray = false; - var str; - - if (type === 'integer' && format === 'int32') { - str = 'integer'; - } else if (type === 'integer' && format === 'int64') { - str = 'long'; - } else if (type === 'integer') { - str = 'integer'; - } else if (type === 'string') { - if (format === 'date-time') { - str = 'date-time'; - } else if (format === 'date') { - str = 'date'; - } else { - str = 'string'; - } - } else if (type === 'number' && format === 'float') { - str = 'float'; - } else if (type === 'number' && format === 'double') { - str = 'double'; - } else if (type === 'number') { - str = 'double'; - } else if (type === 'boolean') { - str = 'boolean'; - } else if (type === 'array') { - isArray = true; - - if (param.items) { - str = this.getType(param.items); - } - } - - if (param.$ref) { - str = helpers.simpleRef(param.$ref); - } - - var schema = param.schema; - - if (schema) { - var ref = schema.$ref; - - if (ref) { - ref = helpers.simpleRef(ref); - - if (isArray) { - return [ ref ]; - } else { - return ref; - } - } else { - // If inline schema, we add it our interal hash -> which gives us it's ID (int) - if(schema.type === 'object') { - return this.addInlineModel(schema); - } - return this.getType(schema); - } - } - if (isArray) { - return [ str ]; - } else { - return str; - } -}; - -/** - * adds an inline schema (model) to a hash, where we can ref it later - * @param {object} schema a schema - * @return {number} the ID of the schema being added, or null - **/ -Operation.prototype.addInlineModel = function (schema) { - var len = this.inlineModels.length; - var model = this.resolveModel(schema, {}); - if(model) { - this.inlineModels.push(model); - return 'Inline Model '+len; // return string ref of the inline model (used with #getInlineModel) - } - return null; // report errors? -}; - -/** - * gets the internal ref to an inline model - * @param {string} inline_str a string reference to an inline model - * @return {Model} the model being referenced. Or null - **/ -Operation.prototype.getInlineModel = function(inlineStr) { - if(/^Inline Model \d+$/.test(inlineStr)) { - var id = parseInt(inlineStr.substr('Inline Model'.length).trim(),10); // - var model = this.inlineModels[id]; - return model; - } - // I'm returning null here, should I rather throw an error? - return null; -}; - -Operation.prototype.resolveModel = function (schema, definitions) { - if (typeof schema.$ref !== 'undefined') { - var ref = schema.$ref; - - if (ref.indexOf('#/definitions/') === 0) { - ref = ref.substring('#/definitions/'.length); - } - - if (definitions[ref]) { - return new Model(ref, definitions[ref], this.models, this.parent.modelPropertyMacro); - } - // schema must at least be an object to get resolved to an inline Model - } else if (schema && typeof schema === 'object' && - (schema.type === 'object' || _.isUndefined(schema.type))) { - return new Model(undefined, schema, this.models, this.parent.modelPropertyMacro); - } - - return null; -}; - -Operation.prototype.help = function (dontPrint) { - var out = this.nickname + ': ' + this.summary + '\n'; - - for (var i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - var typeInfo = param.signature; - - out += '\n * ' + param.name + ' (' + typeInfo + '): ' + param.description; - } - - if (typeof dontPrint === 'undefined') { - helpers.log(out); - } - - return out; -}; - -Operation.prototype.getModelSignature = function (type, definitions) { - var isPrimitive, listType; - - if (type instanceof Array) { - listType = true; - type = type[0]; - } - - // Convert undefined to string of 'undefined' - if (typeof type === 'undefined') { - type = 'undefined'; - isPrimitive = true; - - } else if (definitions[type]){ - // a model def exists? - type = definitions[type]; /* Model */ - isPrimitive = false; - - } else if (this.getInlineModel(type)) { - type = this.getInlineModel(type); /* Model */ - isPrimitive = false; - - } else { - // We default to primitive - isPrimitive = true; - } - - if (isPrimitive) { - if (listType) { - return 'Array[' + type + ']'; - } else { - return type.toString(); - } - } else { - if (listType) { - return 'Array[' + type.getMockSignature() + ']'; - } else { - return type.getMockSignature(); - } - } -}; - -Operation.prototype.supportHeaderParams = function () { - return true; -}; - -Operation.prototype.supportedSubmitMethods = function () { - return this.parent.supportedSubmitMethods; -}; - -Operation.prototype.getHeaderParams = function (args) { - var headers = this.setContentTypes(args, {}); - - for (var i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - - if (typeof args[param.name] !== 'undefined') { - if (param.in === 'header') { - var value = args[param.name]; - - if (Array.isArray(value)) { - value = value.toString(); - } - - headers[param.name] = value; - } - } - } - - return headers; -}; - -Operation.prototype.urlify = function (args) { - var formParams = {}; - var requestUrl = this.path; - var querystring = ''; // grab params from the args, build the querystring along the way - - for (var i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - - if (typeof args[param.name] !== 'undefined') { - if (param.in === 'path') { - var reg = new RegExp('\{' + param.name + '\}', 'gi'); - var value = args[param.name]; - - if (Array.isArray(value)) { - value = this.encodePathCollection(param.collectionFormat, param.name, value); - } else { - value = this.encodePathParam(value); - } - - requestUrl = requestUrl.replace(reg, value); - } else if (param.in === 'query' && typeof args[param.name] !== 'undefined') { - if (querystring === '') { - querystring += '?'; - } else { - querystring += '&'; - } - - if (typeof param.collectionFormat !== 'undefined') { - var qp = args[param.name]; - - if (Array.isArray(qp)) { - querystring += this.encodeQueryCollection(param.collectionFormat, param.name, qp); - } else { - querystring += this.encodeQueryParam(param.name) + '=' + this.encodeQueryParam(args[param.name]); - } - } else { - querystring += this.encodeQueryParam(param.name) + '=' + this.encodeQueryParam(args[param.name]); - } - } else if (param.in === 'formData') { - formParams[param.name] = args[param.name]; - } - } - } - var url = this.scheme + '://' + this.host; - - if (this.basePath !== '/') { - url += this.basePath; - } - return url + requestUrl + querystring; -}; - -Operation.prototype.getMissingParams = function (args) { - var missingParams = []; // check required params, track the ones that are missing - var i; - - for (i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - - if (param.required === true) { - if (typeof args[param.name] === 'undefined') { - missingParams = param.name; - } - } - } - - return missingParams; -}; - -Operation.prototype.getBody = function (headers, args, opts) { - var formParams = {}, body, key, value, hasBody = false; - - for (var i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - - if (typeof args[param.name] !== 'undefined') { - if (param.in === 'body') { - body = args[param.name]; - } else if (param.in === 'formData') { - formParams[param.name] = args[param.name]; - } - } - else { - if(param.in === 'body') { - hasBody = true; - } - } - } - - // if body is null and hasBody is true, AND a JSON body is requested, send empty {} - if(hasBody && typeof body === 'undefined') { - var contentType = headers['Content-Type']; - if(contentType && contentType.indexOf('application/json') === 0) { - body = '{}'; - } - } - - // handle form params - if (headers['Content-Type'] === 'application/x-www-form-urlencoded') { - var encoded = ''; - - for (key in formParams) { - value = formParams[key]; - - if (typeof value !== 'undefined') { - if (encoded !== '') { - encoded += '&'; - } - - encoded += encodeURIComponent(key) + '=' + encodeURIComponent(value); - } - } - - body = encoded; - } else if (headers['Content-Type'] && headers['Content-Type'].indexOf('multipart/form-data') >= 0) { - if (opts.useJQuery) { - var bodyParam = new FormData(); - - bodyParam.type = 'formData'; - - for (key in formParams) { - value = args[key]; - - if (typeof value !== 'undefined') { - // required for jquery file upload - if (value.type === 'file' && value.value) { - delete headers['Content-Type']; - - bodyParam.append(key, value.value); - } else { - bodyParam.append(key, value); - } - } - } - - body = bodyParam; - } - } - - return body; -}; - -/** - * gets sample response for a single operation - **/ -Operation.prototype.getModelSampleJSON = function (type, models) { - var listType, sampleJson, innerType; - models = models || {}; - - listType = (type instanceof Array); - innerType = listType ? type[0] : type; - - if(models[innerType]) { - sampleJson = models[innerType].createJSONSample(); - } else if (this.getInlineModel(innerType)){ - sampleJson = this.getInlineModel(innerType).createJSONSample(); // may return null, if type isn't correct - } - - - if (sampleJson) { - sampleJson = listType ? [sampleJson] : sampleJson; - - if (typeof sampleJson === 'string') { - return sampleJson; - } else if (_.isObject(sampleJson)) { - var t = sampleJson; - - if (sampleJson instanceof Array && sampleJson.length > 0) { - t = sampleJson[0]; - } - - if (t.nodeName) { - var xmlString = new XMLSerializer().serializeToString(t); - - return this.formatXml(xmlString); - } else { - return JSON.stringify(sampleJson, null, 2); - } - } else { - return sampleJson; - } - } -}; - -/** - * legacy binding - **/ -Operation.prototype.do = function (args, opts, callback, error, parent) { - return this.execute(args, opts, callback, error, parent); -}; - -/** - * executes an operation - **/ -Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) { - var args = arg1 || {}; - var opts = {}, success, error; - - if (_.isObject(arg2)) { - opts = arg2; - success = arg3; - error = arg4; - } - - if(this.client) { - opts.client = this.client; - } - if(this.responseInterceptor) { - opts.responseInterceptor = this.responseInterceptor; - } - - - if (typeof arg2 === 'function') { - success = arg2; - error = arg3; - } - - success = (success || this.parent.defaultSuccessCallback || helpers.log); - error = (error || this.parent.defaultErrorCallback || helpers.log); - - - if (typeof opts.useJQuery === 'undefined') { - opts.useJQuery = this.useJQuery; - } - var missingParams = this.getMissingParams(args); - - if (missingParams.length > 0) { - var message = 'missing required params: ' + missingParams; - - helpers.fail(message); - error(message); - - return; - } - - var allHeaders = this.getHeaderParams(args); - var contentTypeHeaders = this.setContentTypes(args, opts); - var headers = {}, attrname; - - for (attrname in allHeaders) { headers[attrname] = allHeaders[attrname]; } - for (attrname in contentTypeHeaders) { headers[attrname] = contentTypeHeaders[attrname]; } - - var body = this.getBody(contentTypeHeaders, args, opts); - var url = this.urlify(args); - - if(url.indexOf('.{format}') > 0) { - if(headers) { - var format = headers.Accept || headers.accept; - if(format && format.indexOf('json') > 0) { - url = url.replace('.{format}', '.json'); - } - else if(format && format.indexOf('xml') > 0) { - url = url.replace('.{format}', '.xml'); - } - } - } - - var obj = { - url: url, - method: this.method.toUpperCase(), - body: body, - useJQuery: opts.useJQuery, - headers: headers, - on: { - response: function (response) { - return success(response, parent); - }, - error: function (response) { - return error(response, parent); - } - } - }; - - this.clientAuthorizations.apply(obj, this.operation.security); - if (opts.mock === true) { - return obj; - } else { - new SwaggerHttp().execute(obj, opts); - } -}; - -function itemByPriority(col, itemPriority) { - - // No priorities? return first... - if(_.isEmpty(itemPriority)) { - return col[0]; - } - - for (var i = 0, len = itemPriority.length; i < len; i++) { - if(col.indexOf(itemPriority[i]) > -1) { - return itemPriority[i]; - } - } - - // Otherwise return first - return col[0]; -} - -Operation.prototype.setContentTypes = function (args, opts) { - // default type - var allDefinedParams = this.parameters; - var body; - var consumes = args.parameterContentType || itemByPriority(this.consumes, ['application/json', 'application/yaml']); - var accepts = opts.responseContentType || itemByPriority(this.produces, ['application/json', 'application/yaml']); - var definedFileParams = []; - var definedFormParams = []; - var headers = {}; - var i; - - // get params from the operation and set them in definedFileParams, definedFormParams, headers - for (i = 0; i < allDefinedParams.length; i++) { - var param = allDefinedParams[i]; - - if (param.in === 'formData') { - if (param.type === 'file') { - definedFileParams.push(param); - } else { - definedFormParams.push(param); - } - } else if (param.in === 'header' && opts) { - var key = param.name; - var headerValue = opts[param.name]; - - if (typeof opts[param.name] !== 'undefined') { - headers[key] = headerValue; - } - } else if (param.in === 'body' && typeof args[param.name] !== 'undefined') { - body = args[param.name]; - } - } - - // if there's a body, need to set the consumes header via requestContentType - if (this.method === 'post' || this.method === 'put' || this.method === 'patch' || - (this.method === 'delete' && body) ) { - if (opts.requestContentType) { - consumes = opts.requestContentType; - } - // if any form params, content type must be set - if (definedFormParams.length > 0) { - if (opts.requestContentType) { // override if set - consumes = opts.requestContentType; - } else if (definedFileParams.length > 0) { // if a file, must be multipart/form-data - consumes = 'multipart/form-data'; - } else { // default to x-www-from-urlencoded - consumes = 'application/x-www-form-urlencoded'; - } - } - } - else { - consumes = null; - } - - if (consumes && this.consumes) { - if (this.consumes.indexOf(consumes) === -1) { - helpers.log('server doesn\'t consume ' + consumes + ', try ' + JSON.stringify(this.consumes)); - } - } - - if (!this.matchesAccept(accepts)) { - helpers.log('server can\'t produce ' + accepts); - } - - if ((consumes && body !== '') || (consumes === 'application/x-www-form-urlencoded')) { - headers['Content-Type'] = consumes; - } - - if (accepts) { - headers.Accept = accepts; - } - - return headers; -}; - -/** - * Returns true if the request accepts header matches anything in this.produces. - * If this.produces contains * / *, ignore the accept header. - * @param {string=} accepts The client request accept header. - * @return {boolean} - */ -Operation.prototype.matchesAccept = function(accepts) { - // no accepts or produces, no problem! - if (!accepts || !this.produces) { - return true; - } - return this.produces.indexOf(accepts) !== -1 || this.produces.indexOf('*/*') !== -1; -}; - -Operation.prototype.asCurl = function (args1, args2) { - var opts = {mock: true}; - if (typeof args2 === 'object') { - for (var argKey in args2) { - opts[argKey] = args2[argKey]; - } - } - var obj = this.execute(args1, opts); - - this.clientAuthorizations.apply(obj); - - var results = []; - - results.push('-X ' + this.method.toUpperCase()); - - if (obj.headers) { - var key; - - for (key in obj.headers) { - results.push('--header "' + key + ': ' + obj.headers[key] + '"'); - } - } - - if (obj.body) { - var body; - - if (_.isObject(obj.body)) { - body = JSON.stringify(obj.body); - } else { - body = obj.body; - } - - results.push('-d "' + body.replace(/"/g, '\\"') + '"'); - } - - return 'curl ' + (results.join(' ')) + ' "' + obj.url + '"'; -}; - -Operation.prototype.encodePathCollection = function (type, name, value) { - var encoded = ''; - var i; - var separator = ''; - - if (type === 'ssv') { - separator = '%20'; - } else if (type === 'tsv') { - separator = '\\t'; - } else if (type === 'pipes') { - separator = '|'; - } else { - separator = ','; - } - - for (i = 0; i < value.length; i++) { - if (i === 0) { - encoded = this.encodeQueryParam(value[i]); - } else { - encoded += separator + this.encodeQueryParam(value[i]); - } - } - - return encoded; -}; - -Operation.prototype.encodeQueryCollection = function (type, name, value) { - var encoded = ''; - var i; - - if (type === 'default' || type === 'multi') { - for (i = 0; i < value.length; i++) { - if (i > 0) {encoded += '&';} - - encoded += this.encodeQueryParam(name) + '=' + this.encodeQueryParam(value[i]); - } - } else { - var separator = ''; - - if (type === 'csv') { - separator = ','; - } else if (type === 'ssv') { - separator = '%20'; - } else if (type === 'tsv') { - separator = '\\t'; - } else if (type === 'pipes') { - separator = '|'; - } else if (type === 'brackets') { - for (i = 0; i < value.length; i++) { - if (i !== 0) { - encoded += '&'; - } - - encoded += this.encodeQueryParam(name) + '[]=' + this.encodeQueryParam(value[i]); - } - } - - if (separator !== '') { - for (i = 0; i < value.length; i++) { - if (i === 0) { - encoded = this.encodeQueryParam(name) + '=' + this.encodeQueryParam(value[i]); - } else { - encoded += separator + this.encodeQueryParam(value[i]); - } - } - } - } - - return encoded; -}; - -Operation.prototype.encodeQueryParam = function (arg) { - return encodeURIComponent(arg); -}; - -/** - * TODO revisit, might not want to leave '/' - **/ -Operation.prototype.encodePathParam = function (pathParam) { - return encodeURIComponent(pathParam); -}; - -},{"../helpers":4,"../http":5,"./model":9,"lodash-compat/lang/cloneDeep":141,"lodash-compat/lang/isEmpty":144,"lodash-compat/lang/isObject":147,"lodash-compat/lang/isUndefined":151}],11:[function(require,module,exports){ -'use strict'; - -var OperationGroup = module.exports = function (tag, description, externalDocs, operation) { - this.description = description; - this.externalDocs = externalDocs; - this.name = tag; - this.operation = operation; - this.operationsArray = []; - this.path = tag; - this.tag = tag; -}; - -OperationGroup.prototype.sort = function () { - -}; - - -},{}],12:[function(require,module,exports){ - -},{}],13:[function(require,module,exports){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var isArray = require('is-array') - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 -Buffer.poolSize = 8192 // not used by this implementation - -var rootParent = {} - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Note: - * - * - Implementation must support adding new properties to `Uint8Array` instances. - * Firefox 4-29 lacked support, fixed in Firefox 30+. - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - * - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will - * get the Object implementation, which is slower but will work correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = (function () { - function Foo () {} - try { - var buf = new ArrayBuffer(0) - var arr = new Uint8Array(buf) - arr.foo = function () { return 42 } - arr.constructor = Foo - return arr.foo() === 42 && // typed array instances can be augmented - arr.constructor === Foo && // constructor can be set - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -})() - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -/** - * Class: Buffer - * ============= - * - * The Buffer constructor returns instances of `Uint8Array` that are augmented - * with function properties for all the node `Buffer` API functions. We use - * `Uint8Array` so that square bracket notation works as expected -- it returns - * a single octet. - * - * By augmenting the instances, we can avoid modifying the `Uint8Array` - * prototype. - */ -function Buffer (arg) { - if (!(this instanceof Buffer)) { - // Avoid going through an ArgumentsAdaptorTrampoline in the common case. - if (arguments.length > 1) return new Buffer(arg, arguments[1]) - return new Buffer(arg) - } - - this.length = 0 - this.parent = undefined - - // Common case. - if (typeof arg === 'number') { - return fromNumber(this, arg) - } - - // Slightly less common case. - if (typeof arg === 'string') { - return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') - } - - // Unusual. - return fromObject(this, arg) -} - -function fromNumber (that, length) { - that = allocate(that, length < 0 ? 0 : checked(length) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < length; i++) { - that[i] = 0 - } - } - return that -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' - - // Assumption: byteLength() return value is always < kMaxLength. - var length = byteLength(string, encoding) | 0 - that = allocate(that, length) - - that.write(string, encoding) - return that -} - -function fromObject (that, object) { - if (Buffer.isBuffer(object)) return fromBuffer(that, object) - - if (isArray(object)) return fromArray(that, object) - - if (object == null) { - throw new TypeError('must start with number, buffer, array or string') - } - - if (typeof ArrayBuffer !== 'undefined' && object.buffer instanceof ArrayBuffer) { - return fromTypedArray(that, object) - } - - if (object.length) return fromArrayLike(that, object) - - return fromJsonObject(that, object) -} - -function fromBuffer (that, buffer) { - var length = checked(buffer.length) | 0 - that = allocate(that, length) - buffer.copy(that, 0, 0, length) - return that -} - -function fromArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Duplicate of fromArray() to keep fromArray() monomorphic. -function fromTypedArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - // Truncating the elements is probably not what people expect from typed - // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior - // of the old Buffer constructor. - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayLike (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. -// Returns a zero-length buffer for inputs that don't conform to the spec. -function fromJsonObject (that, object) { - var array - var length = 0 - - if (object.type === 'Buffer' && isArray(object.data)) { - array = object.data - length = checked(array.length) | 0 - } - that = allocate(that, length) - - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function allocate (that, length) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = Buffer._augment(new Uint8Array(length)) - } else { - // Fallback: Return an object instance of the Buffer class - that.length = length - that._isBuffer = true - } - - var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 - if (fromPool) that.parent = rootParent - - return that -} - -function checked (length) { - // Note: cannot use `length < kMaxLength` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (subject, encoding) { - if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) - - var buf = new Buffer(subject, encoding) - delete buf.parent - return buf -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - var i = 0 - var len = Math.min(x, y) - while (i < len) { - if (a[i] !== b[i]) break - - ++i - } - - if (i !== len) { - x = a[i] - y = b[i] - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') - - if (list.length === 0) { - return new Buffer(0) - } else if (list.length === 1) { - return list[0] - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; i++) { - length += list[i].length - } - } - - var buf = new Buffer(length) - var pos = 0 - for (i = 0; i < list.length; i++) { - var item = list[i] - item.copy(buf, pos) - pos += item.length - } - return buf -} - -function byteLength (string, encoding) { - if (typeof string !== 'string') string = '' + string - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'binary': - // Deprecated - case 'raw': - case 'raws': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -// pre-set for values that may exist in the future -Buffer.prototype.length = undefined -Buffer.prototype.parent = undefined - -function slowToString (encoding, start, end) { - var loweredCase = false - - start = start | 0 - end = end === undefined || end === Infinity ? this.length : end | 0 - - if (!encoding) encoding = 'utf8' - if (start < 0) start = 0 - if (end > this.length) end = this.length - if (end <= start) return '' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'binary': - return binarySlice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return 0 - return Buffer.compare(this, b) -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset) { - if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff - else if (byteOffset < -0x80000000) byteOffset = -0x80000000 - byteOffset >>= 0 - - if (this.length === 0) return -1 - if (byteOffset >= this.length) return -1 - - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) - - if (typeof val === 'string') { - if (val.length === 0) return -1 // special case: looking for empty string always fails - return String.prototype.indexOf.call(this, val, byteOffset) - } - if (Buffer.isBuffer(val)) { - return arrayIndexOf(this, val, byteOffset) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset) - } - - function arrayIndexOf (arr, val, byteOffset) { - var foundIndex = -1 - for (var i = 0; byteOffset + i < arr.length; i++) { - if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex - } else { - foundIndex = -1 - } - } - return -1 - } - - throw new TypeError('val must be string, number or Buffer') -} - -// `get` will be removed in Node 0.13+ -Buffer.prototype.get = function get (offset) { - console.log('.get() is deprecated. Access using array indexes instead.') - return this.readUInt8(offset) -} - -// `set` will be removed in Node 0.13+ -Buffer.prototype.set = function set (v, offset) { - console.log('.set() is deprecated. Access using array indexes instead.') - return this.writeUInt8(v, offset) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new Error('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; i++) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) throw new Error('Invalid hex string') - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - var swap = encoding - encoding = offset - offset = length | 0 - length = swap - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'binary': - return binaryWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - var res = '' - var tmp = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - if (buf[i] <= 0x7F) { - res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) - tmp = '' - } else { - tmp += '%' + buf[i].toString(16) - } - } - - return res + decodeUtf8Char(tmp) -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function binarySlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; i++) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = Buffer._augment(this.subarray(start, end)) - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; i++) { - newBuf[i] = this[i + start] - } - } - - if (newBuf.length) newBuf.parent = this.parent || this - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = value - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = value - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = value - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = value - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = value - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = value - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = value - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') - if (offset < 0) throw new RangeError('index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - - if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < len; i++) { - target[i + targetStart] = this[i + start] - } - } else { - target._set(this.subarray(start, start + len), targetStart) - } - - return len -} - -// fill(value, start=0, end=buffer.length) -Buffer.prototype.fill = function fill (value, start, end) { - if (!value) value = 0 - if (!start) start = 0 - if (!end) end = this.length - - if (end < start) throw new RangeError('end < start') - - // Fill 0 bytes; we're done - if (end === start) return - if (this.length === 0) return - - if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') - if (end < 0 || end > this.length) throw new RangeError('end out of bounds') - - var i - if (typeof value === 'number') { - for (i = start; i < end; i++) { - this[i] = value - } - } else { - var bytes = utf8ToBytes(value.toString()) - var len = bytes.length - for (i = start; i < end; i++) { - this[i] = bytes[i % len] - } - } - - return this -} - -/** - * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. - * Added in Node 0.12. Only available in browsers that support ArrayBuffer. - */ -Buffer.prototype.toArrayBuffer = function toArrayBuffer () { - if (typeof Uint8Array !== 'undefined') { - if (Buffer.TYPED_ARRAY_SUPPORT) { - return (new Buffer(this)).buffer - } else { - var buf = new Uint8Array(this.length) - for (var i = 0, len = buf.length; i < len; i += 1) { - buf[i] = this[i] - } - return buf.buffer - } - } else { - throw new TypeError('Buffer.toArrayBuffer not supported in this browser') - } -} - -// HELPER FUNCTIONS -// ================ - -var BP = Buffer.prototype - -/** - * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods - */ -Buffer._augment = function _augment (arr) { - arr.constructor = Buffer - arr._isBuffer = true - - // save reference to original Uint8Array set method before overwriting - arr._set = arr.set - - // deprecated, will be removed in node 0.13+ - arr.get = BP.get - arr.set = BP.set - - arr.write = BP.write - arr.toString = BP.toString - arr.toLocaleString = BP.toString - arr.toJSON = BP.toJSON - arr.equals = BP.equals - arr.compare = BP.compare - arr.indexOf = BP.indexOf - arr.copy = BP.copy - arr.slice = BP.slice - arr.readUIntLE = BP.readUIntLE - arr.readUIntBE = BP.readUIntBE - arr.readUInt8 = BP.readUInt8 - arr.readUInt16LE = BP.readUInt16LE - arr.readUInt16BE = BP.readUInt16BE - arr.readUInt32LE = BP.readUInt32LE - arr.readUInt32BE = BP.readUInt32BE - arr.readIntLE = BP.readIntLE - arr.readIntBE = BP.readIntBE - arr.readInt8 = BP.readInt8 - arr.readInt16LE = BP.readInt16LE - arr.readInt16BE = BP.readInt16BE - arr.readInt32LE = BP.readInt32LE - arr.readInt32BE = BP.readInt32BE - arr.readFloatLE = BP.readFloatLE - arr.readFloatBE = BP.readFloatBE - arr.readDoubleLE = BP.readDoubleLE - arr.readDoubleBE = BP.readDoubleBE - arr.writeUInt8 = BP.writeUInt8 - arr.writeUIntLE = BP.writeUIntLE - arr.writeUIntBE = BP.writeUIntBE - arr.writeUInt16LE = BP.writeUInt16LE - arr.writeUInt16BE = BP.writeUInt16BE - arr.writeUInt32LE = BP.writeUInt32LE - arr.writeUInt32BE = BP.writeUInt32BE - arr.writeIntLE = BP.writeIntLE - arr.writeIntBE = BP.writeIntBE - arr.writeInt8 = BP.writeInt8 - arr.writeInt16LE = BP.writeInt16LE - arr.writeInt16BE = BP.writeInt16BE - arr.writeInt32LE = BP.writeInt32LE - arr.writeInt32BE = BP.writeInt32BE - arr.writeFloatLE = BP.writeFloatLE - arr.writeFloatBE = BP.writeFloatBE - arr.writeDoubleLE = BP.writeDoubleLE - arr.writeDoubleBE = BP.writeDoubleBE - arr.fill = BP.fill - arr.inspect = BP.inspect - arr.toArrayBuffer = BP.toArrayBuffer - - return arr -} - -var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - var i = 0 - - for (; i < length; i++) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (leadSurrogate) { - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } else { - // valid surrogate pair - codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 - leadSurrogate = null - } - } else { - // no lead yet - - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else { - // valid lead - leadSurrogate = codePoint - continue - } - } - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = null - } - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x200000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; i++) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -function decodeUtf8Char (str) { - try { - return decodeURIComponent(str) - } catch (err) { - return String.fromCharCode(0xFFFD) // UTF 8 invalid char - } -} - -},{"base64-js":14,"ieee754":15,"is-array":16}],14:[function(require,module,exports){ -var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - -;(function (exports) { - 'use strict'; - - var Arr = (typeof Uint8Array !== 'undefined') - ? Uint8Array - : Array - - var PLUS = '+'.charCodeAt(0) - var SLASH = '/'.charCodeAt(0) - var NUMBER = '0'.charCodeAt(0) - var LOWER = 'a'.charCodeAt(0) - var UPPER = 'A'.charCodeAt(0) - var PLUS_URL_SAFE = '-'.charCodeAt(0) - var SLASH_URL_SAFE = '_'.charCodeAt(0) - - function decode (elt) { - var code = elt.charCodeAt(0) - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62 // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63 // '/' - if (code < NUMBER) - return -1 //no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26 - if (code < UPPER + 26) - return code - UPPER - if (code < LOWER + 26) - return code - LOWER + 26 - } - - function b64ToByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - - if (b64.length % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - var len = b64.length - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length - - var L = 0 - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) - push((tmp & 0xFF0000) >> 16) - push((tmp & 0xFF00) >> 8) - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) - push((tmp >> 8) & 0xFF) - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1] - output += encode(temp >> 2) - output += encode((temp << 4) & 0x3F) - output += '==' - break - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) - output += encode(temp >> 10) - output += encode((temp >> 4) & 0x3F) - output += encode((temp << 2) & 0x3F) - output += '=' - break - } - - return output - } - - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) - -},{}],15:[function(require,module,exports){ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - -},{}],16:[function(require,module,exports){ - -/** - * isArray - */ - -var isArray = Array.isArray; - -/** - * toString - */ - -var str = Object.prototype.toString; - -/** - * Whether or not the given `val` - * is an array. - * - * example: - * - * isArray([]); - * // > true - * isArray(arguments); - * // > false - * isArray(''); - * // > false - * - * @param {mixed} val - * @return {bool} - */ - -module.exports = isArray || function (val) { - return !! val && '[object Array]' == str.call(val); -}; - -},{}],17:[function(require,module,exports){ -// shim for using process in browser - -var process = module.exports = {}; -var queue = []; -var draining = false; - -function drainQueue() { - if (draining) { - return; - } - draining = true; - var currentQueue; - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - var i = -1; - while (++i < len) { - currentQueue[i](); - } - len = queue.length; - } - draining = false; -} -process.nextTick = function (fun) { - queue.push(fun); - if (!draining) { - setTimeout(drainQueue, 0); - } -}; - -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -// TODO(shtylman) -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - -},{}],18:[function(require,module,exports){ -(function (Buffer){ -(function () { - "use strict"; - - function btoa(str) { - var buffer - ; - - if (str instanceof Buffer) { - buffer = str; - } else { - buffer = new Buffer(str.toString(), 'binary'); - } - - return buffer.toString('base64'); - } - - module.exports = btoa; -}()); - -}).call(this,require("buffer").Buffer) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idG9hL2luZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiKGZ1bmN0aW9uICgpIHtcbiAgXCJ1c2Ugc3RyaWN0XCI7XG5cbiAgZnVuY3Rpb24gYnRvYShzdHIpIHtcbiAgICB2YXIgYnVmZmVyXG4gICAgICA7XG5cbiAgICBpZiAoc3RyIGluc3RhbmNlb2YgQnVmZmVyKSB7XG4gICAgICBidWZmZXIgPSBzdHI7XG4gICAgfSBlbHNlIHtcbiAgICAgIGJ1ZmZlciA9IG5ldyBCdWZmZXIoc3RyLnRvU3RyaW5nKCksICdiaW5hcnknKTtcbiAgICB9XG5cbiAgICByZXR1cm4gYnVmZmVyLnRvU3RyaW5nKCdiYXNlNjQnKTtcbiAgfVxuXG4gIG1vZHVsZS5leHBvcnRzID0gYnRvYTtcbn0oKSk7XG4iXX0= -},{"buffer":13}],19:[function(require,module,exports){ -/* jshint node: true */ -(function () { - "use strict"; - - function CookieAccessInfo(domain, path, secure, script) { - if (this instanceof CookieAccessInfo) { - this.domain = domain || undefined; - this.path = path || "/"; - this.secure = !!secure; - this.script = !!script; - return this; - } - return new CookieAccessInfo(domain, path, secure, script); - } - exports.CookieAccessInfo = CookieAccessInfo; - - function Cookie(cookiestr, request_domain, request_path) { - if (cookiestr instanceof Cookie) { - return cookiestr; - } - if (this instanceof Cookie) { - this.name = null; - this.value = null; - this.expiration_date = Infinity; - this.path = String(request_path || "/"); - this.explicit_path = false; - this.domain = request_domain || null; - this.explicit_domain = false; - this.secure = false; //how to define default? - this.noscript = false; //httponly - if (cookiestr) { - this.parse(cookiestr, request_domain, request_path); - } - return this; - } - return new Cookie(cookiestr); - } - exports.Cookie = Cookie; - - Cookie.prototype.toString = function toString() { - var str = [this.name + "=" + this.value]; - if (this.expiration_date !== Infinity) { - str.push("expires=" + (new Date(this.expiration_date)).toGMTString()); - } - if (this.domain) { - str.push("domain=" + this.domain); - } - if (this.path) { - str.push("path=" + this.path); - } - if (this.secure) { - str.push("secure"); - } - if (this.noscript) { - str.push("httponly"); - } - return str.join("; "); - }; - - Cookie.prototype.toValueString = function toValueString() { - return this.name + "=" + this.value; - }; - - var cookie_str_splitter = /[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g; - Cookie.prototype.parse = function parse(str, request_domain, request_path) { - if (this instanceof Cookie) { - var parts = str.split(";").filter(function (value) { - return !!value; - }), - pair = parts[0].match(/([^=]+)=([\s\S]*)/), - key = pair[1], - value = pair[2], - i; - this.name = key; - this.value = value; - - for (i = 1; i < parts.length; i += 1) { - pair = parts[i].match(/([^=]+)(?:=([\s\S]*))?/); - key = pair[1].trim().toLowerCase(); - value = pair[2]; - switch (key) { - case "httponly": - this.noscript = true; - break; - case "expires": - this.expiration_date = value ? - Number(Date.parse(value)) : - Infinity; - break; - case "path": - this.path = value ? - value.trim() : - ""; - this.explicit_path = true; - break; - case "domain": - this.domain = value ? - value.trim() : - ""; - this.explicit_domain = !!this.domain; - break; - case "secure": - this.secure = true; - break; - } - } - - if (!this.explicit_path) { - this.path = request_path || "/"; - } - if (!this.explicit_domain) { - this.domain = request_domain; - } - - return this; - } - return new Cookie().parse(str, request_domain, request_path); - }; - - Cookie.prototype.matches = function matches(access_info) { - if (this.noscript && access_info.script || - this.secure && !access_info.secure || - !this.collidesWith(access_info)) { - return false; - } - return true; - }; - - Cookie.prototype.collidesWith = function collidesWith(access_info) { - if ((this.path && !access_info.path) || (this.domain && !access_info.domain)) { - return false; - } - if (this.path && access_info.path.indexOf(this.path) !== 0) { - return false; - } - if (!this.explicit_path) { - if (this.path !== access_info.path) { - return false; - } - } - var access_domain = access_info.domain && access_info.domain.replace(/^[\.]/,''); - var cookie_domain = this.domain && this.domain.replace(/^[\.]/,''); - if (cookie_domain === access_domain) { - return true; - } - if (cookie_domain) { - if (!this.explicit_domain) { - return false; // we already checked if the domains were exactly the same - } - var wildcard = access_domain.indexOf(cookie_domain); - if (wildcard === -1 || wildcard !== access_domain.length - cookie_domain.length) { - return false; - } - return true; - } - return true; - }; - - function CookieJar() { - var cookies, cookies_list, collidable_cookie; - if (this instanceof CookieJar) { - cookies = Object.create(null); //name: [Cookie] - - this.setCookie = function setCookie(cookie, request_domain, request_path) { - var remove, i; - cookie = new Cookie(cookie, request_domain, request_path); - //Delete the cookie if the set is past the current time - remove = cookie.expiration_date <= Date.now(); - if (cookies[cookie.name] !== undefined) { - cookies_list = cookies[cookie.name]; - for (i = 0; i < cookies_list.length; i += 1) { - collidable_cookie = cookies_list[i]; - if (collidable_cookie.collidesWith(cookie)) { - if (remove) { - cookies_list.splice(i, 1); - if (cookies_list.length === 0) { - delete cookies[cookie.name]; - } - return false; - } - cookies_list[i] = cookie; - return cookie; - } - } - if (remove) { - return false; - } - cookies_list.push(cookie); - return cookie; - } - if (remove) { - return false; - } - cookies[cookie.name] = [cookie]; - return cookies[cookie.name]; - }; - //returns a cookie - this.getCookie = function getCookie(cookie_name, access_info) { - var cookie, i; - cookies_list = cookies[cookie_name]; - if (!cookies_list) { - return; - } - for (i = 0; i < cookies_list.length; i += 1) { - cookie = cookies_list[i]; - if (cookie.expiration_date <= Date.now()) { - if (cookies_list.length === 0) { - delete cookies[cookie.name]; - } - continue; - } - if (cookie.matches(access_info)) { - return cookie; - } - } - }; - //returns a list of cookies - this.getCookies = function getCookies(access_info) { - var matches = [], cookie_name, cookie; - for (cookie_name in cookies) { - cookie = this.getCookie(cookie_name, access_info); - if (cookie) { - matches.push(cookie); - } - } - matches.toString = function toString() { - return matches.join(":"); - }; - matches.toValueString = function toValueString() { - return matches.map(function (c) { - return c.toValueString(); - }).join(';'); - }; - return matches; - }; - - return this; - } - return new CookieJar(); - } - exports.CookieJar = CookieJar; - - //returns list of cookies that were set correctly. Cookies that are expired and removed are not returned. - CookieJar.prototype.setCookies = function setCookies(cookies, request_domain, request_path) { - cookies = Array.isArray(cookies) ? - cookies : - cookies.split(cookie_str_splitter); - var successful = [], - i, - cookie; - cookies = cookies.map(Cookie); - for (i = 0; i < cookies.length; i += 1) { - cookie = cookies[i]; - if (this.setCookie(cookie, request_domain, request_path)) { - successful.push(cookie); - } - } - return successful; - }; -}()); - -},{}],20:[function(require,module,exports){ -/*! - * jQuery JavaScript Library v2.1.4 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2015-04-28T16:01Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Support: Firefox 18+ -// Can't be in strict mode, several libs including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// - -var arr = []; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - - version = "2.1.4", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/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(); - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return 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 just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // 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 ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - slice: function() { - return this.pushStack( 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] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // 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 ( i === length ) { - 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 - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - // adding 1 corrects loss of precision from parseFloat (#15100) - return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; - }, - - isPlainObject: function( obj ) { - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.constructor && - !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - // Support: Android<4.0, iOS<6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call(obj) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf("use strict") === 1 ) { - script = document.createElement("script"); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - indirect( code ); - } - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE9-11+ - // 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; - }, - - // Support: Android<4.1 - trim: 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 { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // 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 new values - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return 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 tmp, args, proxy; - - 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 = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( 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; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -}); - -// 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 ) { - - // Support: iOS 8.2 (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.2.0-pre - * http://sizzlejs.com/ - * - * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-12-16 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - 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 as it's faster than native - // http://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[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#" ), - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + characterEncoding + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + 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" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - 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<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }; - -// 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 || []; - nodeType = context.nodeType; - - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - if ( !seed && documentIsHTML ) { - - // Try to shortcut find operations when possible (e.g., not under DocumentFragment) - if ( nodeType !== 11 && (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 (jQuery #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 ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType !== 1 && 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 ) && testContext( 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]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -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; -}; - -/** - * 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 hasCompare, parent, - doc = node ? node.ownerDocument || node : preferredDoc; - - // 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; - parent = doc.defaultView; - - // 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 !== parent.top ) { - // IE11 does not have attachEvent, so all must suffer - if ( parent.addEventListener ) { - parent.addEventListener( "unload", unloadHandler, false ); - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", unloadHandler ); - } - } - - /* Support tests - ---------------------------------------------------------------------- */ - documentIsHTML = !isXML( doc ); - - /* 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; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); - - // 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 !== "undefined" && 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 !== "undefined" && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - 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 ( 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 - docElem.appendChild( div ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ - if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // 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"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibing-combinator selector` fails - if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + 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.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 - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - 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 = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // 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 || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( 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 ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -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 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - 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 - while ( (node = elem[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 (jQuery #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[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[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // 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 !== "undefined" && 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.replace( rwhitespace, " " ) + " " ).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( 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 ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - 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 negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - 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; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // 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(); - -tokenize = Sizzle.tokenize = function( 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 oldCache, outerCache, - newCache = [ 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 ( (oldCache = outerCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - outerCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - 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 multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -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( 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( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - 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 ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context !== document && context; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (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; - } - } - - // 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, match /* 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 ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is no seed and 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; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - 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 ) && testContext( 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 if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// 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 elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -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; - - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// 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 ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; - }); -} - -jQuery.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; - })); -}; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - len = this.length, - ret = [], - self = this; - - 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; - }, - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - 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; - } -}); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // 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-]*))$/, - - init = jQuery.fn.init = function( selector, context ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[0] === "<" && selector[ 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; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - 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] ); - - // Support: Blackberry 4.6 - // gEBID returns nodes no longer in the document (#6963) - if ( elem && elem.parentNode ) { - // 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 typeof rootjQuery.ready !== "undefined" ? - rootjQuery.ready( selector ) : - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.extend({ - dir: function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; - }, - - sibling: function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; - } -}); - -jQuery.fn.extend({ - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter(function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - 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)) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); - }, - - // Determine the position of an element within the set - 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 indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.unique( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - while ( (cur = cur[dir]) && 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 elem.contentDocument || jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.unique( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -}); -var rnotwhite = (/\S+/g); - - - -// 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( 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 // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // 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 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[ tuple[ 0 ] + "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 = 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 ? 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(); - } -}); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend({ - // 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; - } - - // 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.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -}); - -/** - * The ready event handler and self cleanup method - */ -function completed() { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - jQuery.ready(); -} - -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 ); - - } else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = 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 < len; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[0], key ) : emptyGet; -}; - - -/** - * Determines whether an object can have data - */ -jQuery.acceptData = function( owner ) { - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - /* jshint -W018 */ - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - -function Data() { - // Support: Android<4, - // Old WebKit does not have Object.preventExtensions/freeze method, - // return new empty object instead with no [[set]] accessor - Object.defineProperty( this.cache = {}, 0, { - get: function() { - return {}; - } - }); - - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; -Data.accepts = jQuery.acceptData; - -Data.prototype = { - key: function( owner ) { - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return the key for a frozen object. - if ( !Data.accepts( owner ) ) { - return 0; - } - - var descriptor = {}, - // Check if the owner object already has a cache key - unlock = owner[ this.expando ]; - - // If not, create one - if ( !unlock ) { - unlock = Data.uid++; - - // Secure it in a non-enumerable, non-writable property - try { - descriptor[ this.expando ] = { value: unlock }; - Object.defineProperties( owner, descriptor ); - - // Support: Android<4 - // Fallback to a less secure definition - } catch ( e ) { - descriptor[ this.expando ] = unlock; - jQuery.extend( owner, descriptor ); - } - } - - // Ensure the cache object - if ( !this.cache[ unlock ] ) { - this.cache[ unlock ] = {}; - } - - return unlock; - }, - set: function( owner, data, value ) { - var prop, - // There may be an unlock assigned to this node, - // if there is no entry for this "owner", create one inline - // and set the unlock as though an owner entry had always existed - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - // Handle: [ owner, key, value ] args - if ( typeof data === "string" ) { - cache[ data ] = value; - - // Handle: [ owner, { properties } ] args - } else { - // Fresh assignments by object are shallow copied - if ( jQuery.isEmptyObject( cache ) ) { - jQuery.extend( this.cache[ unlock ], data ); - // Otherwise, copy the properties one-by-one to the cache object - } else { - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } - } - } - return cache; - }, - get: function( owner, key ) { - // Either a valid cache is found, or will be created. - // New caches will be created and the unlock returned, - // allowing direct access to the newly created - // empty data object. A valid owner object must be provided. - var cache = this.cache[ this.key( owner ) ]; - - return key === undefined ? - cache : cache[ key ]; - }, - access: function( owner, key, value ) { - var stored; - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ((key && typeof key === "string") && value === undefined) ) { - - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase(key) ); - } - - // [*]When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, name, camel, - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - if ( key === undefined ) { - this.cache[ unlock ] = {}; - - } else { - // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - // 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 = key.concat( key.map( jQuery.camelCase ) ); - } else { - camel = jQuery.camelCase( key ); - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } - } - - i = name.length; - while ( i-- ) { - delete cache[ name[ i ] ]; - } - } - }, - hasData: function( owner ) { - return !jQuery.isEmptyObject( - this.cache[ owner[ this.expando ] ] || {} - ); - }, - discard: function( owner ) { - if ( owner[ this.expando ] ) { - delete this.cache[ owner[ this.expando ] ]; - } - } -}; -var data_priv = new Data(); - -var data_user = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /([A-Z])/g; - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - 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 - data_user.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend({ - hasData: function( elem ) { - return data_user.hasData( elem ) || data_priv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return data_user.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - data_user.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to data_priv methods, these can be deprecated. - _data: function( elem, name, data ) { - return data_priv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - data_priv.remove( elem, name ); - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = data_user.get( elem ); - - if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE11+ - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - data_priv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - data_user.set( this, key ); - }); - } - - return access( this, function( value ) { - var data, - camelKey = jQuery.camelCase( key ); - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - // Attempt to get data from the cache - // with the key as-is - data = data_user.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to get data from the cache - // with the key camelized - data = data_user.get( elem, camelKey ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each(function() { - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = data_user.get( this, camelKey ); - - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - data_user.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf("-") !== -1 && data !== undefined ) { - data_user.set( this, key, value ); - } - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - data_user.remove( this, key ); - }); - } -}); - - -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = data_priv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = data_priv.access( 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 public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return data_priv.get( elem, key ) || data_priv.access( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - data_priv.remove( elem, [ type + "queue", 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 ); - }); - }, - 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 = data_priv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( 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 ); - }; - -var rcheckableType = (/^(?:checkbox|radio)$/i); - - - -(function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Safari<=5.1 - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Safari<=5.1, Android<4.2 - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<=11+ - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -})(); -var strundefined = typeof undefined; - - - -support.focusinBubbles = "onfocusin" in window; - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|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 handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.get( 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 !== strundefined && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( 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 if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - } - } - } - - 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; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.hasData( elem ) && data_priv.get( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( 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; - data_priv.remove( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = 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 = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && jQuery.acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === 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. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( 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; - elem[ type ](); - 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, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( data_priv.get( 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 i, matches, sel, handleObj, - 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") ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( 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; - }, - - // 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 offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // 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 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; - } - }, - - 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: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome<28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : 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 ) { - this.focus(); - return false; - } - }, - 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 ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - 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 ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - 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 = function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } -}; - -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.defaultPrevented === undefined && - // Support: Android<4.0 - src.returnValue === false ? - 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 && e.preventDefault ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && e.stopPropagation ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && e.stopImmediatePropagation ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -// Support: Chrome 15+ -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, 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; - } - }; -}); - -// Support: Firefox, Chrome, Safari -// Create "bubbling" focus and blur events -if ( !support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - data_priv.remove( doc, fix ); - - } else { - data_priv.access( doc, fix, attaches ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // 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 - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /^$|\/(?:java|ecma)script/i, - rscriptTypeMasked = /^true\/(.*)/, - rcleanScript = /^\s*\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - - // Support: IE9 - option: [ 1, "" ], - - thead: [ 1, "", "
        " ], - col: [ 2, "", "
        " ], - tr: [ 2, "", "
        " ], - td: [ 3, "", "
        " ], - - _default: [ 0, "", "" ] - }; - -// Support: IE9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: 1.x compatibility -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? 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 = (elem.getAttribute("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 i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - data_priv.set( - elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) - ); - } -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( data_priv.hasData( src ) ) { - pdataOld = data_priv.access( src ); - pdataCur = data_priv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( data_user.hasData( src ) ) { - udataOld = data_user.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - data_user.set( dest, udataCur ); - } -} - -function getAll( context, tag ) { - var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : - context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Fix IE cloning issues - if ( !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 ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], 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, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - // Support: QtWebKit, PhantomJS - // push.apply(_, arraylike) throws on ancient WebKit - 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 || fragment.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; - } - - // Support: QtWebKit, PhantomJS - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - 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( fragment.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 ); - } - } - } - } - - return fragment; - }, - - cleanData: function( elems ) { - var data, elem, type, key, - special = jQuery.event.special, - i = 0; - - for ( ; (elem = elems[ i ]) !== undefined; i++ ) { - if ( jQuery.acceptData( elem ) ) { - key = elem[ data_priv.expando ]; - - if ( key && (data = data_priv.cache[ key ]) ) { - 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 ); - } - } - } - if ( data_priv.cache[ key ] ) { - // Discard any remaining `private` data - delete data_priv.cache[ key ]; - } - } - } - // Discard any remaining `user` data - delete data_user.cache[ elem[ data_user.expando ] ]; - } - } -}); - -jQuery.fn.extend({ - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each(function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = 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 ); - } - }); - }, - - remove: function( selector, keepData /* Internal Use Only */ ) { - 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++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - 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 access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - 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 arg = arguments[ 0 ]; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - arg = this.parentNode; - - jQuery.cleanData( getAll( this ) ); - - if ( arg ) { - arg.replaceChild( elem, this ); - } - }); - - // Force removal if there was no new content (e.g., from empty arguments) - return arg && (arg.length || arg.nodeType) ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - 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" && - !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 ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, 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 ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - 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 || "" ) && - !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } - } - } - } - - return this; - } -}); - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - - -var iframe, - elemdisplay = {}; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var style, - elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - - // Use of this method is a temporary fix (more like optimization) until something better comes along, - // since it was removed from specification and supported only in FF - style.display : jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function 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( "