diff --git a/package.json b/package.json index c9ba6006d3ee..265a2193e84f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "version": "0.0.0", "description": "Kibana TNG", "main": "Gulpfile.js", - "dependencies": {}, + "dependencies": { + "elasticsearch": "git://github.com/elasticsearch/elasticsearch-js.git#master" + }, "devDependencies": { "lodash": "~2.4.1", "expect.js": "~0.2.0", diff --git a/src/bower_components/elasticsearch/.bower.json b/src/bower_components/elasticsearch/.bower.json index 81c0223e6256..4552de934fcf 100644 --- a/src/bower_components/elasticsearch/.bower.json +++ b/src/bower_components/elasticsearch/.bower.json @@ -1,6 +1,6 @@ { "name": "elasticsearch", - "version": "1.5.10", + "version": "2.1.4", "authors": [ "Spencer Alger " ], @@ -12,13 +12,14 @@ ], "license": "Apache 2.0", "homepage": "https://github.com/elasticsearch/bower-elasticsearch-js", - "_release": "1.5.10", + "_release": "2.1.4", "_resolution": { "type": "version", - "tag": "v1.5.10", - "commit": "adcf5f1793fed158022d8a5baa106d27a754d707" + "tag": "v2.1.4", + "commit": "c80f81c220ca5087ddc79257280261fe40452aba" }, "_source": "git://github.com/elasticsearch/bower-elasticsearch-js.git", - "_target": "*", - "_originalSource": "elasticsearch" + "_target": "~2.1.4", + "_originalSource": "elasticsearch", + "_direct": true } \ No newline at end of file diff --git a/src/bower_components/elasticsearch/README.md b/src/bower_components/elasticsearch/README.md deleted file mode 100644 index bdc1e2a34ae2..000000000000 --- a/src/bower_components/elasticsearch/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# elasticsearch - -Elasticsearch client builds for bower. - -# Install - -Install with `bower` -``` -bower install elasticsearch -``` - -Add a ` - -``` - -## If you are using Angular -Use `elasticsearch.angular.js` instead. This will create an `elasticsearch` module with an `esFactory` that you can use. -``` -/* - * create your app module, specify "elasticsearch" as a dependency - */ -var app = angular.module('myApp', ['elasticsearch']); - -/* - * create a service, which provides your elasticsearch client - * to other parts of your application - */ -app.service('es', function (esFactory) { - return esFactory({ - host: 'localhost:9200', - // ... - }); -}); -``` - -## If you are using jQuery -Use elasticsearch.jquery.js` instead. Rather than a global `elasticsearch` it will create a `jQuery.es` namespace. -``` -var client = new $.es.Client({ - hosts: 'localhost:9200' -}); -``` - -# Submit Issues, Pull Requests, etc to [elasticsearch-js](https://github.com/elasticsearch/elasticsearch-js). \ No newline at end of file diff --git a/src/bower_components/elasticsearch/bower.json b/src/bower_components/elasticsearch/bower.json deleted file mode 100644 index 6b16155f0424..000000000000 --- a/src/bower_components/elasticsearch/bower.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "elasticsearch", - "version": "1.5.10", - "authors": [ - "Spencer Alger " - ], - "description": "The official low-level Elasticsearch client, for use in the browser.", - "main": "elasticsearch.js", - "keywords": [ - "elasticsearch", - "client" - ], - "license": "Apache 2.0" -} \ No newline at end of file diff --git a/src/bower_components/elasticsearch/elasticsearch.angular.js b/src/bower_components/elasticsearch/elasticsearch.angular.js index 17244be722ef..98d0820ae657 100644 --- a/src/bower_components/elasticsearch/elasticsearch.angular.js +++ b/src/bower_components/elasticsearch/elasticsearch.angular.js @@ -1,6 +1,6 @@ -/*! elasticsearch - v1.5.10 - 2014-03-03 +/*! elasticsearch - v2.1.4 - 2014-05-02 * http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/index.html - * Copyright (c) 2014 Elasticsearch BV; Licensed Apache 2.0 */ + * Copyright (c) 2014 ; Licensed Apache 2.0 */ ;(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o', - req: { - scrollId: { - type: 'list' + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'list' + } } + }, + { + fmt: '/_search/scroll' } - }, + ], method: 'DELETE' }); @@ -22275,7 +22280,7 @@ api.indices.prototype.segments = ca({ }); /** - * Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-gateway-snapshot.html) request + * Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-gateway-snapshot.html) request * * @param {Object} params - An object with parameters used to carry out this action * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -23691,6 +23696,75 @@ api.search = ca({ method: 'POST' }); +/** + * Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search_shards', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + api.snapshot = function SnapshotNS(transport) { this.transport = transport; }; @@ -24173,14 +24247,5417 @@ api.create = ca.proxy(api.index, { params.op_type = 'create'; } }); -},{"../client_action":194}],192:[function(require,module,exports){ -module.exports = { - '1.0': require('./1_0'), - '0.90': require('./0_90'), - _default: '0.90' +},{"../client_action":195}],192:[function(require,module,exports){ +/* jshint maxlen: false */ + +var ca = require('../client_action'); +var api = module.exports = {}; + +api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot']; + +/** + * Perform a [bulk](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-bulk.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Explicitely set the replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String} params.type - Default document type for items which don't provide one + * @param {String} params.index - Default index for items which don't provide one + */ +api.bulk = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + type: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_bulk', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_bulk', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_bulk' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +api.cat = function CatNS(transport) { + this.transport = transport; }; -},{"./0_90":190,"./1_0":191}],193:[function(require,module,exports){ +/** + * Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to return + */ +api.cat.prototype.aliases = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/aliases/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_cat/aliases' + } + ] +}); + +/** + * Perform a [cat.allocation](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-allocation.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.bytes - The unit in which to display byte values + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information + */ +api.cat.prototype.allocation = ca({ + params: { + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/allocation/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_cat/allocation' + } + ] +}); + +/** + * Perform a [cat.count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-count.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.count = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/count/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/count' + } + ] +}); + +/** + * Perform a [cat.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-health.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} [params.ts=true] - Set to false to disable timestamping + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.health = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + ts: { + type: 'boolean', + 'default': true + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/health' + } +}); + +/** + * Perform a [cat.help](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.help - Return help information + */ +api.cat.prototype.help = ca({ + params: { + help: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat' + } +}); + +/** + * Perform a [cat.indices](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-indices.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.bytes - The unit in which to display byte values + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.pri - Set to true to return stats only for primary shards + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.indices = ca({ + params: { + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + pri: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/indices/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/indices' + } + ] +}); + +/** + * Perform a [cat.master](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-master.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.master = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/master' + } +}); + +/** + * Perform a [cat.nodes](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-nodes.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.nodes = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/nodes' + } +}); + +/** + * Perform a [cat.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-pending-tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.pendingTasks = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/pending_tasks' + } +}); + +/** + * Perform a [cat.plugins](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-plugins.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.plugins = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/plugins' + } +}); + +/** + * Perform a [cat.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-recovery.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.bytes - The unit in which to display byte values + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.recovery = ca({ + params: { + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/recovery/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/recovery' + } + ] +}); + +/** + * Perform a [cat.shards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.shards = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/shards/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/shards' + } + ] +}); + +/** + * Perform a [cat.threadPool](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-thread-pool.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} params.fullId - Enables displaying the complete node ids + */ +api.cat.prototype.threadPool = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + }, + fullId: { + type: 'boolean', + 'default': false, + name: 'full_id' + } + }, + url: { + fmt: '/_cat/thread_pool' + } +}); + +/** + * Perform a [clearScroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.scrollId - A comma-separated list of scroll IDs to clear + */ +api.clearScroll = ca({ + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'list' + } + } + }, + { + fmt: '/_search/scroll' + } + ], + method: 'DELETE' +}); + +api.cluster = function ClusterNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + */ +api.cluster.prototype.getSettings = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_cluster/settings' + } +}); + +/** + * Perform a [cluster.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-health.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} [params.level=cluster] - Specify the level of detail for returned information + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Number} params.waitForActiveShards - Wait until the specified number of shards is active + * @param {String} params.waitForNodes - Wait until the specified number of nodes is available + * @param {Number} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished + * @param {String} params.waitForStatus - Wait until cluster is in a specific state + * @param {String} params.index - Limit the information returned to a specific index + */ +api.cluster.prototype.health = ca({ + params: { + level: { + type: 'enum', + 'default': 'cluster', + options: [ + 'cluster', + 'indices', + 'shards' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + waitForActiveShards: { + type: 'number', + name: 'wait_for_active_shards' + }, + waitForNodes: { + type: 'string', + name: 'wait_for_nodes' + }, + waitForRelocatingShards: { + type: 'number', + name: 'wait_for_relocating_shards' + }, + waitForStatus: { + type: 'enum', + 'default': null, + options: [ + 'green', + 'yellow', + 'red' + ], + name: 'wait_for_status' + } + }, + urls: [ + { + fmt: '/_cluster/health/<%=index%>', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_cluster/health' + } + ] +}); + +/** + * Perform a [cluster.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-pending.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + */ +api.cluster.prototype.pendingTasks = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_cluster/pending_tasks' + } +}); + +/** + * Perform a [cluster.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + */ +api.cluster.prototype.putSettings = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + url: { + fmt: '/_cluster/settings' + }, + method: 'PUT' +}); + +/** + * Perform a [cluster.reroute](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-reroute.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.dryRun - Simulate the operation only and return the resulting state + * @param {Boolean} params.explain - Return an explanation of why the commands can or cannot be executed + * @param {Boolean} params.filterMetadata - Don't return cluster state metadata (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + */ +api.cluster.prototype.reroute = ca({ + params: { + dryRun: { + type: 'boolean', + name: 'dry_run' + }, + explain: { + type: 'boolean' + }, + filterMetadata: { + type: 'boolean', + name: 'filter_metadata' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_cluster/reroute' + }, + method: 'POST' +}); + +/** + * Perform a [cluster.state](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-state.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.indexTemplates - A comma separated list to return specific index templates when returning metadata + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.metric - Limit the information returned to the specified metrics + */ +api.cluster.prototype.state = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + indexTemplates: { + type: 'list', + name: 'index_templates' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + urls: [ + { + fmt: '/_cluster/state/<%=metric%>/<%=index%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'master_node', + 'version' + ] + }, + index: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/state/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'master_node', + 'version' + ] + } + } + }, + { + fmt: '/_cluster/state' + } + ] +}); + +/** + * Perform a [cluster.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.cluster.prototype.stats = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + human: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cluster/stats/nodes/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/stats' + } + ] +}); + +/** + * Perform a [count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-count.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Number} params.minScore - Include only documents with a specific `_score` value in the result + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the results + * @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the results + */ +api.count = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + minScore: { + type: 'number', + name: 'min_score' + }, + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_count', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_count', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_count' + } + ], + method: 'POST' +}); + +/** + * Perform a [countPercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.percolateIndex - The index to count percolate the document into. Defaults to index. + * @param {String} params.percolateType - The type to count percolate document into. Defaults to type. + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.index - The index of the document being count percolated. + * @param {String} params.type - The type of the document being count percolated. + * @param {String} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster. + */ +api.countPercolate = ca({ + params: { + routing: { + type: 'list' + }, + preference: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + percolateIndex: { + type: 'string', + name: 'percolate_index' + }, + percolateType: { + type: 'string', + name: 'percolate_type' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>/_percolate/count', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-delete.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Specific write consistency setting for the operation + * @param {String} params.parent - ID of parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api['delete'] = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + parent: { + type: 'string' + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [deleteByQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-delete-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.analyzer - The analyzer to use for the query string + * @param {String} params.consistency - Specific write consistency setting for the operation + * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {String} params.df - The field to use as default where no field prefix is given in the query string + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the operation + */ +api.deleteByQuery = ca({ + params: { + analyzer: { + type: 'string' + }, + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + q: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + }, + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_query', + req: { + index: { + type: 'list' + } + } + } + ], + method: 'DELETE' +}); + +/** + * Perform a [exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.exists = ca({ + params: { + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [explain](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-explain.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) + * @param {String} params.analyzer - The analyzer for the query string query + * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {String} params.df - The default field for query string query (default: _all) + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.explain = ca({ + params: { + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + analyzer: { + type: 'string' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + fields: { + type: 'list' + }, + lenient: { + type: 'boolean' + }, + lowercaseExpandedTerms: { + type: 'boolean', + name: 'lowercase_expanded_terms' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.get = ca({ + params: { + fields: { + type: 'list' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [getSource](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types + */ +api.getSource = ca({ + params: { + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_source', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [index](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} params.parent - ID of the parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.timestamp - Explicit timestamp for the document + * @param {Duration} params.ttl - Expiration time for the document + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - Document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.index = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + opType: { + type: 'enum', + 'default': 'index', + options: [ + 'index', + 'create' + ], + name: 'op_type' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + timestamp: { + type: 'time' + }, + ttl: { + type: 'duration' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'POST' +}); + +api.indices = function IndicesNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-analyze.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.analyzer - The name of the analyzer to use + * @param {String} params.field - Use the analyzer configured for this field (instead of passing the analyzer name) + * @param {String, String[], Boolean} params.filters - A comma-separated list of filters to use for the analysis + * @param {String} params.index - The name of the index to scope the operation + * @param {Boolean} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true) + * @param {String} params.text - The text on which the analysis should be performed (when request body is not used) + * @param {String} params.tokenizer - The name of the tokenizer to use for the analysis + * @param {String} [params.format=detailed] - Format of the output + */ +api.indices.prototype.analyze = ca({ + params: { + analyzer: { + type: 'string' + }, + field: { + type: 'string' + }, + filters: { + type: 'list' + }, + index: { + type: 'string' + }, + preferLocal: { + type: 'boolean', + name: 'prefer_local' + }, + text: { + type: 'string' + }, + tokenizer: { + type: 'string' + }, + format: { + type: 'enum', + 'default': 'detailed', + options: [ + 'detailed', + 'text' + ] + } + }, + urls: [ + { + fmt: '/<%=index%>/_analyze', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_analyze' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.clearCache](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-clearcache.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.fieldData - Clear field data + * @param {Boolean} params.fielddata - Clear field data + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all) + * @param {Boolean} params.filter - Clear filter caches + * @param {Boolean} params.filterCache - Clear filter caches + * @param {Boolean} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all) + * @param {Boolean} params.id - Clear ID caches for parent/child + * @param {Boolean} params.idCache - Clear ID caches for parent/child + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index name to limit the operation + * @param {Boolean} params.recycler - Clear the recycler cache + */ +api.indices.prototype.clearCache = ca({ + params: { + fieldData: { + type: 'boolean', + name: 'field_data' + }, + fielddata: { + type: 'boolean' + }, + fields: { + type: 'list' + }, + filter: { + type: 'boolean' + }, + filterCache: { + type: 'boolean', + name: 'filter_cache' + }, + filterKeys: { + type: 'boolean', + name: 'filter_keys' + }, + id: { + type: 'boolean' + }, + idCache: { + type: 'boolean', + name: 'id_cache' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + index: { + type: 'list' + }, + recycler: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_cache/clear', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cache/clear' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.close](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + */ +api.indices.prototype.close = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + url: { + fmt: '/<%=index%>/_close', + req: { + index: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-create-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String} params.index - The name of the index + */ +api.indices.prototype.create = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-delete-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices + */ +api.indices.prototype['delete'] = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit timestamp for the document + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices + * @param {String, String[], Boolean} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. + */ +api.indices.prototype.deleteAlias = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-delete-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices. + */ +api.indices.prototype.deleteMapping = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/_mapping', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String} params.name - The name of the template + */ +api.indices.prototype.deleteTemplate = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices. + */ +api.indices.prototype.deleteWarmer = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + name: { + type: 'list' + } + }, + url: { + fmt: '/<%=index%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to check + */ +api.indices.prototype.exists = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.existsAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to return + */ +api.indices.prototype.existsAlias = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': [ + 'open', + 'closed' + ], + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_alias', + req: { + index: { + type: 'list' + } + } + } + ], + method: 'HEAD' +}); + +/** + * Perform a [indices.existsTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String} params.name - The name of the template + */ +api.indices.prototype.existsTemplate = ca({ + params: { + local: { + type: 'boolean' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.existsType](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-types-exists.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` to check the types across all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to check + */ +api.indices.prototype.existsType = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.flush](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-flush.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) + * @param {Boolean} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + */ +api.indices.prototype.flush = ca({ + params: { + force: { + type: 'boolean' + }, + full: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_flush', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_flush' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.getAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to return + */ +api.indices.prototype.getAlias = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_alias', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_alias' + } + ] +}); + +/** + * Perform a [indices.getAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to filter + */ +api.indices.prototype.getAliases = ca({ + params: { + timeout: { + type: 'time' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_aliases/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_aliases', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_aliases/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_aliases' + } + ] +}); + +/** + * Perform a [indices.getFieldMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-field-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.includeDefaults - Whether the default mapping values should be returned as well + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names + * @param {String, String[], Boolean} params.type - A comma-separated list of document types + * @param {String, String[], Boolean} params.field - A comma-separated list of fields + */ +api.indices.prototype.getFieldMapping = ca({ + params: { + includeDefaults: { + type: 'boolean', + name: 'include_defaults' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + field: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_mapping/field/<%=field%>', + req: { + index: { + type: 'list' + }, + field: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/<%=type%>/field/<%=field%>', + req: { + type: { + type: 'list' + }, + field: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/field/<%=field%>', + req: { + field: { + type: 'list' + } + } + } + ] +}); + +/** + * Perform a [indices.getMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names + * @param {String, String[], Boolean} params.type - A comma-separated list of document types + */ +api.indices.prototype.getMapping = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_mapping', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/<%=type%>', + req: { + type: { + type: 'list' + } + } + }, + { + fmt: '/_mapping' + } + ] +}); + +/** + * Perform a [indices.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.name - The name of the settings that should be included + */ +api.indices.prototype.getSettings = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': [ + 'open', + 'closed' + ], + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_settings/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_settings', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_settings/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_settings' + } + ] +}); + +/** + * Perform a [indices.getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String} params.name - The name of the template + */ +api.indices.prototype.getTemplate = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + { + fmt: '/_template' + } + ] +}); + +/** + * Perform a [indices.getWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices + * @param {String, String[], Boolean} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types + */ +api.indices.prototype.getWarmer = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_warmer', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_warmer/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_warmer' + } + ] +}); + +/** + * Perform a [indices.open](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + */ +api.indices.prototype.open = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'closed', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + url: { + fmt: '/<%=index%>/_open', + req: { + index: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.optimize](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-optimize.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flush - Specify whether the index should be flushed after performing the operation (default: true) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Number} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic) + * @param {Boolean} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents + * @param {Anything} params.operationThreading - TODO: ? + * @param {Boolean} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true) + * @param {Boolean} params.force - Force a merge operation to run, even if there is a single segment in the index (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.optimize = ca({ + params: { + flush: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + maxNumSegments: { + type: 'number', + name: 'max_num_segments' + }, + onlyExpungeDeletes: { + type: 'boolean', + name: 'only_expunge_deletes' + }, + operationThreading: { + name: 'operation_threading' + }, + waitForMerge: { + type: 'boolean', + name: 'wait_for_merge' + }, + force: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_optimize', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_optimize' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.putAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit timestamp for the document + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` or omit to perform the operation on all indices. + * @param {String} params.name - The name of the alias to be created or updated + */ +api.indices.prototype.putAlias = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'string' + } + } + } + ], + method: 'PUT' +}); + +/** + * Perform a [indices.putMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-put-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. + * @param {String} params.type - The name of the document type + */ +api.indices.prototype.putMapping = ca({ + params: { + ignoreConflicts: { + type: 'boolean', + name: 'ignore_conflicts' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/_mapping/<%=type%>', + req: { + type: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.putSettings = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + urls: [ + { + fmt: '/<%=index%>/_settings', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_settings' + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Number} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {String} params.name - The name of the template + */ +api.indices.prototype.putTemplate = ca({ + params: { + order: { + type: 'number' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices + * @param {String} params.name - The name of the warmer + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types + */ +api.indices.prototype.putWarmer = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + { + fmt: '/_warmer/<%=name%>', + req: { + name: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-recovery.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.detailed - Whether to display detailed information about shard recovery + * @param {Boolean} params.activeOnly - Display only those recoveries that are currently on-going + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.recovery = ca({ + params: { + detailed: { + type: 'boolean', + 'default': false + }, + activeOnly: { + type: 'boolean', + 'default': false, + name: 'active_only' + }, + human: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/<%=index%>/_recovery', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_recovery' + } + ] +}); + +/** + * Perform a [indices.refresh](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-refresh.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.force - Force a refresh even if not required + * @param {Anything} params.operationThreading - TODO: ? + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.refresh = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + force: { + type: 'boolean', + 'default': false + }, + operationThreading: { + name: 'operation_threading' + } + }, + urls: [ + { + fmt: '/<%=index%>/_refresh', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_refresh' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.segments](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-segments.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {Anything} params.operationThreading - TODO: ? + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.segments = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + human: { + type: 'boolean', + 'default': false + }, + operationThreading: { + name: 'operation_threading' + } + }, + urls: [ + { + fmt: '/<%=index%>/_segments', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_segments' + } + ] +}); + +/** + * Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-gateway-snapshot.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + */ +api.indices.prototype.snapshotIndex = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_gateway/snapshot', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_gateway/snapshot' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * @param {Boolean} params.groups - A comma-separated list of search groups for `search` index metric + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String} [params.level=indices] - Return stats aggregated at cluster, index or shard level + * @param {String, String[], Boolean} params.types - A comma-separated list of document types for the `indexing` index metric + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.metric - Limit the information returned the specific metrics. + */ +api.indices.prototype.stats = ca({ + params: { + completionFields: { + type: 'list', + name: 'completion_fields' + }, + fielddataFields: { + type: 'list', + name: 'fielddata_fields' + }, + fields: { + type: 'list' + }, + groups: { + type: 'boolean' + }, + human: { + type: 'boolean', + 'default': false + }, + level: { + type: 'enum', + 'default': 'indices', + options: [ + 'cluster', + 'indices', + 'shards' + ] + }, + types: { + type: 'list' + } + }, + urls: [ + { + fmt: '/<%=index%>/_stats/<%=metric%>', + req: { + index: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/_stats/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/<%=index%>/_stats', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_stats' + } + ] +}); + +/** + * Perform a [indices.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-status.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {Anything} params.operationThreading - TODO: ? + * @param {Boolean} params.recovery - Return information about shard recovery + * @param {Boolean} params.snapshot - TODO: ? + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.status = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + human: { + type: 'boolean', + 'default': false + }, + operationThreading: { + name: 'operation_threading' + }, + recovery: { + type: 'boolean' + }, + snapshot: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_status', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_status' + } + ] +}); + +/** + * Perform a [indices.updateAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Request timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + */ +api.indices.prototype.updateAliases = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_aliases' + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [indices.validateQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-validate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.explain - Return detailed information about the error + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Anything} params.operationThreading - TODO: ? + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types + */ +api.indices.prototype.validateQuery = ca({ + params: { + explain: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + operationThreading: { + name: 'operation_threading' + }, + source: { + type: 'string' + }, + q: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_validate/query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_validate/query', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_validate/query' + } + ], + method: 'POST' +}); + +/** + * Perform a [info](http://www.elasticsearch.org/guide/) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.info = ca({ + url: { + fmt: '/' + } +}); + +/** + * Perform a [mget](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-multi-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.mget = ca({ + params: { + fields: { + type: 'list' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mget', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mget', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mget' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [mlt](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-more-like-this.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Number} params.boostTerms - The boost factor + * @param {Number} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored + * @param {Number} params.maxQueryTerms - The maximum query terms to be included in the generated query + * @param {Number} params.maxWordLength - The minimum length of the word: longer words will be ignored + * @param {Number} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored + * @param {Number} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored + * @param {Number} params.minWordLength - The minimum length of the word: shorter words will be ignored + * @param {String, String[], Boolean} params.mltFields - Specific fields to perform the query against + * @param {Number} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3) + * @param {String} params.routing - Specific routing value + * @param {Number} params.searchFrom - The offset from which to return results + * @param {String, String[], Boolean} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document) + * @param {String} params.searchQueryHint - The search query hint + * @param {String} params.searchScroll - A scroll search request definition + * @param {Number} params.searchSize - The number of documents to return (default: 10) + * @param {String} params.searchSource - A specific search request definition (instead of using the request body) + * @param {String} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc) + * @param {String, String[], Boolean} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document) + * @param {String, String[], Boolean} params.stopWords - A list of stop words to be ignored + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.mlt = ca({ + params: { + boostTerms: { + type: 'number', + name: 'boost_terms' + }, + maxDocFreq: { + type: 'number', + name: 'max_doc_freq' + }, + maxQueryTerms: { + type: 'number', + name: 'max_query_terms' + }, + maxWordLength: { + type: 'number', + name: 'max_word_length' + }, + minDocFreq: { + type: 'number', + name: 'min_doc_freq' + }, + minTermFreq: { + type: 'number', + name: 'min_term_freq' + }, + minWordLength: { + type: 'number', + name: 'min_word_length' + }, + mltFields: { + type: 'list', + name: 'mlt_fields' + }, + percentTermsToMatch: { + type: 'number', + name: 'percent_terms_to_match' + }, + routing: { + type: 'string' + }, + searchFrom: { + type: 'number', + name: 'search_from' + }, + searchIndices: { + type: 'list', + name: 'search_indices' + }, + searchQueryHint: { + type: 'string', + name: 'search_query_hint' + }, + searchScroll: { + type: 'string', + name: 'search_scroll' + }, + searchSize: { + type: 'number', + name: 'search_size' + }, + searchSource: { + type: 'string', + name: 'search_source' + }, + searchType: { + type: 'string', + name: 'search_type' + }, + searchTypes: { + type: 'list', + name: 'search_types' + }, + stopWords: { + type: 'list', + name: 'stop_words' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [mpercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The index of the document being count percolated to use as default + * @param {String} params.type - The type of the document being percolated to use as default. + */ +api.mpercolate = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mpercolate', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mpercolate', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mpercolate' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +/** + * Perform a [msearch](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-multi-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.searchType - Search operation type + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to use as default + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to use as default + */ +api.msearch = ca({ + params: { + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch', + 'count', + 'scan' + ], + name: 'search_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_msearch', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_msearch', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_msearch' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +/** + * Perform a [mtermvectors](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-multi-termvectors.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body + * @param {Boolean} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.index - The index in which the document resides. + * @param {String} params.type - The type of the document. + * @param {String} params.id - The id of the document. + */ +api.mtermvectors = ca({ + params: { + ids: { + type: 'list', + required: false + }, + termStatistics: { + type: 'boolean', + 'default': false, + required: false, + name: 'term_statistics' + }, + fieldStatistics: { + type: 'boolean', + 'default': true, + required: false, + name: 'field_statistics' + }, + fields: { + type: 'list', + required: false + }, + offsets: { + type: 'boolean', + 'default': true, + required: false + }, + positions: { + type: 'boolean', + 'default': true, + required: false + }, + payloads: { + type: 'boolean', + 'default': true, + required: false + }, + preference: { + type: 'string', + required: false + }, + routing: { + type: 'string', + required: false + }, + parent: { + type: 'string', + required: false + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mtermvectors', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mtermvectors', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mtermvectors' + } + ], + method: 'POST' +}); + +api.nodes = function NodesNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-hot-threads.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.interval - The interval for the second sampling of threads + * @param {Number} params.snapshots - Number of samples of thread stacktrace (default: 10) + * @param {Number} params.threads - Specify the number of threads to provide information for (default: 3) + * @param {String} params.type - The type to sample (default: cpu) + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.hotThreads = ca({ + params: { + interval: { + type: 'time' + }, + snapshots: { + type: 'number' + }, + threads: { + type: 'number' + }, + type: { + type: 'enum', + options: [ + 'cpu', + 'wait', + 'block' + ] + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/hotthreads', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/hotthreads' + } + ] +}); + +/** + * Perform a [nodes.info](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-info.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {String, String[], Boolean} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all. + */ +api.nodes.prototype.info = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + human: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + 'settings', + 'os', + 'process', + 'jvm', + 'thread_pool', + 'network', + 'transport', + 'http', + 'plugins' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + 'settings', + 'os', + 'process', + 'jvm', + 'thread_pool', + 'network', + 'transport', + 'http', + 'plugins' + ] + } + } + }, + { + fmt: '/_nodes' + } + ] +}); + +/** + * Perform a [nodes.shutdown](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-shutdown.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.delay - Set the delay for the operation (default: 1s) + * @param {Boolean} params.exit - Exit the JVM as well (default: true) + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes + */ +api.nodes.prototype.shutdown = ca({ + params: { + delay: { + type: 'time' + }, + exit: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_shutdown' + } + ], + method: 'POST' +}); + +/** + * Perform a [nodes.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * @param {Boolean} params.groups - A comma-separated list of search groups for `search` index metric + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String} [params.level=node] - Return indices stats aggregated at node, index or shard level + * @param {String, String[], Boolean} params.types - A comma-separated list of document types for the `indexing` index metric + * @param {String, String[], Boolean} params.metric - Limit the information returned to the specified metrics + * @param {String, String[], Boolean} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.stats = ca({ + params: { + completionFields: { + type: 'list', + name: 'completion_fields' + }, + fielddataFields: { + type: 'list', + name: 'fielddata_fields' + }, + fields: { + type: 'list' + }, + groups: { + type: 'boolean' + }, + human: { + type: 'boolean', + 'default': false + }, + level: { + type: 'enum', + 'default': 'node', + options: [ + 'node', + 'indices', + 'shards' + ] + }, + types: { + type: 'list' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + }, + indexMetric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + } + } + }, + { + fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + }, + indexMetric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/stats', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/stats/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + } + } + }, + { + fmt: '/_nodes/stats' + } + ] +}); + +/** + * Perform a [percolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.percolateIndex - The index to percolate the document into. Defaults to index. + * @param {String} params.percolateType - The type to percolate document into. Defaults to type. + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.index - The index of the document being percolated. + * @param {String} params.type - The type of the document being percolated. + * @param {String} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster. + */ +api.percolate = ca({ + params: { + routing: { + type: 'list' + }, + preference: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + percolateIndex: { + type: 'string', + name: 'percolate_index' + }, + percolateType: { + type: 'string', + name: 'percolate_type' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>/_percolate', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [ping](http://www.elasticsearch.org/guide/) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.ping = ca({ + url: { + fmt: '/' + }, + requestTimeout: 100, + method: 'HEAD' +}); + +/** + * Perform a [scroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Duration} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {String} params.scrollId - The scroll ID + */ +api.scroll = ca({ + params: { + scroll: { + type: 'duration' + }, + scrollId: { + type: 'string', + name: 'scroll_id' + } + }, + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'string' + } + } + }, + { + fmt: '/_search/scroll' + } + ], + method: 'POST' +}); + +/** + * Perform a [search](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.analyzer - The analyzer to use for the query string + * @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {String} params.df - The field to use as default where no field prefix is given in the query string + * @param {Boolean} params.explain - Specify whether to return detailed information about score computation as part of a hit + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return as part of a hit + * @param {Number} params.from - Starting offset (default: 0) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.indicesBoost - Comma-separated list of index boosts + * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values + * @param {Duration} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {String} params.searchType - Search operation type + * @param {Number} params.size - Number of hits to return (default: 10) + * @param {String, String[], Boolean} params.sort - A comma-separated list of : pairs + * @param {String} params.source - The URL-encoded request definition using the Query DSL (instead of using request body) + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {String, String[], Boolean} params.stats - Specific 'tag' of the request for logging and statistical purposes + * @param {String} params.suggestField - Specify which field to use for suggestions + * @param {String} [params.suggestMode=missing] - Specify suggest mode + * @param {Number} params.suggestSize - How many suggestions to return in response + * @param {Text} params.suggestText - The source text for which the suggestions should be returned + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Boolean} params.version - Specify whether to return document version as part of a hit + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.search = ca({ + params: { + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + explain: { + type: 'boolean' + }, + fields: { + type: 'list' + }, + from: { + type: 'number' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + indicesBoost: { + type: 'list', + name: 'indices_boost' + }, + lenient: { + type: 'boolean' + }, + lowercaseExpandedTerms: { + type: 'boolean', + name: 'lowercase_expanded_terms' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'duration' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch', + 'count', + 'scan' + ], + name: 'search_type' + }, + size: { + type: 'number' + }, + sort: { + type: 'list' + }, + source: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + stats: { + type: 'list' + }, + suggestField: { + type: 'string', + name: 'suggest_field' + }, + suggestMode: { + type: 'enum', + 'default': 'missing', + options: [ + 'missing', + 'popular', + 'always' + ], + name: 'suggest_mode' + }, + suggestSize: { + type: 'number', + name: 'suggest_size' + }, + suggestText: { + type: 'text', + name: 'suggest_text' + }, + timeout: { + type: 'time' + }, + version: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_search', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search' + } + ], + method: 'POST' +}); + +/** + * Perform a [searchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.searchTemplate = ca({ + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search/template', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_search/template', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search/template' + } + ], + method: 'POST' +}); + +/** + * Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search_shards', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + +api.snapshot = function SnapshotNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Boolean} params.waitForCompletion - Should this request wait until the operation has completed before returning + * @param {String} params.repository - A repository name + * @param {String} params.snapshot - A snapshot name + */ +api.snapshot.prototype.create = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForCompletion: { + type: 'boolean', + 'default': false, + name: 'wait_for_completion' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [snapshot.createRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String} params.repository - A repository name + */ +api.snapshot.prototype.createRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'string' + } + } + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [snapshot.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String} params.repository - A repository name + * @param {String} params.snapshot - A snapshot name + */ +api.snapshot.prototype['delete'] = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [snapshot.deleteRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String, String[], Boolean} params.repository - A comma-separated list of repository names + */ +api.snapshot.prototype.deleteRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [snapshot.get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String} params.repository - A repository name + * @param {String, String[], Boolean} params.snapshot - A comma-separated list of snapshot names + */ +api.snapshot.prototype.get = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'list' + } + } + } +}); + +/** + * Perform a [snapshot.getRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.repository - A comma-separated list of repository names + */ +api.snapshot.prototype.getRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + { + fmt: '/_snapshot' + } + ] +}); + +/** + * Perform a [snapshot.restore](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Boolean} params.waitForCompletion - Should this request wait until the operation has completed before returning + * @param {String} params.repository - A repository name + * @param {String} params.snapshot - A snapshot name + */ +api.snapshot.prototype.restore = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForCompletion: { + type: 'boolean', + 'default': false, + name: 'wait_for_completion' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [snapshot.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String} params.repository - A repository name + * @param {String, String[], Boolean} params.snapshot - A comma-separated list of snapshot names + */ +api.snapshot.prototype.status = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + urls: [ + { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'list' + } + } + }, + { + fmt: '/_snapshot/<%=repository%>/_status', + req: { + repository: { + type: 'string' + } + } + }, + { + fmt: '/_snapshot/_status' + } + ] +}); + +/** + * Perform a [suggest](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded request definition (instead of using request body) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices + */ +api.suggest = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/_suggest', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_suggest' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [termvector](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-termvectors.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.termStatistics - Specifies if total term frequency and document frequency should be returned. + * @param {Boolean} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return. + * @param {Boolean} [params.offsets=true] - Specifies if term offsets should be returned. + * @param {Boolean} [params.positions=true] - Specifies if term positions should be returned. + * @param {Boolean} [params.payloads=true] - Specifies if term payloads should be returned. + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random). + * @param {String} params.routing - Specific routing value. + * @param {String} params.parent - Parent id of documents. + * @param {String} params.index - The index in which the document resides. + * @param {String} params.type - The type of the document. + * @param {String} params.id - The id of the document. + */ +api.termvector = ca({ + params: { + termStatistics: { + type: 'boolean', + 'default': false, + required: false, + name: 'term_statistics' + }, + fieldStatistics: { + type: 'boolean', + 'default': true, + required: false, + name: 'field_statistics' + }, + fields: { + type: 'list', + required: false + }, + offsets: { + type: 'boolean', + 'default': true, + required: false + }, + positions: { + type: 'boolean', + 'default': true, + required: false + }, + payloads: { + type: 'boolean', + 'default': true, + required: false + }, + preference: { + type: 'string', + required: false + }, + routing: { + type: 'string', + required: false + }, + parent: { + type: 'string', + required: false + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [update](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-update.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {String} params.lang - The script language (default: mvel) + * @param {String} params.parent - ID of the parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {Number} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0) + * @param {String} params.routing - Specific routing value + * @param {Anything} params.script - The URL-encoded script definition (instead of using request body) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.timestamp - Explicit timestamp for the document + * @param {Duration} params.ttl - Expiration time for the document + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - Document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.update = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + fields: { + type: 'list' + }, + lang: { + type: 'string' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + retryOnConflict: { + type: 'number', + name: 'retry_on_conflict' + }, + routing: { + type: 'string' + }, + script: {}, + timeout: { + type: 'time' + }, + timestamp: { + type: 'time' + }, + ttl: { + type: 'duration' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_update', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} params.parent - ID of the parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.timestamp - Explicit timestamp for the document + * @param {Duration} params.ttl - Expiration time for the document + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - Document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.create = ca.proxy(api.index, { + transform: function (params) { + params.op_type = 'create'; + } +}); +},{"../client_action":195}],193:[function(require,module,exports){ +module.exports = { + '1.1': require('./1_1'), + '1.0': require('./1_0'), + '0.90': require('./0_90') +}; + +},{"./0_90":190,"./1_0":191,"./1_1":192}],194:[function(require,module,exports){ /** * A client that makes requests to Elasticsearch via a {{#crossLink "Transport"}}Transport{{/crossLink}} * @@ -24215,6 +29692,13 @@ var _ = require('./utils'); function Client(config) { config = config || {}; + if (config.__reused) { + throw new Error('Do not reuse objects to configure the elasticsearch Client class: ' + + 'https://github.com/elasticsearch/elasticsearch-js/issues/33'); + } else { + config.__reused = true; + } + function EsApiClient() { // our client will log minimally by default if (!config.hasOwnProperty('log')) { @@ -24239,7 +29723,7 @@ function Client(config) { delete this._namespaces; } - EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '0.90'); + EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '1.1'); if (!config.sniffEndpoint && EsApiClient.prototype === Client.apis['0.90']) { config.sniffEndpoint = '/_cluster/nodes'; } @@ -24248,7 +29732,7 @@ function Client(config) { } Client.apis = require('./apis'); -},{"./apis":192,"./transport":210,"./utils":211}],194:[function(require,module,exports){ +},{"./apis":193,"./transport":211,"./utils":213}],195:[function(require,module,exports){ /** * Constructs a function that can be called to make a request to ES * @type {[type]} @@ -24380,7 +29864,7 @@ function resolveUrl(url, params) { for (i = 0; i < url.reqParamKeys.length; i ++) { key = url.reqParamKeys[i]; - if (!params.hasOwnProperty(key)) { + if (!params.hasOwnProperty(key) || params[key] == null) { // missing a required param return false; } else { @@ -24403,7 +29887,7 @@ function resolveUrl(url, params) { for (i = 0; i < url.optParamKeys.length; i ++) { key = url.optParamKeys[i]; if (params[key]) { - if (castType[url.opt[key].type]) { + if (castType[url.opt[key].type] || params[key] == null) { vars[key] = castType[url.opt[key].type](url.opt[key], params[key], key); } else { vars[key] = params[key]; @@ -24555,7 +30039,7 @@ ClientAction.proxy = function (fn, spec) { }; }; -},{"./utils":211}],195:[function(require,module,exports){ +},{"./utils":213}],196:[function(require,module,exports){ module.exports = ConnectionAbstract; var _ = require('./utils'); @@ -24655,7 +30139,7 @@ ConnectionAbstract.prototype.setStatus = function (status) { this.removeAllListeners(); } }; -},{"./errors":199,"./host":200,"./log":201,"./utils":211,"events":4}],196:[function(require,module,exports){ +},{"./errors":200,"./host":201,"./log":202,"./utils":213,"events":4}],197:[function(require,module,exports){ var process=require("__browserify_process");/** * Manager of connections to a node(s), capable of ensuring that connections are clear and living * before providing them to the application @@ -24858,7 +30342,7 @@ ConnectionPool.prototype._onConnectionDied = function (connection, alreadyWasDea var ms = this.calcDeadTimeout(timeout.attempt, this.deadTimeout); timeout.id = setTimeout(timeout.revive, ms); - timeout.runAt = Date.now() + ms; + timeout.runAt = _.now() + ms; }; ConnectionPool.prototype._selectDeadConnection = function (cb) { @@ -24988,7 +30472,7 @@ ConnectionPool.prototype.close = function () { this.setHosts([]); }; ConnectionPool.prototype.empty = ConnectionPool.prototype.close; -},{"./connectors":198,"./log":201,"./selectors":206,"./utils":211,"__browserify_process":13}],197:[function(require,module,exports){ +},{"./connectors":199,"./log":202,"./selectors":207,"./utils":213,"__browserify_process":13}],198:[function(require,module,exports){ var Buffer=require("__browserify_Buffer").Buffer;/** * Connection that registers a module with angular, using angular's $http service * to communicate with ES. @@ -25003,21 +30487,30 @@ var ConnectionFault = require('../errors').ConnectionFault; function AngularConnector(host, config) { ConnectionAbstract.call(this, host, config); - this.defer = config.defer; - this.$http = config.$http; - if(this.host.auth) { - this.$http.defaults.headers.common.Authorization = 'Basic ' + Buffer(this.host.auth, 'utf8').toString('base64'); - } + var connector = this; + + config.$injector.invoke(['$http', '$q', function ($http, $q) { + connector.$q = $q; + connector.$http = $http; + + if (connector.host.auth) { + connector.$http.defaults.headers.common.Authorization = 'Basic ' + (new Buffer(connector.host.auth, 'utf8')).toString('base64'); + } + }]); + + } _.inherits(AngularConnector, ConnectionAbstract); AngularConnector.prototype.request = function (params, cb) { - var abort = this.defer(); + var abort = this.$q.defer(); + this.$http({ method: params.method, url: this.host.makeUrl(params), data: params.body, cache: false, + headers: this.host.getHeaders(params.headers), transformRequest: [], transformResponse: [] }).then(function (response) { @@ -25035,7 +30528,7 @@ AngularConnector.prototype.request = function (params, cb) { }; }; -},{"../connection":195,"../errors":199,"../utils":211,"__browserify_Buffer":12}],198:[function(require,module,exports){ +},{"../connection":196,"../errors":200,"../utils":213,"__browserify_Buffer":12}],199:[function(require,module,exports){ var opts = { xhr: require('./xhr'), jquery: require('./jquery'), @@ -25061,19 +30554,27 @@ if (opts.xhr) { module.exports = opts; -},{"../utils":211,"./angular":197,"./jquery":1,"./xhr":1}],199:[function(require,module,exports){ -var process=require("__browserify_process");var _ = require('./utils'); +},{"../utils":213,"./angular":198,"./jquery":1,"./xhr":1}],200:[function(require,module,exports){ +var _ = require('./utils'); var errors = module.exports; +var canCapture = (typeof Error.captureStackTrace === 'function'); +var canStack = !!(new Error()).stack; + function ErrorAbstract(msg, constructor) { this.message = msg; Error.call(this, this.message); - if (process.browser) { - this.stack = ''; - } else { + + if (canCapture) { Error.captureStackTrace(this, constructor); } + else if (canStack) { + this.stack = (new Error()).stack; + } + else { + this.stack = ''; + } } errors._Abstract = ErrorAbstract; _.inherits(ErrorAbstract, Error); @@ -25188,7 +30689,7 @@ _.each(statusCodes, function (name, status) { errors[status] = StatusCodeError; }); -},{"./utils":211,"__browserify_process":13}],200:[function(require,module,exports){ +},{"./utils":213}],201:[function(require,module,exports){ /** * Class to wrap URLS, formatting them and maintaining their separate details * @type {[type]} @@ -25224,6 +30725,7 @@ function Host(config) { this.port = 9200; this.auth = null; this.query = null; + this.headers = null; if (typeof config === 'string') { if (!startsWithProtocolRE.test(config)) { @@ -25308,16 +30810,7 @@ Host.prototype.makeUrl = function (params) { } // build the query string - var query = ''; - if (params.query) { - // if the user passed in a query, merge it with the defaults from the host - query = qs.stringify( - _.defaults(typeof params.query === 'string' ? qs.parse(params.query) : params.query, this.query) - ); - } else if (this.query) { - // just stringify the hosts query - query = qs.stringify(this.query); - } + var query = qs.stringify(this.getQuery(params.query)); var auth = ''; if (params.auth) { @@ -25333,11 +30826,35 @@ Host.prototype.makeUrl = function (params) { } }; +function objectPropertyGetter(prop, preOverride) { + return function (overrides) { + if (preOverride) { + overrides = preOverride(overrides); + } + + var obj = this[prop]; + if (!obj && !overrides) { + return null; + } + + if (overrides) { + obj = _.assign({}, obj, overrides); + } + + return _.size(obj) ? obj : null; + }; +} + +Host.prototype.getHeaders = objectPropertyGetter('headers'); +Host.prototype.getQuery = objectPropertyGetter('query', function (query) { + return typeof query === 'string' ? qs.parse(query) : query; +}); + Host.prototype.toString = function () { return this.makeUrl(); }; -},{"./utils":211,"querystring":6,"url":7}],201:[function(require,module,exports){ +},{"./utils":213,"querystring":6,"url":7}],202:[function(require,module,exports){ var process=require("__browserify_process");var _ = require('./utils'); var url = require('url'); var EventEmitter = require('events').EventEmitter; @@ -25639,7 +31156,7 @@ Log.normalizeTraceArgs = function (method, requestUrl, body, responseBody, respo module.exports = Log; -},{"./loggers":203,"./utils":211,"__browserify_process":13,"events":4,"url":7}],202:[function(require,module,exports){ +},{"./loggers":204,"./utils":213,"__browserify_process":13,"events":4,"url":7}],203:[function(require,module,exports){ var _ = require('./utils'); /** @@ -25810,7 +31327,7 @@ LoggerAbstract.prototype._formatTraceMessage = function (req) { LoggerAbstract.prototype._prettyJson = function (body) { try { - if (typeof object === 'string') { + if (typeof body === 'string') { body = JSON.parse(body); } return JSON.stringify(body, null, ' ').replace(/'/g, '\\u0027'); @@ -25821,12 +31338,12 @@ LoggerAbstract.prototype._prettyJson = function (body) { module.exports = LoggerAbstract; -},{"./utils":211}],203:[function(require,module,exports){ +},{"./utils":213}],204:[function(require,module,exports){ module.exports = { console: require('./console') }; -},{"./console":204}],204:[function(require,module,exports){ +},{"./console":205}],205:[function(require,module,exports){ /** * Special version of the Stream logger, which logs errors and warnings to stderr and all other * levels to stdout. @@ -25927,15 +31444,23 @@ Console.prototype.onTrace = _.handler(function (msg) { this.write('TRACE', this._formatTraceMessage(msg), 'log'); }); -},{"../logger":202,"../utils":211}],205:[function(require,module,exports){ +},{"../logger":203,"../utils":213}],206:[function(require,module,exports){ var _ = require('./utils'); var extractHostPartsRE = /\[\/*([^:]+):(\d+)\]/; function makeNodeParser(hostProp) { return function (nodes) { - var hosts = []; - _.each(nodes, function (node, id) { + return _.transform(nodes, function (hosts, node, id) { + if (!node[hostProp]) { + return; + } + var hostnameMatches = extractHostPartsRE.exec(node[hostProp]); + if (!hostnameMatches) { + throw new Error('node\'s ' + hostProp + ' property (' + JSON.stringify(node[hostProp]) + + ') does not match the expected pattern ' + extractHostPartsRE + '.'); + } + hosts.push({ host: hostnameMatches[1], port: parseInt(hostnameMatches[2], 10), @@ -25946,21 +31471,20 @@ function makeNodeParser(hostProp) { version: node.version } }); - }); - return hosts; + }, []); }; } module.exports = makeNodeParser('http_address'); module.exports.thrift = makeNodeParser('transport_address'); -},{"./utils":211}],206:[function(require,module,exports){ +},{"./utils":213}],207:[function(require,module,exports){ module.exports = { random: require('./random'), roundRobin: require('./round_robin') }; -},{"./random":207,"./round_robin":208}],207:[function(require,module,exports){ +},{"./random":208,"./round_robin":209}],208:[function(require,module,exports){ /** * Selects a connection randomly * @@ -25973,7 +31497,7 @@ module.exports = function RandomSelector(connections) { return connections[Math.floor(Math.random() * connections.length)]; }; -},{}],208:[function(require,module,exports){ +},{}],209:[function(require,module,exports){ /** * Selects a connection the simplest way possible, Round Robin * @@ -25988,7 +31512,7 @@ module.exports = function (connections) { return connection; }; -},{}],209:[function(require,module,exports){ +},{}],210:[function(require,module,exports){ /** * Simple JSON serializer * @type {[type]} @@ -26049,7 +31573,7 @@ Json.prototype.bulkBody = function (val) { return body; }; -},{"../utils":211}],210:[function(require,module,exports){ +},{"../utils":213}],211:[function(require,module,exports){ /** * Class that manages making request, called by all of the API methods. * @type {[type]} @@ -26059,7 +31583,8 @@ module.exports = Transport; var _ = require('./utils'); var errors = require('./errors'); var Host = require('./host'); -var when = require('when'); +var Promise = require('bluebird'); +var patchSniffOnConnectionFault = require('./transport/sniff_on_connection_fault'); function Transport(config) { var self = this; @@ -26132,7 +31657,9 @@ function Transport(config) { }, config.sniffInterval); } - this.sniffAfterConnectionFault = config.sniffAfterConnectionFault; + if (config.sniffOnConnectionFault) { + patchSniffOnConnectionFault(this); + } } Transport.connectionPools = { @@ -26148,7 +31675,7 @@ Transport.nodesToHostCallbacks = { }; Transport.prototype.defer = function () { - return when.defer(); + return Promise.defer(); }; /** @@ -26168,7 +31695,6 @@ Transport.prototype.defer = function () { * @param {Function} cb - A function to call back with (error, responseBody, responseStatus) */ Transport.prototype.request = function (params, cb) { - var self = this; var remainingRetries = this.maxRetries; var requestTimeout = this.requestTimeout; @@ -26382,6 +31908,7 @@ Transport.prototype._timeout = function (cb, delay) { Transport.prototype.sniff = function (cb) { var connectionPool = this.connectionPool; var nodesToHostCallback = this.nodesToHostCallback; + var log = this.log; // make cb a function if it isn't cb = typeof cb === 'function' ? cb : _.noop; @@ -26391,10 +31918,19 @@ Transport.prototype.sniff = function (cb) { method: 'GET' }, function (err, resp, status) { if (!err && resp && resp.nodes) { - var hosts = _.map(nodesToHostCallback(resp.nodes), function (hostConfig) { + var hostsConfigs; + + try { + hostsConfigs = nodesToHostCallback(resp.nodes); + } catch (e) { + log.error(new Error('Unable to convert node list from ' + this.sniffEndpoint + + ' to hosts durring sniff. Encountered error:\n' + (e.stack || e.message))); + return; + } + + connectionPool.setHosts(_.map(hostsConfigs, function (hostConfig) { return new Host(hostConfig); - }); - connectionPool.setHosts(hosts); + })); } cb(err, resp, status); }); @@ -26409,8 +31945,67 @@ Transport.prototype.close = function () { _.each(this._timers, clearTimeout); this.connectionPool.close(); }; +},{"./connection_pool":197,"./errors":200,"./host":201,"./log":202,"./nodes_to_host":206,"./serializers/json":210,"./transport/sniff_on_connection_fault":212,"./utils":213,"bluebird":1}],212:[function(require,module,exports){ +var _ = require('../utils'); -},{"./connection_pool":196,"./errors":199,"./host":200,"./log":201,"./nodes_to_host":205,"./serializers/json":209,"./utils":211,"when":1}],211:[function(require,module,exports){ + +/** + * Patch the transport's connection pool to schedule a sniff after a connection fails. + * When a connection fails for the first time it will schedule a sniff 1 second in the + * future, and increase the timeout based on the deadTimeout algorithm chosen by the + * connectionPool, and the number of times the sniff has failed. + * + * @param {Transport} transport - the transport that will be using this behavior + * @return {undefined} + */ +module.exports = function setupSniffOnConnectionFault(transport) { + var failures = 0; + var pool = transport.connectionPool; + var originalOnDied = pool._onConnectionDied; + + // do the actual sniff, if the sniff is unable to + // connect to a node this function will be called again by the connectionPool + var work = function () { + work.timerId = transport._timeout(work.timerId); + transport.sniff(); + }; + + // create a function that will count down to a + // point n milliseconds into the future + var countdownTo = function (ms) { + var start = _.now(); + return function () { + return start - ms; + }; + }; + + // overwrite the function, but still call it + pool._onConnectionDied = function (connection, wasAlreadyDead) { + var ret = originalOnDied.call(pool, connection, wasAlreadyDead); + + // clear the failures if this is the first failure we have seen + failures = work.timerId ? failures + 1 : 0; + + var ms = pool.calcDeadTimeout(failures, 1000); + + if (work.timerId && ms < work.timerId && work.countdown()) { + // clear the timer + work.timerId = transport._timeout(work.timerId); + } + + if (!work.timerId) { + work.timerId = transport._timeout(work, ms); + work.countdown = countdownTo(ms); + } + + return ret; + }; + + pool._onConnectionDied.restore = function () { + pool._onConnectionDied = originalOnDied; + }; +}; +},{"../utils":213}],213:[function(require,module,exports){ var process=require("__browserify_process"),Buffer=require("__browserify_Buffer").Buffer;var path = require('path'); var _ = require('lodash-node/modern'); var nodeUtils = require('util'); @@ -26831,6 +32426,13 @@ _.getUnwrittenFromStream = function (stream) { } }; +/** + * return the current time in milliseconds since epoch + */ +_.now = function () { + return (typeof Date.now === 'function') ? Date.now() : (new Date()).getTime(); +}; + module.exports = utils; },{"__browserify_Buffer":12,"__browserify_process":13,"lodash-node/modern":87,"path":5,"util":8}]},{},[189]) diff --git a/src/bower_components/elasticsearch/elasticsearch.angular.min.js b/src/bower_components/elasticsearch/elasticsearch.angular.min.js index 2f2620795d75..932ee65d456a 100644 --- a/src/bower_components/elasticsearch/elasticsearch.angular.min.js +++ b/src/bower_components/elasticsearch/elasticsearch.angular.min.js @@ -1,10 +1,11 @@ -/*! elasticsearch - v1.5.10 - 2014-03-03 +/*! elasticsearch - v2.1.4 - 2014-05-02 * http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/index.html - * Copyright (c) 2014 Elasticsearch BV; Licensed Apache 2.0 */ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gf;++f)a.hasOwnProperty(f)&&(e?d=b(d,a[f],f,a):(d=a[f],e=!0));return d},c.substr="b"!=="ab".substr(-1)?function(a,b,c){return 0>b&&(b=a.length+b),a.substr(b,c)}:function(a,b,c){return a.substr(b,c)},c.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},c.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var c=a.shift();return function(){b.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}},c.create="function"==typeof Object.create?Object.create:e;var l="function"==typeof Object.keys?Object.keys:g,m="function"==typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:h;if((new Error).hasOwnProperty("description")){var n=function(a,b){return"[object Error]"===j.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a})),b};c.keys=function(a){return n(a,l(a))},c.getOwnPropertyNames=function(a){return n(a,m(a))}}else c.keys=l,c.getOwnPropertyNames=m;if("function"==typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(o){c.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return i(a,b)}}}else c.getOwnPropertyDescriptor=i},{}],3:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:!m.isNumber(b)||!isNaN(b)&&isFinite(b)?m.isFunction(b)||m.isRegExp(b)?b.toString():b:b.toString()}function d(a,b){return m.isString(a)?a.length=0;d--)if(e[d]!=f[d])return!1;for(d=e.length-1;d>=0;d--)if(c=e[d],!h(a[c],b[c]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util"),n=a("_shims"),o=Array.prototype.slice,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,this.message=a.message||e(this)},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p.throws=function(){l.apply(this,[!0].concat(o.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(o.call(arguments)))},p.ifError=function(a){if(a)throw a}},{_shims:2,util:8}],4:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var d=a("util");b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!d.isNumber(a)||0>a)throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,f,g,h;if(this._events||(this._events={}),"error"===a&&(!this._events.error||d.isObject(this._events.error)&&!this._events.error.length))throw b=arguments[1],b instanceof Error?b:TypeError('Uncaught, unspecified "error" event.');if(c=this._events[a],d.isUndefined(c))return!1;if(d.isFunction(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];c.apply(this,f)}else if(d.isObject(c)){for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];for(h=c.slice(),e=h.length,g=0;e>g;g++)h[g].apply(this,f)}return!0},c.prototype.addListener=function(a,b){var e;if(!d.isFunction(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d.isFunction(b.listener)?b.listener:b),this._events[a]?d.isObject(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,d.isObject(this._events[a])&&!this._events[a].warned){var e;e=d.isUndefined(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),b.apply(this,arguments)}if(!d.isFunction(b))throw TypeError("listener must be a function");return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,f,g;if(!d.isFunction(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,e=-1,c===b||d.isFunction(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(d.isObject(c)){for(g=f;g-->0;)if(c[g]===b||c[g].listener&&c[g].listener===b){e=g;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d.isFunction(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d.isFunction(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d.isFunction(a._events[b])?1:a._events[b].length:0}},{util:8}],5:[function(a,b,c){function d(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var e=a("__browserify_process"),f=a("util"),g=a("_shims"),h=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(a){return h.exec(a).slice(1)};c.resolve=function(){for(var a="",b=!1,c=arguments.length-1;c>=-1&&!b;c--){var h=c>=0?arguments[c]:e.cwd();if(!f.isString(h))throw new TypeError("Arguments to path.resolve must be strings");h&&(a=h+"/"+a,b="/"===h.charAt(0))}return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=c.isAbsolute(a),e="/"===g.substr(a,-1);return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),a||b||(a="."),a&&e&&(a+="/"),(b?"/":"")+a},c.isAbsolute=function(a){return"/"===a.charAt(0)},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(g.filter(a,function(a){if(!f.isString(a))throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},c.relative=function(a,b){function d(a){for(var b=0;b=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=c.resolve(a).substr(1),b=c.resolve(b).substr(1);for(var e=d(a.split("/")),f=d(b.split("/")),g=Math.min(e.length,f.length),h=g,i=0;g>i;i++)if(e[i]!==f[i]){h=i;break}for(var j=[],i=h;i0&&k>j&&(k=j);for(var l=0;k>l;++l){var m,n,o,p,q=a[l].replace(i,"%20"),r=q.indexOf(c);r>=0?(m=q.substr(0,r),n=q.substr(r+1)):(m=q,n="");try{o=decodeURIComponent(m),p=decodeURIComponent(n)}catch(s){o=f.unescape(m,!0),p=f.unescape(n,!0)}d(h,o)?g.isArray(h[o])?h[o].push(p):h[o]=[h[o],p]:h[o]=p}return h}},{_shims:2,buffer:10,util:8}],7:[function(a,b,c){function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function e(a,b,c){if(a&&j.isObject(a)&&a instanceof d)return a;var e=new d;return e.parse(a,b,c),e}function f(a){return j.isString(a)&&(a=e(a)),a instanceof d?a.format():d.prototype.format.call(a)}function g(a,b){return e(a,!1,!0).resolve(b)}function h(a,b){return a?e(a,!1,!0).resolveObject(b):b}var i={encode:function(a){return a}},j=a("util"),k=a("_shims");c.parse=e,c.resolve=g,c.resolveObject=h,c.format=f,c.Url=d;var l=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,n=["<",">",'"',"`"," ","\r","\n"," "],o=["{","}","|","\\","^","`"].concat(n),p=["'"].concat(o),q=["%","/","?",";","#"].concat(p),r=["/","?","#"],s=255,t=/^[a-z0-9A-Z_-]{0,63}$/,u=/^([a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=a("querystring");d.prototype.parse=function(a,b,c){if(!j.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=k.trim(d);var e=l.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&w[e]||(d=d.substr(2),this.slashes=!0)}if(!w[e]&&(g||e&&!x[e])){for(var h=-1,m=0;mn)&&(h=n)}var o,z;z=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==z&&(o=d.slice(0,z),d=d.slice(z+1),this.auth=decodeURIComponent(o)),h=-1;for(var m=0;mn)&&(h=n)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var B=this.hostname.split(/\./),m=0,C=B.length;C>m;m++){var D=B[m];if(D&&!D.match(t)){for(var E="",F=0,G=D.length;G>F;F++)E+=D.charCodeAt(F)>127?"x":D[F];if(!E.match(t)){var H=B.slice(0,m),I=B.slice(m+1),J=D.match(u);J&&(H.push(J[1]),I.unshift(J[2])),I.length&&(d="/"+I.join(".")+d),this.hostname=H.join(".");break}}}if(this.hostname=this.hostname.length>s?"":this.hostname.toLowerCase(),!A){for(var K=this.hostname.split("."),L=[],m=0;mm;m++){var P=p[m],Q=encodeURIComponent(P);Q===P&&(Q=escape(P)),d=d.split(P).join(Q)}var R=d.indexOf("#");-1!==R&&(this.hash=d.substr(R),d=d.slice(0,R));var S=d.indexOf("?");if(-1!==S?(this.search=d.substr(S),this.query=d.substr(S+1),b&&(this.query=y.parse(this.query)),d=d.slice(0,S)):b&&(this.search="",this.query={}),d&&(this.pathname=d),x[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var N=this.pathname||"",M=this.search||"";this.path=N+M}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j.isObject(this.query)&&k.keys(this.query).length&&(f=y.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==k.substr(b,-1)&&(b+=":"),this.slashes||(!b||x[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(j.isString(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(k.forEach(k.keys(this),function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return k.forEach(k.keys(a),function(b){"protocol"!==b&&(c[b]=a[b])}),x[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!x[a.protocol])return k.forEach(k.keys(a),function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||w[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),i=a.host||a.pathname&&"/"===a.pathname.charAt(0),l=i||h||c.host&&a.pathname,m=l,n=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],o=c.protocol&&!x[c.protocol];if(o&&(c.hostname="",c.port=null,c.host&&(""===n[0]?n[0]=c.host:n.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),l=l&&(""===e[0]||""===n[0])),i)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,n=e;else if(e.length)n||(n=[]),n.pop(),n=n.concat(e),c.search=a.search,c.query=a.query;else if(!j.isNullOrUndefined(a.search)){if(o){c.hostname=c.host=n.shift();var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return c.search=a.search,c.query=a.query,j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!n.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var q=n.slice(-1)[0],r=(c.host||a.host)&&("."===q||".."===q)||""===q,s=0,t=n.length;t>=0;t--)q=n[t],"."==q?n.splice(t,1):".."===q?(n.splice(t,1),s++):s&&(n.splice(t,1),s--);if(!l&&!m)for(;s--;s)n.unshift("..");!l||""===n[0]||n[0]&&"/"===n[0].charAt(0)||n.unshift(""),r&&"/"!==k.substr(n.join("/"),-1)&&n.push("");var u=""===n[0]||n[0]&&"/"===n[0].charAt(0);if(o){c.hostname=c.host=u?"":n.length?n.shift():"";var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return l=l||c.host&&n.length,l&&!u&&n.unshift(""),n.length?c.pathname=n.join("/"):(c.pathname=null,c.path=null),j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=m.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{_shims:2,querystring:6,util:8}],8:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a){return a}function g(a){var b={};return G.forEach(a,function(a){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=G.keys(b),p=g(o);if(a.showHidden&&(o=G.getOwnPropertyNames(b)),0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?l(a,b,c,d,String(g),!0):"");return G.forEach(e,function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=G.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),i||(G.indexOf(a.seen,j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=G.reduce(a,function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return G.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===C(a)}function w(a){return"object"==typeof a&&a}function x(a){return w(a)&&"[object Date]"===C(a)}function y(a){return w(a)&&"[object Error]"===C(a)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.binarySlice}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),I[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=a("_shims"),H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=B;var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=function(a,b){a.super_=b,a.prototype=G.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},c._extend=function(a,b){if(!b||!w(b))return a;for(var c=G.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{_shims:2}],9:[function(a,b,c){c.readIEEE754=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],10:[function(a,b,c){function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(b,c,f){if(E||(E=a("assert")),!(this instanceof e))return new e(b,c,f);if(this.parent=this,this.offset=0,"base64"==c&&"string"==typeof b)for(b=d(b);b.length%4!=0;)b+="=";var h;if("number"==typeof f){this.length=g(c);for(var j=0;j=b?b:a>=0?a:(a+=b,a>=0?a:0))}function g(a){return a=~~Math.ceil(+a),0>a?0:a}function h(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}function i(a){return h(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function j(a){return 16>a?"0"+a.toString(16):a.toString(16)}function k(a){for(var b=[],c=0;ce&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function o(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function p(a,b,c,d){var e=0;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=a.length?0:(c?(e=a[b]<<8,b+1=a.length?0:(c?(b+1>>0):(b+2>>0)),e)}function r(a,b,c,d){var e,f;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=0,"specified a negative value for writing an unsigned value"),E.ok(b>=a,"value is larger than maximum value for type"),E.ok(Math.floor(a)===a,"value has a fractional component")}function w(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1>>8*(d?1-f:f)}function x(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3>>8*(d?3-f:f)&255}function y(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value"),E.ok(Math.floor(a)===a,"value has a fractional component")}function z(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value")}function A(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e)}function B(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e)}function C(b,c,d,e,f){f||(E.ok(void 0!==c&&null!==c,"missing value"),E.ok("boolean"==typeof e,"missing or invalid endian"),E.ok(void 0!==d&&null!==d,"missing offset"),E.ok(d+3f;++f)a.hasOwnProperty(f)&&(e?d=b(d,a[f],f,a):(d=a[f],e=!0));return d},c.substr="b"!=="ab".substr(-1)?function(a,b,c){return 0>b&&(b=a.length+b),a.substr(b,c)}:function(a,b,c){return a.substr(b,c)},c.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},c.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var c=a.shift();return function(){b.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}},c.create="function"==typeof Object.create?Object.create:e;var l="function"==typeof Object.keys?Object.keys:g,m="function"==typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:h;if((new Error).hasOwnProperty("description")){var n=function(a,b){return"[object Error]"===j.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a})),b};c.keys=function(a){return n(a,l(a))},c.getOwnPropertyNames=function(a){return n(a,m(a))}}else c.keys=l,c.getOwnPropertyNames=m;if("function"==typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(o){c.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return i(a,b)}}}else c.getOwnPropertyDescriptor=i},{}],3:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:!m.isNumber(b)||!isNaN(b)&&isFinite(b)?m.isFunction(b)||m.isRegExp(b)?b.toString():b:b.toString()}function d(a,b){return m.isString(a)?a.length=0;d--)if(e[d]!=f[d])return!1;for(d=e.length-1;d>=0;d--)if(c=e[d],!h(a[c],b[c]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util"),n=a("_shims"),o=Array.prototype.slice,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,this.message=a.message||e(this)},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p.throws=function(){l.apply(this,[!0].concat(o.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(o.call(arguments)))},p.ifError=function(a){if(a)throw a}},{_shims:2,util:8}],4:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var d=a("util");b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!d.isNumber(a)||0>a)throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,f,g,h;if(this._events||(this._events={}),"error"===a&&(!this._events.error||d.isObject(this._events.error)&&!this._events.error.length))throw b=arguments[1],b instanceof Error?b:TypeError('Uncaught, unspecified "error" event.');if(c=this._events[a],d.isUndefined(c))return!1;if(d.isFunction(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];c.apply(this,f)}else if(d.isObject(c)){for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];for(h=c.slice(),e=h.length,g=0;e>g;g++)h[g].apply(this,f)}return!0},c.prototype.addListener=function(a,b){var e;if(!d.isFunction(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d.isFunction(b.listener)?b.listener:b),this._events[a]?d.isObject(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,d.isObject(this._events[a])&&!this._events[a].warned){var e;e=d.isUndefined(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),b.apply(this,arguments)}if(!d.isFunction(b))throw TypeError("listener must be a function");return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,f,g;if(!d.isFunction(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,e=-1,c===b||d.isFunction(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(d.isObject(c)){for(g=f;g-->0;)if(c[g]===b||c[g].listener&&c[g].listener===b){e=g;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d.isFunction(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d.isFunction(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d.isFunction(a._events[b])?1:a._events[b].length:0}},{util:8}],5:[function(a,b,c){function d(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var e=a("__browserify_process"),f=a("util"),g=a("_shims"),h=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(a){return h.exec(a).slice(1)};c.resolve=function(){for(var a="",b=!1,c=arguments.length-1;c>=-1&&!b;c--){var h=c>=0?arguments[c]:e.cwd();if(!f.isString(h))throw new TypeError("Arguments to path.resolve must be strings");h&&(a=h+"/"+a,b="/"===h.charAt(0))}return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=c.isAbsolute(a),e="/"===g.substr(a,-1);return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),a||b||(a="."),a&&e&&(a+="/"),(b?"/":"")+a},c.isAbsolute=function(a){return"/"===a.charAt(0)},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(g.filter(a,function(a){if(!f.isString(a))throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},c.relative=function(a,b){function d(a){for(var b=0;b=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=c.resolve(a).substr(1),b=c.resolve(b).substr(1);for(var e=d(a.split("/")),f=d(b.split("/")),g=Math.min(e.length,f.length),h=g,i=0;g>i;i++)if(e[i]!==f[i]){h=i;break}for(var j=[],i=h;i0&&k>j&&(k=j);for(var l=0;k>l;++l){var m,n,o,p,q=a[l].replace(i,"%20"),r=q.indexOf(c);r>=0?(m=q.substr(0,r),n=q.substr(r+1)):(m=q,n="");try{o=decodeURIComponent(m),p=decodeURIComponent(n)}catch(s){o=f.unescape(m,!0),p=f.unescape(n,!0)}d(h,o)?g.isArray(h[o])?h[o].push(p):h[o]=[h[o],p]:h[o]=p}return h}},{_shims:2,buffer:10,util:8}],7:[function(a,b,c){function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function e(a,b,c){if(a&&j.isObject(a)&&a instanceof d)return a;var e=new d;return e.parse(a,b,c),e}function f(a){return j.isString(a)&&(a=e(a)),a instanceof d?a.format():d.prototype.format.call(a)}function g(a,b){return e(a,!1,!0).resolve(b)}function h(a,b){return a?e(a,!1,!0).resolveObject(b):b}var i={encode:function(a){return a}},j=a("util"),k=a("_shims");c.parse=e,c.resolve=g,c.resolveObject=h,c.format=f,c.Url=d;var l=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,n=["<",">",'"',"`"," ","\r","\n"," "],o=["{","}","|","\\","^","`"].concat(n),p=["'"].concat(o),q=["%","/","?",";","#"].concat(p),r=["/","?","#"],s=255,t=/^[a-z0-9A-Z_-]{0,63}$/,u=/^([a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=a("querystring");d.prototype.parse=function(a,b,c){if(!j.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=k.trim(d);var e=l.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&w[e]||(d=d.substr(2),this.slashes=!0)}if(!w[e]&&(g||e&&!x[e])){for(var h=-1,m=0;mn)&&(h=n)}var o,z;z=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==z&&(o=d.slice(0,z),d=d.slice(z+1),this.auth=decodeURIComponent(o)),h=-1;for(var m=0;mn)&&(h=n)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var B=this.hostname.split(/\./),m=0,C=B.length;C>m;m++){var D=B[m];if(D&&!D.match(t)){for(var E="",F=0,G=D.length;G>F;F++)E+=D.charCodeAt(F)>127?"x":D[F];if(!E.match(t)){var H=B.slice(0,m),I=B.slice(m+1),J=D.match(u);J&&(H.push(J[1]),I.unshift(J[2])),I.length&&(d="/"+I.join(".")+d),this.hostname=H.join(".");break}}}if(this.hostname=this.hostname.length>s?"":this.hostname.toLowerCase(),!A){for(var K=this.hostname.split("."),L=[],m=0;mm;m++){var P=p[m],Q=encodeURIComponent(P);Q===P&&(Q=escape(P)),d=d.split(P).join(Q)}var R=d.indexOf("#");-1!==R&&(this.hash=d.substr(R),d=d.slice(0,R));var S=d.indexOf("?");if(-1!==S?(this.search=d.substr(S),this.query=d.substr(S+1),b&&(this.query=y.parse(this.query)),d=d.slice(0,S)):b&&(this.search="",this.query={}),d&&(this.pathname=d),x[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var N=this.pathname||"",M=this.search||"";this.path=N+M}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j.isObject(this.query)&&k.keys(this.query).length&&(f=y.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==k.substr(b,-1)&&(b+=":"),this.slashes||(!b||x[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(j.isString(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(k.forEach(k.keys(this),function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return k.forEach(k.keys(a),function(b){"protocol"!==b&&(c[b]=a[b])}),x[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!x[a.protocol])return k.forEach(k.keys(a),function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||w[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),i=a.host||a.pathname&&"/"===a.pathname.charAt(0),l=i||h||c.host&&a.pathname,m=l,n=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],o=c.protocol&&!x[c.protocol];if(o&&(c.hostname="",c.port=null,c.host&&(""===n[0]?n[0]=c.host:n.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),l=l&&(""===e[0]||""===n[0])),i)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,n=e;else if(e.length)n||(n=[]),n.pop(),n=n.concat(e),c.search=a.search,c.query=a.query;else if(!j.isNullOrUndefined(a.search)){if(o){c.hostname=c.host=n.shift();var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return c.search=a.search,c.query=a.query,j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!n.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var q=n.slice(-1)[0],r=(c.host||a.host)&&("."===q||".."===q)||""===q,s=0,t=n.length;t>=0;t--)q=n[t],"."==q?n.splice(t,1):".."===q?(n.splice(t,1),s++):s&&(n.splice(t,1),s--);if(!l&&!m)for(;s--;s)n.unshift("..");!l||""===n[0]||n[0]&&"/"===n[0].charAt(0)||n.unshift(""),r&&"/"!==k.substr(n.join("/"),-1)&&n.push("");var u=""===n[0]||n[0]&&"/"===n[0].charAt(0);if(o){c.hostname=c.host=u?"":n.length?n.shift():"";var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return l=l||c.host&&n.length,l&&!u&&n.unshift(""),n.length?c.pathname=n.join("/"):(c.pathname=null,c.path=null),j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=m.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{_shims:2,querystring:6,util:8}],8:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a){return a}function g(a){var b={};return G.forEach(a,function(a){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=G.keys(b),p=g(o);if(a.showHidden&&(o=G.getOwnPropertyNames(b)),0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?l(a,b,c,d,String(g),!0):"");return G.forEach(e,function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=G.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),i||(G.indexOf(a.seen,j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=G.reduce(a,function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return G.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===C(a)}function w(a){return"object"==typeof a&&a}function x(a){return w(a)&&"[object Date]"===C(a)}function y(a){return w(a)&&"[object Error]"===C(a)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.binarySlice}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),I[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=a("_shims"),H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=B;var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=function(a,b){a.super_=b,a.prototype=G.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},c._extend=function(a,b){if(!b||!w(b))return a;for(var c=G.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{_shims:2}],9:[function(a,b,c){c.readIEEE754=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],10:[function(a,b,c){function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(b,c,f){if(E||(E=a("assert")),!(this instanceof e))return new e(b,c,f);if(this.parent=this,this.offset=0,"base64"==c&&"string"==typeof b)for(b=d(b);b.length%4!=0;)b+="=";var h;if("number"==typeof f){this.length=g(c);for(var j=0;j=b?b:a>=0?a:(a+=b,a>=0?a:0))}function g(a){return a=~~Math.ceil(+a),0>a?0:a}function h(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}function i(a){return h(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function j(a){return 16>a?"0"+a.toString(16):a.toString(16)}function k(a){for(var b=[],c=0;ce&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function o(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function p(a,b,c,d){var e=0;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=a.length?0:(c?(e=a[b]<<8,b+1=a.length?0:(c?(b+1>>0):(b+2>>0)),e)}function r(a,b,c,d){var e,f;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=0,"specified a negative value for writing an unsigned value"),E.ok(b>=a,"value is larger than maximum value for type"),E.ok(Math.floor(a)===a,"value has a fractional component")}function w(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1>>8*(d?1-f:f)}function x(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3>>8*(d?3-f:f)&255}function y(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value"),E.ok(Math.floor(a)===a,"value has a fractional component")}function z(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value")}function A(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e)}function B(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e)}function C(b,c,d,e,f){f||(E.ok(void 0!==c&&null!==c,"missing value"),E.ok("boolean"==typeof e,"missing or invalid endian"),E.ok(void 0!==d&&null!==d,"missing offset"),E.ok(d+3a||a>=this.length)throw new Error("oob");return this[a]},e.prototype.set=function(a,b){if(0>a||a>=this.length)throw new Error("oob");return this[a]=b},e.byteLength=function(a,b){switch(b||"utf8"){case"hex":return a.length/2;case"utf8":case"utf-8":return k(a).length;case"ascii":case"binary":return a.length;case"base64":return m(a).length;default:throw new Error("Unknown encoding")}},e.prototype.utf8Write=function(a,b,c){return e._charsWritten=n(k(a),this,b,c)},e.prototype.asciiWrite=function(a,b,c){return e._charsWritten=n(l(a),this,b,c)},e.prototype.binaryWrite=e.prototype.asciiWrite,e.prototype.base64Write=function(a,b,c){return e._charsWritten=n(m(a),this,b,c)},e.prototype.base64Slice=function(){var b=Array.prototype.slice.apply(this,arguments);return a("base64-js").fromByteArray(b)},e.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",d=0;dd;d++)if(a[d]=j(this[d]),d==c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},e.prototype.hexSlice=function(a,b){var c=this.length;(!a||0>a)&&(a=0),(!b||0>b||b>c)&&(b=c);for(var d="",e=a;b>e;e++)d+=j(this[e]);return d},e.prototype.toString=function(a,b,c){if(a=String(a||"utf8").toLowerCase(),b=+b||0,"undefined"==typeof c&&(c=this.length),+c==b)return"";switch(a){case"hex":return this.hexSlice(b,c);case"utf8":case"utf-8":return this.utf8Slice(b,c);case"ascii":return this.asciiSlice(b,c);case"binary":return this.binarySlice(b,c);case"base64":return this.base64Slice(b,c);case"ucs2":case"ucs-2":return this.ucs2Slice(b,c);default:throw new Error("Unknown encoding")}},e.prototype.hexWrite=function(a,b,c){b=+b||0;var d=this.length-b;c?(c=+c,c>d&&(c=d)):c=d;var f=a.length;if(f%2)throw new Error("Invalid hex string");c>f/2&&(c=f/2);for(var g=0;c>g;g++){var h=parseInt(a.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");this[b+g]=h}return e._charsWritten=2*g,g},e.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b,b=c,c=e}b=+b||0;var f=this.length-b;switch(c?(c=+c,c>f&&(c=f)):c=f,d=String(d||"utf8").toLowerCase()){case"hex":return this.hexWrite(a,b,c);case"utf8":case"utf-8":return this.utf8Write(a,b,c);case"ascii":return this.asciiWrite(a,b,c);case"binary":return this.binaryWrite(a,b,c);case"base64":return this.base64Write(a,b,c);case"ucs2":case"ucs-2":return this.ucs2Write(a,b,c);default:throw new Error("Unknown encoding")}},e.prototype.slice=function(a,b){var c=this.length;return a=f(a,c,0),b=f(b,c,c),new e(this,b-a,+a)},e.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),(void 0===d||isNaN(d))&&(d=this.length),b||(b=0),c>d)throw new Error("sourceEnd < sourceStart");if(d===c)return 0;if(0==a.length||0==e.length)return 0;if(0>b||b>=a.length)throw new Error("targetStart out of bounds");if(0>c||c>=e.length)throw new Error("sourceStart out of bounds");if(0>d||d>e.length)throw new Error("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bg;g++)E.ok("undefined"!=typeof this[g],"copying undefined buffer bytes!"),f.push(this[g]);for(var g=b;gc)throw new Error("end < start");if(c===b)return 0;if(0==this.length)return 0;if(0>b||b>=this.length)throw new Error("start out of bounds");if(0>c||c>this.length)throw new Error("end out of bounds");for(var d=b;c>d;d++)this[d]=a},e.isBuffer=function(a){return a instanceof e||a instanceof e},e.concat=function(a,b){if(!h(a))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new e(0);if(1===a.length)return a[0];if("number"!=typeof b){b=0;for(var c=0;c=c.length?void 0:c[a]},e.prototype.readUInt16LE=function(a,b){return p(this,a,!1,b)},e.prototype.readUInt16BE=function(a,b){return p(this,a,!0,b)},e.prototype.readUInt32LE=function(a,b){return q(this,a,!1,b)},e.prototype.readUInt32BE=function(a,b){return q(this,a,!0,b)},e.prototype.readInt8=function(a,b){var c,d=this;return b||(E.ok(void 0!==a&&null!==a,"missing offset"),E.ok(a=d.length?void 0:(c=128&d[a],c?-1*(255-d[a]+1):d[a])},e.prototype.readInt16LE=function(a,b){return r(this,a,!1,b)},e.prototype.readInt16BE=function(a,b){return r(this,a,!0,b)},e.prototype.readInt32LE=function(a,b){return s(this,a,!1,b)},e.prototype.readInt32BE=function(a,b){return s(this,a,!0,b)},e.prototype.readFloatLE=function(a,b){return t(this,a,!1,b)},e.prototype.readFloatBE=function(a,b){return t(this,a,!0,b)},e.prototype.readDoubleLE=function(a,b){return u(this,a,!1,b)},e.prototype.readDoubleBE=function(a,b){return u(this,a,!0,b)},e.prototype.writeUInt8=function(a,b,c){var d=this;c||(E.ok(void 0!==a&&null!==a,"missing value"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b=0?d.writeUInt8(a,b,c):d.writeUInt8(255+a+1,b,c)},e.prototype.writeInt16LE=function(a,b,c){A(this,a,b,!1,c)},e.prototype.writeInt16BE=function(a,b,c){A(this,a,b,!0,c)},e.prototype.writeInt32LE=function(a,b,c){B(this,a,b,!1,c)},e.prototype.writeInt32BE=function(a,b,c){B(this,a,b,!0,c)},e.prototype.writeFloatLE=function(a,b,c){C(this,a,b,!1,c)},e.prototype.writeFloatBE=function(a,b,c){C(this,a,b,!0,c)},e.prototype.writeDoubleLE=function(a,b,c){D(this,a,b,!1,c)},e.prototype.writeDoubleBE=function(a,b,c){D(this,a,b,!0,c)}},{"./buffer_ieee754":9,assert:3,"base64-js":11}],11:[function(a,b){!function(){"use strict";function a(a){var b,c,e,f,g,h;if(a.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(g=a.indexOf("="),g=g>0?a.length-g:0,h=[],e=g>0?a.length-4:a.length,b=0,c=0;e>b;b+=4,c+=3)f=d.indexOf(a[b])<<18|d.indexOf(a[b+1])<<12|d.indexOf(a[b+2])<<6|d.indexOf(a[b+3]),h.push((16711680&f)>>16),h.push((65280&f)>>8),h.push(255&f);return 2===g?(f=d.indexOf(a[b])<<2|d.indexOf(a[b+1])>>4,h.push(255&f)):1===g&&(f=d.indexOf(a[b])<<10|d.indexOf(a[b+1])<<4|d.indexOf(a[b+2])>>2,h.push(f>>8&255),h.push(255&f)),h}function c(a){function b(a){return d[a>>18&63]+d[a>>12&63]+d[a>>6&63]+d[63&a]}var c,e,f,g=a.length%3,h="";for(c=0,f=a.length-g;f>c;c+=3)e=(a[c]<<16)+(a[c+1]<<8)+a[c+2],h+=b(e);switch(g){case 1:e=a[a.length-1],h+=d[e>>2],h+=d[e<<4&63],h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=d[e>>10],h+=d[e>>4&63],h+=d[e<<2&63],h+="="}return h}var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports.toByteArray=a,b.exports.fromByteArray=c}()},{}],12:[function(a,b){a=function c(b,d,e){function f(h,i){if(!d[h]){if(!b[h]){var j="function"==typeof a&&a;if(!i&&j)return j(h,!0);if(g)return g(h,!0);throw new Error("Cannot find module '"+h+"'")}var k=d[h]={exports:{}};b[h][0].call(k.exports,function(a){var c=b[h][1][a];return f(c?c:a)},k,k.exports,c,b,d,e)}return d[h].exports}for(var g="function"==typeof a&&a,h=0;h>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],q9TxCC:[function(a,b,c){function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(b,c,f){if(E||(E=a("assert")),!(this instanceof e))return new e(b,c,f);if(this.parent=this,this.offset=0,"base64"==c&&"string"==typeof b)for(b=d(b);b.length%4!=0;)b+="=";var h;if("number"==typeof f){this.length=g(c);for(var j=0;j=b?b:a>=0?a:(a+=b,a>=0?a:0))}function g(a){return a=~~Math.ceil(+a),0>a?0:a}function h(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}function i(a){return h(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function j(a){return 16>a?"0"+a.toString(16):a.toString(16)}function k(a){for(var b=[],c=0;ce&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function o(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function p(a,b,c,d){var e=0;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=a.length?0:(c?(e=a[b]<<8,b+1=a.length?0:(c?(b+1>>0):(b+2>>0)),e)}function r(a,b,c,d){var e,f;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=0,"specified a negative value for writing an unsigned value"),E.ok(b>=a,"value is larger than maximum value for type"),E.ok(Math.floor(a)===a,"value has a fractional component")}function w(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1>>8*(d?1-f:f)}function x(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3>>8*(d?3-f:f)&255}function y(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value"),E.ok(Math.floor(a)===a,"value has a fractional component")}function z(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value")}function A(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e)}function B(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e)}function C(b,c,d,e,f){f||(E.ok(void 0!==c&&null!==c,"missing value"),E.ok("boolean"==typeof e,"missing or invalid endian"),E.ok(void 0!==d&&null!==d,"missing offset"),E.ok(d+3a||a>=this.length)throw new Error("oob");return this[a]},e.prototype.set=function(a,b){if(0>a||a>=this.length)throw new Error("oob");return this[a]=b},e.byteLength=function(a,b){switch(b||"utf8"){case"hex":return a.length/2;case"utf8":case"utf-8":return k(a).length;case"ascii":case"binary":return a.length;case"base64":return m(a).length;default:throw new Error("Unknown encoding")}},e.prototype.utf8Write=function(a,b,c){return e._charsWritten=n(k(a),this,b,c)},e.prototype.asciiWrite=function(a,b,c){return e._charsWritten=n(l(a),this,b,c)},e.prototype.binaryWrite=e.prototype.asciiWrite,e.prototype.base64Write=function(a,b,c){return e._charsWritten=n(m(a),this,b,c)},e.prototype.base64Slice=function(){var b=Array.prototype.slice.apply(this,arguments);return a("base64-js").fromByteArray(b)},e.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",d=0;dd;d++)if(a[d]=j(this[d]),d==c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},e.prototype.hexSlice=function(a,b){var c=this.length;(!a||0>a)&&(a=0),(!b||0>b||b>c)&&(b=c);for(var d="",e=a;b>e;e++)d+=j(this[e]);return d},e.prototype.toString=function(a,b,c){if(a=String(a||"utf8").toLowerCase(),b=+b||0,"undefined"==typeof c&&(c=this.length),+c==b)return"";switch(a){case"hex":return this.hexSlice(b,c);case"utf8":case"utf-8":return this.utf8Slice(b,c);case"ascii":return this.asciiSlice(b,c);case"binary":return this.binarySlice(b,c);case"base64":return this.base64Slice(b,c);case"ucs2":case"ucs-2":return this.ucs2Slice(b,c);default:throw new Error("Unknown encoding")}},e.prototype.hexWrite=function(a,b,c){b=+b||0;var d=this.length-b;c?(c=+c,c>d&&(c=d)):c=d;var f=a.length;if(f%2)throw new Error("Invalid hex string");c>f/2&&(c=f/2);for(var g=0;c>g;g++){var h=parseInt(a.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");this[b+g]=h}return e._charsWritten=2*g,g},e.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b,b=c,c=e}b=+b||0;var f=this.length-b;switch(c?(c=+c,c>f&&(c=f)):c=f,d=String(d||"utf8").toLowerCase()){case"hex":return this.hexWrite(a,b,c);case"utf8":case"utf-8":return this.utf8Write(a,b,c);case"ascii":return this.asciiWrite(a,b,c);case"binary":return this.binaryWrite(a,b,c);case"base64":return this.base64Write(a,b,c);case"ucs2":case"ucs-2":return this.ucs2Write(a,b,c);default:throw new Error("Unknown encoding")}},e.prototype.slice=function(a,b){var c=this.length;return a=f(a,c,0),b=f(b,c,c),new e(this,b-a,+a)},e.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),(void 0===d||isNaN(d))&&(d=this.length),b||(b=0),c>d)throw new Error("sourceEnd < sourceStart");if(d===c)return 0;if(0==a.length||0==e.length)return 0;if(0>b||b>=a.length)throw new Error("targetStart out of bounds");if(0>c||c>=e.length)throw new Error("sourceStart out of bounds");if(0>d||d>e.length)throw new Error("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bg;g++)E.ok("undefined"!=typeof this[g],"copying undefined buffer bytes!"),f.push(this[g]);for(var g=b;gc)throw new Error("end < start");if(c===b)return 0;if(0==this.length)return 0;if(0>b||b>=this.length)throw new Error("start out of bounds");if(0>c||c>this.length)throw new Error("end out of bounds");for(var d=b;c>d;d++)this[d]=a},e.isBuffer=function(a){return a instanceof e||a instanceof e},e.concat=function(a,b){if(!h(a))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new e(0);if(1===a.length)return a[0];if("number"!=typeof b){b=0;for(var c=0;c=c.length?void 0:c[a]},e.prototype.readUInt16LE=function(a,b){return p(this,a,!1,b)},e.prototype.readUInt16BE=function(a,b){return p(this,a,!0,b)},e.prototype.readUInt32LE=function(a,b){return q(this,a,!1,b)},e.prototype.readUInt32BE=function(a,b){return q(this,a,!0,b)},e.prototype.readInt8=function(a,b){var c,d=this;return b||(E.ok(void 0!==a&&null!==a,"missing offset"),E.ok(a=d.length?void 0:(c=128&d[a],c?-1*(255-d[a]+1):d[a])},e.prototype.readInt16LE=function(a,b){return r(this,a,!1,b)},e.prototype.readInt16BE=function(a,b){return r(this,a,!0,b)},e.prototype.readInt32LE=function(a,b){return s(this,a,!1,b)},e.prototype.readInt32BE=function(a,b){return s(this,a,!0,b)},e.prototype.readFloatLE=function(a,b){return t(this,a,!1,b)},e.prototype.readFloatBE=function(a,b){return t(this,a,!0,b)},e.prototype.readDoubleLE=function(a,b){return u(this,a,!1,b)},e.prototype.readDoubleBE=function(a,b){return u(this,a,!0,b)},e.prototype.writeUInt8=function(a,b,c){var d=this;c||(E.ok(void 0!==a&&null!==a,"missing value"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b=0?d.writeUInt8(a,b,c):d.writeUInt8(255+a+1,b,c)},e.prototype.writeInt16LE=function(a,b,c){A(this,a,b,!1,c)},e.prototype.writeInt16BE=function(a,b,c){A(this,a,b,!0,c)},e.prototype.writeInt32LE=function(a,b,c){B(this,a,b,!1,c)},e.prototype.writeInt32BE=function(a,b,c){B(this,a,b,!0,c)},e.prototype.writeFloatLE=function(a,b,c){C(this,a,b,!1,c)},e.prototype.writeFloatBE=function(a,b,c){C(this,a,b,!0,c)},e.prototype.writeDoubleLE=function(a,b,c){D(this,a,b,!1,c)},e.prototype.writeDoubleBE=function(a,b,c){D(this,a,b,!0,c)}},{"./buffer_ieee754":1,assert:6,"base64-js":4}],"buffer-browserify":[function(a,b){b.exports=a("q9TxCC")},{}],4:[function(a,b){!function(){"use strict";function a(a){var b,c,e,f,g,h;if(a.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(g=a.indexOf("="),g=g>0?a.length-g:0,h=[],e=g>0?a.length-4:a.length,b=0,c=0;e>b;b+=4,c+=3)f=d.indexOf(a[b])<<18|d.indexOf(a[b+1])<<12|d.indexOf(a[b+2])<<6|d.indexOf(a[b+3]),h.push((16711680&f)>>16),h.push((65280&f)>>8),h.push(255&f);return 2===g?(f=d.indexOf(a[b])<<2|d.indexOf(a[b+1])>>4,h.push(255&f)):1===g&&(f=d.indexOf(a[b])<<10|d.indexOf(a[b+1])<<4|d.indexOf(a[b+2])>>2,h.push(f>>8&255),h.push(255&f)),h}function c(a){function b(a){return d[a>>18&63]+d[a>>12&63]+d[a>>6&63]+d[63&a]}var c,e,f,g=a.length%3,h="";for(c=0,f=a.length-g;f>c;c+=3)e=(a[c]<<16)+(a[c+1]<<8)+a[c+2],h+=b(e);switch(g){case 1:e=a[a.length-1],h+=d[e>>2],h+=d[e<<4&63],h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=d[e>>10],h+=d[e>>4&63],h+=d[e<<2&63],h+="="}return h}var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports.toByteArray=a,b.exports.fromByteArray=c}()},{}],5:[function(a,b,c){function d(a){return"[object Array]"===j.call(a)}function e(a,b){var c;if(null===a)c={__proto__:null};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return"undefined"!=typeof b&&Object.defineProperties&&Object.defineProperties(c,b),c}function f(a){return"object"!=typeof a&&"function"!=typeof a||null===a}function g(a){if(f(a))throw new TypeError("Object.keys called on a non-object");var b=[];for(var c in a)k.call(a,c)&&b.push(c);return b}function h(a){if(f(a))throw new TypeError("Object.getOwnPropertyNames called on a non-object");var b=g(a);return c.isArray(a)&&-1===c.indexOf(a,"length")&&b.push("length"),b}function i(a,b){return{value:a[b]}}var j=Object.prototype.toString,k=Object.prototype.hasOwnProperty;c.isArray="function"==typeof Array.isArray?Array.isArray:d,c.indexOf=function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;cf;++f)a.hasOwnProperty(f)&&(e?d=b(d,a[f],f,a):(d=a[f],e=!0));return d},c.substr="b"!=="ab".substr(-1)?function(a,b,c){return 0>b&&(b=a.length+b),a.substr(b,c)}:function(a,b,c){return a.substr(b,c)},c.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},c.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var c=a.shift();return function(){b.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}},c.create="function"==typeof Object.create?Object.create:e;var l="function"==typeof Object.keys?Object.keys:g,m="function"==typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:h;if((new Error).hasOwnProperty("description")){var n=function(a,b){return"[object Error]"===j.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a})),b};c.keys=function(a){return n(a,l(a))},c.getOwnPropertyNames=function(a){return n(a,m(a))}}else c.keys=l,c.getOwnPropertyNames=m;if("function"==typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(o){c.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return i(a,b)}}}else c.getOwnPropertyDescriptor=i},{}],6:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:!m.isNumber(b)||!isNaN(b)&&isFinite(b)?m.isFunction(b)||m.isRegExp(b)?b.toString():b:b.toString()}function d(a,b){return m.isString(a)?a.length=0;d--)if(e[d]!=f[d])return!1;for(d=e.length-1;d>=0;d--)if(c=e[d],!h(a[c],b[c]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util"),n=a("_shims"),o=Array.prototype.slice,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,this.message=a.message||e(this)},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p.throws=function(){l.apply(this,[!0].concat(o.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(o.call(arguments)))},p.ifError=function(a){if(a)throw a}},{_shims:5,util:7}],7:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a){return a}function g(a){var b={};return G.forEach(a,function(a){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=G.keys(b),p=g(o);if(a.showHidden&&(o=G.getOwnPropertyNames(b)),0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?l(a,b,c,d,String(g),!0):"");return G.forEach(e,function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=G.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),i||(G.indexOf(a.seen,j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=G.reduce(a,function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1 },0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return G.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===C(a)}function w(a){return"object"==typeof a&&a}function x(a){return w(a)&&"[object Date]"===C(a)}function y(a){return w(a)&&"[object Error]"===C(a)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return a instanceof Buffer}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),I[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=a("_shims"),H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=B;var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=function(a,b){a.super_=b,a.prototype=G.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},c._extend=function(a,b){if(!b||!w(b))return a;for(var c=G.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{_shims:5}]},{},[]),b.exports=a("buffer-browserify")},{}],13:[function(a,b){var c=b.exports={};c.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],14:[function(a,b){b.exports={compact:a("./arrays/compact"),difference:a("./arrays/difference"),drop:a("./arrays/rest"),findIndex:a("./arrays/findIndex"),findLastIndex:a("./arrays/findLastIndex"),first:a("./arrays/first"),flatten:a("./arrays/flatten"),head:a("./arrays/first"),indexOf:a("./arrays/indexOf"),initial:a("./arrays/initial"),intersection:a("./arrays/intersection"),last:a("./arrays/last"),lastIndexOf:a("./arrays/lastIndexOf"),object:a("./arrays/zipObject"),pull:a("./arrays/pull"),range:a("./arrays/range"),remove:a("./arrays/remove"),rest:a("./arrays/rest"),sortedIndex:a("./arrays/sortedIndex"),tail:a("./arrays/rest"),take:a("./arrays/first"),union:a("./arrays/union"),uniq:a("./arrays/uniq"),unique:a("./arrays/uniq"),unzip:a("./arrays/zip"),without:a("./arrays/without"),xor:a("./arrays/xor"),zip:a("./arrays/zip"),zipObject:a("./arrays/zipObject")}},{"./arrays/compact":15,"./arrays/difference":16,"./arrays/findIndex":17,"./arrays/findLastIndex":18,"./arrays/first":19,"./arrays/flatten":20,"./arrays/indexOf":21,"./arrays/initial":22,"./arrays/intersection":23,"./arrays/last":24,"./arrays/lastIndexOf":25,"./arrays/pull":26,"./arrays/range":27,"./arrays/remove":28,"./arrays/rest":29,"./arrays/sortedIndex":30,"./arrays/union":31,"./arrays/uniq":32,"./arrays/without":33,"./arrays/xor":34,"./arrays/zip":35,"./arrays/zipObject":36}],15:[function(a,b){function c(a){for(var b=-1,c=a?a.length:0,d=[];++bc?f(0,g+c):c||0}else if(c){var h=e(a,b);return a[h]===b?h:-1}return d(a,b,c)}var d=a("../internals/baseIndexOf"),e=a("./sortedIndex"),f=Math.max;b.exports=c},{"../internals/baseIndexOf":96,"./sortedIndex":30}],22:[function(a,b){function c(a,b,c){var h=0,i=a?a.length:0;if("number"!=typeof b&&null!=b){var j=i;for(b=d(b,c,3);j--&&b(a[j],j,a);)h++}else h=null==b||c?1:b||h;return e(a,0,g(f(0,i-h),i))}var d=a("../functions/createCallback"),e=a("../internals/slice"),f=Math.max,g=Math.min;b.exports=c},{"../functions/createCallback":76,"../internals/slice":129}],23:[function(a,b){function c(){for(var a=[],b=-1,c=arguments.length,m=g(),n=d,o=n===d,p=g();++b=j&&f(b?a[b]:p)))}var r=a[0],s=-1,t=r?r.length:0,u=[];a:for(;++sc?d(0,f+c):e(c,f-1))+1);f--;)if(a[f]===b)return f;return-1}var d=Math.max,e=Math.min;b.exports=c},{}],26:[function(a,b){function c(a){for(var b=arguments,c=0,d=b.length,f=a?a.length:0;++cg;){var i=g+h>>>1;c(a[i])1?arguments:arguments[0],b=-1,c=a?d(e(a,"length")):0,f=Array(0>c?0:c);++bc?h(0,k+c):c)||0,f(a)?l=j(a,b,c)>-1:"number"==typeof k?l=(g(a)?a.indexOf(b,c):j(a,b,c))>-1:e(a,function(a){return++i>=c?!(l=a===b):void 0}),l}var d=a("../internals/baseIndexOf"),e=a("../objects/forOwn"),f=a("../objects/isArray"),g=a("../objects/isString"),h=Math.max;b.exports=c},{"../internals/baseIndexOf":96,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161}],46:[function(a,b){var c=a("../internals/createAggregator"),d=Object.prototype,e=d.hasOwnProperty,f=c(function(a,b,c){e.call(a,c)?a[c]++:a[c]=1});b.exports=f},{"../internals/createAggregator":105}],47:[function(a,b){function c(a,b,c){var f=!0;b=d(b,c,3);var g=-1,h=a?a.length:0;if("number"==typeof h)for(;++gj&&(j=m)}else b=null==b&&h(a)?d:e(b,c,3),f(a,function(a,c,d){var e=b(a,c,d);e>i&&(i=e,j=a)});return j}var d=a("../internals/charAtCallback"),e=a("../functions/createCallback"),f=a("./forEach"),g=(a("../objects/forOwn"),a("../objects/isArray")),h=a("../objects/isString");b.exports=c},{"../functions/createCallback":76,"../internals/charAtCallback":103,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161,"./forEach":51}],58:[function(a,b){function c(a,b,c){var i=1/0,j=i;if("function"!=typeof b&&c&&c[b]===a&&(b=null),null==b&&g(a))for(var k=-1,l=a.length;++km&&(j=m)}else b=null==b&&h(a)?d:e(b,c,3),f(a,function(a,c,d){var e=b(a,c,d);i>e&&(i=e,j=a)});return j}var d=a("../internals/charAtCallback"),e=a("../functions/createCallback"),f=a("./forEach"),g=(a("../objects/forOwn"),a("../objects/isArray")),h=a("../objects/isString");b.exports=c},{"../functions/createCallback":76,"../internals/charAtCallback":103,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161,"./forEach":51}],59:[function(a,b){var c=a("./map"),d=c;b.exports=d},{"./map":56}],60:[function(a,b){function c(a,b,c,f){if(!a)return c;var g=arguments.length<3;b=d(b,f,4);var h=-1,i=a.length;if("number"==typeof i)for(g&&(c=a[++h]);++h2?d(a,17,e(arguments,2),null,b):d(a,1,null,null,b)}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],73:[function(a,b){function c(a){for(var b=arguments.length>1?d(arguments,!0,!1,1):f(a),c=-1,g=b.length;++c2?d(b,19,e(arguments,2),null,a):d(b,3,null,null,a)}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],75:[function(a,b){function c(){for(var a=arguments,b=a.length;b--;)if(!d(a[b]))throw new TypeError;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}var d=a("../objects/isFunction");b.exports=c},{"../objects/isFunction":154}],76:[function(a,b){function c(a,b,c){var i=typeof a;if(null==a||"function"==i)return d(a,b,c);if("object"!=i)return h(a);var j=g(a),k=j[0],l=a[k];return 1!=j.length||l!==l||f(l)?function(b){for(var c=j.length,d=!1;c--&&(d=e(b[j[c]],a[j[c]],null,!0)););return d}:function(a){var b=a[k];return l===b&&(0!==l||1/l==1/b)}}var d=a("../internals/baseCreateCallback"),e=a("../internals/baseIsEqual"),f=a("../objects/isObject"),g=a("../objects/keys"),h=a("../utilities/property");b.exports=c},{"../internals/baseCreateCallback":92,"../internals/baseIsEqual":97,"../objects/isObject":158,"../objects/keys":163,"../utilities/property":181}],77:[function(a,b){function c(a,b){return b="number"==typeof b?b:+b||a.length,d(a,4,null,null,null,b)}var d=a("../internals/createWrapper");b.exports=c},{"../internals/createWrapper":107}],78:[function(a,b){function c(a,b,c){var h,i,j,k,l,m,n,o=0,p=!1,q=!0;if(!d(a))throw new TypeError;if(b=g(0,b)||0,c===!0){var r=!0;q=!1}else e(c)&&(r=c.leading,p="maxWait"in c&&(g(b,c.maxWait)||0),q="trailing"in c?c.trailing:q);var s=function(){var c=b-(f()-k);if(0>=c){i&&clearTimeout(i);var d=n;i=m=n=void 0,d&&(o=f(),j=a.apply(l,h),m||i||(h=l=null))}else m=setTimeout(s,c)},t=function(){m&&clearTimeout(m),i=m=n=void 0,(q||p!==b)&&(o=f(),j=a.apply(l,h),m||i||(h=l=null))};return function(){if(h=arguments,k=f(),l=this,n=q&&(m||!r),p===!1)var c=r&&!m;else{i||r||(o=k);var d=p-(k-o),e=0>=d;e?(i&&(i=clearTimeout(i)),o=k,j=a.apply(l,h)):i||(i=setTimeout(t,d))}return e&&m?m=clearTimeout(m):m||b===p||(m=setTimeout(s,b)),c&&(e=!0,j=a.apply(l,h)),!e||m||i||(h=l=null),j}}var d=a("../objects/isFunction"),e=a("../objects/isObject"),f=a("../utilities/now"),g=Math.max;b.exports=c},{"../objects/isFunction":154,"../objects/isObject":158,"../utilities/now":179}],79:[function(a,b){function c(a){if(!d(a))throw new TypeError;var b=e(arguments,1);return setTimeout(function(){a.apply(void 0,b)},1)}var d=a("../objects/isFunction"),e=a("../internals/slice");b.exports=c},{"../internals/slice":129,"../objects/isFunction":154}],80:[function(a,b){function c(a,b){if(!d(a))throw new TypeError;var c=e(arguments,2);return setTimeout(function(){a.apply(void 0,c)},b)}var d=a("../objects/isFunction"),e=a("../internals/slice");b.exports=c},{"../internals/slice":129,"../objects/isFunction":154}],81:[function(a,b){function c(a,b){if(!d(a))throw new TypeError;var c=function(){var d=c.cache,f=b?b.apply(this,arguments):e+arguments[0];return g.call(d,f)?d[f]:d[f]=a.apply(this,arguments)};return c.cache={},c}var d=a("../objects/isFunction"),e=a("../internals/keyPrefix"),f=Object.prototype,g=f.hasOwnProperty;b.exports=c},{"../internals/keyPrefix":115,"../objects/isFunction":154}],82:[function(a,b){function c(a){var b,c;if(!d(a))throw new TypeError;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}var d=a("../objects/isFunction");b.exports=c},{"../objects/isFunction":154}],83:[function(a,b){function c(a){return d(a,16,e(arguments,1))}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],84:[function(a,b){function c(a){return d(a,32,null,e(arguments,1))}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],85:[function(a,b){function c(a,b,c){var h=!0,i=!0;if(!e(a))throw new TypeError;return c===!1?h=!1:f(c)&&(h="leading"in c?c.leading:h,i="trailing"in c?c.trailing:i),g.leading=h,g.maxWait=b,g.trailing=i,d(a,b,g)}var d=a("./debounce"),e=a("../objects/isFunction"),f=a("../objects/isObject"),g={leading:!1,maxWait:0,trailing:!1};b.exports=c},{"../objects/isFunction":154,"../objects/isObject":158,"./debounce":78}],86:[function(a,b){function c(a,b){return d(b,16,[a])}var d=a("../internals/createWrapper");b.exports=c},{"../internals/createWrapper":107}],87:[function(a,b){function c(a){return a&&"object"==typeof a&&!l(a)&&r.call(a,"__wrapped__")?a:new m(a)}var d=a("./arrays"),e=a("./chaining"),f=a("./collections"),g=a("./functions"),h=a("./objects"),i=a("./utilities"),j=a("./collections/forEach"),k=a("./objects/forOwn"),l=a("./objects/isArray"),m=a("./internals/lodashWrapper"),n=a("./utilities/mixin"),o=a("./support"),p=(a("./utilities/templateSettings"),[]),q=Object.prototype,r=q.hasOwnProperty;m.prototype=c.prototype,n=function(a){var b=h.functions;return function(d,e,f){return e&&(f||b(e).length)||(null==f&&(f=e),e=d,d=c),a(d,e,f)}}(n),c.after=g.after,c.assign=h.assign,c.at=f.at,c.bind=g.bind,c.bindAll=g.bindAll,c.bindKey=g.bindKey,c.chain=e.chain,c.compact=d.compact,c.compose=g.compose,c.constant=i.constant,c.countBy=f.countBy,c.create=h.create,c.createCallback=g.createCallback,c.curry=g.curry,c.debounce=g.debounce,c.defaults=h.defaults,c.defer=g.defer,c.delay=g.delay,c.difference=d.difference,c.filter=f.filter,c.flatten=d.flatten,c.forEach=j,c.forEachRight=f.forEachRight,c.forIn=h.forIn,c.forInRight=h.forInRight,c.forOwn=k,c.forOwnRight=h.forOwnRight,c.functions=h.functions,c.groupBy=f.groupBy,c.indexBy=f.indexBy,c.initial=d.initial,c.intersection=d.intersection,c.invert=h.invert,c.invoke=f.invoke,c.keys=h.keys,c.map=f.map,c.mapValues=h.mapValues,c.max=f.max,c.memoize=g.memoize,c.merge=h.merge,c.min=f.min,c.omit=h.omit,c.once=g.once,c.pairs=h.pairs,c.partial=g.partial,c.partialRight=g.partialRight,c.pick=h.pick,c.pluck=f.pluck,c.property=i.property,c.pull=d.pull,c.range=d.range,c.reject=f.reject,c.remove=d.remove,c.rest=d.rest,c.shuffle=f.shuffle,c.sortBy=f.sortBy,c.tap=e.tap,c.throttle=g.throttle,c.times=i.times,c.toArray=f.toArray,c.transform=h.transform,c.union=d.union,c.uniq=d.uniq,c.values=h.values,c.where=f.where,c.without=d.without,c.wrap=g.wrap,c.xor=d.xor,c.zip=d.zip,c.zipObject=d.zipObject,c.collect=f.map,c.drop=d.rest,c.each=j,c.eachRight=f.forEachRight,c.extend=h.assign,c.methods=h.functions,c.object=d.zipObject,c.select=f.filter,c.tail=d.rest,c.unique=d.uniq,c.unzip=d.zip,n(c),c.clone=h.clone,c.cloneDeep=h.cloneDeep,c.contains=f.contains,c.escape=i.escape,c.every=f.every,c.find=f.find,c.findIndex=d.findIndex,c.findKey=h.findKey,c.findLast=f.findLast,c.findLastIndex=d.findLastIndex,c.findLastKey=h.findLastKey,c.has=h.has,c.identity=i.identity,c.indexOf=d.indexOf,c.isArguments=h.isArguments,c.isArray=l,c.isBoolean=h.isBoolean,c.isDate=h.isDate,c.isElement=h.isElement,c.isEmpty=h.isEmpty,c.isEqual=h.isEqual,c.isFinite=h.isFinite,c.isFunction=h.isFunction,c.isNaN=h.isNaN,c.isNull=h.isNull,c.isNumber=h.isNumber,c.isObject=h.isObject,c.isPlainObject=h.isPlainObject,c.isRegExp=h.isRegExp,c.isString=h.isString,c.isUndefined=h.isUndefined,c.lastIndexOf=d.lastIndexOf,c.mixin=n,c.noConflict=i.noConflict,c.noop=i.noop,c.now=i.now,c.parseInt=i.parseInt,c.random=i.random,c.reduce=f.reduce,c.reduceRight=f.reduceRight,c.result=i.result,c.size=f.size,c.some=f.some,c.sortedIndex=d.sortedIndex,c.template=i.template,c.unescape=i.unescape,c.uniqueId=i.uniqueId,c.all=f.every,c.any=f.some,c.detect=f.find,c.findWhere=f.find,c.foldl=f.reduce,c.foldr=f.reduceRight,c.include=f.contains,c.inject=f.reduce,n(function(){var a={};return k(c,function(b,d){c.prototype[d]||(a[d]=b)}),a}(),!1),c.first=d.first,c.last=d.last,c.sample=f.sample,c.take=d.first,c.head=d.first,k(c,function(a,b){var d="sample"!==b; c.prototype[b]||(c.prototype[b]=function(b,c){var e=this.__chain__,f=a(this.__wrapped__,b,c);return e||null!=b&&(!c||d&&"function"==typeof b)?new m(f,e):f})}),c.VERSION="2.4.1",c.prototype.chain=e.wrapperChain,c.prototype.toString=e.wrapperToString,c.prototype.value=e.wrapperValueOf,c.prototype.valueOf=e.wrapperValueOf,j(["join","pop","shift"],function(a){var b=p[a];c.prototype[a]=function(){var a=this.__chain__,c=b.apply(this.__wrapped__,arguments);return a?new m(c,a):c}}),j(["push","reverse","sort","unshift"],function(a){var b=p[a];c.prototype[a]=function(){return b.apply(this.__wrapped__,arguments),this}}),j(["concat","slice","splice"],function(a){var b=p[a];c.prototype[a]=function(){return new m(b.apply(this.__wrapped__,arguments),this.__chain__)}}),c.support=o,(c.templateSettings=i.templateSettings).imports._=c,b.exports=c},{"./arrays":14,"./chaining":37,"./collections":43,"./collections/forEach":51,"./functions":70,"./internals/lodashWrapper":117,"./objects":131,"./objects/forOwn":141,"./objects/isArray":147,"./support":171,"./utilities":172,"./utilities/mixin":176,"./utilities/templateSettings":185}],88:[function(a,b){var c=[];b.exports=c},{}],89:[function(a,b){function c(a){function b(){if(h){var a=g(h);i.apply(a,arguments)}if(this instanceof b){var f=d(c.prototype),k=c.apply(f,a||arguments);return e(k)?k:f}return c.apply(j,a||arguments)}var c=a[0],h=a[2],j=a[4];return f(b,a),b}var d=a("./baseCreate"),e=a("../objects/isObject"),f=a("./setBindData"),g=a("./slice"),h=[],i=h.push;b.exports=c},{"../objects/isObject":158,"./baseCreate":91,"./setBindData":126,"./slice":129}],90:[function(a,b){function c(a,b,m,n,q){if(m){var s=m(a);if("undefined"!=typeof s)return s}var w=i(a);if(!w)return a;var A=x.call(a);if(!v[A])return a;var B=z[A];switch(A){case o:case p:return new B(+a);case r:case u:return new B(a);case t:return s=B(a.source,l.exec(a)),s.lastIndex=a.lastIndex,s}var C=h(a);if(b){var D=!n;n||(n=g()),q||(q=g());for(var E=n.length;E--;)if(n[E]==a)return q[E];s=C?B(a.length):{}}else s=C?k(a):d({},a);return C&&(y.call(a,"index")&&(s.index=a.index),y.call(a,"input")&&(s.input=a.input)),b?(n.push(a),q.push(s),(C?e:f)(a,function(a,d){s[d]=c(a,b,m,n,q)}),D&&(j(n),j(q)),s):s}var d=a("../objects/assign"),e=a("../collections/forEach"),f=a("../objects/forOwn"),g=a("./getArray"),h=a("../objects/isArray"),i=a("../objects/isObject"),j=a("./releaseArray"),k=a("./slice"),l=/\w*$/,m="[object Arguments]",n="[object Array]",o="[object Boolean]",p="[object Date]",q="[object Function]",r="[object Number]",s="[object Object]",t="[object RegExp]",u="[object String]",v={};v[q]=!1,v[m]=v[n]=v[o]=v[p]=v[r]=v[s]=v[t]=v[u]=!0;var w=Object.prototype,x=w.toString,y=w.hasOwnProperty,z={};z[n]=Array,z[o]=Boolean,z[p]=Date,z[q]=Function,z[s]=Object,z[r]=Number,z[t]=RegExp,z[u]=String,b.exports=c},{"../collections/forEach":51,"../objects/assign":132,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isObject":158,"./getArray":110,"./releaseArray":124,"./slice":129}],91:[function(a,b){function c(a){return f(a)?g(a):{}}var d="undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e=a("./isNative"),f=a("../objects/isObject"),g=(a("../utilities/noop"),e(g=Object.create)&&g);g||(c=function(){function a(){}return function(b){if(f(b)){a.prototype=b;var c=new a;a.prototype=null}return c||d.Object()}}()),b.exports=c},{"../objects/isObject":158,"../utilities/noop":178,"./isNative":114}],92:[function(a,b){function c(a,b,c){if("function"!=typeof a)return e;if("undefined"==typeof b||!("prototype"in a))return a;var k=a.__bindData__;if("undefined"==typeof k&&(g.funcNames&&(k=!a.name),k=k||!g.funcDecomp,!k)){var l=j.call(a);g.funcNames||(k=!h.test(l)),k||(k=i.test(l),f(a,k))}if(k===!1||k!==!0&&1&k[1])return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return d(a,b)}var d=a("../functions/bind"),e=a("../utilities/identity"),f=a("./setBindData"),g=a("../support"),h=/^\s*function[ \n\r\t]+\w/,i=/\bthis\b/,j=Function.prototype.toString;b.exports=c},{"../functions/bind":72,"../support":171,"../utilities/identity":175,"./setBindData":126}],93:[function(a,b){function c(a){function b(){var a=o?m:this;if(k){var f=g(k);i.apply(f,arguments)}if((l||q)&&(f||(f=g(arguments)),l&&i.apply(f,l),q&&f.length=g,l=[];if(k){var m=f(b);m?(i=e,b=m):k=!1}for(;++c-1:void 0});return u.pop(),v.pop(),G&&(h(u),h(v)),w}var d=a("../objects/forIn"),e=a("./getArray"),f=a("../objects/isFunction"),g=a("./objectTypes"),h=a("./releaseArray"),i="[object Arguments]",j="[object Array]",k="[object Boolean]",l="[object Date]",m="[object Number]",n="[object Object]",o="[object RegExp]",p="[object String]",q=Object.prototype,r=q.toString,s=q.hasOwnProperty;b.exports=c},{"../objects/forIn":139,"../objects/isFunction":154,"./getArray":110,"./objectTypes":120,"./releaseArray":124}],98:[function(a,b){function c(a,b,h,i,j){(f(b)?d:e)(b,function(b,d){var e,k,l=b,m=a[d];if(b&&((k=f(b))||g(b))){for(var n=i.length;n--;)if(e=i[n]==b){m=j[n];break}if(!e){var o;h&&(l=h(m,b),(o="undefined"!=typeof l)&&(m=l)),o||(m=k?f(m)?m:[]:g(m)?m:{}),i.push(b),j.push(m),o||c(m,b,h,i,j)}}else h&&(l=h(m,b),"undefined"==typeof l&&(l=b)),"undefined"!=typeof l&&(m=l);a[d]=m})}var d=a("../collections/forEach"),e=a("../objects/forOwn"),f=a("../objects/isArray"),g=a("../objects/isPlainObject");b.exports=c},{"../collections/forEach":51,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isPlainObject":159}],99:[function(a,b){function c(a,b){return a+d(e()*(b-a+1))}var d=Math.floor,e=Math.random;b.exports=c},{}],100:[function(a,b){function c(a,b,c){var k=-1,l=d,m=a?a.length:0,n=[],o=!b&&m>=h,p=c||o?g():n;if(o){var q=f(p);l=e,p=q}for(;++k-1?0:-1:a?0:-1}var d=a("./baseIndexOf"),e=a("./keyPrefix");b.exports=c},{"./baseIndexOf":96,"./keyPrefix":115}],102:[function(a,b){function c(a){var b=this.cache,c=typeof a;if("boolean"==c||null==a)b[a]=!0;else{"number"!=c&&"string"!=c&&(c="object");var e="number"==c?a:d+a,f=b[c]||(b[c]={});"object"==c?(f[e]||(f[e]=[])).push(a):f[e]=!0}}var d=a("./keyPrefix");b.exports=c},{"./keyPrefix":115}],103:[function(a,b){function c(a){return a.charCodeAt(0)}b.exports=c},{}],104:[function(a,b){function c(a,b){for(var c=a.criteria,d=b.criteria,e=-1,f=c.length;++eh||"undefined"==typeof g)return 1;if(h>g||"undefined"==typeof h)return-1}}return a.index-b.index}b.exports=c},{}],105:[function(a,b){function c(a){return function(b,c,f){var g={};c=d(c,f,3);var h=-1,i=b?b.length:0;if("number"==typeof i)for(;++h":">",'"':""","'":"'"};b.exports=c},{}],113:[function(a,b){var c=a("./htmlEscapes"),d=a("../objects/invert"),e=d(c);b.exports=e},{"../objects/invert":145,"./htmlEscapes":112}],114:[function(a,b){function c(a){return"function"==typeof a&&f.test(a)}var d=Object.prototype,e=d.toString,f=RegExp("^"+String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$");b.exports=c},{}],115:[function(a,b){var c=+new Date+"";b.exports=c},{}],116:[function(a,b){var c=75;b.exports=c},{}],117:[function(a,b){function c(a,b){this.__chain__=!!b,this.__wrapped__=a}b.exports=c},{}],118:[function(a,b){var c=40;b.exports=c},{}],119:[function(a,b){var c=[];b.exports=c},{}],120:[function(a,b){var c={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};b.exports=c},{}],121:[function(a,b){var c=a("./htmlUnescapes"),d=a("../objects/keys"),e=RegExp("("+d(c).join("|")+")","g");b.exports=e},{"../objects/keys":163,"./htmlUnescapes":113}],122:[function(a,b){var c=/<%=([\s\S]+?)%>/g;b.exports=c},{}],123:[function(a,b){var c=a("./htmlEscapes"),d=a("../objects/keys"),e=RegExp("["+d(c).join("")+"]","g");b.exports=e},{"../objects/keys":163,"./htmlEscapes":112}],124:[function(a,b){function c(a){a.length=0,d.lengthe?0:e);++d3&&"function"==typeof j[l-2])var m=c(j[--l-1],j[l--],2);else l>2&&"function"==typeof j[l-1]&&(m=j[--l]);for(;++k3&&"function"==typeof b[c-2])var j=d(b[--c-1],b[c--],2);else c>2&&"function"==typeof b[c-1]&&(j=b[--c]);for(var k=i(arguments,1,c),l=-1,m=f(),n=f();++l/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:{escape:c}}};b.exports=e},{"../internals/reInterpolate":122,"./escape":174}],186:[function(a,b){function c(a,b,c){a=(a=+a)>-1?a:0; -var e=-1,f=Array(a);for(b=d(b,c,1);++e/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.clearScroll=c({url:{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.nodeHotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.cluster.prototype.nodeInfo=c({params:{all:{type:"boolean"},clear:{type:"boolean"},http:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},plugin:{type:"boolean"},process:{type:"boolean"},settings:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},timeout:{type:"time"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes"}]}),d.cluster.prototype.nodeShutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.cluster.prototype.nodeStats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},fields:{type:"list"},fs:{type:"boolean"},http:{type:"boolean"},indices:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},process:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{filterBlocks:{type:"boolean",name:"filter_blocks"},filterIndexTemplates:{type:"boolean",name:"filter_index_templates"},filterIndices:{type:"list",name:"filter_indices"},filterMetadata:{type:"boolean",name:"filter_metadata"},filterNodes:{type:"boolean",name:"filter_nodes"},filterRoutingTable:{type:"boolean",name:"filter_routing_table"},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/state"}}),d.count=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>",req:{index:{type:"list"}}},{fmt:"/"}],method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}],method:"DELETE"}),d.indices.prototype.exists=c({url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},refresh:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mapping/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({urls:[{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},refresh:{type:"boolean"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"string"}}},{fmt:"/_alias"}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},completion:{type:"boolean"},completionFields:{type:"list",name:"completion_fields"},docs:{type:"boolean"},fielddata:{type:"boolean"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},filterCache:{type:"boolean",name:"filter_cache"},flush:{type:"boolean"},get:{type:"boolean"},groups:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indexing:{type:"boolean"},merge:{type:"boolean"},refresh:{type:"boolean"},search:{type:"boolean"},store:{type:"boolean"},warmer:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLen:{type:"number",name:"max_word_len"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLen:{type:"number",name:"min_word_len"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.percolate=c({params:{preferLocal:{type:"boolean",name:"prefer_local"}},url:{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}},needBody:!0,method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.suggest=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":194}],191:[function(a,b){var c=a("../client_action"),d=b.exports={};d._namespaces=["cat","cluster","indices","nodes","snapshot"],d.bulk=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},type:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.cat=function(a){this.transport=a},d.cat.prototype.aliases=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_cat/aliases"}]}),d.cat.prototype.allocation=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/allocation/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cat/allocation"}]}),d.cat.prototype.count=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/count/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/count"}]}),d.cat.prototype.health=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},ts:{type:"boolean","default":!0},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/health"}}),d.cat.prototype.help=c({params:{help:{type:"boolean","default":!1}},url:{fmt:"/_cat"}}),d.cat.prototype.indices=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},pri:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/indices/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/indices"}]}),d.cat.prototype.master=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/master"}}),d.cat.prototype.nodes=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/nodes"}}),d.cat.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/pending_tasks"}}),d.cat.prototype.recovery=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/recovery/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/recovery"}]}),d.cat.prototype.shards=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/shards/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/shards"}]}),d.cat.prototype.threadPool=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1},fullId:{type:"boolean","default":!1,name:"full_id"}},url:{fmt:"/_cat/thread_pool"}}),d.clearScroll=c({url:{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},indexTemplates:{type:"list",name:"index_templates"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/_cluster/state/<%=metric%>/<%=index%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]},index:{type:"list"}}},{fmt:"/_cluster/state/<%=metric%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]}}},{fmt:"/_cluster/state"}]}),d.cluster.prototype.stats=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_cluster/stats/nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cluster/stats"}]}),d.count=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d.countPercolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a -},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},name:{type:"list"}},url:{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.exists=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsTemplate=c({params:{local:{type:"boolean"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}},{fmt:"/_alias"}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_aliases/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/<%=type%>/field/<%=field%>",req:{type:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_settings/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_warmer"}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"closed",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},force:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"indices",options:["cluster","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/<%=index%>/_stats/<%=metric%>",req:{index:{type:"list"},metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_stats/<%=metric%>",req:{metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLength:{type:"number",name:"max_word_length"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLength:{type:"number",name:"min_word_length"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.mpercolate=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mpercolate",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mpercolate",req:{index:{type:"string"}}},{fmt:"/_mpercolate"}],needBody:!0,bulkBody:!0,method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.mtermvectors=c({params:{ids:{type:"list",required:!1},termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},urls:[{fmt:"/<%=index%>/<%=type%>/_mtermvectors",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mtermvectors",req:{index:{type:"string"}}},{fmt:"/_mtermvectors"}],method:"POST"}),d.nodes=function(a){this.transport=a},d.nodes.prototype.hotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.nodes.prototype.info=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_nodes/<%=nodeId%>/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/<%=metric%>",req:{metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes"}]}),d.nodes.prototype.shutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.nodes.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"node",options:["node","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats/<%=metric%>/<%=indexMetric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats/<%=metric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats"}]}),d.percolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.snapshot=function(a){this.transport=a},d.snapshot.prototype.create=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.createRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"string"}}},needBody:!0,method:"POST"}),d.snapshot.prototype["delete"]=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"DELETE"}),d.snapshot.prototype.deleteRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},method:"DELETE"}),d.snapshot.prototype.get=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"list"}}}}),d.snapshot.prototype.getRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},local:{type:"boolean"}},urls:[{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},{fmt:"/_snapshot"}]}),d.snapshot.prototype.restore=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_restore",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.suggest=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],needBody:!0,method:"POST"}),d.termvector=c({params:{termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_termvector",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":194}],192:[function(a,b){b.exports={"1.0":a("./1_0"),"0.90":a("./0_90"),_default:"0.90"}},{"./0_90":190,"./1_0":191}],193:[function(a,b){function c(a){function b(){a.hasOwnProperty("log")||(a.log="warning"),a.hosts||a.host||(a.host="http://localhost:9200"),this.close=function(){this.transport.close()},this.transport=new d(a);for(var b=0;b1?"one of "+a.options.join(","):a.options[0]))},duration:function(a,b,c){if(f.isNumeric(b)||f.isInterval(b))return b;throw new TypeError("Invalid "+c+": expected a number or interval (an integer followed by one of Mwdhmsy).")},list:function(a,b,c){switch(typeof b){case"number":case"string":case"boolean":return""+b;case"object":if(f.isArray(b))return b.join(",");default:throw new TypeError("Invalid "+c+": expected be a comma seperated list, array, number or string.")}},"boolean":function(a,b){return b=f.isString(b)?b.toLowerCase():b,"no"===b||"off"===b?!1:!!b},number:function(a,b,c){if(f.isNumeric(b))return 1*b;throw new TypeError("Invalid "+c+": expected a number.")},string:function(a,b,c){switch(typeof b){case"number":case"string":return""+b;default:throw new TypeError("Invalid "+c+": expected a string.")}},time:function(a,b,c){if("string"==typeof b)return b;if(f.isNumeric(b))return""+b;if(b instanceof Date)return""+b.getTime();throw new TypeError("Invalid "+c+": expected some sort of time.")}};c.resolveUrl=d,c.proxy=function(a,b){return function(c,d){return"function"==typeof c?(d=c,c={}):(c=c||{},d="function"==typeof d?d:null),b.transform&&b.transform(c),a.call(this,c,d)}}},{"./utils":211}],195:[function(a,b){function c(a,b){if(b=b||{},e.call(this),this.requestTimeout=b.hasOwnProperty("requestTimeout")?b.requestTimeout:3e4,this.log=b.log||new f,!a)throw new TypeError("Missing host");if(!(a instanceof g))throw new TypeError("Invalid host");this.host=a,d.makeBoundMethods(this)}b.exports=c;var d=a("./utils"),e=a("events").EventEmitter,f=a("./log"),g=a("./host"),h=a("./errors");d.inherits(c,e),c.prototype.request=function(){throw new Error("Connection#request must be overwritten by the Connector")},c.prototype.ping=function(a,b){"function"==typeof a?(b=a,a=null):b="function"==typeof b?b:null;var c,e,f,g=100;a&&a.hasOwnProperty("requestTimeout")&&(g=a.requestTimeout),f=this.request(d.defaults(a||{},{path:"/",method:"HEAD"}),function(a){e||(clearTimeout(c),b&&b(a))}),g&&(c=setTimeout(function(){f&&f(),e=!0,b&&b(new h.RequestTimeout("Ping Timeout after "+g+"ms"))},g))},c.prototype.setStatus=function(a){var b=this.status;this.status=a,this.emit("status set",a,b,this),"closed"===a&&this.removeAllListeners()}},{"./errors":199,"./host":200,"./log":201,"./utils":211,events:4}],196:[function(a,b){function c(a){a=a||{},e.makeBoundMethods(this),a.log?this.log=a.log:(this.log=new f,a.log=this.log),this._config=a,this.selector=e.funcEnum(a,"selector",c.selectors,c.defaultSelector),this.Connection=e.funcEnum(a,"connectionClass",c.connectionClasses,c.defaultConnectionClass),this.deadTimeout=a.hasOwnProperty("deadTimeout")?a.deadTimeout:6e4,this.maxDeadTimeout=a.hasOwnProperty("maxDeadTimeout")?a.maxDeadTimeout:18e5,this.calcDeadTimeout=e.funcEnum(a,"calcDeadTimeout",c.calcDeadTimeoutOptions,"exponential"),this.index={},this._conns={alive:[],dead:[]},this._timeouts=[]}var d=a("__browserify_process");b.exports=c; -var e=a("./utils"),f=a("./log");c.selectors=a("./selectors"),c.defaultSelector="roundRobin",c.connectionClasses=a("./connectors"),c.defaultConnectionClass=c.connectionClasses._default,delete c.connectionClasses._default,c.calcDeadTimeoutOptions={flat:function(a,b){return b},exponential:function(a,b){return Math.min(2*b*Math.pow(2,.5*a-1),this.maxDeadTimeout)}},c.prototype.select=function(a){if(this._conns.alive.length)if(this.selector.length>1)this.selector(this._conns.alive,a);else try{e.nextTick(a,void 0,this.selector(this._conns.alive))}catch(b){a(b)}else this._timeouts.length?this._selectDeadConnection(a):e.nextTick(a,void 0)},c.prototype.onStatusSet=e.handler(function(a,b,c){var d,f="dead"===a,g=f&&"dead"===b,h=!f&&"dead"===b,i=b===a,j=this._conns[b],k=this._conns[a];return i&&!f?!0:(j!==k&&(e.isArray(j)&&(d=j.indexOf(c),-1!==d&&j.splice(d,1)),e.isArray(k)&&(d=k.indexOf(c),-1===d&&k.push(c))),f&&this._onConnectionDied(c,g),void(h&&this._onConnectionRevived(c)))}),c.prototype._onConnectionRevived=function(a){for(var b,c=0;c=0)return c.levels.slice(0,b+1);case"object":if(e.isArray(a)){var d=e.intersection(a,c.levels);if(d.length===a.length)return d}default:throw new TypeError("invalid logging level "+a+". Expected zero or more of these options: "+c.levels.join(", "))}},c.join=function(a){return e.map(a,function(a){return e.isPlainObject(a)?e.inspect(a)+"\n":a.toString()}).join(" ")},c.prototype.addOutput=function(a){a=a||{},a.levels=c.parseLevels(a.levels||a.level||"warning"),delete a.level;var b=e.funcEnum(a,"type",c.loggers,d.browser?"console":"stdio");return new b(this,a)},c.prototype.error=function(a){return this.listenerCount("error")?this.emit("error",a instanceof Error?a:new Error(a)):void 0},c.prototype.warning=function(){return this.listenerCount("warning")?this.emit("warning",c.join(arguments)):void 0},c.prototype.info=function(){return this.listenerCount("info")?this.emit("info",c.join(arguments)):void 0},c.prototype.debug=function(){return this.listenerCount("debug")?this.emit("debug",c.join(arguments)):void 0},c.prototype.trace=function(a,b,d,e,f){return this.listenerCount("trace")?this.emit("trace",c.normalizeTraceArgs(a,b,d,e,f)):void 0},c.normalizeTraceArgs=function(a,b,c,d,g){return"string"==typeof b?b=f.parse(b,!0,!0):(b=e.clone(b),b.path&&(b.query=f.parse(b.path,!0,!1).query),!b.pathname&&b.path&&(b.pathname=b.path.split("?").shift())),delete b.auth,{method:a,url:f.format(b),body:c,status:g,response:d}},b.exports=c},{"./loggers":203,"./utils":211,__browserify_process:13,events:4,url:7}],202:[function(a,b){function c(a,b){this.log=a,this.listeningLevels=[],f.makeBoundMethods(this),this.log.once("closing",this.bound.cleanUpListeners),this.setupListeners(b.levels)}function d(a){return 10>a?"0"+a.toString(10):a.toString(10)}function e(a,b){var c=f.repeat(" ",b||2);return(a||"").split(/\r?\n/).map(function(a){return c+a}).join("\n")}var f=a("./utils");c.prototype.timestamp=function(){var a=new Date;return a.getUTCFullYear()+"-"+d(a.getUTCMonth()+1)+"-"+d(a.getUTCDate())+"T"+d(a.getUTCHours())+":"+d(a.getUTCMinutes())+":"+d(a.getUTCSeconds())+"Z"},c.prototype.format=function(a,b){return a+": "+this.timestamp()+"\n"+e(b)+"\n\n"},c.prototype.write=function(){throw new Error("This should be overwritten by the logger")},c.prototype.setupListeners=function(a){this.cleanUpListeners(),this.listeningLevels=[],f.each(a,function(a){var b="on"+f.ucfirst(a);if(!this.bound[b])throw new Error('Unable to listen for level "'+a+'"');this.listeningLevels.push(a),this.log.on(a,this.bound[b])},this)},c.prototype.cleanUpListeners=f.handler(function(){f.each(this.listeningLevels,function(a){this.log.removeListener(a,this.bound["on"+f.ucfirst(a)])},this)}),c.prototype.onError=f.handler(function(a){this.write("Error"===a.name?"ERROR":a.name,a.stack)}),c.prototype.onWarning=f.handler(function(a){this.write("WARNING",a)}),c.prototype.onInfo=f.handler(function(a){this.write("INFO",a)}),c.prototype.onDebug=f.handler(function(a){this.write("DEBUG",a)}),c.prototype.onTrace=f.handler(function(a){this.write("TRACE",this._formatTraceMessage(a))}),c.prototype._formatTraceMessage=function(a){return"-> "+a.method+" "+a.url+"\n"+this._prettyJson(a.body)+"\n<- "+a.status+"\n"+this._prettyJson(a.response)},c.prototype._prettyJson=function(a){try{return"string"==typeof object&&(a=JSON.parse(a)),JSON.stringify(a,null," ").replace(/'/g,"\\u0027")}catch(b){return"string"==typeof a?a:""}},b.exports=c},{"./utils":211}],203:[function(a,b){b.exports={console:a("./console")}},{"./console":204}],204:[function(a,b){function c(a,b){d.call(this,a,b),this.color=e.has(b,"color")?!!b.color:!0}b.exports=c;var d=a("../logger"),e=a("../utils");e.inherits(c,d),c.prototype.setupListeners=function(a){d.prototype.setupListeners.call(this,a)},c.prototype.write=function(a,b,c){console[c]&&console[c](this.format(a,b))},c.prototype.onError=e.handler(function(a){var b=console.error?"error":"log";this.write("Error"===a.name?"ERROR":a.name,a.stack||a.message,b)}),c.prototype.onWarning=e.handler(function(a){this.write("WARNING",a,console.warn?"warn":"log")}),c.prototype.onInfo=e.handler(function(a){this.write("INFO",a,console.info?"info":"log")}),c.prototype.onDebug=e.handler(function(a){this.write("DEBUG",a,console.debug?"debug":"log")}),c.prototype.onTrace=e.handler(function(a){this.write("TRACE",this._formatTraceMessage(a),"log")})},{"../logger":202,"../utils":211}],205:[function(a,b){function c(a){return function(b){var c=[];return d.each(b,function(b,d){var f=e.exec(b[a]);c.push({host:f[1],port:parseInt(f[2],10),_meta:{id:d,name:b.name,hostname:b.hostname,version:b.version}})}),c}}var d=a("./utils"),e=/\[\/*([^:]+):(\d+)\]/;b.exports=c("http_address"),b.exports.thrift=c("transport_address")},{"./utils":211}],206:[function(a,b){b.exports={random:a("./random"),roundRobin:a("./round_robin")}},{"./random":207,"./round_robin":208}],207:[function(a,b){b.exports=function(a){return a[Math.floor(Math.random()*a.length)]}},{}],208:[function(a,b){b.exports=function(a){var b=a[0];return a.push(a.shift()),b}},{}],209:[function(a,b){function c(){}b.exports=c;var d=a("../utils");c.prototype.serialize=function(a,b,c){switch(typeof a){case"string":return a;case"object":if(a)return JSON.stringify(a,b,c);default:return}},c.prototype.deserialize=function(a){if("string"==typeof a)try{return JSON.parse(a)}catch(b){}},c.prototype.bulkBody=function(a){var b,c="";if(d.isArray(a))for(b=0;bg||g>=300)||a.ignore&&d.contains(a.ignore,g)||(c=e[g]?new e[g](i&&i.error):new e.Generic("unknown error")),a.castExists&&(c&&c instanceof e.NotFound?(i=!1,c=void 0):i=!c),"function"==typeof b?c?b(c,i,g):b(void 0,i,g):c?(c.body=i,c.status=g,m.reject(c)):m.resolve(i)}}function h(){q||(q=!0,o=0,n._timeout(k),"function"==typeof j&&j())}var i,j,k,l,m,n=this,o=this.maxRetries,p=this.requestTimeout,q=!1;return n.log.debug("starting request",a),a.body&&"GET"===a.method?void d.nextTick(g,new TypeError('Body can not be sent with method "GET"')):(a.body&&(a.body=n.serializer[a.bulkBody?"bulkBody":"serialize"](a.body)),a.hasOwnProperty("maxRetries")&&(o=a.maxRetries),a.hasOwnProperty("requestTimeout")&&(p=a.requestTimeout),a.req={method:a.method,path:a.path||"/",query:a.query,body:a.body},p&&1/0!==p&&(k=this._timeout(function(){g(new e.RequestTimeout("Request Timeout after "+p+"ms")),h()},p)),"function"==typeof b?l={abort:h}:(m=this.defer(),l=m.promise,l.abort=h),i?c(void 0,i):n.connectionPool.select(c),l)},c.prototype._timeout=function(a,b){this._timers=this._timers||[];var c;if("function"!=typeof a&&(c=a,a=void 0),a)return c=setTimeout(a,b),this._timers.push(c),c;if(c){clearTimeout(c);var d=this._timers.indexOf(c);-1!==d&&this._timers.splice(d,1)}},c.prototype.sniff=function(a){var b=this.connectionPool,c=this.nodesToHostCallback;a="function"==typeof a?a:d.noop,this.request({path:this.sniffEndpoint,method:"GET"},function(e,g,h){if(!e&&g&&g.nodes){var i=d.map(c(g.nodes),function(a){return new f(a)});b.setHosts(i)}a(e,g,h)})},c.prototype.close=function(){this.log.close(),d.each(this._timers,clearTimeout),this.connectionPool.close()}},{"./connection_pool":196,"./errors":199,"./host":200,"./log":201,"./nodes_to_host":205,"./serializers/json":209,"./utils":211,when:1}],211:[function(a,b){function c(a,b,c){return function(d){for(var e,f,g,h,i=0,j=[],k="";i=97&&122>=e||e>=48&&57>=e,g=e>=65&&90>=e,(g||!h)&&(k.length&&j.push(k),k=""),(g||h)&&(h&&k.length?k+=f:k=!j.length&&a||j.length&&b?f.toUpperCase():f.toLowerCase());return k.length&&j.push(k),j.length&&"_"===d.charAt(0)&&(j[0]="_"+j[0]),j.join(c)}}var d=a("__browserify_process"),e=a("__browserify_Buffer").Buffer,f=a("path"),g=a("lodash-node/modern"),h=a("util"),i=g.extend({},g,h);g=i,i.joinPath=f.join,i.deepMerge=function(a,b){return g.each(b,function(c,d){switch(typeof a[d]){case"undefined":a[d]=b[d];break;case"object":g.isArray(a[d])&&g.isArray(b[d])?a[d]=a[d].concat(b[d]):g.isPlainObject(a[d])&&g.isPlainObject(b[d])&&i.deepMerge(a[d],b[d])}}),a},g.each(["String","Object","PlainObject","Array","Finite","Function","RegExp"],function(a){var b=g["is"+a];i["isArrayOf"+a+"s"]=function(a){return g.isArray(a)&&g.every(a.slice(0,10),b)}}),i.ucfirst=function(a){return a[0].toUpperCase()+a.substring(1).toLowerCase()},i.studlyCase=c(!0,!0,""),i.camelCase=c(!1,!0,""),i.snakeCase=c(!1,!1,"_"),i.toLowerString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toLowerCase()},i.toUpperString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toUpperCase()},i.isNumeric=function(a){return"object"!=typeof a&&a-parseFloat(a)>=0};var j=/^(\d+(?:\.\d+)?)([Mwdhmsy])$/;i.isInterval=function(a){return!(!a.match||!a.match(j))},i.repeat=function(a,b){return new Array(b+1).join(a)},i.applyArgs=function(a,b,c,d){switch(d=d||0,c.length-d){case 0:return a.call(b);case 1:return a.call(b,c[0+d]);case 2:return a.call(b,c[0+d],c[1+d]);case 3:return a.call(b,c[0+d],c[1+d],c[2+d]);case 4:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d]);case 5:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d],c[4+d]);default:return a.apply(b,Array.prototype.slice.call(c,d))}},g.nextTick=function(a){d.nextTick(g.bindKey(g,"applyArgs",a,null,arguments,1))},g.handler=function(a){return a._provideBound=!0,a},g.scheduled=g.handler,g.makeBoundMethods=function(a){a.bound={};for(var b in a)"function"==typeof a[b]&&a[b]._provideBound===!0&&(a.bound[b]=g.bind(a[b],a))},g.noop=function(){},g.funcEnum=function(a,b,c,d){var e=a[b];switch(typeof e){case"undefined":return c[d];case"function":return e;case"string":if(c.hasOwnProperty(e))return c[e];default:var f="Invalid "+b+' "'+e+'", expected a function';switch(g.size(c)){case 0:break;case 1:f+=" or "+g.keys(c)[0];break;default:f+=" or one of "+g.keys(c).join(", ")}throw new TypeError(f)}},g.createArray=function(a,b){b="function"==typeof b?b:g.identity;var c,d,e=[];for(g.isArray(a)||(a=[a]),d=0;d/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.clearScroll=c({url:{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.nodeHotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.cluster.prototype.nodeInfo=c({params:{all:{type:"boolean"},clear:{type:"boolean"},http:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},plugin:{type:"boolean"},process:{type:"boolean"},settings:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},timeout:{type:"time"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes"}]}),d.cluster.prototype.nodeShutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.cluster.prototype.nodeStats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},fields:{type:"list"},fs:{type:"boolean"},http:{type:"boolean"},indices:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},process:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{filterBlocks:{type:"boolean",name:"filter_blocks"},filterIndexTemplates:{type:"boolean",name:"filter_index_templates"},filterIndices:{type:"list",name:"filter_indices"},filterMetadata:{type:"boolean",name:"filter_metadata"},filterNodes:{type:"boolean",name:"filter_nodes"},filterRoutingTable:{type:"boolean",name:"filter_routing_table"},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/state"}}),d.count=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>",req:{index:{type:"list"}}},{fmt:"/"}],method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}],method:"DELETE"}),d.indices.prototype.exists=c({url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},refresh:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mapping/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({urls:[{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},refresh:{type:"boolean"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"string"}}},{fmt:"/_alias"}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},completion:{type:"boolean"},completionFields:{type:"list",name:"completion_fields"},docs:{type:"boolean"},fielddata:{type:"boolean"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},filterCache:{type:"boolean",name:"filter_cache"},flush:{type:"boolean"},get:{type:"boolean"},groups:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indexing:{type:"boolean"},merge:{type:"boolean"},refresh:{type:"boolean"},search:{type:"boolean"},store:{type:"boolean"},warmer:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLen:{type:"number",name:"max_word_len"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLen:{type:"number",name:"min_word_len"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.percolate=c({params:{preferLocal:{type:"boolean",name:"prefer_local"}},url:{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}},needBody:!0,method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.suggest=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":195}],191:[function(a,b){var c=a("../client_action"),d=b.exports={};d._namespaces=["cat","cluster","indices","nodes","snapshot"],d.bulk=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},type:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.cat=function(a){this.transport=a},d.cat.prototype.aliases=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_cat/aliases"}]}),d.cat.prototype.allocation=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/allocation/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cat/allocation"}]}),d.cat.prototype.count=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/count/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/count"}]}),d.cat.prototype.health=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},ts:{type:"boolean","default":!0},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/health"}}),d.cat.prototype.help=c({params:{help:{type:"boolean","default":!1}},url:{fmt:"/_cat"}}),d.cat.prototype.indices=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},pri:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/indices/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/indices"}]}),d.cat.prototype.master=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/master"}}),d.cat.prototype.nodes=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/nodes"}}),d.cat.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/pending_tasks"}}),d.cat.prototype.recovery=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/recovery/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/recovery"}]}),d.cat.prototype.shards=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/shards/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/shards"}]}),d.cat.prototype.threadPool=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1},fullId:{type:"boolean","default":!1,name:"full_id"}},url:{fmt:"/_cat/thread_pool"}}),d.clearScroll=c({urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},{fmt:"/_search/scroll"}],method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},indexTemplates:{type:"list",name:"index_templates"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/_cluster/state/<%=metric%>/<%=index%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]},index:{type:"list"}}},{fmt:"/_cluster/state/<%=metric%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]}}},{fmt:"/_cluster/state"}]}),d.cluster.prototype.stats=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_cluster/stats/nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cluster/stats"}]}),d.count=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d.countPercolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a +},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},name:{type:"list"}},url:{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.exists=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsTemplate=c({params:{local:{type:"boolean"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}},{fmt:"/_alias"}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_aliases/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/<%=type%>/field/<%=field%>",req:{type:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_settings/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_warmer"}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"closed",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},force:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"indices",options:["cluster","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/<%=index%>/_stats/<%=metric%>",req:{index:{type:"list"},metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_stats/<%=metric%>",req:{metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLength:{type:"number",name:"max_word_length"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLength:{type:"number",name:"min_word_length"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.mpercolate=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mpercolate",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mpercolate",req:{index:{type:"string"}}},{fmt:"/_mpercolate"}],needBody:!0,bulkBody:!0,method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.mtermvectors=c({params:{ids:{type:"list",required:!1},termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},urls:[{fmt:"/<%=index%>/<%=type%>/_mtermvectors",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mtermvectors",req:{index:{type:"string"}}},{fmt:"/_mtermvectors"}],method:"POST"}),d.nodes=function(a){this.transport=a},d.nodes.prototype.hotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.nodes.prototype.info=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_nodes/<%=nodeId%>/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/<%=metric%>",req:{metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes"}]}),d.nodes.prototype.shutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.nodes.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"node",options:["node","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats/<%=metric%>/<%=indexMetric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats/<%=metric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats"}]}),d.percolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.searchShards=c({params:{preference:{type:"string"},routing:{type:"string"},local:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search_shards",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_search_shards",req:{index:{type:"string"}}},{fmt:"/_search_shards"}],method:"POST"}),d.snapshot=function(a){this.transport=a},d.snapshot.prototype.create=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.createRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"string"}}},needBody:!0,method:"POST"}),d.snapshot.prototype["delete"]=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"DELETE"}),d.snapshot.prototype.deleteRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},method:"DELETE"}),d.snapshot.prototype.get=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"list"}}}}),d.snapshot.prototype.getRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},local:{type:"boolean"}},urls:[{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},{fmt:"/_snapshot"}]}),d.snapshot.prototype.restore=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_restore",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.suggest=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],needBody:!0,method:"POST"}),d.termvector=c({params:{termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_termvector",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":195}],192:[function(a,b){var c=a("../client_action"),d=b.exports={};d._namespaces=["cat","cluster","indices","nodes","snapshot"],d.bulk=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},type:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.cat=function(a){this.transport=a},d.cat.prototype.aliases=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_cat/aliases"}]}),d.cat.prototype.allocation=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/allocation/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cat/allocation"}]}),d.cat.prototype.count=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/count/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/count"}]}),d.cat.prototype.health=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},ts:{type:"boolean","default":!0},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/health"}}),d.cat.prototype.help=c({params:{help:{type:"boolean","default":!1}},url:{fmt:"/_cat"}}),d.cat.prototype.indices=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},pri:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/indices/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/indices"}]}),d.cat.prototype.master=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/master"}}),d.cat.prototype.nodes=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/nodes"}}),d.cat.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/pending_tasks"}}),d.cat.prototype.plugins=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/plugins"}}),d.cat.prototype.recovery=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/recovery/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/recovery"}]}),d.cat.prototype.shards=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/shards/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/shards"}]}),d.cat.prototype.threadPool=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1},fullId:{type:"boolean","default":!1,name:"full_id"}},url:{fmt:"/_cat/thread_pool"}}),d.clearScroll=c({urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},{fmt:"/_search/scroll"}],method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},explain:{type:"boolean"},filterMetadata:{type:"boolean",name:"filter_metadata"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},indexTemplates:{type:"list",name:"index_templates"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/_cluster/state/<%=metric%>/<%=index%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]},index:{type:"list"}}},{fmt:"/_cluster/state/<%=metric%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]}}},{fmt:"/_cluster/state"}]}),d.cluster.prototype.stats=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_cluster/stats/nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cluster/stats"}]}),d.count=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d.countPercolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a +},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},name:{type:"list"}},url:{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.exists=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsTemplate=c({params:{local:{type:"boolean"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}},{fmt:"/_alias"}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_aliases/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/<%=type%>/field/<%=field%>",req:{type:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_settings/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_warmer"}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"closed",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},waitForMerge:{type:"boolean",name:"wait_for_merge"},force:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.recovery=c({params:{detailed:{type:"boolean","default":!1},activeOnly:{type:"boolean","default":!1,name:"active_only"},human:{type:"boolean","default":!1}},urls:[{fmt:"/<%=index%>/_recovery",req:{index:{type:"list"}}},{fmt:"/_recovery"}]}),d.indices.prototype.refresh=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},force:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"indices",options:["cluster","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/<%=index%>/_stats/<%=metric%>",req:{index:{type:"list"},metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_stats/<%=metric%>",req:{metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLength:{type:"number",name:"max_word_length"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLength:{type:"number",name:"min_word_length"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.mpercolate=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mpercolate",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mpercolate",req:{index:{type:"string"}}},{fmt:"/_mpercolate"}],needBody:!0,bulkBody:!0,method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.mtermvectors=c({params:{ids:{type:"list",required:!1},termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},urls:[{fmt:"/<%=index%>/<%=type%>/_mtermvectors",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mtermvectors",req:{index:{type:"string"}}},{fmt:"/_mtermvectors"}],method:"POST"}),d.nodes=function(a){this.transport=a},d.nodes.prototype.hotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.nodes.prototype.info=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_nodes/<%=nodeId%>/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugins"]}}},{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/<%=metric%>",req:{metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugins"]}}},{fmt:"/_nodes"}]}),d.nodes.prototype.shutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.nodes.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"node",options:["node","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats/<%=metric%>/<%=indexMetric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats/<%=metric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats"}]}),d.percolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.searchTemplate=c({urls:[{fmt:"/<%=index%>/<%=type%>/_search/template",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search/template",req:{index:{type:"list"}}},{fmt:"/_search/template"}],method:"POST"}),d.searchShards=c({params:{preference:{type:"string"},routing:{type:"string"},local:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search_shards",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_search_shards",req:{index:{type:"string"}}},{fmt:"/_search_shards"}],method:"POST"}),d.snapshot=function(a){this.transport=a},d.snapshot.prototype.create=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.createRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"string"}}},needBody:!0,method:"POST"}),d.snapshot.prototype["delete"]=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"DELETE"}),d.snapshot.prototype.deleteRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},method:"DELETE"}),d.snapshot.prototype.get=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"list"}}}}),d.snapshot.prototype.getRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},local:{type:"boolean"}},urls:[{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},{fmt:"/_snapshot"}]}),d.snapshot.prototype.restore=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_restore",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.status=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_status",req:{repository:{type:"string"},snapshot:{type:"list"}}},{fmt:"/_snapshot/<%=repository%>/_status",req:{repository:{type:"string"}}},{fmt:"/_snapshot/_status"}]}),d.suggest=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],needBody:!0,method:"POST"}),d.termvector=c({params:{termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_termvector",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":195}],193:[function(a,b){b.exports={1.1:a("./1_1"),"1.0":a("./1_0"),"0.90":a("./0_90")}},{"./0_90":190,"./1_0":191,"./1_1":192}],194:[function(a,b){function c(a){function b(){a.hasOwnProperty("log")||(a.log="warning"),a.hosts||a.host||(a.host="http://localhost:9200"),this.close=function(){this.transport.close()},this.transport=new d(a);for(var b=0;b1?"one of "+a.options.join(","):a.options[0]))},duration:function(a,b,c){if(f.isNumeric(b)||f.isInterval(b))return b;throw new TypeError("Invalid "+c+": expected a number or interval (an integer followed by one of Mwdhmsy).")},list:function(a,b,c){switch(typeof b){case"number":case"string":case"boolean":return""+b;case"object":if(f.isArray(b))return b.join(",");default:throw new TypeError("Invalid "+c+": expected be a comma seperated list, array, number or string.")}},"boolean":function(a,b){return b=f.isString(b)?b.toLowerCase():b,"no"===b||"off"===b?!1:!!b},number:function(a,b,c){if(f.isNumeric(b))return 1*b;throw new TypeError("Invalid "+c+": expected a number.")},string:function(a,b,c){switch(typeof b){case"number":case"string":return""+b;default:throw new TypeError("Invalid "+c+": expected a string.")}},time:function(a,b,c){if("string"==typeof b)return b;if(f.isNumeric(b))return""+b;if(b instanceof Date)return""+b.getTime();throw new TypeError("Invalid "+c+": expected some sort of time.")}};c.resolveUrl=d,c.proxy=function(a,b){return function(c,d){return"function"==typeof c?(d=c,c={}):(c=c||{},d="function"==typeof d?d:null),b.transform&&b.transform(c),a.call(this,c,d)}}},{"./utils":213}],196:[function(a,b){function c(a,b){if(b=b||{},e.call(this),this.requestTimeout=b.hasOwnProperty("requestTimeout")?b.requestTimeout:3e4,this.log=b.log||new f,!a)throw new TypeError("Missing host"); +if(!(a instanceof g))throw new TypeError("Invalid host");this.host=a,d.makeBoundMethods(this)}b.exports=c;var d=a("./utils"),e=a("events").EventEmitter,f=a("./log"),g=a("./host"),h=a("./errors");d.inherits(c,e),c.prototype.request=function(){throw new Error("Connection#request must be overwritten by the Connector")},c.prototype.ping=function(a,b){"function"==typeof a?(b=a,a=null):b="function"==typeof b?b:null;var c,e,f,g=100;a&&a.hasOwnProperty("requestTimeout")&&(g=a.requestTimeout),f=this.request(d.defaults(a||{},{path:"/",method:"HEAD"}),function(a){e||(clearTimeout(c),b&&b(a))}),g&&(c=setTimeout(function(){f&&f(),e=!0,b&&b(new h.RequestTimeout("Ping Timeout after "+g+"ms"))},g))},c.prototype.setStatus=function(a){var b=this.status;this.status=a,this.emit("status set",a,b,this),"closed"===a&&this.removeAllListeners()}},{"./errors":200,"./host":201,"./log":202,"./utils":213,events:4}],197:[function(a,b){function c(a){a=a||{},e.makeBoundMethods(this),a.log?this.log=a.log:(this.log=new f,a.log=this.log),this._config=a,this.selector=e.funcEnum(a,"selector",c.selectors,c.defaultSelector),this.Connection=e.funcEnum(a,"connectionClass",c.connectionClasses,c.defaultConnectionClass),this.deadTimeout=a.hasOwnProperty("deadTimeout")?a.deadTimeout:6e4,this.maxDeadTimeout=a.hasOwnProperty("maxDeadTimeout")?a.maxDeadTimeout:18e5,this.calcDeadTimeout=e.funcEnum(a,"calcDeadTimeout",c.calcDeadTimeoutOptions,"exponential"),this.index={},this._conns={alive:[],dead:[]},this._timeouts=[]}var d=a("__browserify_process");b.exports=c;var e=a("./utils"),f=a("./log");c.selectors=a("./selectors"),c.defaultSelector="roundRobin",c.connectionClasses=a("./connectors"),c.defaultConnectionClass=c.connectionClasses._default,delete c.connectionClasses._default,c.calcDeadTimeoutOptions={flat:function(a,b){return b},exponential:function(a,b){return Math.min(2*b*Math.pow(2,.5*a-1),this.maxDeadTimeout)}},c.prototype.select=function(a){if(this._conns.alive.length)if(this.selector.length>1)this.selector(this._conns.alive,a);else try{e.nextTick(a,void 0,this.selector(this._conns.alive))}catch(b){a(b)}else this._timeouts.length?this._selectDeadConnection(a):e.nextTick(a,void 0)},c.prototype.onStatusSet=e.handler(function(a,b,c){var d,f="dead"===a,g=f&&"dead"===b,h=!f&&"dead"===b,i=b===a,j=this._conns[b],k=this._conns[a];return i&&!f?!0:(j!==k&&(e.isArray(j)&&(d=j.indexOf(c),-1!==d&&j.splice(d,1)),e.isArray(k)&&(d=k.indexOf(c),-1===d&&k.push(c))),f&&this._onConnectionDied(c,g),void(h&&this._onConnectionRevived(c)))}),c.prototype._onConnectionRevived=function(a){for(var b,c=0;c=0)return c.levels.slice(0,b+1);case"object":if(e.isArray(a)){var d=e.intersection(a,c.levels);if(d.length===a.length)return d}default:throw new TypeError("invalid logging level "+a+". Expected zero or more of these options: "+c.levels.join(", "))}},c.join=function(a){return e.map(a,function(a){return e.isPlainObject(a)?e.inspect(a)+"\n":a.toString()}).join(" ")},c.prototype.addOutput=function(a){a=a||{},a.levels=c.parseLevels(a.levels||a.level||"warning"),delete a.level;var b=e.funcEnum(a,"type",c.loggers,d.browser?"console":"stdio");return new b(this,a)},c.prototype.error=function(a){return this.listenerCount("error")?this.emit("error",a instanceof Error?a:new Error(a)):void 0},c.prototype.warning=function(){return this.listenerCount("warning")?this.emit("warning",c.join(arguments)):void 0},c.prototype.info=function(){return this.listenerCount("info")?this.emit("info",c.join(arguments)):void 0},c.prototype.debug=function(){return this.listenerCount("debug")?this.emit("debug",c.join(arguments)):void 0},c.prototype.trace=function(a,b,d,e,f){return this.listenerCount("trace")?this.emit("trace",c.normalizeTraceArgs(a,b,d,e,f)):void 0},c.normalizeTraceArgs=function(a,b,c,d,g){return"string"==typeof b?b=f.parse(b,!0,!0):(b=e.clone(b),b.path&&(b.query=f.parse(b.path,!0,!1).query),!b.pathname&&b.path&&(b.pathname=b.path.split("?").shift())),delete b.auth,{method:a,url:f.format(b),body:c,status:g,response:d}},b.exports=c},{"./loggers":204,"./utils":213,__browserify_process:13,events:4,url:7}],203:[function(a,b){function c(a,b){this.log=a,this.listeningLevels=[],f.makeBoundMethods(this),this.log.once("closing",this.bound.cleanUpListeners),this.setupListeners(b.levels)}function d(a){return 10>a?"0"+a.toString(10):a.toString(10)}function e(a,b){var c=f.repeat(" ",b||2);return(a||"").split(/\r?\n/).map(function(a){return c+a}).join("\n")}var f=a("./utils");c.prototype.timestamp=function(){var a=new Date;return a.getUTCFullYear()+"-"+d(a.getUTCMonth()+1)+"-"+d(a.getUTCDate())+"T"+d(a.getUTCHours())+":"+d(a.getUTCMinutes())+":"+d(a.getUTCSeconds())+"Z"},c.prototype.format=function(a,b){return a+": "+this.timestamp()+"\n"+e(b)+"\n\n"},c.prototype.write=function(){throw new Error("This should be overwritten by the logger")},c.prototype.setupListeners=function(a){this.cleanUpListeners(),this.listeningLevels=[],f.each(a,function(a){var b="on"+f.ucfirst(a);if(!this.bound[b])throw new Error('Unable to listen for level "'+a+'"');this.listeningLevels.push(a),this.log.on(a,this.bound[b])},this)},c.prototype.cleanUpListeners=f.handler(function(){f.each(this.listeningLevels,function(a){this.log.removeListener(a,this.bound["on"+f.ucfirst(a)])},this)}),c.prototype.onError=f.handler(function(a){this.write("Error"===a.name?"ERROR":a.name,a.stack)}),c.prototype.onWarning=f.handler(function(a){this.write("WARNING",a)}),c.prototype.onInfo=f.handler(function(a){this.write("INFO",a)}),c.prototype.onDebug=f.handler(function(a){this.write("DEBUG",a)}),c.prototype.onTrace=f.handler(function(a){this.write("TRACE",this._formatTraceMessage(a))}),c.prototype._formatTraceMessage=function(a){return"-> "+a.method+" "+a.url+"\n"+this._prettyJson(a.body)+"\n<- "+a.status+"\n"+this._prettyJson(a.response)},c.prototype._prettyJson=function(a){try{return"string"==typeof a&&(a=JSON.parse(a)),JSON.stringify(a,null," ").replace(/'/g,"\\u0027")}catch(b){return"string"==typeof a?a:""}},b.exports=c},{"./utils":213}],204:[function(a,b){b.exports={console:a("./console")}},{"./console":205}],205:[function(a,b){function c(a,b){d.call(this,a,b),this.color=e.has(b,"color")?!!b.color:!0}b.exports=c;var d=a("../logger"),e=a("../utils");e.inherits(c,d),c.prototype.setupListeners=function(a){d.prototype.setupListeners.call(this,a)},c.prototype.write=function(a,b,c){console[c]&&console[c](this.format(a,b))},c.prototype.onError=e.handler(function(a){var b=console.error?"error":"log";this.write("Error"===a.name?"ERROR":a.name,a.stack||a.message,b)}),c.prototype.onWarning=e.handler(function(a){this.write("WARNING",a,console.warn?"warn":"log")}),c.prototype.onInfo=e.handler(function(a){this.write("INFO",a,console.info?"info":"log")}),c.prototype.onDebug=e.handler(function(a){this.write("DEBUG",a,console.debug?"debug":"log")}),c.prototype.onTrace=e.handler(function(a){this.write("TRACE",this._formatTraceMessage(a),"log")})},{"../logger":203,"../utils":213}],206:[function(a,b){function c(a){return function(b){return d.transform(b,function(b,c,d){if(c[a]){var f=e.exec(c[a]);if(!f)throw new Error("node's "+a+" property ("+JSON.stringify(c[a])+") does not match the expected pattern "+e+".");b.push({host:f[1],port:parseInt(f[2],10),_meta:{id:d,name:c.name,hostname:c.hostname,version:c.version}})}},[])}}var d=a("./utils"),e=/\[\/*([^:]+):(\d+)\]/;b.exports=c("http_address"),b.exports.thrift=c("transport_address")},{"./utils":213}],207:[function(a,b){b.exports={random:a("./random"),roundRobin:a("./round_robin")}},{"./random":208,"./round_robin":209}],208:[function(a,b){b.exports=function(a){return a[Math.floor(Math.random()*a.length)]}},{}],209:[function(a,b){b.exports=function(a){var b=a[0];return a.push(a.shift()),b}},{}],210:[function(a,b){function c(){}b.exports=c;var d=a("../utils");c.prototype.serialize=function(a,b,c){switch(typeof a){case"string":return a;case"object":if(a)return JSON.stringify(a,b,c);default:return}},c.prototype.deserialize=function(a){if("string"==typeof a)try{return JSON.parse(a)}catch(b){}},c.prototype.bulkBody=function(a){var b,c="";if(d.isArray(a))for(b=0;bg||g>=300)||a.ignore&&d.contains(a.ignore,g)||(c=e[g]?new e[g](i&&i.error):new e.Generic("unknown error")),a.castExists&&(c&&c instanceof e.NotFound?(i=!1,c=void 0):i=!c),"function"==typeof b?c?b(c,i,g):b(void 0,i,g):c?(c.body=i,c.status=g,m.reject(c)):m.resolve(i)}}function h(){q||(q=!0,o=0,n._timeout(k),"function"==typeof j&&j())}var i,j,k,l,m,n=this,o=this.maxRetries,p=this.requestTimeout,q=!1;return n.log.debug("starting request",a),a.body&&"GET"===a.method?void d.nextTick(g,new TypeError('Body can not be sent with method "GET"')):(a.body&&(a.body=n.serializer[a.bulkBody?"bulkBody":"serialize"](a.body)),a.hasOwnProperty("maxRetries")&&(o=a.maxRetries),a.hasOwnProperty("requestTimeout")&&(p=a.requestTimeout),a.req={method:a.method,path:a.path||"/",query:a.query,body:a.body},p&&1/0!==p&&(k=this._timeout(function(){g(new e.RequestTimeout("Request Timeout after "+p+"ms")),h()},p)),"function"==typeof b?l={abort:h}:(m=this.defer(),l=m.promise,l.abort=h),i?c(void 0,i):n.connectionPool.select(c),l)},c.prototype._timeout=function(a,b){this._timers=this._timers||[];var c;if("function"!=typeof a&&(c=a,a=void 0),a)return c=setTimeout(a,b),this._timers.push(c),c;if(c){clearTimeout(c);var d=this._timers.indexOf(c);-1!==d&&this._timers.splice(d,1)}},c.prototype.sniff=function(a){var b=this.connectionPool,c=this.nodesToHostCallback,e=this.log;a="function"==typeof a?a:d.noop,this.request({path:this.sniffEndpoint,method:"GET"},function(g,h,i){if(!g&&h&&h.nodes){var j;try{j=c(h.nodes)}catch(k){return void e.error(new Error("Unable to convert node list from "+this.sniffEndpoint+" to hosts durring sniff. Encountered error:\n"+(k.stack||k.message)))}b.setHosts(d.map(j,function(a){return new f(a)}))}a(g,h,i)})},c.prototype.close=function(){this.log.close(),d.each(this._timers,clearTimeout),this.connectionPool.close()}},{"./connection_pool":197,"./errors":200,"./host":201,"./log":202,"./nodes_to_host":206,"./serializers/json":210,"./transport/sniff_on_connection_fault":212,"./utils":213,bluebird:1}],212:[function(a,b){var c=a("../utils");b.exports=function(a){var b=0,d=a.connectionPool,e=d._onConnectionDied,f=function(){f.timerId=a._timeout(f.timerId),a.sniff()},g=function(a){var b=c.now();return function(){return b-a}};d._onConnectionDied=function(c,h){var i=e.call(d,c,h);b=f.timerId?b+1:0;var j=d.calcDeadTimeout(b,1e3);return f.timerId&&j=97&&122>=e||e>=48&&57>=e,g=e>=65&&90>=e,(g||!h)&&(k.length&&j.push(k),k=""),(g||h)&&(h&&k.length?k+=f:k=!j.length&&a||j.length&&b?f.toUpperCase():f.toLowerCase());return k.length&&j.push(k),j.length&&"_"===d.charAt(0)&&(j[0]="_"+j[0]),j.join(c)}}var d=a("__browserify_process"),e=a("__browserify_Buffer").Buffer,f=a("path"),g=a("lodash-node/modern"),h=a("util"),i=g.extend({},g,h);g=i,i.joinPath=f.join,i.deepMerge=function(a,b){return g.each(b,function(c,d){switch(typeof a[d]){case"undefined":a[d]=b[d];break;case"object":g.isArray(a[d])&&g.isArray(b[d])?a[d]=a[d].concat(b[d]):g.isPlainObject(a[d])&&g.isPlainObject(b[d])&&i.deepMerge(a[d],b[d])}}),a},g.each(["String","Object","PlainObject","Array","Finite","Function","RegExp"],function(a){var b=g["is"+a];i["isArrayOf"+a+"s"]=function(a){return g.isArray(a)&&g.every(a.slice(0,10),b)}}),i.ucfirst=function(a){return a[0].toUpperCase()+a.substring(1).toLowerCase()},i.studlyCase=c(!0,!0,""),i.camelCase=c(!1,!0,""),i.snakeCase=c(!1,!1,"_"),i.toLowerString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toLowerCase()},i.toUpperString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toUpperCase()},i.isNumeric=function(a){return"object"!=typeof a&&a-parseFloat(a)>=0};var j=/^(\d+(?:\.\d+)?)([Mwdhmsy])$/;i.isInterval=function(a){return!(!a.match||!a.match(j))},i.repeat=function(a,b){return new Array(b+1).join(a)},i.applyArgs=function(a,b,c,d){switch(d=d||0,c.length-d){case 0:return a.call(b);case 1:return a.call(b,c[0+d]);case 2:return a.call(b,c[0+d],c[1+d]);case 3:return a.call(b,c[0+d],c[1+d],c[2+d]);case 4:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d]);case 5:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d],c[4+d]);default:return a.apply(b,Array.prototype.slice.call(c,d))}},g.nextTick=function(a){d.nextTick(g.bindKey(g,"applyArgs",a,null,arguments,1))},g.handler=function(a){return a._provideBound=!0,a},g.scheduled=g.handler,g.makeBoundMethods=function(a){a.bound={};for(var b in a)"function"==typeof a[b]&&a[b]._provideBound===!0&&(a.bound[b]=g.bind(a[b],a))},g.noop=function(){},g.funcEnum=function(a,b,c,d){var e=a[b];switch(typeof e){case"undefined":return c[d];case"function":return e;case"string":if(c.hasOwnProperty(e))return c[e];default:var f="Invalid "+b+' "'+e+'", expected a function';switch(g.size(c)){case 0:break;case 1:f+=" or "+g.keys(c)[0];break;default:f+=" or one of "+g.keys(c).join(", ")}throw new TypeError(f)}},g.createArray=function(a,b){b="function"==typeof b?b:g.identity;var c,d,e=[];for(g.isArray(a)||(a=[a]),d=0;d', - req: { - scrollId: { - type: 'list' + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'list' + } } + }, + { + fmt: '/_search/scroll' } - }, + ], method: 'DELETE' }); @@ -22282,7 +22287,7 @@ api.indices.prototype.segments = ca({ }); /** - * Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-gateway-snapshot.html) request + * Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-gateway-snapshot.html) request * * @param {Object} params - An object with parameters used to carry out this action * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -23698,6 +23703,75 @@ api.search = ca({ method: 'POST' }); +/** + * Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search_shards', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + api.snapshot = function SnapshotNS(transport) { this.transport = transport; }; @@ -24180,14 +24254,5417 @@ api.create = ca.proxy(api.index, { params.op_type = 'create'; } }); -},{"../client_action":195}],193:[function(require,module,exports){ -module.exports = { - '1.0': require('./1_0'), - '0.90': require('./0_90'), - _default: '0.90' +},{"../client_action":196}],193:[function(require,module,exports){ +/* jshint maxlen: false */ + +var ca = require('../client_action'); +var api = module.exports = {}; + +api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot']; + +/** + * Perform a [bulk](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-bulk.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Explicitely set the replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String} params.type - Default document type for items which don't provide one + * @param {String} params.index - Default index for items which don't provide one + */ +api.bulk = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + type: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_bulk', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_bulk', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_bulk' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +api.cat = function CatNS(transport) { + this.transport = transport; }; -},{"./0_90":191,"./1_0":192}],194:[function(require,module,exports){ +/** + * Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to return + */ +api.cat.prototype.aliases = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/aliases/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_cat/aliases' + } + ] +}); + +/** + * Perform a [cat.allocation](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-allocation.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.bytes - The unit in which to display byte values + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information + */ +api.cat.prototype.allocation = ca({ + params: { + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/allocation/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_cat/allocation' + } + ] +}); + +/** + * Perform a [cat.count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-count.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.count = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/count/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/count' + } + ] +}); + +/** + * Perform a [cat.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-health.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} [params.ts=true] - Set to false to disable timestamping + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.health = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + ts: { + type: 'boolean', + 'default': true + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/health' + } +}); + +/** + * Perform a [cat.help](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.help - Return help information + */ +api.cat.prototype.help = ca({ + params: { + help: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat' + } +}); + +/** + * Perform a [cat.indices](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-indices.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.bytes - The unit in which to display byte values + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.pri - Set to true to return stats only for primary shards + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.indices = ca({ + params: { + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + pri: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/indices/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/indices' + } + ] +}); + +/** + * Perform a [cat.master](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-master.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.master = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/master' + } +}); + +/** + * Perform a [cat.nodes](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-nodes.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.nodes = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/nodes' + } +}); + +/** + * Perform a [cat.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-pending-tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.pendingTasks = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/pending_tasks' + } +}); + +/** + * Perform a [cat.plugins](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-plugins.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.plugins = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/plugins' + } +}); + +/** + * Perform a [cat.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-recovery.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.bytes - The unit in which to display byte values + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.recovery = ca({ + params: { + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/recovery/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/recovery' + } + ] +}); + +/** + * Perform a [cat.shards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.shards = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/shards/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/shards' + } + ] +}); + +/** + * Perform a [cat.threadPool](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-thread-pool.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} params.fullId - Enables displaying the complete node ids + */ +api.cat.prototype.threadPool = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + }, + fullId: { + type: 'boolean', + 'default': false, + name: 'full_id' + } + }, + url: { + fmt: '/_cat/thread_pool' + } +}); + +/** + * Perform a [clearScroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.scrollId - A comma-separated list of scroll IDs to clear + */ +api.clearScroll = ca({ + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'list' + } + } + }, + { + fmt: '/_search/scroll' + } + ], + method: 'DELETE' +}); + +api.cluster = function ClusterNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + */ +api.cluster.prototype.getSettings = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_cluster/settings' + } +}); + +/** + * Perform a [cluster.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-health.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} [params.level=cluster] - Specify the level of detail for returned information + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Number} params.waitForActiveShards - Wait until the specified number of shards is active + * @param {String} params.waitForNodes - Wait until the specified number of nodes is available + * @param {Number} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished + * @param {String} params.waitForStatus - Wait until cluster is in a specific state + * @param {String} params.index - Limit the information returned to a specific index + */ +api.cluster.prototype.health = ca({ + params: { + level: { + type: 'enum', + 'default': 'cluster', + options: [ + 'cluster', + 'indices', + 'shards' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + waitForActiveShards: { + type: 'number', + name: 'wait_for_active_shards' + }, + waitForNodes: { + type: 'string', + name: 'wait_for_nodes' + }, + waitForRelocatingShards: { + type: 'number', + name: 'wait_for_relocating_shards' + }, + waitForStatus: { + type: 'enum', + 'default': null, + options: [ + 'green', + 'yellow', + 'red' + ], + name: 'wait_for_status' + } + }, + urls: [ + { + fmt: '/_cluster/health/<%=index%>', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_cluster/health' + } + ] +}); + +/** + * Perform a [cluster.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-pending.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + */ +api.cluster.prototype.pendingTasks = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_cluster/pending_tasks' + } +}); + +/** + * Perform a [cluster.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + */ +api.cluster.prototype.putSettings = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + url: { + fmt: '/_cluster/settings' + }, + method: 'PUT' +}); + +/** + * Perform a [cluster.reroute](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-reroute.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.dryRun - Simulate the operation only and return the resulting state + * @param {Boolean} params.explain - Return an explanation of why the commands can or cannot be executed + * @param {Boolean} params.filterMetadata - Don't return cluster state metadata (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + */ +api.cluster.prototype.reroute = ca({ + params: { + dryRun: { + type: 'boolean', + name: 'dry_run' + }, + explain: { + type: 'boolean' + }, + filterMetadata: { + type: 'boolean', + name: 'filter_metadata' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_cluster/reroute' + }, + method: 'POST' +}); + +/** + * Perform a [cluster.state](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-state.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.indexTemplates - A comma separated list to return specific index templates when returning metadata + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.metric - Limit the information returned to the specified metrics + */ +api.cluster.prototype.state = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + indexTemplates: { + type: 'list', + name: 'index_templates' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + urls: [ + { + fmt: '/_cluster/state/<%=metric%>/<%=index%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'master_node', + 'version' + ] + }, + index: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/state/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'master_node', + 'version' + ] + } + } + }, + { + fmt: '/_cluster/state' + } + ] +}); + +/** + * Perform a [cluster.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.cluster.prototype.stats = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + human: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cluster/stats/nodes/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/stats' + } + ] +}); + +/** + * Perform a [count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-count.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Number} params.minScore - Include only documents with a specific `_score` value in the result + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the results + * @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the results + */ +api.count = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + minScore: { + type: 'number', + name: 'min_score' + }, + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_count', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_count', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_count' + } + ], + method: 'POST' +}); + +/** + * Perform a [countPercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.percolateIndex - The index to count percolate the document into. Defaults to index. + * @param {String} params.percolateType - The type to count percolate document into. Defaults to type. + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.index - The index of the document being count percolated. + * @param {String} params.type - The type of the document being count percolated. + * @param {String} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster. + */ +api.countPercolate = ca({ + params: { + routing: { + type: 'list' + }, + preference: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + percolateIndex: { + type: 'string', + name: 'percolate_index' + }, + percolateType: { + type: 'string', + name: 'percolate_type' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>/_percolate/count', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-delete.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Specific write consistency setting for the operation + * @param {String} params.parent - ID of parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api['delete'] = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + parent: { + type: 'string' + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [deleteByQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-delete-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.analyzer - The analyzer to use for the query string + * @param {String} params.consistency - Specific write consistency setting for the operation + * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {String} params.df - The field to use as default where no field prefix is given in the query string + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the operation + */ +api.deleteByQuery = ca({ + params: { + analyzer: { + type: 'string' + }, + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + q: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + }, + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_query', + req: { + index: { + type: 'list' + } + } + } + ], + method: 'DELETE' +}); + +/** + * Perform a [exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.exists = ca({ + params: { + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [explain](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-explain.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) + * @param {String} params.analyzer - The analyzer for the query string query + * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {String} params.df - The default field for query string query (default: _all) + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.explain = ca({ + params: { + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + analyzer: { + type: 'string' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + fields: { + type: 'list' + }, + lenient: { + type: 'boolean' + }, + lowercaseExpandedTerms: { + type: 'boolean', + name: 'lowercase_expanded_terms' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.get = ca({ + params: { + fields: { + type: 'list' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [getSource](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types + */ +api.getSource = ca({ + params: { + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_source', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [index](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} params.parent - ID of the parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.timestamp - Explicit timestamp for the document + * @param {Duration} params.ttl - Expiration time for the document + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - Document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.index = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + opType: { + type: 'enum', + 'default': 'index', + options: [ + 'index', + 'create' + ], + name: 'op_type' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + timestamp: { + type: 'time' + }, + ttl: { + type: 'duration' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'POST' +}); + +api.indices = function IndicesNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-analyze.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.analyzer - The name of the analyzer to use + * @param {String} params.field - Use the analyzer configured for this field (instead of passing the analyzer name) + * @param {String, String[], Boolean} params.filters - A comma-separated list of filters to use for the analysis + * @param {String} params.index - The name of the index to scope the operation + * @param {Boolean} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true) + * @param {String} params.text - The text on which the analysis should be performed (when request body is not used) + * @param {String} params.tokenizer - The name of the tokenizer to use for the analysis + * @param {String} [params.format=detailed] - Format of the output + */ +api.indices.prototype.analyze = ca({ + params: { + analyzer: { + type: 'string' + }, + field: { + type: 'string' + }, + filters: { + type: 'list' + }, + index: { + type: 'string' + }, + preferLocal: { + type: 'boolean', + name: 'prefer_local' + }, + text: { + type: 'string' + }, + tokenizer: { + type: 'string' + }, + format: { + type: 'enum', + 'default': 'detailed', + options: [ + 'detailed', + 'text' + ] + } + }, + urls: [ + { + fmt: '/<%=index%>/_analyze', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_analyze' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.clearCache](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-clearcache.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.fieldData - Clear field data + * @param {Boolean} params.fielddata - Clear field data + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all) + * @param {Boolean} params.filter - Clear filter caches + * @param {Boolean} params.filterCache - Clear filter caches + * @param {Boolean} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all) + * @param {Boolean} params.id - Clear ID caches for parent/child + * @param {Boolean} params.idCache - Clear ID caches for parent/child + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index name to limit the operation + * @param {Boolean} params.recycler - Clear the recycler cache + */ +api.indices.prototype.clearCache = ca({ + params: { + fieldData: { + type: 'boolean', + name: 'field_data' + }, + fielddata: { + type: 'boolean' + }, + fields: { + type: 'list' + }, + filter: { + type: 'boolean' + }, + filterCache: { + type: 'boolean', + name: 'filter_cache' + }, + filterKeys: { + type: 'boolean', + name: 'filter_keys' + }, + id: { + type: 'boolean' + }, + idCache: { + type: 'boolean', + name: 'id_cache' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + index: { + type: 'list' + }, + recycler: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_cache/clear', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cache/clear' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.close](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + */ +api.indices.prototype.close = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + url: { + fmt: '/<%=index%>/_close', + req: { + index: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-create-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String} params.index - The name of the index + */ +api.indices.prototype.create = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-delete-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices + */ +api.indices.prototype['delete'] = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit timestamp for the document + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices + * @param {String, String[], Boolean} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. + */ +api.indices.prototype.deleteAlias = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-delete-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices. + */ +api.indices.prototype.deleteMapping = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/_mapping', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String} params.name - The name of the template + */ +api.indices.prototype.deleteTemplate = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices. + */ +api.indices.prototype.deleteWarmer = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + name: { + type: 'list' + } + }, + url: { + fmt: '/<%=index%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to check + */ +api.indices.prototype.exists = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.existsAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to return + */ +api.indices.prototype.existsAlias = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': [ + 'open', + 'closed' + ], + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_alias', + req: { + index: { + type: 'list' + } + } + } + ], + method: 'HEAD' +}); + +/** + * Perform a [indices.existsTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String} params.name - The name of the template + */ +api.indices.prototype.existsTemplate = ca({ + params: { + local: { + type: 'boolean' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.existsType](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-types-exists.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` to check the types across all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to check + */ +api.indices.prototype.existsType = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.flush](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-flush.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) + * @param {Boolean} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + */ +api.indices.prototype.flush = ca({ + params: { + force: { + type: 'boolean' + }, + full: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_flush', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_flush' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.getAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to return + */ +api.indices.prototype.getAlias = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_alias', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_alias' + } + ] +}); + +/** + * Perform a [indices.getAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to filter + */ +api.indices.prototype.getAliases = ca({ + params: { + timeout: { + type: 'time' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_aliases/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_aliases', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_aliases/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_aliases' + } + ] +}); + +/** + * Perform a [indices.getFieldMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-field-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.includeDefaults - Whether the default mapping values should be returned as well + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names + * @param {String, String[], Boolean} params.type - A comma-separated list of document types + * @param {String, String[], Boolean} params.field - A comma-separated list of fields + */ +api.indices.prototype.getFieldMapping = ca({ + params: { + includeDefaults: { + type: 'boolean', + name: 'include_defaults' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + field: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_mapping/field/<%=field%>', + req: { + index: { + type: 'list' + }, + field: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/<%=type%>/field/<%=field%>', + req: { + type: { + type: 'list' + }, + field: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/field/<%=field%>', + req: { + field: { + type: 'list' + } + } + } + ] +}); + +/** + * Perform a [indices.getMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names + * @param {String, String[], Boolean} params.type - A comma-separated list of document types + */ +api.indices.prototype.getMapping = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_mapping', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/<%=type%>', + req: { + type: { + type: 'list' + } + } + }, + { + fmt: '/_mapping' + } + ] +}); + +/** + * Perform a [indices.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.name - The name of the settings that should be included + */ +api.indices.prototype.getSettings = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': [ + 'open', + 'closed' + ], + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_settings/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_settings', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_settings/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_settings' + } + ] +}); + +/** + * Perform a [indices.getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String} params.name - The name of the template + */ +api.indices.prototype.getTemplate = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + { + fmt: '/_template' + } + ] +}); + +/** + * Perform a [indices.getWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices + * @param {String, String[], Boolean} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types + */ +api.indices.prototype.getWarmer = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_warmer', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_warmer/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_warmer' + } + ] +}); + +/** + * Perform a [indices.open](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + */ +api.indices.prototype.open = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'closed', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + url: { + fmt: '/<%=index%>/_open', + req: { + index: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.optimize](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-optimize.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flush - Specify whether the index should be flushed after performing the operation (default: true) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Number} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic) + * @param {Boolean} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents + * @param {Anything} params.operationThreading - TODO: ? + * @param {Boolean} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true) + * @param {Boolean} params.force - Force a merge operation to run, even if there is a single segment in the index (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.optimize = ca({ + params: { + flush: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + maxNumSegments: { + type: 'number', + name: 'max_num_segments' + }, + onlyExpungeDeletes: { + type: 'boolean', + name: 'only_expunge_deletes' + }, + operationThreading: { + name: 'operation_threading' + }, + waitForMerge: { + type: 'boolean', + name: 'wait_for_merge' + }, + force: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_optimize', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_optimize' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.putAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit timestamp for the document + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` or omit to perform the operation on all indices. + * @param {String} params.name - The name of the alias to be created or updated + */ +api.indices.prototype.putAlias = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'string' + } + } + } + ], + method: 'PUT' +}); + +/** + * Perform a [indices.putMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-put-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. + * @param {String} params.type - The name of the document type + */ +api.indices.prototype.putMapping = ca({ + params: { + ignoreConflicts: { + type: 'boolean', + name: 'ignore_conflicts' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/_mapping/<%=type%>', + req: { + type: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.putSettings = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + urls: [ + { + fmt: '/<%=index%>/_settings', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_settings' + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Number} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {String} params.name - The name of the template + */ +api.indices.prototype.putTemplate = ca({ + params: { + order: { + type: 'number' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices + * @param {String} params.name - The name of the warmer + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types + */ +api.indices.prototype.putWarmer = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + { + fmt: '/_warmer/<%=name%>', + req: { + name: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-recovery.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.detailed - Whether to display detailed information about shard recovery + * @param {Boolean} params.activeOnly - Display only those recoveries that are currently on-going + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.recovery = ca({ + params: { + detailed: { + type: 'boolean', + 'default': false + }, + activeOnly: { + type: 'boolean', + 'default': false, + name: 'active_only' + }, + human: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/<%=index%>/_recovery', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_recovery' + } + ] +}); + +/** + * Perform a [indices.refresh](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-refresh.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.force - Force a refresh even if not required + * @param {Anything} params.operationThreading - TODO: ? + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.refresh = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + force: { + type: 'boolean', + 'default': false + }, + operationThreading: { + name: 'operation_threading' + } + }, + urls: [ + { + fmt: '/<%=index%>/_refresh', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_refresh' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.segments](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-segments.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {Anything} params.operationThreading - TODO: ? + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.segments = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + human: { + type: 'boolean', + 'default': false + }, + operationThreading: { + name: 'operation_threading' + } + }, + urls: [ + { + fmt: '/<%=index%>/_segments', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_segments' + } + ] +}); + +/** + * Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-gateway-snapshot.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + */ +api.indices.prototype.snapshotIndex = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_gateway/snapshot', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_gateway/snapshot' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * @param {Boolean} params.groups - A comma-separated list of search groups for `search` index metric + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String} [params.level=indices] - Return stats aggregated at cluster, index or shard level + * @param {String, String[], Boolean} params.types - A comma-separated list of document types for the `indexing` index metric + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.metric - Limit the information returned the specific metrics. + */ +api.indices.prototype.stats = ca({ + params: { + completionFields: { + type: 'list', + name: 'completion_fields' + }, + fielddataFields: { + type: 'list', + name: 'fielddata_fields' + }, + fields: { + type: 'list' + }, + groups: { + type: 'boolean' + }, + human: { + type: 'boolean', + 'default': false + }, + level: { + type: 'enum', + 'default': 'indices', + options: [ + 'cluster', + 'indices', + 'shards' + ] + }, + types: { + type: 'list' + } + }, + urls: [ + { + fmt: '/<%=index%>/_stats/<%=metric%>', + req: { + index: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/_stats/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/<%=index%>/_stats', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_stats' + } + ] +}); + +/** + * Perform a [indices.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-status.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {Anything} params.operationThreading - TODO: ? + * @param {Boolean} params.recovery - Return information about shard recovery + * @param {Boolean} params.snapshot - TODO: ? + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.status = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + human: { + type: 'boolean', + 'default': false + }, + operationThreading: { + name: 'operation_threading' + }, + recovery: { + type: 'boolean' + }, + snapshot: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_status', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_status' + } + ] +}); + +/** + * Perform a [indices.updateAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Request timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + */ +api.indices.prototype.updateAliases = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_aliases' + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [indices.validateQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-validate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.explain - Return detailed information about the error + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Anything} params.operationThreading - TODO: ? + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types + */ +api.indices.prototype.validateQuery = ca({ + params: { + explain: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + operationThreading: { + name: 'operation_threading' + }, + source: { + type: 'string' + }, + q: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_validate/query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_validate/query', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_validate/query' + } + ], + method: 'POST' +}); + +/** + * Perform a [info](http://www.elasticsearch.org/guide/) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.info = ca({ + url: { + fmt: '/' + } +}); + +/** + * Perform a [mget](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-multi-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.mget = ca({ + params: { + fields: { + type: 'list' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mget', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mget', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mget' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [mlt](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-more-like-this.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Number} params.boostTerms - The boost factor + * @param {Number} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored + * @param {Number} params.maxQueryTerms - The maximum query terms to be included in the generated query + * @param {Number} params.maxWordLength - The minimum length of the word: longer words will be ignored + * @param {Number} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored + * @param {Number} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored + * @param {Number} params.minWordLength - The minimum length of the word: shorter words will be ignored + * @param {String, String[], Boolean} params.mltFields - Specific fields to perform the query against + * @param {Number} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3) + * @param {String} params.routing - Specific routing value + * @param {Number} params.searchFrom - The offset from which to return results + * @param {String, String[], Boolean} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document) + * @param {String} params.searchQueryHint - The search query hint + * @param {String} params.searchScroll - A scroll search request definition + * @param {Number} params.searchSize - The number of documents to return (default: 10) + * @param {String} params.searchSource - A specific search request definition (instead of using the request body) + * @param {String} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc) + * @param {String, String[], Boolean} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document) + * @param {String, String[], Boolean} params.stopWords - A list of stop words to be ignored + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.mlt = ca({ + params: { + boostTerms: { + type: 'number', + name: 'boost_terms' + }, + maxDocFreq: { + type: 'number', + name: 'max_doc_freq' + }, + maxQueryTerms: { + type: 'number', + name: 'max_query_terms' + }, + maxWordLength: { + type: 'number', + name: 'max_word_length' + }, + minDocFreq: { + type: 'number', + name: 'min_doc_freq' + }, + minTermFreq: { + type: 'number', + name: 'min_term_freq' + }, + minWordLength: { + type: 'number', + name: 'min_word_length' + }, + mltFields: { + type: 'list', + name: 'mlt_fields' + }, + percentTermsToMatch: { + type: 'number', + name: 'percent_terms_to_match' + }, + routing: { + type: 'string' + }, + searchFrom: { + type: 'number', + name: 'search_from' + }, + searchIndices: { + type: 'list', + name: 'search_indices' + }, + searchQueryHint: { + type: 'string', + name: 'search_query_hint' + }, + searchScroll: { + type: 'string', + name: 'search_scroll' + }, + searchSize: { + type: 'number', + name: 'search_size' + }, + searchSource: { + type: 'string', + name: 'search_source' + }, + searchType: { + type: 'string', + name: 'search_type' + }, + searchTypes: { + type: 'list', + name: 'search_types' + }, + stopWords: { + type: 'list', + name: 'stop_words' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [mpercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The index of the document being count percolated to use as default + * @param {String} params.type - The type of the document being percolated to use as default. + */ +api.mpercolate = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mpercolate', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mpercolate', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mpercolate' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +/** + * Perform a [msearch](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-multi-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.searchType - Search operation type + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to use as default + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to use as default + */ +api.msearch = ca({ + params: { + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch', + 'count', + 'scan' + ], + name: 'search_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_msearch', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_msearch', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_msearch' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +/** + * Perform a [mtermvectors](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-multi-termvectors.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body + * @param {Boolean} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.index - The index in which the document resides. + * @param {String} params.type - The type of the document. + * @param {String} params.id - The id of the document. + */ +api.mtermvectors = ca({ + params: { + ids: { + type: 'list', + required: false + }, + termStatistics: { + type: 'boolean', + 'default': false, + required: false, + name: 'term_statistics' + }, + fieldStatistics: { + type: 'boolean', + 'default': true, + required: false, + name: 'field_statistics' + }, + fields: { + type: 'list', + required: false + }, + offsets: { + type: 'boolean', + 'default': true, + required: false + }, + positions: { + type: 'boolean', + 'default': true, + required: false + }, + payloads: { + type: 'boolean', + 'default': true, + required: false + }, + preference: { + type: 'string', + required: false + }, + routing: { + type: 'string', + required: false + }, + parent: { + type: 'string', + required: false + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mtermvectors', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mtermvectors', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mtermvectors' + } + ], + method: 'POST' +}); + +api.nodes = function NodesNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-hot-threads.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.interval - The interval for the second sampling of threads + * @param {Number} params.snapshots - Number of samples of thread stacktrace (default: 10) + * @param {Number} params.threads - Specify the number of threads to provide information for (default: 3) + * @param {String} params.type - The type to sample (default: cpu) + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.hotThreads = ca({ + params: { + interval: { + type: 'time' + }, + snapshots: { + type: 'number' + }, + threads: { + type: 'number' + }, + type: { + type: 'enum', + options: [ + 'cpu', + 'wait', + 'block' + ] + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/hotthreads', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/hotthreads' + } + ] +}); + +/** + * Perform a [nodes.info](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-info.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {String, String[], Boolean} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all. + */ +api.nodes.prototype.info = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + human: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + 'settings', + 'os', + 'process', + 'jvm', + 'thread_pool', + 'network', + 'transport', + 'http', + 'plugins' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + 'settings', + 'os', + 'process', + 'jvm', + 'thread_pool', + 'network', + 'transport', + 'http', + 'plugins' + ] + } + } + }, + { + fmt: '/_nodes' + } + ] +}); + +/** + * Perform a [nodes.shutdown](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-shutdown.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.delay - Set the delay for the operation (default: 1s) + * @param {Boolean} params.exit - Exit the JVM as well (default: true) + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes + */ +api.nodes.prototype.shutdown = ca({ + params: { + delay: { + type: 'time' + }, + exit: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_shutdown' + } + ], + method: 'POST' +}); + +/** + * Perform a [nodes.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * @param {Boolean} params.groups - A comma-separated list of search groups for `search` index metric + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String} [params.level=node] - Return indices stats aggregated at node, index or shard level + * @param {String, String[], Boolean} params.types - A comma-separated list of document types for the `indexing` index metric + * @param {String, String[], Boolean} params.metric - Limit the information returned to the specified metrics + * @param {String, String[], Boolean} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.stats = ca({ + params: { + completionFields: { + type: 'list', + name: 'completion_fields' + }, + fielddataFields: { + type: 'list', + name: 'fielddata_fields' + }, + fields: { + type: 'list' + }, + groups: { + type: 'boolean' + }, + human: { + type: 'boolean', + 'default': false + }, + level: { + type: 'enum', + 'default': 'node', + options: [ + 'node', + 'indices', + 'shards' + ] + }, + types: { + type: 'list' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + }, + indexMetric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + } + } + }, + { + fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + }, + indexMetric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/stats', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/stats/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + } + } + }, + { + fmt: '/_nodes/stats' + } + ] +}); + +/** + * Perform a [percolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.percolateIndex - The index to percolate the document into. Defaults to index. + * @param {String} params.percolateType - The type to percolate document into. Defaults to type. + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.index - The index of the document being percolated. + * @param {String} params.type - The type of the document being percolated. + * @param {String} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster. + */ +api.percolate = ca({ + params: { + routing: { + type: 'list' + }, + preference: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + percolateIndex: { + type: 'string', + name: 'percolate_index' + }, + percolateType: { + type: 'string', + name: 'percolate_type' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>/_percolate', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [ping](http://www.elasticsearch.org/guide/) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.ping = ca({ + url: { + fmt: '/' + }, + requestTimeout: 100, + method: 'HEAD' +}); + +/** + * Perform a [scroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Duration} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {String} params.scrollId - The scroll ID + */ +api.scroll = ca({ + params: { + scroll: { + type: 'duration' + }, + scrollId: { + type: 'string', + name: 'scroll_id' + } + }, + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'string' + } + } + }, + { + fmt: '/_search/scroll' + } + ], + method: 'POST' +}); + +/** + * Perform a [search](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.analyzer - The analyzer to use for the query string + * @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {String} params.df - The field to use as default where no field prefix is given in the query string + * @param {Boolean} params.explain - Specify whether to return detailed information about score computation as part of a hit + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return as part of a hit + * @param {Number} params.from - Starting offset (default: 0) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.indicesBoost - Comma-separated list of index boosts + * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values + * @param {Duration} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {String} params.searchType - Search operation type + * @param {Number} params.size - Number of hits to return (default: 10) + * @param {String, String[], Boolean} params.sort - A comma-separated list of : pairs + * @param {String} params.source - The URL-encoded request definition using the Query DSL (instead of using request body) + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {String, String[], Boolean} params.stats - Specific 'tag' of the request for logging and statistical purposes + * @param {String} params.suggestField - Specify which field to use for suggestions + * @param {String} [params.suggestMode=missing] - Specify suggest mode + * @param {Number} params.suggestSize - How many suggestions to return in response + * @param {Text} params.suggestText - The source text for which the suggestions should be returned + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Boolean} params.version - Specify whether to return document version as part of a hit + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.search = ca({ + params: { + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + explain: { + type: 'boolean' + }, + fields: { + type: 'list' + }, + from: { + type: 'number' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + indicesBoost: { + type: 'list', + name: 'indices_boost' + }, + lenient: { + type: 'boolean' + }, + lowercaseExpandedTerms: { + type: 'boolean', + name: 'lowercase_expanded_terms' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'duration' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch', + 'count', + 'scan' + ], + name: 'search_type' + }, + size: { + type: 'number' + }, + sort: { + type: 'list' + }, + source: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + stats: { + type: 'list' + }, + suggestField: { + type: 'string', + name: 'suggest_field' + }, + suggestMode: { + type: 'enum', + 'default': 'missing', + options: [ + 'missing', + 'popular', + 'always' + ], + name: 'suggest_mode' + }, + suggestSize: { + type: 'number', + name: 'suggest_size' + }, + suggestText: { + type: 'text', + name: 'suggest_text' + }, + timeout: { + type: 'time' + }, + version: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_search', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search' + } + ], + method: 'POST' +}); + +/** + * Perform a [searchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.searchTemplate = ca({ + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search/template', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_search/template', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search/template' + } + ], + method: 'POST' +}); + +/** + * Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search_shards', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + +api.snapshot = function SnapshotNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Boolean} params.waitForCompletion - Should this request wait until the operation has completed before returning + * @param {String} params.repository - A repository name + * @param {String} params.snapshot - A snapshot name + */ +api.snapshot.prototype.create = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForCompletion: { + type: 'boolean', + 'default': false, + name: 'wait_for_completion' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [snapshot.createRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String} params.repository - A repository name + */ +api.snapshot.prototype.createRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'string' + } + } + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [snapshot.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String} params.repository - A repository name + * @param {String} params.snapshot - A snapshot name + */ +api.snapshot.prototype['delete'] = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [snapshot.deleteRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String, String[], Boolean} params.repository - A comma-separated list of repository names + */ +api.snapshot.prototype.deleteRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [snapshot.get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String} params.repository - A repository name + * @param {String, String[], Boolean} params.snapshot - A comma-separated list of snapshot names + */ +api.snapshot.prototype.get = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'list' + } + } + } +}); + +/** + * Perform a [snapshot.getRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.repository - A comma-separated list of repository names + */ +api.snapshot.prototype.getRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + { + fmt: '/_snapshot' + } + ] +}); + +/** + * Perform a [snapshot.restore](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Boolean} params.waitForCompletion - Should this request wait until the operation has completed before returning + * @param {String} params.repository - A repository name + * @param {String} params.snapshot - A snapshot name + */ +api.snapshot.prototype.restore = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForCompletion: { + type: 'boolean', + 'default': false, + name: 'wait_for_completion' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [snapshot.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String} params.repository - A repository name + * @param {String, String[], Boolean} params.snapshot - A comma-separated list of snapshot names + */ +api.snapshot.prototype.status = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + urls: [ + { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'list' + } + } + }, + { + fmt: '/_snapshot/<%=repository%>/_status', + req: { + repository: { + type: 'string' + } + } + }, + { + fmt: '/_snapshot/_status' + } + ] +}); + +/** + * Perform a [suggest](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded request definition (instead of using request body) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices + */ +api.suggest = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/_suggest', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_suggest' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [termvector](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-termvectors.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.termStatistics - Specifies if total term frequency and document frequency should be returned. + * @param {Boolean} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return. + * @param {Boolean} [params.offsets=true] - Specifies if term offsets should be returned. + * @param {Boolean} [params.positions=true] - Specifies if term positions should be returned. + * @param {Boolean} [params.payloads=true] - Specifies if term payloads should be returned. + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random). + * @param {String} params.routing - Specific routing value. + * @param {String} params.parent - Parent id of documents. + * @param {String} params.index - The index in which the document resides. + * @param {String} params.type - The type of the document. + * @param {String} params.id - The id of the document. + */ +api.termvector = ca({ + params: { + termStatistics: { + type: 'boolean', + 'default': false, + required: false, + name: 'term_statistics' + }, + fieldStatistics: { + type: 'boolean', + 'default': true, + required: false, + name: 'field_statistics' + }, + fields: { + type: 'list', + required: false + }, + offsets: { + type: 'boolean', + 'default': true, + required: false + }, + positions: { + type: 'boolean', + 'default': true, + required: false + }, + payloads: { + type: 'boolean', + 'default': true, + required: false + }, + preference: { + type: 'string', + required: false + }, + routing: { + type: 'string', + required: false + }, + parent: { + type: 'string', + required: false + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [update](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-update.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {String} params.lang - The script language (default: mvel) + * @param {String} params.parent - ID of the parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {Number} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0) + * @param {String} params.routing - Specific routing value + * @param {Anything} params.script - The URL-encoded script definition (instead of using request body) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.timestamp - Explicit timestamp for the document + * @param {Duration} params.ttl - Expiration time for the document + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - Document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.update = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + fields: { + type: 'list' + }, + lang: { + type: 'string' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + retryOnConflict: { + type: 'number', + name: 'retry_on_conflict' + }, + routing: { + type: 'string' + }, + script: {}, + timeout: { + type: 'time' + }, + timestamp: { + type: 'time' + }, + ttl: { + type: 'duration' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_update', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} params.parent - ID of the parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.timestamp - Explicit timestamp for the document + * @param {Duration} params.ttl - Expiration time for the document + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - Document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.create = ca.proxy(api.index, { + transform: function (params) { + params.op_type = 'create'; + } +}); +},{"../client_action":196}],194:[function(require,module,exports){ +module.exports = { + '1.1': require('./1_1'), + '1.0': require('./1_0'), + '0.90': require('./0_90') +}; + +},{"./0_90":191,"./1_0":192,"./1_1":193}],195:[function(require,module,exports){ /** * A client that makes requests to Elasticsearch via a {{#crossLink "Transport"}}Transport{{/crossLink}} * @@ -24222,6 +29699,13 @@ var _ = require('./utils'); function Client(config) { config = config || {}; + if (config.__reused) { + throw new Error('Do not reuse objects to configure the elasticsearch Client class: ' + + 'https://github.com/elasticsearch/elasticsearch-js/issues/33'); + } else { + config.__reused = true; + } + function EsApiClient() { // our client will log minimally by default if (!config.hasOwnProperty('log')) { @@ -24246,7 +29730,7 @@ function Client(config) { delete this._namespaces; } - EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '0.90'); + EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '1.1'); if (!config.sniffEndpoint && EsApiClient.prototype === Client.apis['0.90']) { config.sniffEndpoint = '/_cluster/nodes'; } @@ -24255,7 +29739,7 @@ function Client(config) { } Client.apis = require('./apis'); -},{"./apis":193,"./transport":211,"./utils":212}],195:[function(require,module,exports){ +},{"./apis":194,"./transport":212,"./utils":214}],196:[function(require,module,exports){ /** * Constructs a function that can be called to make a request to ES * @type {[type]} @@ -24387,7 +29871,7 @@ function resolveUrl(url, params) { for (i = 0; i < url.reqParamKeys.length; i ++) { key = url.reqParamKeys[i]; - if (!params.hasOwnProperty(key)) { + if (!params.hasOwnProperty(key) || params[key] == null) { // missing a required param return false; } else { @@ -24410,7 +29894,7 @@ function resolveUrl(url, params) { for (i = 0; i < url.optParamKeys.length; i ++) { key = url.optParamKeys[i]; if (params[key]) { - if (castType[url.opt[key].type]) { + if (castType[url.opt[key].type] || params[key] == null) { vars[key] = castType[url.opt[key].type](url.opt[key], params[key], key); } else { vars[key] = params[key]; @@ -24562,7 +30046,7 @@ ClientAction.proxy = function (fn, spec) { }; }; -},{"./utils":212}],196:[function(require,module,exports){ +},{"./utils":214}],197:[function(require,module,exports){ module.exports = ConnectionAbstract; var _ = require('./utils'); @@ -24662,7 +30146,7 @@ ConnectionAbstract.prototype.setStatus = function (status) { this.removeAllListeners(); } }; -},{"./errors":200,"./host":201,"./log":202,"./utils":212,"events":4}],197:[function(require,module,exports){ +},{"./errors":201,"./host":202,"./log":203,"./utils":214,"events":4}],198:[function(require,module,exports){ var process=require("__browserify_process");/** * Manager of connections to a node(s), capable of ensuring that connections are clear and living * before providing them to the application @@ -24865,7 +30349,7 @@ ConnectionPool.prototype._onConnectionDied = function (connection, alreadyWasDea var ms = this.calcDeadTimeout(timeout.attempt, this.deadTimeout); timeout.id = setTimeout(timeout.revive, ms); - timeout.runAt = Date.now() + ms; + timeout.runAt = _.now() + ms; }; ConnectionPool.prototype._selectDeadConnection = function (cb) { @@ -24995,7 +30479,7 @@ ConnectionPool.prototype.close = function () { this.setHosts([]); }; ConnectionPool.prototype.empty = ConnectionPool.prototype.close; -},{"./connectors":198,"./log":202,"./selectors":207,"./utils":212,"__browserify_process":13}],198:[function(require,module,exports){ +},{"./connectors":199,"./log":203,"./selectors":208,"./utils":214,"__browserify_process":13}],199:[function(require,module,exports){ var opts = { xhr: require('./xhr'), jquery: require('./jquery'), @@ -25021,7 +30505,7 @@ if (opts.xhr) { module.exports = opts; -},{"../utils":212,"./angular":1,"./jquery":199,"./xhr":1}],199:[function(require,module,exports){ +},{"../utils":214,"./angular":1,"./jquery":200,"./xhr":1}],200:[function(require,module,exports){ /* jshint browser: true, jquery: true */ /** @@ -25046,7 +30530,7 @@ JqueryConnector.prototype.request = function (params, cb) { data: params.body, method: params.method, dataType: 'text', - headers: params.headers, + headers: this.host.getHeaders(params.headers), done: cb }; @@ -25073,19 +30557,27 @@ JqueryConnector.prototype.request = function (params, cb) { -},{"../connection":196,"../errors":200,"../utils":212}],200:[function(require,module,exports){ -var process=require("__browserify_process");var _ = require('./utils'); +},{"../connection":197,"../errors":201,"../utils":214}],201:[function(require,module,exports){ +var _ = require('./utils'); var errors = module.exports; +var canCapture = (typeof Error.captureStackTrace === 'function'); +var canStack = !!(new Error()).stack; + function ErrorAbstract(msg, constructor) { this.message = msg; Error.call(this, this.message); - if (process.browser) { - this.stack = ''; - } else { + + if (canCapture) { Error.captureStackTrace(this, constructor); } + else if (canStack) { + this.stack = (new Error()).stack; + } + else { + this.stack = ''; + } } errors._Abstract = ErrorAbstract; _.inherits(ErrorAbstract, Error); @@ -25200,7 +30692,7 @@ _.each(statusCodes, function (name, status) { errors[status] = StatusCodeError; }); -},{"./utils":212,"__browserify_process":13}],201:[function(require,module,exports){ +},{"./utils":214}],202:[function(require,module,exports){ /** * Class to wrap URLS, formatting them and maintaining their separate details * @type {[type]} @@ -25236,6 +30728,7 @@ function Host(config) { this.port = 9200; this.auth = null; this.query = null; + this.headers = null; if (typeof config === 'string') { if (!startsWithProtocolRE.test(config)) { @@ -25320,16 +30813,7 @@ Host.prototype.makeUrl = function (params) { } // build the query string - var query = ''; - if (params.query) { - // if the user passed in a query, merge it with the defaults from the host - query = qs.stringify( - _.defaults(typeof params.query === 'string' ? qs.parse(params.query) : params.query, this.query) - ); - } else if (this.query) { - // just stringify the hosts query - query = qs.stringify(this.query); - } + var query = qs.stringify(this.getQuery(params.query)); var auth = ''; if (params.auth) { @@ -25345,11 +30829,35 @@ Host.prototype.makeUrl = function (params) { } }; +function objectPropertyGetter(prop, preOverride) { + return function (overrides) { + if (preOverride) { + overrides = preOverride(overrides); + } + + var obj = this[prop]; + if (!obj && !overrides) { + return null; + } + + if (overrides) { + obj = _.assign({}, obj, overrides); + } + + return _.size(obj) ? obj : null; + }; +} + +Host.prototype.getHeaders = objectPropertyGetter('headers'); +Host.prototype.getQuery = objectPropertyGetter('query', function (query) { + return typeof query === 'string' ? qs.parse(query) : query; +}); + Host.prototype.toString = function () { return this.makeUrl(); }; -},{"./utils":212,"querystring":6,"url":7}],202:[function(require,module,exports){ +},{"./utils":214,"querystring":6,"url":7}],203:[function(require,module,exports){ var process=require("__browserify_process");var _ = require('./utils'); var url = require('url'); var EventEmitter = require('events').EventEmitter; @@ -25651,7 +31159,7 @@ Log.normalizeTraceArgs = function (method, requestUrl, body, responseBody, respo module.exports = Log; -},{"./loggers":204,"./utils":212,"__browserify_process":13,"events":4,"url":7}],203:[function(require,module,exports){ +},{"./loggers":205,"./utils":214,"__browserify_process":13,"events":4,"url":7}],204:[function(require,module,exports){ var _ = require('./utils'); /** @@ -25822,7 +31330,7 @@ LoggerAbstract.prototype._formatTraceMessage = function (req) { LoggerAbstract.prototype._prettyJson = function (body) { try { - if (typeof object === 'string') { + if (typeof body === 'string') { body = JSON.parse(body); } return JSON.stringify(body, null, ' ').replace(/'/g, '\\u0027'); @@ -25833,12 +31341,12 @@ LoggerAbstract.prototype._prettyJson = function (body) { module.exports = LoggerAbstract; -},{"./utils":212}],204:[function(require,module,exports){ +},{"./utils":214}],205:[function(require,module,exports){ module.exports = { console: require('./console') }; -},{"./console":205}],205:[function(require,module,exports){ +},{"./console":206}],206:[function(require,module,exports){ /** * Special version of the Stream logger, which logs errors and warnings to stderr and all other * levels to stdout. @@ -25939,15 +31447,23 @@ Console.prototype.onTrace = _.handler(function (msg) { this.write('TRACE', this._formatTraceMessage(msg), 'log'); }); -},{"../logger":203,"../utils":212}],206:[function(require,module,exports){ +},{"../logger":204,"../utils":214}],207:[function(require,module,exports){ var _ = require('./utils'); var extractHostPartsRE = /\[\/*([^:]+):(\d+)\]/; function makeNodeParser(hostProp) { return function (nodes) { - var hosts = []; - _.each(nodes, function (node, id) { + return _.transform(nodes, function (hosts, node, id) { + if (!node[hostProp]) { + return; + } + var hostnameMatches = extractHostPartsRE.exec(node[hostProp]); + if (!hostnameMatches) { + throw new Error('node\'s ' + hostProp + ' property (' + JSON.stringify(node[hostProp]) + + ') does not match the expected pattern ' + extractHostPartsRE + '.'); + } + hosts.push({ host: hostnameMatches[1], port: parseInt(hostnameMatches[2], 10), @@ -25958,21 +31474,20 @@ function makeNodeParser(hostProp) { version: node.version } }); - }); - return hosts; + }, []); }; } module.exports = makeNodeParser('http_address'); module.exports.thrift = makeNodeParser('transport_address'); -},{"./utils":212}],207:[function(require,module,exports){ +},{"./utils":214}],208:[function(require,module,exports){ module.exports = { random: require('./random'), roundRobin: require('./round_robin') }; -},{"./random":208,"./round_robin":209}],208:[function(require,module,exports){ +},{"./random":209,"./round_robin":210}],209:[function(require,module,exports){ /** * Selects a connection randomly * @@ -25985,7 +31500,7 @@ module.exports = function RandomSelector(connections) { return connections[Math.floor(Math.random() * connections.length)]; }; -},{}],209:[function(require,module,exports){ +},{}],210:[function(require,module,exports){ /** * Selects a connection the simplest way possible, Round Robin * @@ -26000,7 +31515,7 @@ module.exports = function (connections) { return connection; }; -},{}],210:[function(require,module,exports){ +},{}],211:[function(require,module,exports){ /** * Simple JSON serializer * @type {[type]} @@ -26061,7 +31576,7 @@ Json.prototype.bulkBody = function (val) { return body; }; -},{"../utils":212}],211:[function(require,module,exports){ +},{"../utils":214}],212:[function(require,module,exports){ /** * Class that manages making request, called by all of the API methods. * @type {[type]} @@ -26071,7 +31586,8 @@ module.exports = Transport; var _ = require('./utils'); var errors = require('./errors'); var Host = require('./host'); -var when = require('when'); +var Promise = require('bluebird'); +var patchSniffOnConnectionFault = require('./transport/sniff_on_connection_fault'); function Transport(config) { var self = this; @@ -26144,7 +31660,9 @@ function Transport(config) { }, config.sniffInterval); } - this.sniffAfterConnectionFault = config.sniffAfterConnectionFault; + if (config.sniffOnConnectionFault) { + patchSniffOnConnectionFault(this); + } } Transport.connectionPools = { @@ -26160,7 +31678,7 @@ Transport.nodesToHostCallbacks = { }; Transport.prototype.defer = function () { - return when.defer(); + return Promise.defer(); }; /** @@ -26180,7 +31698,6 @@ Transport.prototype.defer = function () { * @param {Function} cb - A function to call back with (error, responseBody, responseStatus) */ Transport.prototype.request = function (params, cb) { - var self = this; var remainingRetries = this.maxRetries; var requestTimeout = this.requestTimeout; @@ -26394,6 +31911,7 @@ Transport.prototype._timeout = function (cb, delay) { Transport.prototype.sniff = function (cb) { var connectionPool = this.connectionPool; var nodesToHostCallback = this.nodesToHostCallback; + var log = this.log; // make cb a function if it isn't cb = typeof cb === 'function' ? cb : _.noop; @@ -26403,10 +31921,19 @@ Transport.prototype.sniff = function (cb) { method: 'GET' }, function (err, resp, status) { if (!err && resp && resp.nodes) { - var hosts = _.map(nodesToHostCallback(resp.nodes), function (hostConfig) { + var hostsConfigs; + + try { + hostsConfigs = nodesToHostCallback(resp.nodes); + } catch (e) { + log.error(new Error('Unable to convert node list from ' + this.sniffEndpoint + + ' to hosts durring sniff. Encountered error:\n' + (e.stack || e.message))); + return; + } + + connectionPool.setHosts(_.map(hostsConfigs, function (hostConfig) { return new Host(hostConfig); - }); - connectionPool.setHosts(hosts); + })); } cb(err, resp, status); }); @@ -26421,8 +31948,67 @@ Transport.prototype.close = function () { _.each(this._timers, clearTimeout); this.connectionPool.close(); }; +},{"./connection_pool":198,"./errors":201,"./host":202,"./log":203,"./nodes_to_host":207,"./serializers/json":211,"./transport/sniff_on_connection_fault":213,"./utils":214,"bluebird":1}],213:[function(require,module,exports){ +var _ = require('../utils'); -},{"./connection_pool":197,"./errors":200,"./host":201,"./log":202,"./nodes_to_host":206,"./serializers/json":210,"./utils":212,"when":1}],212:[function(require,module,exports){ + +/** + * Patch the transport's connection pool to schedule a sniff after a connection fails. + * When a connection fails for the first time it will schedule a sniff 1 second in the + * future, and increase the timeout based on the deadTimeout algorithm chosen by the + * connectionPool, and the number of times the sniff has failed. + * + * @param {Transport} transport - the transport that will be using this behavior + * @return {undefined} + */ +module.exports = function setupSniffOnConnectionFault(transport) { + var failures = 0; + var pool = transport.connectionPool; + var originalOnDied = pool._onConnectionDied; + + // do the actual sniff, if the sniff is unable to + // connect to a node this function will be called again by the connectionPool + var work = function () { + work.timerId = transport._timeout(work.timerId); + transport.sniff(); + }; + + // create a function that will count down to a + // point n milliseconds into the future + var countdownTo = function (ms) { + var start = _.now(); + return function () { + return start - ms; + }; + }; + + // overwrite the function, but still call it + pool._onConnectionDied = function (connection, wasAlreadyDead) { + var ret = originalOnDied.call(pool, connection, wasAlreadyDead); + + // clear the failures if this is the first failure we have seen + failures = work.timerId ? failures + 1 : 0; + + var ms = pool.calcDeadTimeout(failures, 1000); + + if (work.timerId && ms < work.timerId && work.countdown()) { + // clear the timer + work.timerId = transport._timeout(work.timerId); + } + + if (!work.timerId) { + work.timerId = transport._timeout(work, ms); + work.countdown = countdownTo(ms); + } + + return ret; + }; + + pool._onConnectionDied.restore = function () { + pool._onConnectionDied = originalOnDied; + }; +}; +},{"../utils":214}],214:[function(require,module,exports){ var process=require("__browserify_process"),Buffer=require("__browserify_Buffer").Buffer;var path = require('path'); var _ = require('lodash-node/modern'); var nodeUtils = require('util'); @@ -26843,6 +32429,13 @@ _.getUnwrittenFromStream = function (stream) { } }; +/** + * return the current time in milliseconds since epoch + */ +_.now = function () { + return (typeof Date.now === 'function') ? Date.now() : (new Date()).getTime(); +}; + module.exports = utils; },{"__browserify_Buffer":12,"__browserify_process":13,"lodash-node/modern":87,"path":5,"util":8}]},{},[189]) diff --git a/src/bower_components/elasticsearch/elasticsearch.jquery.min.js b/src/bower_components/elasticsearch/elasticsearch.jquery.min.js index 94882593242a..58b49a4b6ca0 100644 --- a/src/bower_components/elasticsearch/elasticsearch.jquery.min.js +++ b/src/bower_components/elasticsearch/elasticsearch.jquery.min.js @@ -1,10 +1,11 @@ -/*! elasticsearch - v1.5.10 - 2014-03-03 +/*! elasticsearch - v2.1.4 - 2014-05-02 * http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/index.html - * Copyright (c) 2014 Elasticsearch BV; Licensed Apache 2.0 */ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gf;++f)a.hasOwnProperty(f)&&(e?d=b(d,a[f],f,a):(d=a[f],e=!0));return d},c.substr="b"!=="ab".substr(-1)?function(a,b,c){return 0>b&&(b=a.length+b),a.substr(b,c)}:function(a,b,c){return a.substr(b,c)},c.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},c.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var c=a.shift();return function(){b.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}},c.create="function"==typeof Object.create?Object.create:e;var l="function"==typeof Object.keys?Object.keys:g,m="function"==typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:h;if((new Error).hasOwnProperty("description")){var n=function(a,b){return"[object Error]"===j.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a})),b};c.keys=function(a){return n(a,l(a))},c.getOwnPropertyNames=function(a){return n(a,m(a))}}else c.keys=l,c.getOwnPropertyNames=m;if("function"==typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(o){c.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return i(a,b)}}}else c.getOwnPropertyDescriptor=i},{}],3:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:!m.isNumber(b)||!isNaN(b)&&isFinite(b)?m.isFunction(b)||m.isRegExp(b)?b.toString():b:b.toString()}function d(a,b){return m.isString(a)?a.length=0;d--)if(e[d]!=f[d])return!1;for(d=e.length-1;d>=0;d--)if(c=e[d],!h(a[c],b[c]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util"),n=a("_shims"),o=Array.prototype.slice,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,this.message=a.message||e(this)},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p.throws=function(){l.apply(this,[!0].concat(o.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(o.call(arguments)))},p.ifError=function(a){if(a)throw a}},{_shims:2,util:8}],4:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var d=a("util");b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!d.isNumber(a)||0>a)throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,f,g,h;if(this._events||(this._events={}),"error"===a&&(!this._events.error||d.isObject(this._events.error)&&!this._events.error.length))throw b=arguments[1],b instanceof Error?b:TypeError('Uncaught, unspecified "error" event.');if(c=this._events[a],d.isUndefined(c))return!1;if(d.isFunction(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];c.apply(this,f)}else if(d.isObject(c)){for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];for(h=c.slice(),e=h.length,g=0;e>g;g++)h[g].apply(this,f)}return!0},c.prototype.addListener=function(a,b){var e;if(!d.isFunction(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d.isFunction(b.listener)?b.listener:b),this._events[a]?d.isObject(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,d.isObject(this._events[a])&&!this._events[a].warned){var e;e=d.isUndefined(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),b.apply(this,arguments)}if(!d.isFunction(b))throw TypeError("listener must be a function");return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,f,g;if(!d.isFunction(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,e=-1,c===b||d.isFunction(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(d.isObject(c)){for(g=f;g-->0;)if(c[g]===b||c[g].listener&&c[g].listener===b){e=g;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d.isFunction(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d.isFunction(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d.isFunction(a._events[b])?1:a._events[b].length:0}},{util:8}],5:[function(a,b,c){function d(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var e=a("__browserify_process"),f=a("util"),g=a("_shims"),h=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(a){return h.exec(a).slice(1)};c.resolve=function(){for(var a="",b=!1,c=arguments.length-1;c>=-1&&!b;c--){var h=c>=0?arguments[c]:e.cwd();if(!f.isString(h))throw new TypeError("Arguments to path.resolve must be strings");h&&(a=h+"/"+a,b="/"===h.charAt(0))}return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=c.isAbsolute(a),e="/"===g.substr(a,-1);return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),a||b||(a="."),a&&e&&(a+="/"),(b?"/":"")+a},c.isAbsolute=function(a){return"/"===a.charAt(0)},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(g.filter(a,function(a){if(!f.isString(a))throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},c.relative=function(a,b){function d(a){for(var b=0;b=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=c.resolve(a).substr(1),b=c.resolve(b).substr(1);for(var e=d(a.split("/")),f=d(b.split("/")),g=Math.min(e.length,f.length),h=g,i=0;g>i;i++)if(e[i]!==f[i]){h=i;break}for(var j=[],i=h;i0&&k>j&&(k=j);for(var l=0;k>l;++l){var m,n,o,p,q=a[l].replace(i,"%20"),r=q.indexOf(c);r>=0?(m=q.substr(0,r),n=q.substr(r+1)):(m=q,n="");try{o=decodeURIComponent(m),p=decodeURIComponent(n)}catch(s){o=f.unescape(m,!0),p=f.unescape(n,!0)}d(h,o)?g.isArray(h[o])?h[o].push(p):h[o]=[h[o],p]:h[o]=p}return h}},{_shims:2,buffer:10,util:8}],7:[function(a,b,c){function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function e(a,b,c){if(a&&j.isObject(a)&&a instanceof d)return a;var e=new d;return e.parse(a,b,c),e}function f(a){return j.isString(a)&&(a=e(a)),a instanceof d?a.format():d.prototype.format.call(a)}function g(a,b){return e(a,!1,!0).resolve(b)}function h(a,b){return a?e(a,!1,!0).resolveObject(b):b}var i={encode:function(a){return a}},j=a("util"),k=a("_shims");c.parse=e,c.resolve=g,c.resolveObject=h,c.format=f,c.Url=d;var l=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,n=["<",">",'"',"`"," ","\r","\n"," "],o=["{","}","|","\\","^","`"].concat(n),p=["'"].concat(o),q=["%","/","?",";","#"].concat(p),r=["/","?","#"],s=255,t=/^[a-z0-9A-Z_-]{0,63}$/,u=/^([a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=a("querystring");d.prototype.parse=function(a,b,c){if(!j.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=k.trim(d);var e=l.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&w[e]||(d=d.substr(2),this.slashes=!0)}if(!w[e]&&(g||e&&!x[e])){for(var h=-1,m=0;mn)&&(h=n)}var o,z;z=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==z&&(o=d.slice(0,z),d=d.slice(z+1),this.auth=decodeURIComponent(o)),h=-1;for(var m=0;mn)&&(h=n)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var B=this.hostname.split(/\./),m=0,C=B.length;C>m;m++){var D=B[m];if(D&&!D.match(t)){for(var E="",F=0,G=D.length;G>F;F++)E+=D.charCodeAt(F)>127?"x":D[F];if(!E.match(t)){var H=B.slice(0,m),I=B.slice(m+1),J=D.match(u);J&&(H.push(J[1]),I.unshift(J[2])),I.length&&(d="/"+I.join(".")+d),this.hostname=H.join(".");break}}}if(this.hostname=this.hostname.length>s?"":this.hostname.toLowerCase(),!A){for(var K=this.hostname.split("."),L=[],m=0;mm;m++){var P=p[m],Q=encodeURIComponent(P);Q===P&&(Q=escape(P)),d=d.split(P).join(Q)}var R=d.indexOf("#");-1!==R&&(this.hash=d.substr(R),d=d.slice(0,R));var S=d.indexOf("?");if(-1!==S?(this.search=d.substr(S),this.query=d.substr(S+1),b&&(this.query=y.parse(this.query)),d=d.slice(0,S)):b&&(this.search="",this.query={}),d&&(this.pathname=d),x[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var N=this.pathname||"",M=this.search||"";this.path=N+M}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j.isObject(this.query)&&k.keys(this.query).length&&(f=y.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==k.substr(b,-1)&&(b+=":"),this.slashes||(!b||x[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(j.isString(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(k.forEach(k.keys(this),function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return k.forEach(k.keys(a),function(b){"protocol"!==b&&(c[b]=a[b])}),x[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!x[a.protocol])return k.forEach(k.keys(a),function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||w[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),i=a.host||a.pathname&&"/"===a.pathname.charAt(0),l=i||h||c.host&&a.pathname,m=l,n=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],o=c.protocol&&!x[c.protocol];if(o&&(c.hostname="",c.port=null,c.host&&(""===n[0]?n[0]=c.host:n.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),l=l&&(""===e[0]||""===n[0])),i)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,n=e;else if(e.length)n||(n=[]),n.pop(),n=n.concat(e),c.search=a.search,c.query=a.query;else if(!j.isNullOrUndefined(a.search)){if(o){c.hostname=c.host=n.shift();var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return c.search=a.search,c.query=a.query,j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!n.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var q=n.slice(-1)[0],r=(c.host||a.host)&&("."===q||".."===q)||""===q,s=0,t=n.length;t>=0;t--)q=n[t],"."==q?n.splice(t,1):".."===q?(n.splice(t,1),s++):s&&(n.splice(t,1),s--);if(!l&&!m)for(;s--;s)n.unshift("..");!l||""===n[0]||n[0]&&"/"===n[0].charAt(0)||n.unshift(""),r&&"/"!==k.substr(n.join("/"),-1)&&n.push("");var u=""===n[0]||n[0]&&"/"===n[0].charAt(0);if(o){c.hostname=c.host=u?"":n.length?n.shift():"";var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return l=l||c.host&&n.length,l&&!u&&n.unshift(""),n.length?c.pathname=n.join("/"):(c.pathname=null,c.path=null),j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=m.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{_shims:2,querystring:6,util:8}],8:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a){return a}function g(a){var b={};return G.forEach(a,function(a){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=G.keys(b),p=g(o);if(a.showHidden&&(o=G.getOwnPropertyNames(b)),0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?l(a,b,c,d,String(g),!0):"");return G.forEach(e,function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=G.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),i||(G.indexOf(a.seen,j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=G.reduce(a,function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return G.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===C(a)}function w(a){return"object"==typeof a&&a}function x(a){return w(a)&&"[object Date]"===C(a)}function y(a){return w(a)&&"[object Error]"===C(a)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.binarySlice}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),I[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=a("_shims"),H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=B;var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=function(a,b){a.super_=b,a.prototype=G.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},c._extend=function(a,b){if(!b||!w(b))return a;for(var c=G.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{_shims:2}],9:[function(a,b,c){c.readIEEE754=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],10:[function(a,b,c){function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(b,c,f){if(E||(E=a("assert")),!(this instanceof e))return new e(b,c,f);if(this.parent=this,this.offset=0,"base64"==c&&"string"==typeof b)for(b=d(b);b.length%4!=0;)b+="=";var h;if("number"==typeof f){this.length=g(c);for(var j=0;j=b?b:a>=0?a:(a+=b,a>=0?a:0))}function g(a){return a=~~Math.ceil(+a),0>a?0:a}function h(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}function i(a){return h(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function j(a){return 16>a?"0"+a.toString(16):a.toString(16)}function k(a){for(var b=[],c=0;ce&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function o(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function p(a,b,c,d){var e=0;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=a.length?0:(c?(e=a[b]<<8,b+1=a.length?0:(c?(b+1>>0):(b+2>>0)),e)}function r(a,b,c,d){var e,f;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=0,"specified a negative value for writing an unsigned value"),E.ok(b>=a,"value is larger than maximum value for type"),E.ok(Math.floor(a)===a,"value has a fractional component")}function w(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1>>8*(d?1-f:f)}function x(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3>>8*(d?3-f:f)&255}function y(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value"),E.ok(Math.floor(a)===a,"value has a fractional component")}function z(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value")}function A(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e)}function B(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e)}function C(b,c,d,e,f){f||(E.ok(void 0!==c&&null!==c,"missing value"),E.ok("boolean"==typeof e,"missing or invalid endian"),E.ok(void 0!==d&&null!==d,"missing offset"),E.ok(d+3f;++f)a.hasOwnProperty(f)&&(e?d=b(d,a[f],f,a):(d=a[f],e=!0));return d},c.substr="b"!=="ab".substr(-1)?function(a,b,c){return 0>b&&(b=a.length+b),a.substr(b,c)}:function(a,b,c){return a.substr(b,c)},c.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},c.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var c=a.shift();return function(){b.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}},c.create="function"==typeof Object.create?Object.create:e;var l="function"==typeof Object.keys?Object.keys:g,m="function"==typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:h;if((new Error).hasOwnProperty("description")){var n=function(a,b){return"[object Error]"===j.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a})),b};c.keys=function(a){return n(a,l(a))},c.getOwnPropertyNames=function(a){return n(a,m(a))}}else c.keys=l,c.getOwnPropertyNames=m;if("function"==typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(o){c.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return i(a,b)}}}else c.getOwnPropertyDescriptor=i},{}],3:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:!m.isNumber(b)||!isNaN(b)&&isFinite(b)?m.isFunction(b)||m.isRegExp(b)?b.toString():b:b.toString()}function d(a,b){return m.isString(a)?a.length=0;d--)if(e[d]!=f[d])return!1;for(d=e.length-1;d>=0;d--)if(c=e[d],!h(a[c],b[c]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util"),n=a("_shims"),o=Array.prototype.slice,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,this.message=a.message||e(this)},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p.throws=function(){l.apply(this,[!0].concat(o.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(o.call(arguments)))},p.ifError=function(a){if(a)throw a}},{_shims:2,util:8}],4:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var d=a("util");b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!d.isNumber(a)||0>a)throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,f,g,h;if(this._events||(this._events={}),"error"===a&&(!this._events.error||d.isObject(this._events.error)&&!this._events.error.length))throw b=arguments[1],b instanceof Error?b:TypeError('Uncaught, unspecified "error" event.');if(c=this._events[a],d.isUndefined(c))return!1;if(d.isFunction(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];c.apply(this,f)}else if(d.isObject(c)){for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];for(h=c.slice(),e=h.length,g=0;e>g;g++)h[g].apply(this,f)}return!0},c.prototype.addListener=function(a,b){var e;if(!d.isFunction(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d.isFunction(b.listener)?b.listener:b),this._events[a]?d.isObject(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,d.isObject(this._events[a])&&!this._events[a].warned){var e;e=d.isUndefined(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),b.apply(this,arguments)}if(!d.isFunction(b))throw TypeError("listener must be a function");return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,f,g;if(!d.isFunction(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,e=-1,c===b||d.isFunction(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(d.isObject(c)){for(g=f;g-->0;)if(c[g]===b||c[g].listener&&c[g].listener===b){e=g;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d.isFunction(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d.isFunction(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d.isFunction(a._events[b])?1:a._events[b].length:0}},{util:8}],5:[function(a,b,c){function d(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var e=a("__browserify_process"),f=a("util"),g=a("_shims"),h=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(a){return h.exec(a).slice(1)};c.resolve=function(){for(var a="",b=!1,c=arguments.length-1;c>=-1&&!b;c--){var h=c>=0?arguments[c]:e.cwd();if(!f.isString(h))throw new TypeError("Arguments to path.resolve must be strings");h&&(a=h+"/"+a,b="/"===h.charAt(0))}return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=c.isAbsolute(a),e="/"===g.substr(a,-1);return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),a||b||(a="."),a&&e&&(a+="/"),(b?"/":"")+a},c.isAbsolute=function(a){return"/"===a.charAt(0)},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(g.filter(a,function(a){if(!f.isString(a))throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},c.relative=function(a,b){function d(a){for(var b=0;b=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=c.resolve(a).substr(1),b=c.resolve(b).substr(1);for(var e=d(a.split("/")),f=d(b.split("/")),g=Math.min(e.length,f.length),h=g,i=0;g>i;i++)if(e[i]!==f[i]){h=i;break}for(var j=[],i=h;i0&&k>j&&(k=j);for(var l=0;k>l;++l){var m,n,o,p,q=a[l].replace(i,"%20"),r=q.indexOf(c);r>=0?(m=q.substr(0,r),n=q.substr(r+1)):(m=q,n="");try{o=decodeURIComponent(m),p=decodeURIComponent(n)}catch(s){o=f.unescape(m,!0),p=f.unescape(n,!0)}d(h,o)?g.isArray(h[o])?h[o].push(p):h[o]=[h[o],p]:h[o]=p}return h}},{_shims:2,buffer:10,util:8}],7:[function(a,b,c){function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function e(a,b,c){if(a&&j.isObject(a)&&a instanceof d)return a;var e=new d;return e.parse(a,b,c),e}function f(a){return j.isString(a)&&(a=e(a)),a instanceof d?a.format():d.prototype.format.call(a)}function g(a,b){return e(a,!1,!0).resolve(b)}function h(a,b){return a?e(a,!1,!0).resolveObject(b):b}var i={encode:function(a){return a}},j=a("util"),k=a("_shims");c.parse=e,c.resolve=g,c.resolveObject=h,c.format=f,c.Url=d;var l=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,n=["<",">",'"',"`"," ","\r","\n"," "],o=["{","}","|","\\","^","`"].concat(n),p=["'"].concat(o),q=["%","/","?",";","#"].concat(p),r=["/","?","#"],s=255,t=/^[a-z0-9A-Z_-]{0,63}$/,u=/^([a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=a("querystring");d.prototype.parse=function(a,b,c){if(!j.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=k.trim(d);var e=l.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&w[e]||(d=d.substr(2),this.slashes=!0)}if(!w[e]&&(g||e&&!x[e])){for(var h=-1,m=0;mn)&&(h=n)}var o,z;z=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==z&&(o=d.slice(0,z),d=d.slice(z+1),this.auth=decodeURIComponent(o)),h=-1;for(var m=0;mn)&&(h=n)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var B=this.hostname.split(/\./),m=0,C=B.length;C>m;m++){var D=B[m];if(D&&!D.match(t)){for(var E="",F=0,G=D.length;G>F;F++)E+=D.charCodeAt(F)>127?"x":D[F];if(!E.match(t)){var H=B.slice(0,m),I=B.slice(m+1),J=D.match(u);J&&(H.push(J[1]),I.unshift(J[2])),I.length&&(d="/"+I.join(".")+d),this.hostname=H.join(".");break}}}if(this.hostname=this.hostname.length>s?"":this.hostname.toLowerCase(),!A){for(var K=this.hostname.split("."),L=[],m=0;mm;m++){var P=p[m],Q=encodeURIComponent(P);Q===P&&(Q=escape(P)),d=d.split(P).join(Q)}var R=d.indexOf("#");-1!==R&&(this.hash=d.substr(R),d=d.slice(0,R));var S=d.indexOf("?");if(-1!==S?(this.search=d.substr(S),this.query=d.substr(S+1),b&&(this.query=y.parse(this.query)),d=d.slice(0,S)):b&&(this.search="",this.query={}),d&&(this.pathname=d),x[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var N=this.pathname||"",M=this.search||"";this.path=N+M}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j.isObject(this.query)&&k.keys(this.query).length&&(f=y.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==k.substr(b,-1)&&(b+=":"),this.slashes||(!b||x[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(j.isString(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(k.forEach(k.keys(this),function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return k.forEach(k.keys(a),function(b){"protocol"!==b&&(c[b]=a[b])}),x[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!x[a.protocol])return k.forEach(k.keys(a),function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||w[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),i=a.host||a.pathname&&"/"===a.pathname.charAt(0),l=i||h||c.host&&a.pathname,m=l,n=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],o=c.protocol&&!x[c.protocol];if(o&&(c.hostname="",c.port=null,c.host&&(""===n[0]?n[0]=c.host:n.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),l=l&&(""===e[0]||""===n[0])),i)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,n=e;else if(e.length)n||(n=[]),n.pop(),n=n.concat(e),c.search=a.search,c.query=a.query;else if(!j.isNullOrUndefined(a.search)){if(o){c.hostname=c.host=n.shift();var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return c.search=a.search,c.query=a.query,j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!n.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var q=n.slice(-1)[0],r=(c.host||a.host)&&("."===q||".."===q)||""===q,s=0,t=n.length;t>=0;t--)q=n[t],"."==q?n.splice(t,1):".."===q?(n.splice(t,1),s++):s&&(n.splice(t,1),s--);if(!l&&!m)for(;s--;s)n.unshift("..");!l||""===n[0]||n[0]&&"/"===n[0].charAt(0)||n.unshift(""),r&&"/"!==k.substr(n.join("/"),-1)&&n.push("");var u=""===n[0]||n[0]&&"/"===n[0].charAt(0);if(o){c.hostname=c.host=u?"":n.length?n.shift():"";var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return l=l||c.host&&n.length,l&&!u&&n.unshift(""),n.length?c.pathname=n.join("/"):(c.pathname=null,c.path=null),j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=m.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{_shims:2,querystring:6,util:8}],8:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a){return a}function g(a){var b={};return G.forEach(a,function(a){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=G.keys(b),p=g(o);if(a.showHidden&&(o=G.getOwnPropertyNames(b)),0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?l(a,b,c,d,String(g),!0):"");return G.forEach(e,function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=G.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),i||(G.indexOf(a.seen,j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=G.reduce(a,function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return G.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===C(a)}function w(a){return"object"==typeof a&&a}function x(a){return w(a)&&"[object Date]"===C(a)}function y(a){return w(a)&&"[object Error]"===C(a)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.binarySlice}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),I[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=a("_shims"),H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=B;var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=function(a,b){a.super_=b,a.prototype=G.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},c._extend=function(a,b){if(!b||!w(b))return a;for(var c=G.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{_shims:2}],9:[function(a,b,c){c.readIEEE754=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],10:[function(a,b,c){function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(b,c,f){if(E||(E=a("assert")),!(this instanceof e))return new e(b,c,f);if(this.parent=this,this.offset=0,"base64"==c&&"string"==typeof b)for(b=d(b);b.length%4!=0;)b+="=";var h;if("number"==typeof f){this.length=g(c);for(var j=0;j=b?b:a>=0?a:(a+=b,a>=0?a:0))}function g(a){return a=~~Math.ceil(+a),0>a?0:a}function h(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}function i(a){return h(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function j(a){return 16>a?"0"+a.toString(16):a.toString(16)}function k(a){for(var b=[],c=0;ce&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function o(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function p(a,b,c,d){var e=0;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=a.length?0:(c?(e=a[b]<<8,b+1=a.length?0:(c?(b+1>>0):(b+2>>0)),e)}function r(a,b,c,d){var e,f;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=0,"specified a negative value for writing an unsigned value"),E.ok(b>=a,"value is larger than maximum value for type"),E.ok(Math.floor(a)===a,"value has a fractional component")}function w(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1>>8*(d?1-f:f)}function x(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3>>8*(d?3-f:f)&255}function y(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value"),E.ok(Math.floor(a)===a,"value has a fractional component")}function z(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value")}function A(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e)}function B(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e)}function C(b,c,d,e,f){f||(E.ok(void 0!==c&&null!==c,"missing value"),E.ok("boolean"==typeof e,"missing or invalid endian"),E.ok(void 0!==d&&null!==d,"missing offset"),E.ok(d+3a||a>=this.length)throw new Error("oob");return this[a]},e.prototype.set=function(a,b){if(0>a||a>=this.length)throw new Error("oob");return this[a]=b},e.byteLength=function(a,b){switch(b||"utf8"){case"hex":return a.length/2;case"utf8":case"utf-8":return k(a).length;case"ascii":case"binary":return a.length;case"base64":return m(a).length;default:throw new Error("Unknown encoding")}},e.prototype.utf8Write=function(a,b,c){return e._charsWritten=n(k(a),this,b,c)},e.prototype.asciiWrite=function(a,b,c){return e._charsWritten=n(l(a),this,b,c)},e.prototype.binaryWrite=e.prototype.asciiWrite,e.prototype.base64Write=function(a,b,c){return e._charsWritten=n(m(a),this,b,c)},e.prototype.base64Slice=function(){var b=Array.prototype.slice.apply(this,arguments);return a("base64-js").fromByteArray(b)},e.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",d=0;dd;d++)if(a[d]=j(this[d]),d==c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},e.prototype.hexSlice=function(a,b){var c=this.length;(!a||0>a)&&(a=0),(!b||0>b||b>c)&&(b=c);for(var d="",e=a;b>e;e++)d+=j(this[e]);return d},e.prototype.toString=function(a,b,c){if(a=String(a||"utf8").toLowerCase(),b=+b||0,"undefined"==typeof c&&(c=this.length),+c==b)return"";switch(a){case"hex":return this.hexSlice(b,c);case"utf8":case"utf-8":return this.utf8Slice(b,c);case"ascii":return this.asciiSlice(b,c);case"binary":return this.binarySlice(b,c);case"base64":return this.base64Slice(b,c);case"ucs2":case"ucs-2":return this.ucs2Slice(b,c);default:throw new Error("Unknown encoding")}},e.prototype.hexWrite=function(a,b,c){b=+b||0;var d=this.length-b;c?(c=+c,c>d&&(c=d)):c=d;var f=a.length;if(f%2)throw new Error("Invalid hex string");c>f/2&&(c=f/2);for(var g=0;c>g;g++){var h=parseInt(a.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");this[b+g]=h}return e._charsWritten=2*g,g},e.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b,b=c,c=e}b=+b||0;var f=this.length-b;switch(c?(c=+c,c>f&&(c=f)):c=f,d=String(d||"utf8").toLowerCase()){case"hex":return this.hexWrite(a,b,c);case"utf8":case"utf-8":return this.utf8Write(a,b,c);case"ascii":return this.asciiWrite(a,b,c);case"binary":return this.binaryWrite(a,b,c);case"base64":return this.base64Write(a,b,c);case"ucs2":case"ucs-2":return this.ucs2Write(a,b,c);default:throw new Error("Unknown encoding")}},e.prototype.slice=function(a,b){var c=this.length;return a=f(a,c,0),b=f(b,c,c),new e(this,b-a,+a)},e.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),(void 0===d||isNaN(d))&&(d=this.length),b||(b=0),c>d)throw new Error("sourceEnd < sourceStart");if(d===c)return 0;if(0==a.length||0==e.length)return 0;if(0>b||b>=a.length)throw new Error("targetStart out of bounds");if(0>c||c>=e.length)throw new Error("sourceStart out of bounds");if(0>d||d>e.length)throw new Error("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bg;g++)E.ok("undefined"!=typeof this[g],"copying undefined buffer bytes!"),f.push(this[g]);for(var g=b;gc)throw new Error("end < start");if(c===b)return 0;if(0==this.length)return 0;if(0>b||b>=this.length)throw new Error("start out of bounds");if(0>c||c>this.length)throw new Error("end out of bounds");for(var d=b;c>d;d++)this[d]=a},e.isBuffer=function(a){return a instanceof e||a instanceof e},e.concat=function(a,b){if(!h(a))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new e(0);if(1===a.length)return a[0];if("number"!=typeof b){b=0;for(var c=0;c=c.length?void 0:c[a]},e.prototype.readUInt16LE=function(a,b){return p(this,a,!1,b)},e.prototype.readUInt16BE=function(a,b){return p(this,a,!0,b)},e.prototype.readUInt32LE=function(a,b){return q(this,a,!1,b)},e.prototype.readUInt32BE=function(a,b){return q(this,a,!0,b)},e.prototype.readInt8=function(a,b){var c,d=this;return b||(E.ok(void 0!==a&&null!==a,"missing offset"),E.ok(a=d.length?void 0:(c=128&d[a],c?-1*(255-d[a]+1):d[a])},e.prototype.readInt16LE=function(a,b){return r(this,a,!1,b)},e.prototype.readInt16BE=function(a,b){return r(this,a,!0,b)},e.prototype.readInt32LE=function(a,b){return s(this,a,!1,b)},e.prototype.readInt32BE=function(a,b){return s(this,a,!0,b)},e.prototype.readFloatLE=function(a,b){return t(this,a,!1,b)},e.prototype.readFloatBE=function(a,b){return t(this,a,!0,b)},e.prototype.readDoubleLE=function(a,b){return u(this,a,!1,b)},e.prototype.readDoubleBE=function(a,b){return u(this,a,!0,b)},e.prototype.writeUInt8=function(a,b,c){var d=this;c||(E.ok(void 0!==a&&null!==a,"missing value"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b=0?d.writeUInt8(a,b,c):d.writeUInt8(255+a+1,b,c)},e.prototype.writeInt16LE=function(a,b,c){A(this,a,b,!1,c)},e.prototype.writeInt16BE=function(a,b,c){A(this,a,b,!0,c)},e.prototype.writeInt32LE=function(a,b,c){B(this,a,b,!1,c)},e.prototype.writeInt32BE=function(a,b,c){B(this,a,b,!0,c)},e.prototype.writeFloatLE=function(a,b,c){C(this,a,b,!1,c)},e.prototype.writeFloatBE=function(a,b,c){C(this,a,b,!0,c)},e.prototype.writeDoubleLE=function(a,b,c){D(this,a,b,!1,c)},e.prototype.writeDoubleBE=function(a,b,c){D(this,a,b,!0,c)}},{"./buffer_ieee754":9,assert:3,"base64-js":11}],11:[function(a,b){!function(){"use strict";function a(a){var b,c,e,f,g,h;if(a.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(g=a.indexOf("="),g=g>0?a.length-g:0,h=[],e=g>0?a.length-4:a.length,b=0,c=0;e>b;b+=4,c+=3)f=d.indexOf(a[b])<<18|d.indexOf(a[b+1])<<12|d.indexOf(a[b+2])<<6|d.indexOf(a[b+3]),h.push((16711680&f)>>16),h.push((65280&f)>>8),h.push(255&f);return 2===g?(f=d.indexOf(a[b])<<2|d.indexOf(a[b+1])>>4,h.push(255&f)):1===g&&(f=d.indexOf(a[b])<<10|d.indexOf(a[b+1])<<4|d.indexOf(a[b+2])>>2,h.push(f>>8&255),h.push(255&f)),h}function c(a){function b(a){return d[a>>18&63]+d[a>>12&63]+d[a>>6&63]+d[63&a]}var c,e,f,g=a.length%3,h="";for(c=0,f=a.length-g;f>c;c+=3)e=(a[c]<<16)+(a[c+1]<<8)+a[c+2],h+=b(e);switch(g){case 1:e=a[a.length-1],h+=d[e>>2],h+=d[e<<4&63],h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=d[e>>10],h+=d[e>>4&63],h+=d[e<<2&63],h+="="}return h}var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports.toByteArray=a,b.exports.fromByteArray=c}()},{}],12:[function(a,b){a=function c(b,d,e){function f(h,i){if(!d[h]){if(!b[h]){var j="function"==typeof a&&a;if(!i&&j)return j(h,!0);if(g)return g(h,!0);throw new Error("Cannot find module '"+h+"'")}var k=d[h]={exports:{}};b[h][0].call(k.exports,function(a){var c=b[h][1][a];return f(c?c:a)},k,k.exports,c,b,d,e)}return d[h].exports}for(var g="function"==typeof a&&a,h=0;h>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],q9TxCC:[function(a,b,c){function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(b,c,f){if(E||(E=a("assert")),!(this instanceof e))return new e(b,c,f);if(this.parent=this,this.offset=0,"base64"==c&&"string"==typeof b)for(b=d(b);b.length%4!=0;)b+="=";var h;if("number"==typeof f){this.length=g(c);for(var j=0;j=b?b:a>=0?a:(a+=b,a>=0?a:0))}function g(a){return a=~~Math.ceil(+a),0>a?0:a}function h(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}function i(a){return h(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function j(a){return 16>a?"0"+a.toString(16):a.toString(16)}function k(a){for(var b=[],c=0;ce&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function o(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function p(a,b,c,d){var e=0;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=a.length?0:(c?(e=a[b]<<8,b+1=a.length?0:(c?(b+1>>0):(b+2>>0)),e)}function r(a,b,c,d){var e,f;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=0,"specified a negative value for writing an unsigned value"),E.ok(b>=a,"value is larger than maximum value for type"),E.ok(Math.floor(a)===a,"value has a fractional component")}function w(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1>>8*(d?1-f:f)}function x(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3>>8*(d?3-f:f)&255}function y(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value"),E.ok(Math.floor(a)===a,"value has a fractional component")}function z(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value")}function A(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e)}function B(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e)}function C(b,c,d,e,f){f||(E.ok(void 0!==c&&null!==c,"missing value"),E.ok("boolean"==typeof e,"missing or invalid endian"),E.ok(void 0!==d&&null!==d,"missing offset"),E.ok(d+3a||a>=this.length)throw new Error("oob");return this[a]},e.prototype.set=function(a,b){if(0>a||a>=this.length)throw new Error("oob");return this[a]=b},e.byteLength=function(a,b){switch(b||"utf8"){case"hex":return a.length/2;case"utf8":case"utf-8":return k(a).length;case"ascii":case"binary":return a.length;case"base64":return m(a).length;default:throw new Error("Unknown encoding")}},e.prototype.utf8Write=function(a,b,c){return e._charsWritten=n(k(a),this,b,c)},e.prototype.asciiWrite=function(a,b,c){return e._charsWritten=n(l(a),this,b,c)},e.prototype.binaryWrite=e.prototype.asciiWrite,e.prototype.base64Write=function(a,b,c){return e._charsWritten=n(m(a),this,b,c)},e.prototype.base64Slice=function(){var b=Array.prototype.slice.apply(this,arguments);return a("base64-js").fromByteArray(b)},e.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",d=0;dd;d++)if(a[d]=j(this[d]),d==c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},e.prototype.hexSlice=function(a,b){var c=this.length;(!a||0>a)&&(a=0),(!b||0>b||b>c)&&(b=c);for(var d="",e=a;b>e;e++)d+=j(this[e]);return d},e.prototype.toString=function(a,b,c){if(a=String(a||"utf8").toLowerCase(),b=+b||0,"undefined"==typeof c&&(c=this.length),+c==b)return"";switch(a){case"hex":return this.hexSlice(b,c);case"utf8":case"utf-8":return this.utf8Slice(b,c);case"ascii":return this.asciiSlice(b,c);case"binary":return this.binarySlice(b,c);case"base64":return this.base64Slice(b,c);case"ucs2":case"ucs-2":return this.ucs2Slice(b,c);default:throw new Error("Unknown encoding")}},e.prototype.hexWrite=function(a,b,c){b=+b||0;var d=this.length-b;c?(c=+c,c>d&&(c=d)):c=d;var f=a.length;if(f%2)throw new Error("Invalid hex string");c>f/2&&(c=f/2);for(var g=0;c>g;g++){var h=parseInt(a.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");this[b+g]=h}return e._charsWritten=2*g,g},e.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b,b=c,c=e}b=+b||0;var f=this.length-b;switch(c?(c=+c,c>f&&(c=f)):c=f,d=String(d||"utf8").toLowerCase()){case"hex":return this.hexWrite(a,b,c);case"utf8":case"utf-8":return this.utf8Write(a,b,c);case"ascii":return this.asciiWrite(a,b,c);case"binary":return this.binaryWrite(a,b,c);case"base64":return this.base64Write(a,b,c);case"ucs2":case"ucs-2":return this.ucs2Write(a,b,c);default:throw new Error("Unknown encoding")}},e.prototype.slice=function(a,b){var c=this.length;return a=f(a,c,0),b=f(b,c,c),new e(this,b-a,+a)},e.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),(void 0===d||isNaN(d))&&(d=this.length),b||(b=0),c>d)throw new Error("sourceEnd < sourceStart");if(d===c)return 0;if(0==a.length||0==e.length)return 0;if(0>b||b>=a.length)throw new Error("targetStart out of bounds");if(0>c||c>=e.length)throw new Error("sourceStart out of bounds");if(0>d||d>e.length)throw new Error("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bg;g++)E.ok("undefined"!=typeof this[g],"copying undefined buffer bytes!"),f.push(this[g]);for(var g=b;gc)throw new Error("end < start");if(c===b)return 0;if(0==this.length)return 0;if(0>b||b>=this.length)throw new Error("start out of bounds");if(0>c||c>this.length)throw new Error("end out of bounds");for(var d=b;c>d;d++)this[d]=a},e.isBuffer=function(a){return a instanceof e||a instanceof e},e.concat=function(a,b){if(!h(a))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new e(0);if(1===a.length)return a[0];if("number"!=typeof b){b=0;for(var c=0;c=c.length?void 0:c[a]},e.prototype.readUInt16LE=function(a,b){return p(this,a,!1,b)},e.prototype.readUInt16BE=function(a,b){return p(this,a,!0,b)},e.prototype.readUInt32LE=function(a,b){return q(this,a,!1,b)},e.prototype.readUInt32BE=function(a,b){return q(this,a,!0,b)},e.prototype.readInt8=function(a,b){var c,d=this;return b||(E.ok(void 0!==a&&null!==a,"missing offset"),E.ok(a=d.length?void 0:(c=128&d[a],c?-1*(255-d[a]+1):d[a])},e.prototype.readInt16LE=function(a,b){return r(this,a,!1,b)},e.prototype.readInt16BE=function(a,b){return r(this,a,!0,b)},e.prototype.readInt32LE=function(a,b){return s(this,a,!1,b)},e.prototype.readInt32BE=function(a,b){return s(this,a,!0,b)},e.prototype.readFloatLE=function(a,b){return t(this,a,!1,b)},e.prototype.readFloatBE=function(a,b){return t(this,a,!0,b)},e.prototype.readDoubleLE=function(a,b){return u(this,a,!1,b)},e.prototype.readDoubleBE=function(a,b){return u(this,a,!0,b)},e.prototype.writeUInt8=function(a,b,c){var d=this;c||(E.ok(void 0!==a&&null!==a,"missing value"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b=0?d.writeUInt8(a,b,c):d.writeUInt8(255+a+1,b,c)},e.prototype.writeInt16LE=function(a,b,c){A(this,a,b,!1,c)},e.prototype.writeInt16BE=function(a,b,c){A(this,a,b,!0,c)},e.prototype.writeInt32LE=function(a,b,c){B(this,a,b,!1,c)},e.prototype.writeInt32BE=function(a,b,c){B(this,a,b,!0,c)},e.prototype.writeFloatLE=function(a,b,c){C(this,a,b,!1,c)},e.prototype.writeFloatBE=function(a,b,c){C(this,a,b,!0,c)},e.prototype.writeDoubleLE=function(a,b,c){D(this,a,b,!1,c)},e.prototype.writeDoubleBE=function(a,b,c){D(this,a,b,!0,c)}},{"./buffer_ieee754":1,assert:6,"base64-js":4}],"buffer-browserify":[function(a,b){b.exports=a("q9TxCC")},{}],4:[function(a,b){!function(){"use strict";function a(a){var b,c,e,f,g,h;if(a.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(g=a.indexOf("="),g=g>0?a.length-g:0,h=[],e=g>0?a.length-4:a.length,b=0,c=0;e>b;b+=4,c+=3)f=d.indexOf(a[b])<<18|d.indexOf(a[b+1])<<12|d.indexOf(a[b+2])<<6|d.indexOf(a[b+3]),h.push((16711680&f)>>16),h.push((65280&f)>>8),h.push(255&f);return 2===g?(f=d.indexOf(a[b])<<2|d.indexOf(a[b+1])>>4,h.push(255&f)):1===g&&(f=d.indexOf(a[b])<<10|d.indexOf(a[b+1])<<4|d.indexOf(a[b+2])>>2,h.push(f>>8&255),h.push(255&f)),h}function c(a){function b(a){return d[a>>18&63]+d[a>>12&63]+d[a>>6&63]+d[63&a]}var c,e,f,g=a.length%3,h="";for(c=0,f=a.length-g;f>c;c+=3)e=(a[c]<<16)+(a[c+1]<<8)+a[c+2],h+=b(e);switch(g){case 1:e=a[a.length-1],h+=d[e>>2],h+=d[e<<4&63],h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=d[e>>10],h+=d[e>>4&63],h+=d[e<<2&63],h+="="}return h}var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports.toByteArray=a,b.exports.fromByteArray=c}()},{}],5:[function(a,b,c){function d(a){return"[object Array]"===j.call(a)}function e(a,b){var c;if(null===a)c={__proto__:null};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return"undefined"!=typeof b&&Object.defineProperties&&Object.defineProperties(c,b),c}function f(a){return"object"!=typeof a&&"function"!=typeof a||null===a}function g(a){if(f(a))throw new TypeError("Object.keys called on a non-object");var b=[];for(var c in a)k.call(a,c)&&b.push(c);return b}function h(a){if(f(a))throw new TypeError("Object.getOwnPropertyNames called on a non-object");var b=g(a);return c.isArray(a)&&-1===c.indexOf(a,"length")&&b.push("length"),b}function i(a,b){return{value:a[b]}}var j=Object.prototype.toString,k=Object.prototype.hasOwnProperty;c.isArray="function"==typeof Array.isArray?Array.isArray:d,c.indexOf=function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;cf;++f)a.hasOwnProperty(f)&&(e?d=b(d,a[f],f,a):(d=a[f],e=!0));return d},c.substr="b"!=="ab".substr(-1)?function(a,b,c){return 0>b&&(b=a.length+b),a.substr(b,c)}:function(a,b,c){return a.substr(b,c)},c.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},c.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var c=a.shift();return function(){b.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}},c.create="function"==typeof Object.create?Object.create:e;var l="function"==typeof Object.keys?Object.keys:g,m="function"==typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:h;if((new Error).hasOwnProperty("description")){var n=function(a,b){return"[object Error]"===j.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a})),b};c.keys=function(a){return n(a,l(a))},c.getOwnPropertyNames=function(a){return n(a,m(a))}}else c.keys=l,c.getOwnPropertyNames=m;if("function"==typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(o){c.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return i(a,b)}}}else c.getOwnPropertyDescriptor=i},{}],6:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:!m.isNumber(b)||!isNaN(b)&&isFinite(b)?m.isFunction(b)||m.isRegExp(b)?b.toString():b:b.toString()}function d(a,b){return m.isString(a)?a.length=0;d--)if(e[d]!=f[d])return!1;for(d=e.length-1;d>=0;d--)if(c=e[d],!h(a[c],b[c]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util"),n=a("_shims"),o=Array.prototype.slice,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,this.message=a.message||e(this)},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p.throws=function(){l.apply(this,[!0].concat(o.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(o.call(arguments)))},p.ifError=function(a){if(a)throw a}},{_shims:5,util:7}],7:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a){return a}function g(a){var b={};return G.forEach(a,function(a){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=G.keys(b),p=g(o);if(a.showHidden&&(o=G.getOwnPropertyNames(b)),0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?l(a,b,c,d,String(g),!0):"");return G.forEach(e,function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=G.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),i||(G.indexOf(a.seen,j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=G.reduce(a,function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1 },0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return G.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===C(a)}function w(a){return"object"==typeof a&&a}function x(a){return w(a)&&"[object Date]"===C(a)}function y(a){return w(a)&&"[object Error]"===C(a)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return a instanceof Buffer}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),I[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=a("_shims"),H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=B;var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=function(a,b){a.super_=b,a.prototype=G.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},c._extend=function(a,b){if(!b||!w(b))return a;for(var c=G.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{_shims:5}]},{},[]),b.exports=a("buffer-browserify")},{}],13:[function(a,b){var c=b.exports={};c.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],14:[function(a,b){b.exports={compact:a("./arrays/compact"),difference:a("./arrays/difference"),drop:a("./arrays/rest"),findIndex:a("./arrays/findIndex"),findLastIndex:a("./arrays/findLastIndex"),first:a("./arrays/first"),flatten:a("./arrays/flatten"),head:a("./arrays/first"),indexOf:a("./arrays/indexOf"),initial:a("./arrays/initial"),intersection:a("./arrays/intersection"),last:a("./arrays/last"),lastIndexOf:a("./arrays/lastIndexOf"),object:a("./arrays/zipObject"),pull:a("./arrays/pull"),range:a("./arrays/range"),remove:a("./arrays/remove"),rest:a("./arrays/rest"),sortedIndex:a("./arrays/sortedIndex"),tail:a("./arrays/rest"),take:a("./arrays/first"),union:a("./arrays/union"),uniq:a("./arrays/uniq"),unique:a("./arrays/uniq"),unzip:a("./arrays/zip"),without:a("./arrays/without"),xor:a("./arrays/xor"),zip:a("./arrays/zip"),zipObject:a("./arrays/zipObject")}},{"./arrays/compact":15,"./arrays/difference":16,"./arrays/findIndex":17,"./arrays/findLastIndex":18,"./arrays/first":19,"./arrays/flatten":20,"./arrays/indexOf":21,"./arrays/initial":22,"./arrays/intersection":23,"./arrays/last":24,"./arrays/lastIndexOf":25,"./arrays/pull":26,"./arrays/range":27,"./arrays/remove":28,"./arrays/rest":29,"./arrays/sortedIndex":30,"./arrays/union":31,"./arrays/uniq":32,"./arrays/without":33,"./arrays/xor":34,"./arrays/zip":35,"./arrays/zipObject":36}],15:[function(a,b){function c(a){for(var b=-1,c=a?a.length:0,d=[];++bc?f(0,g+c):c||0}else if(c){var h=e(a,b);return a[h]===b?h:-1}return d(a,b,c)}var d=a("../internals/baseIndexOf"),e=a("./sortedIndex"),f=Math.max;b.exports=c},{"../internals/baseIndexOf":96,"./sortedIndex":30}],22:[function(a,b){function c(a,b,c){var h=0,i=a?a.length:0;if("number"!=typeof b&&null!=b){var j=i;for(b=d(b,c,3);j--&&b(a[j],j,a);)h++}else h=null==b||c?1:b||h;return e(a,0,g(f(0,i-h),i))}var d=a("../functions/createCallback"),e=a("../internals/slice"),f=Math.max,g=Math.min;b.exports=c},{"../functions/createCallback":76,"../internals/slice":129}],23:[function(a,b){function c(){for(var a=[],b=-1,c=arguments.length,m=g(),n=d,o=n===d,p=g();++b=j&&f(b?a[b]:p)))}var r=a[0],s=-1,t=r?r.length:0,u=[];a:for(;++sc?d(0,f+c):e(c,f-1))+1);f--;)if(a[f]===b)return f;return-1}var d=Math.max,e=Math.min;b.exports=c},{}],26:[function(a,b){function c(a){for(var b=arguments,c=0,d=b.length,f=a?a.length:0;++cg;){var i=g+h>>>1;c(a[i])1?arguments:arguments[0],b=-1,c=a?d(e(a,"length")):0,f=Array(0>c?0:c);++bc?h(0,k+c):c)||0,f(a)?l=j(a,b,c)>-1:"number"==typeof k?l=(g(a)?a.indexOf(b,c):j(a,b,c))>-1:e(a,function(a){return++i>=c?!(l=a===b):void 0}),l}var d=a("../internals/baseIndexOf"),e=a("../objects/forOwn"),f=a("../objects/isArray"),g=a("../objects/isString"),h=Math.max;b.exports=c},{"../internals/baseIndexOf":96,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161}],46:[function(a,b){var c=a("../internals/createAggregator"),d=Object.prototype,e=d.hasOwnProperty,f=c(function(a,b,c){e.call(a,c)?a[c]++:a[c]=1});b.exports=f},{"../internals/createAggregator":105}],47:[function(a,b){function c(a,b,c){var f=!0;b=d(b,c,3);var g=-1,h=a?a.length:0;if("number"==typeof h)for(;++gj&&(j=m)}else b=null==b&&h(a)?d:e(b,c,3),f(a,function(a,c,d){var e=b(a,c,d);e>i&&(i=e,j=a)});return j}var d=a("../internals/charAtCallback"),e=a("../functions/createCallback"),f=a("./forEach"),g=(a("../objects/forOwn"),a("../objects/isArray")),h=a("../objects/isString");b.exports=c},{"../functions/createCallback":76,"../internals/charAtCallback":103,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161,"./forEach":51}],58:[function(a,b){function c(a,b,c){var i=1/0,j=i;if("function"!=typeof b&&c&&c[b]===a&&(b=null),null==b&&g(a))for(var k=-1,l=a.length;++km&&(j=m)}else b=null==b&&h(a)?d:e(b,c,3),f(a,function(a,c,d){var e=b(a,c,d);i>e&&(i=e,j=a)});return j}var d=a("../internals/charAtCallback"),e=a("../functions/createCallback"),f=a("./forEach"),g=(a("../objects/forOwn"),a("../objects/isArray")),h=a("../objects/isString");b.exports=c},{"../functions/createCallback":76,"../internals/charAtCallback":103,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161,"./forEach":51}],59:[function(a,b){var c=a("./map"),d=c;b.exports=d},{"./map":56}],60:[function(a,b){function c(a,b,c,f){if(!a)return c;var g=arguments.length<3;b=d(b,f,4);var h=-1,i=a.length;if("number"==typeof i)for(g&&(c=a[++h]);++h2?d(a,17,e(arguments,2),null,b):d(a,1,null,null,b)}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],73:[function(a,b){function c(a){for(var b=arguments.length>1?d(arguments,!0,!1,1):f(a),c=-1,g=b.length;++c2?d(b,19,e(arguments,2),null,a):d(b,3,null,null,a)}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],75:[function(a,b){function c(){for(var a=arguments,b=a.length;b--;)if(!d(a[b]))throw new TypeError;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}var d=a("../objects/isFunction");b.exports=c},{"../objects/isFunction":154}],76:[function(a,b){function c(a,b,c){var i=typeof a;if(null==a||"function"==i)return d(a,b,c);if("object"!=i)return h(a);var j=g(a),k=j[0],l=a[k];return 1!=j.length||l!==l||f(l)?function(b){for(var c=j.length,d=!1;c--&&(d=e(b[j[c]],a[j[c]],null,!0)););return d}:function(a){var b=a[k];return l===b&&(0!==l||1/l==1/b)}}var d=a("../internals/baseCreateCallback"),e=a("../internals/baseIsEqual"),f=a("../objects/isObject"),g=a("../objects/keys"),h=a("../utilities/property");b.exports=c},{"../internals/baseCreateCallback":92,"../internals/baseIsEqual":97,"../objects/isObject":158,"../objects/keys":163,"../utilities/property":181}],77:[function(a,b){function c(a,b){return b="number"==typeof b?b:+b||a.length,d(a,4,null,null,null,b)}var d=a("../internals/createWrapper");b.exports=c},{"../internals/createWrapper":107}],78:[function(a,b){function c(a,b,c){var h,i,j,k,l,m,n,o=0,p=!1,q=!0;if(!d(a))throw new TypeError;if(b=g(0,b)||0,c===!0){var r=!0;q=!1}else e(c)&&(r=c.leading,p="maxWait"in c&&(g(b,c.maxWait)||0),q="trailing"in c?c.trailing:q);var s=function(){var c=b-(f()-k);if(0>=c){i&&clearTimeout(i);var d=n;i=m=n=void 0,d&&(o=f(),j=a.apply(l,h),m||i||(h=l=null))}else m=setTimeout(s,c)},t=function(){m&&clearTimeout(m),i=m=n=void 0,(q||p!==b)&&(o=f(),j=a.apply(l,h),m||i||(h=l=null))};return function(){if(h=arguments,k=f(),l=this,n=q&&(m||!r),p===!1)var c=r&&!m;else{i||r||(o=k);var d=p-(k-o),e=0>=d;e?(i&&(i=clearTimeout(i)),o=k,j=a.apply(l,h)):i||(i=setTimeout(t,d))}return e&&m?m=clearTimeout(m):m||b===p||(m=setTimeout(s,b)),c&&(e=!0,j=a.apply(l,h)),!e||m||i||(h=l=null),j}}var d=a("../objects/isFunction"),e=a("../objects/isObject"),f=a("../utilities/now"),g=Math.max;b.exports=c},{"../objects/isFunction":154,"../objects/isObject":158,"../utilities/now":179}],79:[function(a,b){function c(a){if(!d(a))throw new TypeError;var b=e(arguments,1);return setTimeout(function(){a.apply(void 0,b)},1)}var d=a("../objects/isFunction"),e=a("../internals/slice");b.exports=c},{"../internals/slice":129,"../objects/isFunction":154}],80:[function(a,b){function c(a,b){if(!d(a))throw new TypeError;var c=e(arguments,2);return setTimeout(function(){a.apply(void 0,c)},b)}var d=a("../objects/isFunction"),e=a("../internals/slice");b.exports=c},{"../internals/slice":129,"../objects/isFunction":154}],81:[function(a,b){function c(a,b){if(!d(a))throw new TypeError;var c=function(){var d=c.cache,f=b?b.apply(this,arguments):e+arguments[0];return g.call(d,f)?d[f]:d[f]=a.apply(this,arguments)};return c.cache={},c}var d=a("../objects/isFunction"),e=a("../internals/keyPrefix"),f=Object.prototype,g=f.hasOwnProperty;b.exports=c},{"../internals/keyPrefix":115,"../objects/isFunction":154}],82:[function(a,b){function c(a){var b,c;if(!d(a))throw new TypeError;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}var d=a("../objects/isFunction");b.exports=c},{"../objects/isFunction":154}],83:[function(a,b){function c(a){return d(a,16,e(arguments,1))}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],84:[function(a,b){function c(a){return d(a,32,null,e(arguments,1))}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],85:[function(a,b){function c(a,b,c){var h=!0,i=!0;if(!e(a))throw new TypeError;return c===!1?h=!1:f(c)&&(h="leading"in c?c.leading:h,i="trailing"in c?c.trailing:i),g.leading=h,g.maxWait=b,g.trailing=i,d(a,b,g)}var d=a("./debounce"),e=a("../objects/isFunction"),f=a("../objects/isObject"),g={leading:!1,maxWait:0,trailing:!1};b.exports=c},{"../objects/isFunction":154,"../objects/isObject":158,"./debounce":78}],86:[function(a,b){function c(a,b){return d(b,16,[a])}var d=a("../internals/createWrapper");b.exports=c},{"../internals/createWrapper":107}],87:[function(a,b){function c(a){return a&&"object"==typeof a&&!l(a)&&r.call(a,"__wrapped__")?a:new m(a)}var d=a("./arrays"),e=a("./chaining"),f=a("./collections"),g=a("./functions"),h=a("./objects"),i=a("./utilities"),j=a("./collections/forEach"),k=a("./objects/forOwn"),l=a("./objects/isArray"),m=a("./internals/lodashWrapper"),n=a("./utilities/mixin"),o=a("./support"),p=(a("./utilities/templateSettings"),[]),q=Object.prototype,r=q.hasOwnProperty;m.prototype=c.prototype,n=function(a){var b=h.functions;return function(d,e,f){return e&&(f||b(e).length)||(null==f&&(f=e),e=d,d=c),a(d,e,f)}}(n),c.after=g.after,c.assign=h.assign,c.at=f.at,c.bind=g.bind,c.bindAll=g.bindAll,c.bindKey=g.bindKey,c.chain=e.chain,c.compact=d.compact,c.compose=g.compose,c.constant=i.constant,c.countBy=f.countBy,c.create=h.create,c.createCallback=g.createCallback,c.curry=g.curry,c.debounce=g.debounce,c.defaults=h.defaults,c.defer=g.defer,c.delay=g.delay,c.difference=d.difference,c.filter=f.filter,c.flatten=d.flatten,c.forEach=j,c.forEachRight=f.forEachRight,c.forIn=h.forIn,c.forInRight=h.forInRight,c.forOwn=k,c.forOwnRight=h.forOwnRight,c.functions=h.functions,c.groupBy=f.groupBy,c.indexBy=f.indexBy,c.initial=d.initial,c.intersection=d.intersection,c.invert=h.invert,c.invoke=f.invoke,c.keys=h.keys,c.map=f.map,c.mapValues=h.mapValues,c.max=f.max,c.memoize=g.memoize,c.merge=h.merge,c.min=f.min,c.omit=h.omit,c.once=g.once,c.pairs=h.pairs,c.partial=g.partial,c.partialRight=g.partialRight,c.pick=h.pick,c.pluck=f.pluck,c.property=i.property,c.pull=d.pull,c.range=d.range,c.reject=f.reject,c.remove=d.remove,c.rest=d.rest,c.shuffle=f.shuffle,c.sortBy=f.sortBy,c.tap=e.tap,c.throttle=g.throttle,c.times=i.times,c.toArray=f.toArray,c.transform=h.transform,c.union=d.union,c.uniq=d.uniq,c.values=h.values,c.where=f.where,c.without=d.without,c.wrap=g.wrap,c.xor=d.xor,c.zip=d.zip,c.zipObject=d.zipObject,c.collect=f.map,c.drop=d.rest,c.each=j,c.eachRight=f.forEachRight,c.extend=h.assign,c.methods=h.functions,c.object=d.zipObject,c.select=f.filter,c.tail=d.rest,c.unique=d.uniq,c.unzip=d.zip,n(c),c.clone=h.clone,c.cloneDeep=h.cloneDeep,c.contains=f.contains,c.escape=i.escape,c.every=f.every,c.find=f.find,c.findIndex=d.findIndex,c.findKey=h.findKey,c.findLast=f.findLast,c.findLastIndex=d.findLastIndex,c.findLastKey=h.findLastKey,c.has=h.has,c.identity=i.identity,c.indexOf=d.indexOf,c.isArguments=h.isArguments,c.isArray=l,c.isBoolean=h.isBoolean,c.isDate=h.isDate,c.isElement=h.isElement,c.isEmpty=h.isEmpty,c.isEqual=h.isEqual,c.isFinite=h.isFinite,c.isFunction=h.isFunction,c.isNaN=h.isNaN,c.isNull=h.isNull,c.isNumber=h.isNumber,c.isObject=h.isObject,c.isPlainObject=h.isPlainObject,c.isRegExp=h.isRegExp,c.isString=h.isString,c.isUndefined=h.isUndefined,c.lastIndexOf=d.lastIndexOf,c.mixin=n,c.noConflict=i.noConflict,c.noop=i.noop,c.now=i.now,c.parseInt=i.parseInt,c.random=i.random,c.reduce=f.reduce,c.reduceRight=f.reduceRight,c.result=i.result,c.size=f.size,c.some=f.some,c.sortedIndex=d.sortedIndex,c.template=i.template,c.unescape=i.unescape,c.uniqueId=i.uniqueId,c.all=f.every,c.any=f.some,c.detect=f.find,c.findWhere=f.find,c.foldl=f.reduce,c.foldr=f.reduceRight,c.include=f.contains,c.inject=f.reduce,n(function(){var a={};return k(c,function(b,d){c.prototype[d]||(a[d]=b)}),a}(),!1),c.first=d.first,c.last=d.last,c.sample=f.sample,c.take=d.first,c.head=d.first,k(c,function(a,b){var d="sample"!==b; c.prototype[b]||(c.prototype[b]=function(b,c){var e=this.__chain__,f=a(this.__wrapped__,b,c);return e||null!=b&&(!c||d&&"function"==typeof b)?new m(f,e):f})}),c.VERSION="2.4.1",c.prototype.chain=e.wrapperChain,c.prototype.toString=e.wrapperToString,c.prototype.value=e.wrapperValueOf,c.prototype.valueOf=e.wrapperValueOf,j(["join","pop","shift"],function(a){var b=p[a];c.prototype[a]=function(){var a=this.__chain__,c=b.apply(this.__wrapped__,arguments);return a?new m(c,a):c}}),j(["push","reverse","sort","unshift"],function(a){var b=p[a];c.prototype[a]=function(){return b.apply(this.__wrapped__,arguments),this}}),j(["concat","slice","splice"],function(a){var b=p[a];c.prototype[a]=function(){return new m(b.apply(this.__wrapped__,arguments),this.__chain__)}}),c.support=o,(c.templateSettings=i.templateSettings).imports._=c,b.exports=c},{"./arrays":14,"./chaining":37,"./collections":43,"./collections/forEach":51,"./functions":70,"./internals/lodashWrapper":117,"./objects":131,"./objects/forOwn":141,"./objects/isArray":147,"./support":171,"./utilities":172,"./utilities/mixin":176,"./utilities/templateSettings":185}],88:[function(a,b){var c=[];b.exports=c},{}],89:[function(a,b){function c(a){function b(){if(h){var a=g(h);i.apply(a,arguments)}if(this instanceof b){var f=d(c.prototype),k=c.apply(f,a||arguments);return e(k)?k:f}return c.apply(j,a||arguments)}var c=a[0],h=a[2],j=a[4];return f(b,a),b}var d=a("./baseCreate"),e=a("../objects/isObject"),f=a("./setBindData"),g=a("./slice"),h=[],i=h.push;b.exports=c},{"../objects/isObject":158,"./baseCreate":91,"./setBindData":126,"./slice":129}],90:[function(a,b){function c(a,b,m,n,q){if(m){var s=m(a);if("undefined"!=typeof s)return s}var w=i(a);if(!w)return a;var A=x.call(a);if(!v[A])return a;var B=z[A];switch(A){case o:case p:return new B(+a);case r:case u:return new B(a);case t:return s=B(a.source,l.exec(a)),s.lastIndex=a.lastIndex,s}var C=h(a);if(b){var D=!n;n||(n=g()),q||(q=g());for(var E=n.length;E--;)if(n[E]==a)return q[E];s=C?B(a.length):{}}else s=C?k(a):d({},a);return C&&(y.call(a,"index")&&(s.index=a.index),y.call(a,"input")&&(s.input=a.input)),b?(n.push(a),q.push(s),(C?e:f)(a,function(a,d){s[d]=c(a,b,m,n,q)}),D&&(j(n),j(q)),s):s}var d=a("../objects/assign"),e=a("../collections/forEach"),f=a("../objects/forOwn"),g=a("./getArray"),h=a("../objects/isArray"),i=a("../objects/isObject"),j=a("./releaseArray"),k=a("./slice"),l=/\w*$/,m="[object Arguments]",n="[object Array]",o="[object Boolean]",p="[object Date]",q="[object Function]",r="[object Number]",s="[object Object]",t="[object RegExp]",u="[object String]",v={};v[q]=!1,v[m]=v[n]=v[o]=v[p]=v[r]=v[s]=v[t]=v[u]=!0;var w=Object.prototype,x=w.toString,y=w.hasOwnProperty,z={};z[n]=Array,z[o]=Boolean,z[p]=Date,z[q]=Function,z[s]=Object,z[r]=Number,z[t]=RegExp,z[u]=String,b.exports=c},{"../collections/forEach":51,"../objects/assign":132,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isObject":158,"./getArray":110,"./releaseArray":124,"./slice":129}],91:[function(a,b){function c(a){return f(a)?g(a):{}}var d="undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e=a("./isNative"),f=a("../objects/isObject"),g=(a("../utilities/noop"),e(g=Object.create)&&g);g||(c=function(){function a(){}return function(b){if(f(b)){a.prototype=b;var c=new a;a.prototype=null}return c||d.Object()}}()),b.exports=c},{"../objects/isObject":158,"../utilities/noop":178,"./isNative":114}],92:[function(a,b){function c(a,b,c){if("function"!=typeof a)return e;if("undefined"==typeof b||!("prototype"in a))return a;var k=a.__bindData__;if("undefined"==typeof k&&(g.funcNames&&(k=!a.name),k=k||!g.funcDecomp,!k)){var l=j.call(a);g.funcNames||(k=!h.test(l)),k||(k=i.test(l),f(a,k))}if(k===!1||k!==!0&&1&k[1])return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return d(a,b)}var d=a("../functions/bind"),e=a("../utilities/identity"),f=a("./setBindData"),g=a("../support"),h=/^\s*function[ \n\r\t]+\w/,i=/\bthis\b/,j=Function.prototype.toString;b.exports=c},{"../functions/bind":72,"../support":171,"../utilities/identity":175,"./setBindData":126}],93:[function(a,b){function c(a){function b(){var a=o?m:this;if(k){var f=g(k);i.apply(f,arguments)}if((l||q)&&(f||(f=g(arguments)),l&&i.apply(f,l),q&&f.length=g,l=[];if(k){var m=f(b);m?(i=e,b=m):k=!1}for(;++c-1:void 0});return u.pop(),v.pop(),G&&(h(u),h(v)),w}var d=a("../objects/forIn"),e=a("./getArray"),f=a("../objects/isFunction"),g=a("./objectTypes"),h=a("./releaseArray"),i="[object Arguments]",j="[object Array]",k="[object Boolean]",l="[object Date]",m="[object Number]",n="[object Object]",o="[object RegExp]",p="[object String]",q=Object.prototype,r=q.toString,s=q.hasOwnProperty;b.exports=c},{"../objects/forIn":139,"../objects/isFunction":154,"./getArray":110,"./objectTypes":120,"./releaseArray":124}],98:[function(a,b){function c(a,b,h,i,j){(f(b)?d:e)(b,function(b,d){var e,k,l=b,m=a[d];if(b&&((k=f(b))||g(b))){for(var n=i.length;n--;)if(e=i[n]==b){m=j[n];break}if(!e){var o;h&&(l=h(m,b),(o="undefined"!=typeof l)&&(m=l)),o||(m=k?f(m)?m:[]:g(m)?m:{}),i.push(b),j.push(m),o||c(m,b,h,i,j)}}else h&&(l=h(m,b),"undefined"==typeof l&&(l=b)),"undefined"!=typeof l&&(m=l);a[d]=m})}var d=a("../collections/forEach"),e=a("../objects/forOwn"),f=a("../objects/isArray"),g=a("../objects/isPlainObject");b.exports=c},{"../collections/forEach":51,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isPlainObject":159}],99:[function(a,b){function c(a,b){return a+d(e()*(b-a+1))}var d=Math.floor,e=Math.random;b.exports=c},{}],100:[function(a,b){function c(a,b,c){var k=-1,l=d,m=a?a.length:0,n=[],o=!b&&m>=h,p=c||o?g():n;if(o){var q=f(p);l=e,p=q}for(;++k-1?0:-1:a?0:-1}var d=a("./baseIndexOf"),e=a("./keyPrefix");b.exports=c},{"./baseIndexOf":96,"./keyPrefix":115}],102:[function(a,b){function c(a){var b=this.cache,c=typeof a;if("boolean"==c||null==a)b[a]=!0;else{"number"!=c&&"string"!=c&&(c="object");var e="number"==c?a:d+a,f=b[c]||(b[c]={});"object"==c?(f[e]||(f[e]=[])).push(a):f[e]=!0}}var d=a("./keyPrefix");b.exports=c},{"./keyPrefix":115}],103:[function(a,b){function c(a){return a.charCodeAt(0)}b.exports=c},{}],104:[function(a,b){function c(a,b){for(var c=a.criteria,d=b.criteria,e=-1,f=c.length;++eh||"undefined"==typeof g)return 1;if(h>g||"undefined"==typeof h)return-1}}return a.index-b.index}b.exports=c},{}],105:[function(a,b){function c(a){return function(b,c,f){var g={};c=d(c,f,3);var h=-1,i=b?b.length:0;if("number"==typeof i)for(;++h":">",'"':""","'":"'"};b.exports=c},{}],113:[function(a,b){var c=a("./htmlEscapes"),d=a("../objects/invert"),e=d(c);b.exports=e},{"../objects/invert":145,"./htmlEscapes":112}],114:[function(a,b){function c(a){return"function"==typeof a&&f.test(a)}var d=Object.prototype,e=d.toString,f=RegExp("^"+String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$");b.exports=c},{}],115:[function(a,b){var c=+new Date+"";b.exports=c},{}],116:[function(a,b){var c=75;b.exports=c},{}],117:[function(a,b){function c(a,b){this.__chain__=!!b,this.__wrapped__=a}b.exports=c},{}],118:[function(a,b){var c=40;b.exports=c},{}],119:[function(a,b){var c=[];b.exports=c},{}],120:[function(a,b){var c={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};b.exports=c},{}],121:[function(a,b){var c=a("./htmlUnescapes"),d=a("../objects/keys"),e=RegExp("("+d(c).join("|")+")","g");b.exports=e},{"../objects/keys":163,"./htmlUnescapes":113}],122:[function(a,b){var c=/<%=([\s\S]+?)%>/g;b.exports=c},{}],123:[function(a,b){var c=a("./htmlEscapes"),d=a("../objects/keys"),e=RegExp("["+d(c).join("")+"]","g");b.exports=e},{"../objects/keys":163,"./htmlEscapes":112}],124:[function(a,b){function c(a){a.length=0,d.lengthe?0:e);++d3&&"function"==typeof j[l-2])var m=c(j[--l-1],j[l--],2);else l>2&&"function"==typeof j[l-1]&&(m=j[--l]);for(;++k3&&"function"==typeof b[c-2])var j=d(b[--c-1],b[c--],2);else c>2&&"function"==typeof b[c-1]&&(j=b[--c]);for(var k=i(arguments,1,c),l=-1,m=f(),n=f();++l/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:{escape:c}}};b.exports=e},{"../internals/reInterpolate":122,"./escape":174}],186:[function(a,b){function c(a,b,c){a=(a=+a)>-1?a:0; -var e=-1,f=Array(a);for(b=d(b,c,1);++e/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.clearScroll=c({url:{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.nodeHotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.cluster.prototype.nodeInfo=c({params:{all:{type:"boolean"},clear:{type:"boolean"},http:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},plugin:{type:"boolean"},process:{type:"boolean"},settings:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},timeout:{type:"time"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes"}]}),d.cluster.prototype.nodeShutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.cluster.prototype.nodeStats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},fields:{type:"list"},fs:{type:"boolean"},http:{type:"boolean"},indices:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},process:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{filterBlocks:{type:"boolean",name:"filter_blocks"},filterIndexTemplates:{type:"boolean",name:"filter_index_templates"},filterIndices:{type:"list",name:"filter_indices"},filterMetadata:{type:"boolean",name:"filter_metadata"},filterNodes:{type:"boolean",name:"filter_nodes"},filterRoutingTable:{type:"boolean",name:"filter_routing_table"},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/state"}}),d.count=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>",req:{index:{type:"list"}}},{fmt:"/"}],method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}],method:"DELETE"}),d.indices.prototype.exists=c({url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},refresh:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mapping/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({urls:[{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},refresh:{type:"boolean"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"string"}}},{fmt:"/_alias"}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},completion:{type:"boolean"},completionFields:{type:"list",name:"completion_fields"},docs:{type:"boolean"},fielddata:{type:"boolean"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},filterCache:{type:"boolean",name:"filter_cache"},flush:{type:"boolean"},get:{type:"boolean"},groups:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indexing:{type:"boolean"},merge:{type:"boolean"},refresh:{type:"boolean"},search:{type:"boolean"},store:{type:"boolean"},warmer:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLen:{type:"number",name:"max_word_len"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLen:{type:"number",name:"min_word_len"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.percolate=c({params:{preferLocal:{type:"boolean",name:"prefer_local"}},url:{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}},needBody:!0,method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.suggest=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":195}],192:[function(a,b){var c=a("../client_action"),d=b.exports={};d._namespaces=["cat","cluster","indices","nodes","snapshot"],d.bulk=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},type:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.cat=function(a){this.transport=a},d.cat.prototype.aliases=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_cat/aliases"}]}),d.cat.prototype.allocation=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/allocation/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cat/allocation"}]}),d.cat.prototype.count=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/count/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/count"}]}),d.cat.prototype.health=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},ts:{type:"boolean","default":!0},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/health"}}),d.cat.prototype.help=c({params:{help:{type:"boolean","default":!1}},url:{fmt:"/_cat"}}),d.cat.prototype.indices=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},pri:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/indices/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/indices"}]}),d.cat.prototype.master=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/master"}}),d.cat.prototype.nodes=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/nodes"}}),d.cat.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/pending_tasks"}}),d.cat.prototype.recovery=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/recovery/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/recovery"}]}),d.cat.prototype.shards=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/shards/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/shards"}]}),d.cat.prototype.threadPool=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1},fullId:{type:"boolean","default":!1,name:"full_id"}},url:{fmt:"/_cat/thread_pool"}}),d.clearScroll=c({url:{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},indexTemplates:{type:"list",name:"index_templates"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/_cluster/state/<%=metric%>/<%=index%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]},index:{type:"list"}}},{fmt:"/_cluster/state/<%=metric%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]}}},{fmt:"/_cluster/state"}]}),d.cluster.prototype.stats=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_cluster/stats/nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cluster/stats"}]}),d.count=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d.countPercolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a -},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},name:{type:"list"}},url:{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.exists=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsTemplate=c({params:{local:{type:"boolean"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}},{fmt:"/_alias"}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_aliases/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/<%=type%>/field/<%=field%>",req:{type:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_settings/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_warmer"}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"closed",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},force:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"indices",options:["cluster","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/<%=index%>/_stats/<%=metric%>",req:{index:{type:"list"},metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_stats/<%=metric%>",req:{metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLength:{type:"number",name:"max_word_length"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLength:{type:"number",name:"min_word_length"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.mpercolate=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mpercolate",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mpercolate",req:{index:{type:"string"}}},{fmt:"/_mpercolate"}],needBody:!0,bulkBody:!0,method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.mtermvectors=c({params:{ids:{type:"list",required:!1},termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},urls:[{fmt:"/<%=index%>/<%=type%>/_mtermvectors",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mtermvectors",req:{index:{type:"string"}}},{fmt:"/_mtermvectors"}],method:"POST"}),d.nodes=function(a){this.transport=a},d.nodes.prototype.hotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.nodes.prototype.info=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_nodes/<%=nodeId%>/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/<%=metric%>",req:{metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes"}]}),d.nodes.prototype.shutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.nodes.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"node",options:["node","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats/<%=metric%>/<%=indexMetric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats/<%=metric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats"}]}),d.percolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.snapshot=function(a){this.transport=a},d.snapshot.prototype.create=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.createRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"string"}}},needBody:!0,method:"POST"}),d.snapshot.prototype["delete"]=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"DELETE"}),d.snapshot.prototype.deleteRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},method:"DELETE"}),d.snapshot.prototype.get=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"list"}}}}),d.snapshot.prototype.getRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},local:{type:"boolean"}},urls:[{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},{fmt:"/_snapshot"}]}),d.snapshot.prototype.restore=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_restore",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.suggest=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],needBody:!0,method:"POST"}),d.termvector=c({params:{termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_termvector",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":195}],193:[function(a,b){b.exports={"1.0":a("./1_0"),"0.90":a("./0_90"),_default:"0.90"}},{"./0_90":191,"./1_0":192}],194:[function(a,b){function c(a){function b(){a.hasOwnProperty("log")||(a.log="warning"),a.hosts||a.host||(a.host="http://localhost:9200"),this.close=function(){this.transport.close()},this.transport=new d(a);for(var b=0;b1?"one of "+a.options.join(","):a.options[0]))},duration:function(a,b,c){if(f.isNumeric(b)||f.isInterval(b))return b;throw new TypeError("Invalid "+c+": expected a number or interval (an integer followed by one of Mwdhmsy).")},list:function(a,b,c){switch(typeof b){case"number":case"string":case"boolean":return""+b;case"object":if(f.isArray(b))return b.join(",");default:throw new TypeError("Invalid "+c+": expected be a comma seperated list, array, number or string.")}},"boolean":function(a,b){return b=f.isString(b)?b.toLowerCase():b,"no"===b||"off"===b?!1:!!b},number:function(a,b,c){if(f.isNumeric(b))return 1*b;throw new TypeError("Invalid "+c+": expected a number.")},string:function(a,b,c){switch(typeof b){case"number":case"string":return""+b;default:throw new TypeError("Invalid "+c+": expected a string.")}},time:function(a,b,c){if("string"==typeof b)return b;if(f.isNumeric(b))return""+b;if(b instanceof Date)return""+b.getTime();throw new TypeError("Invalid "+c+": expected some sort of time.")}};c.resolveUrl=d,c.proxy=function(a,b){return function(c,d){return"function"==typeof c?(d=c,c={}):(c=c||{},d="function"==typeof d?d:null),b.transform&&b.transform(c),a.call(this,c,d)}}},{"./utils":212}],196:[function(a,b){function c(a,b){if(b=b||{},e.call(this),this.requestTimeout=b.hasOwnProperty("requestTimeout")?b.requestTimeout:3e4,this.log=b.log||new f,!a)throw new TypeError("Missing host");if(!(a instanceof g))throw new TypeError("Invalid host");this.host=a,d.makeBoundMethods(this)}b.exports=c;var d=a("./utils"),e=a("events").EventEmitter,f=a("./log"),g=a("./host"),h=a("./errors");d.inherits(c,e),c.prototype.request=function(){throw new Error("Connection#request must be overwritten by the Connector")},c.prototype.ping=function(a,b){"function"==typeof a?(b=a,a=null):b="function"==typeof b?b:null;var c,e,f,g=100;a&&a.hasOwnProperty("requestTimeout")&&(g=a.requestTimeout),f=this.request(d.defaults(a||{},{path:"/",method:"HEAD"}),function(a){e||(clearTimeout(c),b&&b(a))}),g&&(c=setTimeout(function(){f&&f(),e=!0,b&&b(new h.RequestTimeout("Ping Timeout after "+g+"ms"))},g))},c.prototype.setStatus=function(a){var b=this.status;this.status=a,this.emit("status set",a,b,this),"closed"===a&&this.removeAllListeners()}},{"./errors":200,"./host":201,"./log":202,"./utils":212,events:4}],197:[function(a,b){function c(a){a=a||{},e.makeBoundMethods(this),a.log?this.log=a.log:(this.log=new f,a.log=this.log),this._config=a,this.selector=e.funcEnum(a,"selector",c.selectors,c.defaultSelector),this.Connection=e.funcEnum(a,"connectionClass",c.connectionClasses,c.defaultConnectionClass),this.deadTimeout=a.hasOwnProperty("deadTimeout")?a.deadTimeout:6e4,this.maxDeadTimeout=a.hasOwnProperty("maxDeadTimeout")?a.maxDeadTimeout:18e5,this.calcDeadTimeout=e.funcEnum(a,"calcDeadTimeout",c.calcDeadTimeoutOptions,"exponential"),this.index={},this._conns={alive:[],dead:[]},this._timeouts=[]}var d=a("__browserify_process");b.exports=c; -var e=a("./utils"),f=a("./log");c.selectors=a("./selectors"),c.defaultSelector="roundRobin",c.connectionClasses=a("./connectors"),c.defaultConnectionClass=c.connectionClasses._default,delete c.connectionClasses._default,c.calcDeadTimeoutOptions={flat:function(a,b){return b},exponential:function(a,b){return Math.min(2*b*Math.pow(2,.5*a-1),this.maxDeadTimeout)}},c.prototype.select=function(a){if(this._conns.alive.length)if(this.selector.length>1)this.selector(this._conns.alive,a);else try{e.nextTick(a,void 0,this.selector(this._conns.alive))}catch(b){a(b)}else this._timeouts.length?this._selectDeadConnection(a):e.nextTick(a,void 0)},c.prototype.onStatusSet=e.handler(function(a,b,c){var d,f="dead"===a,g=f&&"dead"===b,h=!f&&"dead"===b,i=b===a,j=this._conns[b],k=this._conns[a];return i&&!f?!0:(j!==k&&(e.isArray(j)&&(d=j.indexOf(c),-1!==d&&j.splice(d,1)),e.isArray(k)&&(d=k.indexOf(c),-1===d&&k.push(c))),f&&this._onConnectionDied(c,g),void(h&&this._onConnectionRevived(c)))}),c.prototype._onConnectionRevived=function(a){for(var b,c=0;c=0)return c.levels.slice(0,b+1);case"object":if(e.isArray(a)){var d=e.intersection(a,c.levels);if(d.length===a.length)return d}default:throw new TypeError("invalid logging level "+a+". Expected zero or more of these options: "+c.levels.join(", "))}},c.join=function(a){return e.map(a,function(a){return e.isPlainObject(a)?e.inspect(a)+"\n":a.toString()}).join(" ")},c.prototype.addOutput=function(a){a=a||{},a.levels=c.parseLevels(a.levels||a.level||"warning"),delete a.level;var b=e.funcEnum(a,"type",c.loggers,d.browser?"console":"stdio");return new b(this,a)},c.prototype.error=function(a){return this.listenerCount("error")?this.emit("error",a instanceof Error?a:new Error(a)):void 0},c.prototype.warning=function(){return this.listenerCount("warning")?this.emit("warning",c.join(arguments)):void 0},c.prototype.info=function(){return this.listenerCount("info")?this.emit("info",c.join(arguments)):void 0},c.prototype.debug=function(){return this.listenerCount("debug")?this.emit("debug",c.join(arguments)):void 0},c.prototype.trace=function(a,b,d,e,f){return this.listenerCount("trace")?this.emit("trace",c.normalizeTraceArgs(a,b,d,e,f)):void 0},c.normalizeTraceArgs=function(a,b,c,d,g){return"string"==typeof b?b=f.parse(b,!0,!0):(b=e.clone(b),b.path&&(b.query=f.parse(b.path,!0,!1).query),!b.pathname&&b.path&&(b.pathname=b.path.split("?").shift())),delete b.auth,{method:a,url:f.format(b),body:c,status:g,response:d}},b.exports=c},{"./loggers":204,"./utils":212,__browserify_process:13,events:4,url:7}],203:[function(a,b){function c(a,b){this.log=a,this.listeningLevels=[],f.makeBoundMethods(this),this.log.once("closing",this.bound.cleanUpListeners),this.setupListeners(b.levels)}function d(a){return 10>a?"0"+a.toString(10):a.toString(10)}function e(a,b){var c=f.repeat(" ",b||2);return(a||"").split(/\r?\n/).map(function(a){return c+a}).join("\n")}var f=a("./utils");c.prototype.timestamp=function(){var a=new Date;return a.getUTCFullYear()+"-"+d(a.getUTCMonth()+1)+"-"+d(a.getUTCDate())+"T"+d(a.getUTCHours())+":"+d(a.getUTCMinutes())+":"+d(a.getUTCSeconds())+"Z"},c.prototype.format=function(a,b){return a+": "+this.timestamp()+"\n"+e(b)+"\n\n"},c.prototype.write=function(){throw new Error("This should be overwritten by the logger")},c.prototype.setupListeners=function(a){this.cleanUpListeners(),this.listeningLevels=[],f.each(a,function(a){var b="on"+f.ucfirst(a);if(!this.bound[b])throw new Error('Unable to listen for level "'+a+'"');this.listeningLevels.push(a),this.log.on(a,this.bound[b])},this)},c.prototype.cleanUpListeners=f.handler(function(){f.each(this.listeningLevels,function(a){this.log.removeListener(a,this.bound["on"+f.ucfirst(a)])},this)}),c.prototype.onError=f.handler(function(a){this.write("Error"===a.name?"ERROR":a.name,a.stack)}),c.prototype.onWarning=f.handler(function(a){this.write("WARNING",a)}),c.prototype.onInfo=f.handler(function(a){this.write("INFO",a)}),c.prototype.onDebug=f.handler(function(a){this.write("DEBUG",a)}),c.prototype.onTrace=f.handler(function(a){this.write("TRACE",this._formatTraceMessage(a))}),c.prototype._formatTraceMessage=function(a){return"-> "+a.method+" "+a.url+"\n"+this._prettyJson(a.body)+"\n<- "+a.status+"\n"+this._prettyJson(a.response)},c.prototype._prettyJson=function(a){try{return"string"==typeof object&&(a=JSON.parse(a)),JSON.stringify(a,null," ").replace(/'/g,"\\u0027")}catch(b){return"string"==typeof a?a:""}},b.exports=c},{"./utils":212}],204:[function(a,b){b.exports={console:a("./console")}},{"./console":205}],205:[function(a,b){function c(a,b){d.call(this,a,b),this.color=e.has(b,"color")?!!b.color:!0}b.exports=c;var d=a("../logger"),e=a("../utils");e.inherits(c,d),c.prototype.setupListeners=function(a){d.prototype.setupListeners.call(this,a)},c.prototype.write=function(a,b,c){console[c]&&console[c](this.format(a,b))},c.prototype.onError=e.handler(function(a){var b=console.error?"error":"log";this.write("Error"===a.name?"ERROR":a.name,a.stack||a.message,b)}),c.prototype.onWarning=e.handler(function(a){this.write("WARNING",a,console.warn?"warn":"log")}),c.prototype.onInfo=e.handler(function(a){this.write("INFO",a,console.info?"info":"log")}),c.prototype.onDebug=e.handler(function(a){this.write("DEBUG",a,console.debug?"debug":"log")}),c.prototype.onTrace=e.handler(function(a){this.write("TRACE",this._formatTraceMessage(a),"log")})},{"../logger":203,"../utils":212}],206:[function(a,b){function c(a){return function(b){var c=[];return d.each(b,function(b,d){var f=e.exec(b[a]);c.push({host:f[1],port:parseInt(f[2],10),_meta:{id:d,name:b.name,hostname:b.hostname,version:b.version}})}),c}}var d=a("./utils"),e=/\[\/*([^:]+):(\d+)\]/;b.exports=c("http_address"),b.exports.thrift=c("transport_address")},{"./utils":212}],207:[function(a,b){b.exports={random:a("./random"),roundRobin:a("./round_robin")}},{"./random":208,"./round_robin":209}],208:[function(a,b){b.exports=function(a){return a[Math.floor(Math.random()*a.length)]}},{}],209:[function(a,b){b.exports=function(a){var b=a[0];return a.push(a.shift()),b}},{}],210:[function(a,b){function c(){}b.exports=c;var d=a("../utils");c.prototype.serialize=function(a,b,c){switch(typeof a){case"string":return a;case"object":if(a)return JSON.stringify(a,b,c);default:return}},c.prototype.deserialize=function(a){if("string"==typeof a)try{return JSON.parse(a)}catch(b){}},c.prototype.bulkBody=function(a){var b,c="";if(d.isArray(a))for(b=0;bg||g>=300)||a.ignore&&d.contains(a.ignore,g)||(c=e[g]?new e[g](i&&i.error):new e.Generic("unknown error")),a.castExists&&(c&&c instanceof e.NotFound?(i=!1,c=void 0):i=!c),"function"==typeof b?c?b(c,i,g):b(void 0,i,g):c?(c.body=i,c.status=g,m.reject(c)):m.resolve(i)}}function h(){q||(q=!0,o=0,n._timeout(k),"function"==typeof j&&j())}var i,j,k,l,m,n=this,o=this.maxRetries,p=this.requestTimeout,q=!1;return n.log.debug("starting request",a),a.body&&"GET"===a.method?void d.nextTick(g,new TypeError('Body can not be sent with method "GET"')):(a.body&&(a.body=n.serializer[a.bulkBody?"bulkBody":"serialize"](a.body)),a.hasOwnProperty("maxRetries")&&(o=a.maxRetries),a.hasOwnProperty("requestTimeout")&&(p=a.requestTimeout),a.req={method:a.method,path:a.path||"/",query:a.query,body:a.body},p&&1/0!==p&&(k=this._timeout(function(){g(new e.RequestTimeout("Request Timeout after "+p+"ms")),h()},p)),"function"==typeof b?l={abort:h}:(m=this.defer(),l=m.promise,l.abort=h),i?c(void 0,i):n.connectionPool.select(c),l)},c.prototype._timeout=function(a,b){this._timers=this._timers||[];var c;if("function"!=typeof a&&(c=a,a=void 0),a)return c=setTimeout(a,b),this._timers.push(c),c;if(c){clearTimeout(c);var d=this._timers.indexOf(c);-1!==d&&this._timers.splice(d,1)}},c.prototype.sniff=function(a){var b=this.connectionPool,c=this.nodesToHostCallback;a="function"==typeof a?a:d.noop,this.request({path:this.sniffEndpoint,method:"GET"},function(e,g,h){if(!e&&g&&g.nodes){var i=d.map(c(g.nodes),function(a){return new f(a)});b.setHosts(i)}a(e,g,h)})},c.prototype.close=function(){this.log.close(),d.each(this._timers,clearTimeout),this.connectionPool.close()}},{"./connection_pool":197,"./errors":200,"./host":201,"./log":202,"./nodes_to_host":206,"./serializers/json":210,"./utils":212,when:1}],212:[function(a,b){function c(a,b,c){return function(d){for(var e,f,g,h,i=0,j=[],k="";i=97&&122>=e||e>=48&&57>=e,g=e>=65&&90>=e,(g||!h)&&(k.length&&j.push(k),k=""),(g||h)&&(h&&k.length?k+=f:k=!j.length&&a||j.length&&b?f.toUpperCase():f.toLowerCase());return k.length&&j.push(k),j.length&&"_"===d.charAt(0)&&(j[0]="_"+j[0]),j.join(c)}}var d=a("__browserify_process"),e=a("__browserify_Buffer").Buffer,f=a("path"),g=a("lodash-node/modern"),h=a("util"),i=g.extend({},g,h);g=i,i.joinPath=f.join,i.deepMerge=function(a,b){return g.each(b,function(c,d){switch(typeof a[d]){case"undefined":a[d]=b[d];break;case"object":g.isArray(a[d])&&g.isArray(b[d])?a[d]=a[d].concat(b[d]):g.isPlainObject(a[d])&&g.isPlainObject(b[d])&&i.deepMerge(a[d],b[d])}}),a},g.each(["String","Object","PlainObject","Array","Finite","Function","RegExp"],function(a){var b=g["is"+a];i["isArrayOf"+a+"s"]=function(a){return g.isArray(a)&&g.every(a.slice(0,10),b)}}),i.ucfirst=function(a){return a[0].toUpperCase()+a.substring(1).toLowerCase()},i.studlyCase=c(!0,!0,""),i.camelCase=c(!1,!0,""),i.snakeCase=c(!1,!1,"_"),i.toLowerString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toLowerCase()},i.toUpperString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toUpperCase()},i.isNumeric=function(a){return"object"!=typeof a&&a-parseFloat(a)>=0};var j=/^(\d+(?:\.\d+)?)([Mwdhmsy])$/;i.isInterval=function(a){return!(!a.match||!a.match(j))},i.repeat=function(a,b){return new Array(b+1).join(a)},i.applyArgs=function(a,b,c,d){switch(d=d||0,c.length-d){case 0:return a.call(b);case 1:return a.call(b,c[0+d]);case 2:return a.call(b,c[0+d],c[1+d]);case 3:return a.call(b,c[0+d],c[1+d],c[2+d]);case 4:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d]);case 5:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d],c[4+d]);default:return a.apply(b,Array.prototype.slice.call(c,d))}},g.nextTick=function(a){d.nextTick(g.bindKey(g,"applyArgs",a,null,arguments,1))},g.handler=function(a){return a._provideBound=!0,a},g.scheduled=g.handler,g.makeBoundMethods=function(a){a.bound={};for(var b in a)"function"==typeof a[b]&&a[b]._provideBound===!0&&(a.bound[b]=g.bind(a[b],a))},g.noop=function(){},g.funcEnum=function(a,b,c,d){var e=a[b];switch(typeof e){case"undefined":return c[d];case"function":return e;case"string":if(c.hasOwnProperty(e))return c[e];default:var f="Invalid "+b+' "'+e+'", expected a function';switch(g.size(c)){case 0:break;case 1:f+=" or "+g.keys(c)[0];break;default:f+=" or one of "+g.keys(c).join(", ")}throw new TypeError(f)}},g.createArray=function(a,b){b="function"==typeof b?b:g.identity;var c,d,e=[];for(g.isArray(a)||(a=[a]),d=0;d/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.clearScroll=c({url:{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.nodeHotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.cluster.prototype.nodeInfo=c({params:{all:{type:"boolean"},clear:{type:"boolean"},http:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},plugin:{type:"boolean"},process:{type:"boolean"},settings:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},timeout:{type:"time"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes"}]}),d.cluster.prototype.nodeShutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.cluster.prototype.nodeStats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},fields:{type:"list"},fs:{type:"boolean"},http:{type:"boolean"},indices:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},process:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{filterBlocks:{type:"boolean",name:"filter_blocks"},filterIndexTemplates:{type:"boolean",name:"filter_index_templates"},filterIndices:{type:"list",name:"filter_indices"},filterMetadata:{type:"boolean",name:"filter_metadata"},filterNodes:{type:"boolean",name:"filter_nodes"},filterRoutingTable:{type:"boolean",name:"filter_routing_table"},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/state"}}),d.count=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>",req:{index:{type:"list"}}},{fmt:"/"}],method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}],method:"DELETE"}),d.indices.prototype.exists=c({url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},refresh:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mapping/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({urls:[{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},refresh:{type:"boolean"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"string"}}},{fmt:"/_alias"}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},completion:{type:"boolean"},completionFields:{type:"list",name:"completion_fields"},docs:{type:"boolean"},fielddata:{type:"boolean"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},filterCache:{type:"boolean",name:"filter_cache"},flush:{type:"boolean"},get:{type:"boolean"},groups:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indexing:{type:"boolean"},merge:{type:"boolean"},refresh:{type:"boolean"},search:{type:"boolean"},store:{type:"boolean"},warmer:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLen:{type:"number",name:"max_word_len"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLen:{type:"number",name:"min_word_len"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.percolate=c({params:{preferLocal:{type:"boolean",name:"prefer_local"}},url:{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}},needBody:!0,method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.suggest=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":196}],192:[function(a,b){var c=a("../client_action"),d=b.exports={};d._namespaces=["cat","cluster","indices","nodes","snapshot"],d.bulk=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},type:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.cat=function(a){this.transport=a},d.cat.prototype.aliases=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_cat/aliases"}]}),d.cat.prototype.allocation=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/allocation/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cat/allocation"}]}),d.cat.prototype.count=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/count/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/count"}]}),d.cat.prototype.health=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},ts:{type:"boolean","default":!0},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/health"}}),d.cat.prototype.help=c({params:{help:{type:"boolean","default":!1}},url:{fmt:"/_cat"}}),d.cat.prototype.indices=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},pri:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/indices/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/indices"}]}),d.cat.prototype.master=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/master"}}),d.cat.prototype.nodes=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/nodes"}}),d.cat.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/pending_tasks"}}),d.cat.prototype.recovery=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/recovery/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/recovery"}]}),d.cat.prototype.shards=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/shards/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/shards"}]}),d.cat.prototype.threadPool=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1},fullId:{type:"boolean","default":!1,name:"full_id"}},url:{fmt:"/_cat/thread_pool"}}),d.clearScroll=c({urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},{fmt:"/_search/scroll"}],method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},indexTemplates:{type:"list",name:"index_templates"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/_cluster/state/<%=metric%>/<%=index%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]},index:{type:"list"}}},{fmt:"/_cluster/state/<%=metric%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]}}},{fmt:"/_cluster/state"}]}),d.cluster.prototype.stats=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_cluster/stats/nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cluster/stats"}]}),d.count=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d.countPercolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a +},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},name:{type:"list"}},url:{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.exists=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsTemplate=c({params:{local:{type:"boolean"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}},{fmt:"/_alias"}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_aliases/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/<%=type%>/field/<%=field%>",req:{type:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_settings/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_warmer"}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"closed",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},force:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"indices",options:["cluster","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/<%=index%>/_stats/<%=metric%>",req:{index:{type:"list"},metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_stats/<%=metric%>",req:{metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLength:{type:"number",name:"max_word_length"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLength:{type:"number",name:"min_word_length"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.mpercolate=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mpercolate",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mpercolate",req:{index:{type:"string"}}},{fmt:"/_mpercolate"}],needBody:!0,bulkBody:!0,method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.mtermvectors=c({params:{ids:{type:"list",required:!1},termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},urls:[{fmt:"/<%=index%>/<%=type%>/_mtermvectors",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mtermvectors",req:{index:{type:"string"}}},{fmt:"/_mtermvectors"}],method:"POST"}),d.nodes=function(a){this.transport=a},d.nodes.prototype.hotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.nodes.prototype.info=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_nodes/<%=nodeId%>/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/<%=metric%>",req:{metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes"}]}),d.nodes.prototype.shutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.nodes.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"node",options:["node","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats/<%=metric%>/<%=indexMetric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats/<%=metric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats"}]}),d.percolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.searchShards=c({params:{preference:{type:"string"},routing:{type:"string"},local:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search_shards",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_search_shards",req:{index:{type:"string"}}},{fmt:"/_search_shards"}],method:"POST"}),d.snapshot=function(a){this.transport=a},d.snapshot.prototype.create=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.createRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"string"}}},needBody:!0,method:"POST"}),d.snapshot.prototype["delete"]=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"DELETE"}),d.snapshot.prototype.deleteRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},method:"DELETE"}),d.snapshot.prototype.get=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"list"}}}}),d.snapshot.prototype.getRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},local:{type:"boolean"}},urls:[{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},{fmt:"/_snapshot"}]}),d.snapshot.prototype.restore=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_restore",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.suggest=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],needBody:!0,method:"POST"}),d.termvector=c({params:{termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_termvector",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":196}],193:[function(a,b){var c=a("../client_action"),d=b.exports={};d._namespaces=["cat","cluster","indices","nodes","snapshot"],d.bulk=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},type:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.cat=function(a){this.transport=a},d.cat.prototype.aliases=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_cat/aliases"}]}),d.cat.prototype.allocation=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/allocation/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cat/allocation"}]}),d.cat.prototype.count=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/count/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/count"}]}),d.cat.prototype.health=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},ts:{type:"boolean","default":!0},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/health"}}),d.cat.prototype.help=c({params:{help:{type:"boolean","default":!1}},url:{fmt:"/_cat"}}),d.cat.prototype.indices=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},pri:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/indices/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/indices"}]}),d.cat.prototype.master=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/master"}}),d.cat.prototype.nodes=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/nodes"}}),d.cat.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/pending_tasks"}}),d.cat.prototype.plugins=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/plugins"}}),d.cat.prototype.recovery=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/recovery/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/recovery"}]}),d.cat.prototype.shards=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/shards/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/shards"}]}),d.cat.prototype.threadPool=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1},fullId:{type:"boolean","default":!1,name:"full_id"}},url:{fmt:"/_cat/thread_pool"}}),d.clearScroll=c({urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},{fmt:"/_search/scroll"}],method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},explain:{type:"boolean"},filterMetadata:{type:"boolean",name:"filter_metadata"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},indexTemplates:{type:"list",name:"index_templates"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/_cluster/state/<%=metric%>/<%=index%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]},index:{type:"list"}}},{fmt:"/_cluster/state/<%=metric%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]}}},{fmt:"/_cluster/state"}]}),d.cluster.prototype.stats=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_cluster/stats/nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cluster/stats"}]}),d.count=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d.countPercolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a +},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},name:{type:"list"}},url:{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.exists=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsTemplate=c({params:{local:{type:"boolean"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}},{fmt:"/_alias"}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_aliases/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/<%=type%>/field/<%=field%>",req:{type:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_settings/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_warmer"}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"closed",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},waitForMerge:{type:"boolean",name:"wait_for_merge"},force:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.recovery=c({params:{detailed:{type:"boolean","default":!1},activeOnly:{type:"boolean","default":!1,name:"active_only"},human:{type:"boolean","default":!1}},urls:[{fmt:"/<%=index%>/_recovery",req:{index:{type:"list"}}},{fmt:"/_recovery"}]}),d.indices.prototype.refresh=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},force:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"indices",options:["cluster","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/<%=index%>/_stats/<%=metric%>",req:{index:{type:"list"},metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_stats/<%=metric%>",req:{metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLength:{type:"number",name:"max_word_length"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLength:{type:"number",name:"min_word_length"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.mpercolate=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mpercolate",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mpercolate",req:{index:{type:"string"}}},{fmt:"/_mpercolate"}],needBody:!0,bulkBody:!0,method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.mtermvectors=c({params:{ids:{type:"list",required:!1},termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},urls:[{fmt:"/<%=index%>/<%=type%>/_mtermvectors",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mtermvectors",req:{index:{type:"string"}}},{fmt:"/_mtermvectors"}],method:"POST"}),d.nodes=function(a){this.transport=a},d.nodes.prototype.hotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.nodes.prototype.info=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_nodes/<%=nodeId%>/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugins"]}}},{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/<%=metric%>",req:{metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugins"]}}},{fmt:"/_nodes"}]}),d.nodes.prototype.shutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.nodes.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"node",options:["node","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats/<%=metric%>/<%=indexMetric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats/<%=metric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats"}]}),d.percolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.searchTemplate=c({urls:[{fmt:"/<%=index%>/<%=type%>/_search/template",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search/template",req:{index:{type:"list"}}},{fmt:"/_search/template"}],method:"POST"}),d.searchShards=c({params:{preference:{type:"string"},routing:{type:"string"},local:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search_shards",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_search_shards",req:{index:{type:"string"}}},{fmt:"/_search_shards"}],method:"POST"}),d.snapshot=function(a){this.transport=a},d.snapshot.prototype.create=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.createRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"string"}}},needBody:!0,method:"POST"}),d.snapshot.prototype["delete"]=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"DELETE"}),d.snapshot.prototype.deleteRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},method:"DELETE"}),d.snapshot.prototype.get=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"list"}}}}),d.snapshot.prototype.getRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},local:{type:"boolean"}},urls:[{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},{fmt:"/_snapshot"}]}),d.snapshot.prototype.restore=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_restore",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.status=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_status",req:{repository:{type:"string"},snapshot:{type:"list"}}},{fmt:"/_snapshot/<%=repository%>/_status",req:{repository:{type:"string"}}},{fmt:"/_snapshot/_status"}]}),d.suggest=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],needBody:!0,method:"POST"}),d.termvector=c({params:{termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_termvector",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":196}],194:[function(a,b){b.exports={1.1:a("./1_1"),"1.0":a("./1_0"),"0.90":a("./0_90")}},{"./0_90":191,"./1_0":192,"./1_1":193}],195:[function(a,b){function c(a){function b(){a.hasOwnProperty("log")||(a.log="warning"),a.hosts||a.host||(a.host="http://localhost:9200"),this.close=function(){this.transport.close()},this.transport=new d(a);for(var b=0;b1?"one of "+a.options.join(","):a.options[0]))},duration:function(a,b,c){if(f.isNumeric(b)||f.isInterval(b))return b;throw new TypeError("Invalid "+c+": expected a number or interval (an integer followed by one of Mwdhmsy).")},list:function(a,b,c){switch(typeof b){case"number":case"string":case"boolean":return""+b;case"object":if(f.isArray(b))return b.join(",");default:throw new TypeError("Invalid "+c+": expected be a comma seperated list, array, number or string.")}},"boolean":function(a,b){return b=f.isString(b)?b.toLowerCase():b,"no"===b||"off"===b?!1:!!b},number:function(a,b,c){if(f.isNumeric(b))return 1*b;throw new TypeError("Invalid "+c+": expected a number.")},string:function(a,b,c){switch(typeof b){case"number":case"string":return""+b;default:throw new TypeError("Invalid "+c+": expected a string.")}},time:function(a,b,c){if("string"==typeof b)return b;if(f.isNumeric(b))return""+b;if(b instanceof Date)return""+b.getTime();throw new TypeError("Invalid "+c+": expected some sort of time.")}};c.resolveUrl=d,c.proxy=function(a,b){return function(c,d){return"function"==typeof c?(d=c,c={}):(c=c||{},d="function"==typeof d?d:null),b.transform&&b.transform(c),a.call(this,c,d)}}},{"./utils":214}],197:[function(a,b){function c(a,b){if(b=b||{},e.call(this),this.requestTimeout=b.hasOwnProperty("requestTimeout")?b.requestTimeout:3e4,this.log=b.log||new f,!a)throw new TypeError("Missing host"); +if(!(a instanceof g))throw new TypeError("Invalid host");this.host=a,d.makeBoundMethods(this)}b.exports=c;var d=a("./utils"),e=a("events").EventEmitter,f=a("./log"),g=a("./host"),h=a("./errors");d.inherits(c,e),c.prototype.request=function(){throw new Error("Connection#request must be overwritten by the Connector")},c.prototype.ping=function(a,b){"function"==typeof a?(b=a,a=null):b="function"==typeof b?b:null;var c,e,f,g=100;a&&a.hasOwnProperty("requestTimeout")&&(g=a.requestTimeout),f=this.request(d.defaults(a||{},{path:"/",method:"HEAD"}),function(a){e||(clearTimeout(c),b&&b(a))}),g&&(c=setTimeout(function(){f&&f(),e=!0,b&&b(new h.RequestTimeout("Ping Timeout after "+g+"ms"))},g))},c.prototype.setStatus=function(a){var b=this.status;this.status=a,this.emit("status set",a,b,this),"closed"===a&&this.removeAllListeners()}},{"./errors":201,"./host":202,"./log":203,"./utils":214,events:4}],198:[function(a,b){function c(a){a=a||{},e.makeBoundMethods(this),a.log?this.log=a.log:(this.log=new f,a.log=this.log),this._config=a,this.selector=e.funcEnum(a,"selector",c.selectors,c.defaultSelector),this.Connection=e.funcEnum(a,"connectionClass",c.connectionClasses,c.defaultConnectionClass),this.deadTimeout=a.hasOwnProperty("deadTimeout")?a.deadTimeout:6e4,this.maxDeadTimeout=a.hasOwnProperty("maxDeadTimeout")?a.maxDeadTimeout:18e5,this.calcDeadTimeout=e.funcEnum(a,"calcDeadTimeout",c.calcDeadTimeoutOptions,"exponential"),this.index={},this._conns={alive:[],dead:[]},this._timeouts=[]}var d=a("__browserify_process");b.exports=c;var e=a("./utils"),f=a("./log");c.selectors=a("./selectors"),c.defaultSelector="roundRobin",c.connectionClasses=a("./connectors"),c.defaultConnectionClass=c.connectionClasses._default,delete c.connectionClasses._default,c.calcDeadTimeoutOptions={flat:function(a,b){return b},exponential:function(a,b){return Math.min(2*b*Math.pow(2,.5*a-1),this.maxDeadTimeout)}},c.prototype.select=function(a){if(this._conns.alive.length)if(this.selector.length>1)this.selector(this._conns.alive,a);else try{e.nextTick(a,void 0,this.selector(this._conns.alive))}catch(b){a(b)}else this._timeouts.length?this._selectDeadConnection(a):e.nextTick(a,void 0)},c.prototype.onStatusSet=e.handler(function(a,b,c){var d,f="dead"===a,g=f&&"dead"===b,h=!f&&"dead"===b,i=b===a,j=this._conns[b],k=this._conns[a];return i&&!f?!0:(j!==k&&(e.isArray(j)&&(d=j.indexOf(c),-1!==d&&j.splice(d,1)),e.isArray(k)&&(d=k.indexOf(c),-1===d&&k.push(c))),f&&this._onConnectionDied(c,g),void(h&&this._onConnectionRevived(c)))}),c.prototype._onConnectionRevived=function(a){for(var b,c=0;c=0)return c.levels.slice(0,b+1);case"object":if(e.isArray(a)){var d=e.intersection(a,c.levels);if(d.length===a.length)return d}default:throw new TypeError("invalid logging level "+a+". Expected zero or more of these options: "+c.levels.join(", "))}},c.join=function(a){return e.map(a,function(a){return e.isPlainObject(a)?e.inspect(a)+"\n":a.toString()}).join(" ")},c.prototype.addOutput=function(a){a=a||{},a.levels=c.parseLevels(a.levels||a.level||"warning"),delete a.level;var b=e.funcEnum(a,"type",c.loggers,d.browser?"console":"stdio");return new b(this,a)},c.prototype.error=function(a){return this.listenerCount("error")?this.emit("error",a instanceof Error?a:new Error(a)):void 0},c.prototype.warning=function(){return this.listenerCount("warning")?this.emit("warning",c.join(arguments)):void 0},c.prototype.info=function(){return this.listenerCount("info")?this.emit("info",c.join(arguments)):void 0},c.prototype.debug=function(){return this.listenerCount("debug")?this.emit("debug",c.join(arguments)):void 0},c.prototype.trace=function(a,b,d,e,f){return this.listenerCount("trace")?this.emit("trace",c.normalizeTraceArgs(a,b,d,e,f)):void 0},c.normalizeTraceArgs=function(a,b,c,d,g){return"string"==typeof b?b=f.parse(b,!0,!0):(b=e.clone(b),b.path&&(b.query=f.parse(b.path,!0,!1).query),!b.pathname&&b.path&&(b.pathname=b.path.split("?").shift())),delete b.auth,{method:a,url:f.format(b),body:c,status:g,response:d}},b.exports=c},{"./loggers":205,"./utils":214,__browserify_process:13,events:4,url:7}],204:[function(a,b){function c(a,b){this.log=a,this.listeningLevels=[],f.makeBoundMethods(this),this.log.once("closing",this.bound.cleanUpListeners),this.setupListeners(b.levels)}function d(a){return 10>a?"0"+a.toString(10):a.toString(10)}function e(a,b){var c=f.repeat(" ",b||2);return(a||"").split(/\r?\n/).map(function(a){return c+a}).join("\n")}var f=a("./utils");c.prototype.timestamp=function(){var a=new Date;return a.getUTCFullYear()+"-"+d(a.getUTCMonth()+1)+"-"+d(a.getUTCDate())+"T"+d(a.getUTCHours())+":"+d(a.getUTCMinutes())+":"+d(a.getUTCSeconds())+"Z"},c.prototype.format=function(a,b){return a+": "+this.timestamp()+"\n"+e(b)+"\n\n"},c.prototype.write=function(){throw new Error("This should be overwritten by the logger")},c.prototype.setupListeners=function(a){this.cleanUpListeners(),this.listeningLevels=[],f.each(a,function(a){var b="on"+f.ucfirst(a);if(!this.bound[b])throw new Error('Unable to listen for level "'+a+'"');this.listeningLevels.push(a),this.log.on(a,this.bound[b])},this)},c.prototype.cleanUpListeners=f.handler(function(){f.each(this.listeningLevels,function(a){this.log.removeListener(a,this.bound["on"+f.ucfirst(a)])},this)}),c.prototype.onError=f.handler(function(a){this.write("Error"===a.name?"ERROR":a.name,a.stack)}),c.prototype.onWarning=f.handler(function(a){this.write("WARNING",a)}),c.prototype.onInfo=f.handler(function(a){this.write("INFO",a)}),c.prototype.onDebug=f.handler(function(a){this.write("DEBUG",a)}),c.prototype.onTrace=f.handler(function(a){this.write("TRACE",this._formatTraceMessage(a))}),c.prototype._formatTraceMessage=function(a){return"-> "+a.method+" "+a.url+"\n"+this._prettyJson(a.body)+"\n<- "+a.status+"\n"+this._prettyJson(a.response)},c.prototype._prettyJson=function(a){try{return"string"==typeof a&&(a=JSON.parse(a)),JSON.stringify(a,null," ").replace(/'/g,"\\u0027")}catch(b){return"string"==typeof a?a:""}},b.exports=c},{"./utils":214}],205:[function(a,b){b.exports={console:a("./console")}},{"./console":206}],206:[function(a,b){function c(a,b){d.call(this,a,b),this.color=e.has(b,"color")?!!b.color:!0}b.exports=c;var d=a("../logger"),e=a("../utils");e.inherits(c,d),c.prototype.setupListeners=function(a){d.prototype.setupListeners.call(this,a)},c.prototype.write=function(a,b,c){console[c]&&console[c](this.format(a,b))},c.prototype.onError=e.handler(function(a){var b=console.error?"error":"log";this.write("Error"===a.name?"ERROR":a.name,a.stack||a.message,b)}),c.prototype.onWarning=e.handler(function(a){this.write("WARNING",a,console.warn?"warn":"log")}),c.prototype.onInfo=e.handler(function(a){this.write("INFO",a,console.info?"info":"log")}),c.prototype.onDebug=e.handler(function(a){this.write("DEBUG",a,console.debug?"debug":"log")}),c.prototype.onTrace=e.handler(function(a){this.write("TRACE",this._formatTraceMessage(a),"log")})},{"../logger":204,"../utils":214}],207:[function(a,b){function c(a){return function(b){return d.transform(b,function(b,c,d){if(c[a]){var f=e.exec(c[a]);if(!f)throw new Error("node's "+a+" property ("+JSON.stringify(c[a])+") does not match the expected pattern "+e+".");b.push({host:f[1],port:parseInt(f[2],10),_meta:{id:d,name:c.name,hostname:c.hostname,version:c.version}})}},[])}}var d=a("./utils"),e=/\[\/*([^:]+):(\d+)\]/;b.exports=c("http_address"),b.exports.thrift=c("transport_address")},{"./utils":214}],208:[function(a,b){b.exports={random:a("./random"),roundRobin:a("./round_robin")}},{"./random":209,"./round_robin":210}],209:[function(a,b){b.exports=function(a){return a[Math.floor(Math.random()*a.length)]}},{}],210:[function(a,b){b.exports=function(a){var b=a[0];return a.push(a.shift()),b}},{}],211:[function(a,b){function c(){}b.exports=c;var d=a("../utils");c.prototype.serialize=function(a,b,c){switch(typeof a){case"string":return a;case"object":if(a)return JSON.stringify(a,b,c);default:return}},c.prototype.deserialize=function(a){if("string"==typeof a)try{return JSON.parse(a)}catch(b){}},c.prototype.bulkBody=function(a){var b,c="";if(d.isArray(a))for(b=0;bg||g>=300)||a.ignore&&d.contains(a.ignore,g)||(c=e[g]?new e[g](i&&i.error):new e.Generic("unknown error")),a.castExists&&(c&&c instanceof e.NotFound?(i=!1,c=void 0):i=!c),"function"==typeof b?c?b(c,i,g):b(void 0,i,g):c?(c.body=i,c.status=g,m.reject(c)):m.resolve(i)}}function h(){q||(q=!0,o=0,n._timeout(k),"function"==typeof j&&j())}var i,j,k,l,m,n=this,o=this.maxRetries,p=this.requestTimeout,q=!1;return n.log.debug("starting request",a),a.body&&"GET"===a.method?void d.nextTick(g,new TypeError('Body can not be sent with method "GET"')):(a.body&&(a.body=n.serializer[a.bulkBody?"bulkBody":"serialize"](a.body)),a.hasOwnProperty("maxRetries")&&(o=a.maxRetries),a.hasOwnProperty("requestTimeout")&&(p=a.requestTimeout),a.req={method:a.method,path:a.path||"/",query:a.query,body:a.body},p&&1/0!==p&&(k=this._timeout(function(){g(new e.RequestTimeout("Request Timeout after "+p+"ms")),h()},p)),"function"==typeof b?l={abort:h}:(m=this.defer(),l=m.promise,l.abort=h),i?c(void 0,i):n.connectionPool.select(c),l)},c.prototype._timeout=function(a,b){this._timers=this._timers||[];var c;if("function"!=typeof a&&(c=a,a=void 0),a)return c=setTimeout(a,b),this._timers.push(c),c;if(c){clearTimeout(c);var d=this._timers.indexOf(c);-1!==d&&this._timers.splice(d,1)}},c.prototype.sniff=function(a){var b=this.connectionPool,c=this.nodesToHostCallback,e=this.log;a="function"==typeof a?a:d.noop,this.request({path:this.sniffEndpoint,method:"GET"},function(g,h,i){if(!g&&h&&h.nodes){var j;try{j=c(h.nodes)}catch(k){return void e.error(new Error("Unable to convert node list from "+this.sniffEndpoint+" to hosts durring sniff. Encountered error:\n"+(k.stack||k.message)))}b.setHosts(d.map(j,function(a){return new f(a)}))}a(g,h,i)})},c.prototype.close=function(){this.log.close(),d.each(this._timers,clearTimeout),this.connectionPool.close()}},{"./connection_pool":198,"./errors":201,"./host":202,"./log":203,"./nodes_to_host":207,"./serializers/json":211,"./transport/sniff_on_connection_fault":213,"./utils":214,bluebird:1}],213:[function(a,b){var c=a("../utils");b.exports=function(a){var b=0,d=a.connectionPool,e=d._onConnectionDied,f=function(){f.timerId=a._timeout(f.timerId),a.sniff()},g=function(a){var b=c.now();return function(){return b-a}};d._onConnectionDied=function(c,h){var i=e.call(d,c,h);b=f.timerId?b+1:0;var j=d.calcDeadTimeout(b,1e3);return f.timerId&&j=97&&122>=e||e>=48&&57>=e,g=e>=65&&90>=e,(g||!h)&&(k.length&&j.push(k),k=""),(g||h)&&(h&&k.length?k+=f:k=!j.length&&a||j.length&&b?f.toUpperCase():f.toLowerCase());return k.length&&j.push(k),j.length&&"_"===d.charAt(0)&&(j[0]="_"+j[0]),j.join(c)}}var d=a("__browserify_process"),e=a("__browserify_Buffer").Buffer,f=a("path"),g=a("lodash-node/modern"),h=a("util"),i=g.extend({},g,h);g=i,i.joinPath=f.join,i.deepMerge=function(a,b){return g.each(b,function(c,d){switch(typeof a[d]){case"undefined":a[d]=b[d];break;case"object":g.isArray(a[d])&&g.isArray(b[d])?a[d]=a[d].concat(b[d]):g.isPlainObject(a[d])&&g.isPlainObject(b[d])&&i.deepMerge(a[d],b[d])}}),a},g.each(["String","Object","PlainObject","Array","Finite","Function","RegExp"],function(a){var b=g["is"+a];i["isArrayOf"+a+"s"]=function(a){return g.isArray(a)&&g.every(a.slice(0,10),b)}}),i.ucfirst=function(a){return a[0].toUpperCase()+a.substring(1).toLowerCase()},i.studlyCase=c(!0,!0,""),i.camelCase=c(!1,!0,""),i.snakeCase=c(!1,!1,"_"),i.toLowerString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toLowerCase()},i.toUpperString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toUpperCase()},i.isNumeric=function(a){return"object"!=typeof a&&a-parseFloat(a)>=0};var j=/^(\d+(?:\.\d+)?)([Mwdhmsy])$/;i.isInterval=function(a){return!(!a.match||!a.match(j))},i.repeat=function(a,b){return new Array(b+1).join(a)},i.applyArgs=function(a,b,c,d){switch(d=d||0,c.length-d){case 0:return a.call(b);case 1:return a.call(b,c[0+d]);case 2:return a.call(b,c[0+d],c[1+d]);case 3:return a.call(b,c[0+d],c[1+d],c[2+d]);case 4:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d]);case 5:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d],c[4+d]);default:return a.apply(b,Array.prototype.slice.call(c,d))}},g.nextTick=function(a){d.nextTick(g.bindKey(g,"applyArgs",a,null,arguments,1))},g.handler=function(a){return a._provideBound=!0,a},g.scheduled=g.handler,g.makeBoundMethods=function(a){a.bound={};for(var b in a)"function"==typeof a[b]&&a[b]._provideBound===!0&&(a.bound[b]=g.bind(a[b],a))},g.noop=function(){},g.funcEnum=function(a,b,c,d){var e=a[b];switch(typeof e){case"undefined":return c[d];case"function":return e;case"string":if(c.hasOwnProperty(e))return c[e];default:var f="Invalid "+b+' "'+e+'", expected a function';switch(g.size(c)){case 0:break;case 1:f+=" or "+g.keys(c)[0];break;default:f+=" or one of "+g.keys(c).join(", ")}throw new TypeError(f)}},g.createArray=function(a,b){b="function"==typeof b?b:g.identity;var c,d,e=[];for(g.isArray(a)||(a=[a]),d=0;d + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, Promise$_CreatePromiseArray, PromiseArray) { -},{}],2:[function(require,module,exports){ +var SomePromiseArray = require("./some_promise_array.js")(PromiseArray); +function Promise$_Any(promises, useBound) { + var ret = Promise$_CreatePromiseArray( + promises, + SomePromiseArray, + useBound === true && promises._isBound() + ? promises._boundTo + : void 0 + ); + var promise = ret.promise(); + if (promise.isRejected()) { + return promise; + } + ret.setHowMany(1); + ret.setUnwrap(); + ret.init(); + return promise; +} + +Promise.any = function Promise$Any(promises) { + return Promise$_Any(promises, false); +}; + +Promise.prototype.any = function Promise$any() { + return Promise$_Any(this, true); +}; + +}; + +},{"./some_promise_array.js":33}],2:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +var schedule = require("./schedule.js"); +var Queue = require("./queue.js"); +var errorObj = require("./util.js").errorObj; +var tryCatch1 = require("./util.js").tryCatch1; +var process = require("./global.js").process; + +function Async() { + this._isTickUsed = false; + this._length = 0; + this._lateBuffer = new Queue(); + this._functionBuffer = new Queue(25000 * 3); + var self = this; + this.consumeFunctionBuffer = function Async$consumeFunctionBuffer() { + self._consumeFunctionBuffer(); + }; +} + +Async.prototype.haveItemsQueued = function Async$haveItemsQueued() { + return this._length > 0; +}; + +Async.prototype.invokeLater = function Async$invokeLater(fn, receiver, arg) { + if (process !== void 0 && + process.domain != null && + !fn.domain) { + fn = process.domain.bind(fn); + } + this._lateBuffer.push(fn, receiver, arg); + this._queueTick(); +}; + +Async.prototype.invoke = function Async$invoke(fn, receiver, arg) { + if (process !== void 0 && + process.domain != null && + !fn.domain) { + fn = process.domain.bind(fn); + } + var functionBuffer = this._functionBuffer; + functionBuffer.push(fn, receiver, arg); + this._length = functionBuffer.length(); + this._queueTick(); +}; + +Async.prototype._consumeFunctionBuffer = +function Async$_consumeFunctionBuffer() { + var functionBuffer = this._functionBuffer; + while(functionBuffer.length() > 0) { + var fn = functionBuffer.shift(); + var receiver = functionBuffer.shift(); + var arg = functionBuffer.shift(); + fn.call(receiver, arg); + } + this._reset(); + this._consumeLateBuffer(); +}; + +Async.prototype._consumeLateBuffer = function Async$_consumeLateBuffer() { + var buffer = this._lateBuffer; + while(buffer.length() > 0) { + var fn = buffer.shift(); + var receiver = buffer.shift(); + var arg = buffer.shift(); + var res = tryCatch1(fn, receiver, arg); + if (res === errorObj) { + this._queueTick(); + if (fn.domain != null) { + fn.domain.emit("error", res.e); + } + else { + throw res.e; + } + } + } +}; + +Async.prototype._queueTick = function Async$_queue() { + if (!this._isTickUsed) { + schedule(this.consumeFunctionBuffer); + this._isTickUsed = true; + } +}; + +Async.prototype._reset = function Async$_reset() { + this._isTickUsed = false; + this._length = 0; +}; + +module.exports = new Async(); + +},{"./global.js":15,"./queue.js":26,"./schedule.js":29,"./util.js":37}],3:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +var Promise = require("./promise.js")(); +module.exports = Promise; +},{"./promise.js":19}],4:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise) { +Promise.prototype.call = function Promise$call(propertyName) { + var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];} + + return this._then(function(obj) { + return obj[propertyName].apply(obj, args); + }, + void 0, + void 0, + void 0, + void 0 + ); +}; + +function Promise$getter(obj) { + var prop = typeof this === "string" + ? this + : ("" + this); + return obj[prop]; +} +Promise.prototype.get = function Promise$get(propertyName) { + return this._then( + Promise$getter, + void 0, + void 0, + propertyName, + void 0 + ); +}; +}; + +},{}],5:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var errors = require("./errors.js"); +var async = require("./async.js"); +var CancellationError = errors.CancellationError; + +Promise.prototype._cancel = function Promise$_cancel() { + if (!this.isCancellable()) return this; + var parent; + var promiseToReject = this; + while ((parent = promiseToReject._cancellationParent) !== void 0 && + parent.isCancellable()) { + promiseToReject = parent; + } + var err = new CancellationError(); + promiseToReject._attachExtraTrace(err); + promiseToReject._rejectUnchecked(err); +}; + +Promise.prototype.cancel = function Promise$cancel() { + if (!this.isCancellable()) return this; + async.invokeLater(this._cancel, this, void 0); + return this; +}; + +Promise.prototype.cancellable = function Promise$cancellable() { + if (this._cancellable()) return this; + this._setCancellable(); + this._cancellationParent = void 0; + return this; +}; + +Promise.prototype.uncancellable = function Promise$uncancellable() { + var ret = new Promise(INTERNAL); + ret._setTrace(this); + ret._follow(this); + ret._unsetCancellable(); + if (this._isBound()) ret._setBoundTo(this._boundTo); + return ret; +}; + +Promise.prototype.fork = +function Promise$fork(didFulfill, didReject, didProgress) { + var ret = this._then(didFulfill, didReject, didProgress, + void 0, void 0); + + ret._setCancellable(); + ret._cancellationParent = void 0; + return ret; +}; +}; + +},{"./async.js":2,"./errors.js":9}],6:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function() { +var inherits = require("./util.js").inherits; +var defineProperty = require("./es5.js").defineProperty; + +var rignore = new RegExp( + "\\b(?:[a-zA-Z0-9.]+\\$_\\w+|" + + "tryCatch(?:1|2|Apply)|new \\w*PromiseArray|" + + "\\w*PromiseArray\\.\\w*PromiseArray|" + + "setTimeout|CatchFilter\\$_\\w+|makeNodePromisified|processImmediate|" + + "process._tickCallback|nextTick|Async\\$\\w+)\\b" +); + +var rtraceline = null; +var formatStack = null; + +function formatNonError(obj) { + var str; + if (typeof obj === "function") { + str = "[function " + + (obj.name || "anonymous") + + "]"; + } + else { + str = obj.toString(); + var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; + if (ruselessToString.test(str)) { + try { + var newStr = JSON.stringify(obj); + str = newStr; + } + catch(e) { + + } + } + if (str.length === 0) { + str = "(empty array)"; + } + } + return ("(<" + snip(str) + ">, no stack trace)"); +} + +function snip(str) { + var maxChars = 41; + if (str.length < maxChars) { + return str; + } + return str.substr(0, maxChars - 3) + "..."; +} + +function CapturedTrace(ignoreUntil, isTopLevel) { + this.captureStackTrace(CapturedTrace, isTopLevel); + +} +inherits(CapturedTrace, Error); + +CapturedTrace.prototype.captureStackTrace = +function CapturedTrace$captureStackTrace(ignoreUntil, isTopLevel) { + captureStackTrace(this, ignoreUntil, isTopLevel); +}; + +CapturedTrace.possiblyUnhandledRejection = +function CapturedTrace$PossiblyUnhandledRejection(reason) { + if (typeof console === "object") { + var message; + if (typeof reason === "object" || typeof reason === "function") { + var stack = reason.stack; + message = "Possibly unhandled " + formatStack(stack, reason); + } + else { + message = "Possibly unhandled " + String(reason); + } + if (typeof console.error === "function" || + typeof console.error === "object") { + console.error(message); + } + else if (typeof console.log === "function" || + typeof console.log === "object") { + console.log(message); + } + } +}; + +CapturedTrace.combine = function CapturedTrace$Combine(current, prev) { + var curLast = current.length - 1; + for (var i = prev.length - 1; i >= 0; --i) { + var line = prev[i]; + if (current[curLast] === line) { + current.pop(); + curLast--; + } + else { + break; + } + } + + current.push("From previous event:"); + var lines = current.concat(prev); + + var ret = []; + + for (var i = 0, len = lines.length; i < len; ++i) { + + if ((rignore.test(lines[i]) || + (i > 0 && !rtraceline.test(lines[i])) && + lines[i] !== "From previous event:") + ) { + continue; + } + ret.push(lines[i]); + } + return ret; +}; + +CapturedTrace.isSupported = function CapturedTrace$IsSupported() { + return typeof captureStackTrace === "function"; +}; + +var captureStackTrace = (function stackDetection() { + if (typeof Error.stackTraceLimit === "number" && + typeof Error.captureStackTrace === "function") { + rtraceline = /^\s*at\s*/; + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + + if (error.name !== void 0 && + error.message !== void 0) { + return error.name + ". " + error.message; + } + return formatNonError(error); + + + }; + var captureStackTrace = Error.captureStackTrace; + return function CapturedTrace$_captureStackTrace( + receiver, ignoreUntil) { + captureStackTrace(receiver, ignoreUntil); + }; + } + var err = new Error(); + + if (typeof err.stack === "string" && + typeof "".startsWith === "function" && + (err.stack.startsWith("stackDetection@")) && + stackDetection.name === "stackDetection") { + + defineProperty(Error, "stackTraceLimit", { + writable: true, + enumerable: false, + configurable: false, + value: 25 + }); + rtraceline = /@/; + var rline = /[@\n]/; + + formatStack = function(stack, error) { + if (typeof stack === "string") { + return (error.name + ". " + error.message + "\n" + stack); + } + + if (error.name !== void 0 && + error.message !== void 0) { + return error.name + ". " + error.message; + } + return formatNonError(error); + }; + + return function captureStackTrace(o) { + var stack = new Error().stack; + var split = stack.split(rline); + var len = split.length; + var ret = ""; + for (var i = 0; i < len; i += 2) { + ret += split[i]; + ret += "@"; + ret += split[i + 1]; + ret += "\n"; + } + o.stack = ret; + }; + } + else { + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + + if ((typeof error === "object" || + typeof error === "function") && + error.name !== void 0 && + error.message !== void 0) { + return error.name + ". " + error.message; + } + return formatNonError(error); + }; + + return null; + } +})(); + +return CapturedTrace; +}; + +},{"./es5.js":11,"./util.js":37}],7:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(NEXT_FILTER) { +var util = require("./util.js"); +var errors = require("./errors.js"); +var tryCatch1 = util.tryCatch1; +var errorObj = util.errorObj; +var keys = require("./es5.js").keys; +var TypeError = errors.TypeError; + +function CatchFilter(instances, callback, promise) { + this._instances = instances; + this._callback = callback; + this._promise = promise; +} + +function CatchFilter$_safePredicate(predicate, e) { + var safeObject = {}; + var retfilter = tryCatch1(predicate, safeObject, e); + + if (retfilter === errorObj) return retfilter; + + var safeKeys = keys(safeObject); + if (safeKeys.length) { + errorObj.e = new TypeError( + "Catch filter must inherit from Error " + + "or be a simple predicate function"); + return errorObj; + } + return retfilter; +} + +CatchFilter.prototype.doFilter = function CatchFilter$_doFilter(e) { + var cb = this._callback; + var promise = this._promise; + var boundTo = promise._isBound() ? promise._boundTo : void 0; + for (var i = 0, len = this._instances.length; i < len; ++i) { + var item = this._instances[i]; + var itemIsErrorType = item === Error || + (item != null && item.prototype instanceof Error); + + if (itemIsErrorType && e instanceof item) { + var ret = tryCatch1(cb, boundTo, e); + if (ret === errorObj) { + NEXT_FILTER.e = ret.e; + return NEXT_FILTER; + } + return ret; + } else if (typeof item === "function" && !itemIsErrorType) { + var shouldHandle = CatchFilter$_safePredicate(item, e); + if (shouldHandle === errorObj) { + var trace = errors.canAttach(errorObj.e) + ? errorObj.e + : new Error(errorObj.e + ""); + this._promise._attachExtraTrace(trace); + e = errorObj.e; + break; + } else if (shouldHandle) { + var ret = tryCatch1(cb, boundTo, e); + if (ret === errorObj) { + NEXT_FILTER.e = ret.e; + return NEXT_FILTER; + } + return ret; + } + } + } + NEXT_FILTER.e = e; + return NEXT_FILTER; +}; + +return CatchFilter; +}; + +},{"./errors.js":9,"./es5.js":11,"./util.js":37}],8:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +var util = require("./util.js"); +var isPrimitive = util.isPrimitive; +var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver; + +module.exports = function(Promise) { +var returner = function Promise$_returner() { + return this; +}; +var thrower = function Promise$_thrower() { + throw this; +}; + +var wrapper = function Promise$_wrapper(value, action) { + if (action === 1) { + return function Promise$_thrower() { + throw value; + }; + } + else if (action === 2) { + return function Promise$_returner() { + return value; + }; + } +}; + + +Promise.prototype["return"] = +Promise.prototype.thenReturn = +function Promise$thenReturn(value) { + if (wrapsPrimitiveReceiver && isPrimitive(value)) { + return this._then( + wrapper(value, 2), + void 0, + void 0, + void 0, + void 0 + ); + } + return this._then(returner, void 0, void 0, value, void 0); +}; + +Promise.prototype["throw"] = +Promise.prototype.thenThrow = +function Promise$thenThrow(reason) { + if (wrapsPrimitiveReceiver && isPrimitive(reason)) { + return this._then( + wrapper(reason, 1), + void 0, + void 0, + void 0, + void 0 + ); + } + return this._then(thrower, void 0, void 0, reason, void 0); +}; +}; + +},{"./util.js":37}],9:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +var global = require("./global.js"); +var Objectfreeze = require("./es5.js").freeze; +var util = require("./util.js"); +var inherits = util.inherits; +var notEnumerableProp = util.notEnumerableProp; +var Error = global.Error; + +function markAsOriginatingFromRejection(e) { + try { + notEnumerableProp(e, "isAsync", true); + } + catch(ignore) {} +} + +function originatesFromRejection(e) { + if (e == null) return false; + return ((e instanceof RejectionError) || + e["isAsync"] === true); +} + +function isError(obj) { + return obj instanceof Error; +} + +function canAttach(obj) { + return isError(obj); +} + +function subError(nameProperty, defaultMessage) { + function SubError(message) { + if (!(this instanceof SubError)) return new SubError(message); + this.message = typeof message === "string" ? message : defaultMessage; + this.name = nameProperty; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + inherits(SubError, Error); + return SubError; +} + +var TypeError = global.TypeError; +if (typeof TypeError !== "function") { + TypeError = subError("TypeError", "type error"); +} +var RangeError = global.RangeError; +if (typeof RangeError !== "function") { + RangeError = subError("RangeError", "range error"); +} +var CancellationError = subError("CancellationError", "cancellation error"); +var TimeoutError = subError("TimeoutError", "timeout error"); + +function RejectionError(message) { + this.name = "RejectionError"; + this.message = message; + this.cause = message; + this.isAsync = true; + + if (message instanceof Error) { + this.message = message.message; + this.stack = message.stack; + } + else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + +} +inherits(RejectionError, Error); + +var key = "__BluebirdErrorTypes__"; +var errorTypes = global[key]; +if (!errorTypes) { + errorTypes = Objectfreeze({ + CancellationError: CancellationError, + TimeoutError: TimeoutError, + RejectionError: RejectionError + }); + notEnumerableProp(global, key, errorTypes); +} + +module.exports = { + Error: Error, + TypeError: TypeError, + RangeError: RangeError, + CancellationError: errorTypes.CancellationError, + RejectionError: errorTypes.RejectionError, + TimeoutError: errorTypes.TimeoutError, + originatesFromRejection: originatesFromRejection, + markAsOriginatingFromRejection: markAsOriginatingFromRejection, + canAttach: canAttach +}; + +},{"./es5.js":11,"./global.js":15,"./util.js":37}],10:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise) { +var TypeError = require('./errors.js').TypeError; + +function apiRejection(msg) { + var error = new TypeError(msg); + var ret = Promise.rejected(error); + var parent = ret._peekContext(); + if (parent != null) { + parent._attachExtraTrace(error); + } + return ret; +} + +return apiRejection; +}; + +},{"./errors.js":9}],11:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +var isES5 = (function(){ + "use strict"; + return this === void 0; +})(); + +if (isES5) { + module.exports = { + freeze: Object.freeze, + defineProperty: Object.defineProperty, + keys: Object.keys, + getPrototypeOf: Object.getPrototypeOf, + isArray: Array.isArray, + isES5: isES5 + }; +} + +else { + var has = {}.hasOwnProperty; + var str = {}.toString; + var proto = {}.constructor.prototype; + + var ObjectKeys = function ObjectKeys(o) { + var ret = []; + for (var key in o) { + if (has.call(o, key)) { + ret.push(key); + } + } + return ret; + } + + var ObjectDefineProperty = function ObjectDefineProperty(o, key, desc) { + o[key] = desc.value; + return o; + } + + var ObjectFreeze = function ObjectFreeze(obj) { + return obj; + } + + var ObjectGetPrototypeOf = function ObjectGetPrototypeOf(obj) { + try { + return Object(obj).constructor.prototype; + } + catch (e) { + return proto; + } + } + + var ArrayIsArray = function ArrayIsArray(obj) { + try { + return str.call(obj) === "[object Array]"; + } + catch(e) { + return false; + } + } + + module.exports = { + isArray: ArrayIsArray, + keys: ObjectKeys, + defineProperty: ObjectDefineProperty, + freeze: ObjectFreeze, + getPrototypeOf: ObjectGetPrototypeOf, + isES5: isES5 + }; +} + +},{}],12:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise) { +var isArray = require("./util.js").isArray; + +function Promise$_filter(booleans) { + var values = this instanceof Promise ? this._settledValue : this; + var len = values.length; + var ret = new Array(len); + var j = 0; + + for (var i = 0; i < len; ++i) { + if (booleans[i]) ret[j++] = values[i]; + + } + ret.length = j; + return ret; +} + +var ref = {ref: null}; +Promise.filter = function Promise$Filter(promises, fn) { + return Promise.map(promises, fn, ref) + ._then(Promise$_filter, void 0, void 0, ref.ref, void 0); +}; + +Promise.prototype.filter = function Promise$filter(fn) { + return this.map(fn, ref) + ._then(Promise$_filter, void 0, void 0, ref.ref, void 0); +}; +}; + +},{"./util.js":37}],13:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, NEXT_FILTER) { +var util = require("./util.js"); +var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver; +var isPrimitive = util.isPrimitive; +var thrower = util.thrower; + + +function returnThis() { + return this; +} +function throwThis() { + throw this; +} +function return$(r) { + return function Promise$_returner() { + return r; + }; +} +function throw$(r) { + return function Promise$_thrower() { + throw r; + }; +} +function promisedFinally(ret, reasonOrValue, isFulfilled) { + var then; + if (wrapsPrimitiveReceiver && isPrimitive(reasonOrValue)) { + then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue); + } + else { + then = isFulfilled ? returnThis : throwThis; + } + return ret._then(then, thrower, void 0, reasonOrValue, void 0); +} + +function finallyHandler(reasonOrValue) { + var promise = this.promise; + var handler = this.handler; + + var ret = promise._isBound() + ? handler.call(promise._boundTo) + : handler(); + + if (ret !== void 0) { + var maybePromise = Promise._cast(ret, void 0); + if (maybePromise instanceof Promise) { + return promisedFinally(maybePromise, reasonOrValue, + promise.isFulfilled()); + } + } + + if (promise.isRejected()) { + NEXT_FILTER.e = reasonOrValue; + return NEXT_FILTER; + } + else { + return reasonOrValue; + } +} + +function tapHandler(value) { + var promise = this.promise; + var handler = this.handler; + + var ret = promise._isBound() + ? handler.call(promise._boundTo, value) + : handler(value); + + if (ret !== void 0) { + var maybePromise = Promise._cast(ret, void 0); + if (maybePromise instanceof Promise) { + return promisedFinally(maybePromise, value, true); + } + } + return value; +} + +Promise.prototype._passThroughHandler = +function Promise$_passThroughHandler(handler, isFinally) { + if (typeof handler !== "function") return this.then(); + + var promiseAndHandler = { + promise: this, + handler: handler + }; + + return this._then( + isFinally ? finallyHandler : tapHandler, + isFinally ? finallyHandler : void 0, void 0, + promiseAndHandler, void 0); +}; + +Promise.prototype.lastly = +Promise.prototype["finally"] = function Promise$finally(handler) { + return this._passThroughHandler(handler, true); +}; + +Promise.prototype.tap = function Promise$tap(handler) { + return this._passThroughHandler(handler, false); +}; +}; + +},{"./util.js":37}],14:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, apiRejection, INTERNAL) { +var PromiseSpawn = require("./promise_spawn.js")(Promise, INTERNAL); +var errors = require("./errors.js"); +var TypeError = errors.TypeError; +var deprecated = require("./util.js").deprecated; + +Promise.coroutine = function Promise$Coroutine(generatorFunction) { + if (typeof generatorFunction !== "function") { + throw new TypeError("generatorFunction must be a function"); + } + var PromiseSpawn$ = PromiseSpawn; + return function () { + var generator = generatorFunction.apply(this, arguments); + var spawn = new PromiseSpawn$(void 0, void 0); + spawn._generator = generator; + spawn._next(void 0); + return spawn.promise(); + }; +}; + +Promise.coroutine.addYieldHandler = PromiseSpawn.addYieldHandler; + +Promise.spawn = function Promise$Spawn(generatorFunction) { + deprecated("Promise.spawn is deprecated. Use Promise.coroutine instead."); + if (typeof generatorFunction !== "function") { + return apiRejection("generatorFunction must be a function"); + } + var spawn = new PromiseSpawn(generatorFunction, this); + var ret = spawn.promise(); + spawn._run(Promise.spawn); + return ret; +}; +}; + +},{"./errors.js":9,"./promise_spawn.js":22,"./util.js":37}],15:[function(require,module,exports){ +var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +module.exports = (function() { + if (this !== void 0) return this; + try {return global;} + catch(e) {} + try {return window;} + catch(e) {} + try {return self;} + catch(e) {} +})(); + +},{}],16:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, PromiseArray, INTERNAL, apiRejection) { + +var all = Promise.all; +var util = require("./util.js"); +var canAttach = require("./errors.js").canAttach; +var isArray = util.isArray; +var _cast = Promise._cast; + +function unpack(values) { + return Promise$_Map(values, this[0], this[1], this[2]); +} + +function Promise$_Map(promises, fn, useBound, ref) { + if (typeof fn !== "function") { + return apiRejection("fn must be a function"); + } + + var receiver = void 0; + if (useBound === true) { + if (promises._isBound()) { + receiver = promises._boundTo; + } + } + else if (useBound !== false) { + receiver = useBound; + } + + var shouldUnwrapItems = ref !== void 0; + if (shouldUnwrapItems) ref.ref = promises; + + if (promises instanceof Promise) { + var pack = [fn, receiver, ref]; + return promises._then(unpack, void 0, void 0, pack, void 0); + } + else if (!isArray(promises)) { + return apiRejection("expecting an array, a promise or a thenable"); + } + + var promise = new Promise(INTERNAL); + if (receiver !== void 0) promise._setBoundTo(receiver); + promise._setTrace(void 0); + + var mapping = new Mapping(promise, + fn, + promises, + receiver, + shouldUnwrapItems); + mapping.init(); + return promise; +} + +var pending = {}; +function Mapping(promise, callback, items, receiver, shouldUnwrapItems) { + this.shouldUnwrapItems = shouldUnwrapItems; + this.index = 0; + this.items = items; + this.callback = callback; + this.receiver = receiver; + this.promise = promise; + this.result = new Array(items.length); +} +util.inherits(Mapping, PromiseArray); + +Mapping.prototype.init = function Mapping$init() { + var items = this.items; + var len = items.length; + var result = this.result; + var isRejected = false; + for (var i = 0; i < len; ++i) { + var maybePromise = _cast(items[i], void 0); + if (maybePromise instanceof Promise) { + if (maybePromise.isPending()) { + result[i] = pending; + maybePromise._proxyPromiseArray(this, i); + } + else if (maybePromise.isFulfilled()) { + result[i] = maybePromise.value(); + } + else { + maybePromise._unsetRejectionIsUnhandled(); + if (!isRejected) { + this.reject(maybePromise.reason()); + isRejected = true; + } + } + } + else { + result[i] = maybePromise; + } + } + if (!isRejected) this.iterate(); +}; + +Mapping.prototype.isResolved = function Mapping$isResolved() { + return this.promise === null; +}; + +Mapping.prototype._promiseProgressed = +function Mapping$_promiseProgressed(value) { + if (this.isResolved()) return; + this.promise._progress(value); +}; + +Mapping.prototype._promiseFulfilled = +function Mapping$_promiseFulfilled(value, index) { + if (this.isResolved()) return; + this.result[index] = value; + if (this.shouldUnwrapItems) this.items[index] = value; + if (this.index === index) this.iterate(); +}; + +Mapping.prototype._promiseRejected = +function Mapping$_promiseRejected(reason) { + this.reject(reason); +}; + +Mapping.prototype.reject = function Mapping$reject(reason) { + if (this.isResolved()) return; + var trace = canAttach(reason) ? reason : new Error(reason + ""); + this.promise._attachExtraTrace(trace); + this.promise._reject(reason, trace); +}; + +Mapping.prototype.iterate = function Mapping$iterate() { + var i = this.index; + var items = this.items; + var result = this.result; + var len = items.length; + var result = this.result; + var receiver = this.receiver; + var callback = this.callback; + + for (; i < len; ++i) { + var value = result[i]; + if (value === pending) { + this.index = i; + return; + } + try { result[i] = callback.call(receiver, value, i, len); } + catch (e) { return this.reject(e); } + } + this.promise._follow(all(result)); + this.items = this.result = this.callback = this.promise = null; +}; + +Promise.prototype.map = function Promise$map(fn, ref) { + return Promise$_Map(this, fn, true, ref); +}; + +Promise.map = function Promise$Map(promises, fn, ref) { + return Promise$_Map(promises, fn, false, ref); +}; +}; + +},{"./errors.js":9,"./util.js":37}],17:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise) { +var util = require("./util.js"); +var async = require("./async.js"); +var tryCatch2 = util.tryCatch2; +var tryCatch1 = util.tryCatch1; +var errorObj = util.errorObj; + +function thrower(r) { + throw r; +} + +function Promise$_successAdapter(val, receiver) { + var nodeback = this; + var ret = val === void 0 + ? tryCatch1(nodeback, receiver, null) + : tryCatch2(nodeback, receiver, null, val); + if (ret === errorObj) { + async.invokeLater(thrower, void 0, ret.e); + } +} +function Promise$_errorAdapter(reason, receiver) { + var nodeback = this; + var ret = tryCatch1(nodeback, receiver, reason); + if (ret === errorObj) { + async.invokeLater(thrower, void 0, ret.e); + } +} + +Promise.prototype.nodeify = function Promise$nodeify(nodeback) { + if (typeof nodeback == "function") { + this._then( + Promise$_successAdapter, + Promise$_errorAdapter, + void 0, + nodeback, + this._isBound() ? this._boundTo : null + ); + } + return this; +}; +}; + +},{"./async.js":2,"./util.js":37}],18:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, isPromiseArrayProxy) { +var util = require("./util.js"); +var async = require("./async.js"); +var errors = require("./errors.js"); +var tryCatch1 = util.tryCatch1; +var errorObj = util.errorObj; + +Promise.prototype.progressed = function Promise$progressed(handler) { + return this._then(void 0, void 0, handler, void 0, void 0); +}; + +Promise.prototype._progress = function Promise$_progress(progressValue) { + if (this._isFollowingOrFulfilledOrRejected()) return; + this._progressUnchecked(progressValue); + +}; + +Promise.prototype._progressHandlerAt = +function Promise$_progressHandlerAt(index) { + if (index === 0) return this._progressHandler0; + return this[index + 2 - 5]; +}; + +Promise.prototype._doProgressWith = +function Promise$_doProgressWith(progression) { + var progressValue = progression.value; + var handler = progression.handler; + var promise = progression.promise; + var receiver = progression.receiver; + + this._pushContext(); + var ret = tryCatch1(handler, receiver, progressValue); + this._popContext(); + + if (ret === errorObj) { + if (ret.e != null && + ret.e.name !== "StopProgressPropagation") { + var trace = errors.canAttach(ret.e) + ? ret.e : new Error(ret.e + ""); + promise._attachExtraTrace(trace); + promise._progress(ret.e); + } + } + else if (ret instanceof Promise) { + ret._then(promise._progress, null, null, promise, void 0); + } + else { + promise._progress(ret); + } +}; + + +Promise.prototype._progressUnchecked = +function Promise$_progressUnchecked(progressValue) { + if (!this.isPending()) return; + var len = this._length(); + var progress = this._progress; + for (var i = 0; i < len; i += 5) { + var handler = this._progressHandlerAt(i); + var promise = this._promiseAt(i); + if (!(promise instanceof Promise)) { + var receiver = this._receiverAt(i); + if (typeof handler === "function") { + handler.call(receiver, progressValue, promise); + } + else if (receiver instanceof Promise && receiver._isProxied()) { + receiver._progressUnchecked(progressValue); + } + else if (isPromiseArrayProxy(receiver, promise)) { + receiver._promiseProgressed(progressValue, promise); + } + continue; + } + + if (typeof handler === "function") { + async.invoke(this._doProgressWith, this, { + handler: handler, + promise: promise, + receiver: this._receiverAt(i), + value: progressValue + }); + } + else { + async.invoke(progress, promise, progressValue); + } + } +}; +}; + +},{"./async.js":2,"./errors.js":9,"./util.js":37}],19:[function(require,module,exports){ +var process=require("__browserify_process");/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function() { +var global = require("./global.js"); +var util = require("./util.js"); +var async = require("./async.js"); +var errors = require("./errors.js"); + +var INTERNAL = function(){}; +var APPLY = {}; +var NEXT_FILTER = {e: null}; + +var PromiseArray = require("./promise_array.js")(Promise, INTERNAL); +var CapturedTrace = require("./captured_trace.js")(); +var CatchFilter = require("./catch_filter.js")(NEXT_FILTER); +var PromiseResolver = require("./promise_resolver.js"); + +var isArray = util.isArray; + +var errorObj = util.errorObj; +var tryCatch1 = util.tryCatch1; +var tryCatch2 = util.tryCatch2; +var tryCatchApply = util.tryCatchApply; +var RangeError = errors.RangeError; +var TypeError = errors.TypeError; +var CancellationError = errors.CancellationError; +var TimeoutError = errors.TimeoutError; +var RejectionError = errors.RejectionError; +var originatesFromRejection = errors.originatesFromRejection; +var markAsOriginatingFromRejection = errors.markAsOriginatingFromRejection; +var canAttach = errors.canAttach; +var thrower = util.thrower; +var apiRejection = require("./errors_api_rejection")(Promise); + + +var makeSelfResolutionError = function Promise$_makeSelfResolutionError() { + return new TypeError("circular promise resolution chain"); +}; + +function isPromise(obj) { + if (obj === void 0) return false; + return obj instanceof Promise; +} + +function isPromiseArrayProxy(receiver, promiseSlotValue) { + if (receiver instanceof PromiseArray) { + return promiseSlotValue >= 0; + } + return false; +} + +function Promise(resolver) { + if (typeof resolver !== "function") { + throw new TypeError("the promise constructor requires a resolver function"); + } + if (this.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly"); + } + this._bitField = 0; + this._fulfillmentHandler0 = void 0; + this._rejectionHandler0 = void 0; + this._promise0 = void 0; + this._receiver0 = void 0; + this._settledValue = void 0; + this._boundTo = void 0; + if (resolver !== INTERNAL) this._resolveFromResolver(resolver); +} + +Promise.prototype.bind = function Promise$bind(thisArg) { + var ret = new Promise(INTERNAL); + ret._setTrace(this); + ret._follow(this); + ret._setBoundTo(thisArg); + if (this._cancellable()) { + ret._setCancellable(); + ret._cancellationParent = this; + } + return ret; +}; + +Promise.prototype.toString = function Promise$toString() { + return "[object Promise]"; +}; + +Promise.prototype.caught = Promise.prototype["catch"] = +function Promise$catch(fn) { + var len = arguments.length; + if (len > 1) { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (typeof item === "function") { + catchInstances[j++] = item; + } + else { + var catchFilterTypeError = + new TypeError( + "A catch filter must be an error constructor " + + "or a filter function"); + + this._attachExtraTrace(catchFilterTypeError); + async.invoke(this._reject, this, catchFilterTypeError); + return; + } + } + catchInstances.length = j; + fn = arguments[i]; + + this._resetTrace(); + var catchFilter = new CatchFilter(catchInstances, fn, this); + return this._then(void 0, catchFilter.doFilter, void 0, + catchFilter, void 0); + } + return this._then(void 0, fn, void 0, void 0, void 0); +}; + +Promise.prototype.then = +function Promise$then(didFulfill, didReject, didProgress) { + return this._then(didFulfill, didReject, didProgress, + void 0, void 0); +}; + + +Promise.prototype.done = +function Promise$done(didFulfill, didReject, didProgress) { + var promise = this._then(didFulfill, didReject, didProgress, + void 0, void 0); + promise._setIsFinal(); +}; + +Promise.prototype.spread = function Promise$spread(didFulfill, didReject) { + return this._then(didFulfill, didReject, void 0, + APPLY, void 0); +}; + +Promise.prototype.isCancellable = function Promise$isCancellable() { + return !this.isResolved() && + this._cancellable(); +}; + +Promise.prototype.toJSON = function Promise$toJSON() { + var ret = { + isFulfilled: false, + isRejected: false, + fulfillmentValue: void 0, + rejectionReason: void 0 + }; + if (this.isFulfilled()) { + ret.fulfillmentValue = this._settledValue; + ret.isFulfilled = true; + } + else if (this.isRejected()) { + ret.rejectionReason = this._settledValue; + ret.isRejected = true; + } + return ret; +}; + +Promise.prototype.all = function Promise$all() { + return Promise$_all(this, true); +}; + + +Promise.is = isPromise; + +function Promise$_all(promises, useBound) { + return Promise$_CreatePromiseArray( + promises, + PromiseArray, + useBound === true && promises._isBound() + ? promises._boundTo + : void 0 + ).promise(); +} +Promise.all = function Promise$All(promises) { + return Promise$_all(promises, false); +}; + +Promise.join = function Promise$Join() { + var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];} + return Promise$_CreatePromiseArray(args, PromiseArray, void 0).promise(); +}; + +Promise.resolve = Promise.fulfilled = +function Promise$Resolve(value) { + var ret = new Promise(INTERNAL); + ret._setTrace(void 0); + if (ret._tryFollow(value)) { + return ret; + } + ret._cleanValues(); + ret._setFulfilled(); + ret._settledValue = value; + return ret; +}; + +Promise.reject = Promise.rejected = function Promise$Reject(reason) { + var ret = new Promise(INTERNAL); + ret._setTrace(void 0); + markAsOriginatingFromRejection(reason); + ret._cleanValues(); + ret._setRejected(); + ret._settledValue = reason; + if (!canAttach(reason)) { + var trace = new Error(reason + ""); + ret._setCarriedStackTrace(trace); + } + ret._ensurePossibleRejectionHandled(); + return ret; +}; + +Promise.prototype.error = function Promise$_error(fn) { + return this.caught(originatesFromRejection, fn); +}; + +Promise.prototype._resolveFromSyncValue = +function Promise$_resolveFromSyncValue(value) { + if (value === errorObj) { + this._cleanValues(); + this._setRejected(); + this._settledValue = value.e; + this._ensurePossibleRejectionHandled(); + } + else { + var maybePromise = Promise._cast(value, void 0); + if (maybePromise instanceof Promise) { + this._follow(maybePromise); + } + else { + this._cleanValues(); + this._setFulfilled(); + this._settledValue = value; + } + } +}; + +Promise.method = function Promise$_Method(fn) { + if (typeof fn !== "function") { + throw new TypeError("fn must be a function"); + } + return function Promise$_method() { + var value; + switch(arguments.length) { + case 0: value = tryCatch1(fn, this, void 0); break; + case 1: value = tryCatch1(fn, this, arguments[0]); break; + case 2: value = tryCatch2(fn, this, arguments[0], arguments[1]); break; + default: + var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];} + value = tryCatchApply(fn, args, this); break; + } + var ret = new Promise(INTERNAL); + ret._setTrace(void 0); + ret._resolveFromSyncValue(value); + return ret; + }; +}; + +Promise.attempt = Promise["try"] = function Promise$_Try(fn, args, ctx) { + if (typeof fn !== "function") { + return apiRejection("fn must be a function"); + } + var value = isArray(args) + ? tryCatchApply(fn, args, ctx) + : tryCatch1(fn, ctx, args); + + var ret = new Promise(INTERNAL); + ret._setTrace(void 0); + ret._resolveFromSyncValue(value); + return ret; +}; + +Promise.defer = Promise.pending = function Promise$Defer() { + var promise = new Promise(INTERNAL); + promise._setTrace(void 0); + return new PromiseResolver(promise); +}; + +Promise.bind = function Promise$Bind(thisArg) { + var ret = new Promise(INTERNAL); + ret._setTrace(void 0); + ret._setFulfilled(); + ret._setBoundTo(thisArg); + return ret; +}; + +Promise.cast = function Promise$_Cast(obj) { + var ret = Promise._cast(obj, void 0); + if (!(ret instanceof Promise)) { + return Promise.resolve(ret); + } + return ret; +}; + +Promise.onPossiblyUnhandledRejection = +function Promise$OnPossiblyUnhandledRejection(fn) { + CapturedTrace.possiblyUnhandledRejection = typeof fn === "function" + ? fn : void 0; +}; + +var unhandledRejectionHandled; +Promise.onUnhandledRejectionHandled = +function Promise$onUnhandledRejectionHandled(fn) { + unhandledRejectionHandled = typeof fn === "function" ? fn : void 0; +}; + +var debugging = false || !!( + typeof process !== "undefined" && + typeof process.execPath === "string" && + typeof process.env === "object" && + (process.env["BLUEBIRD_DEBUG"] || + process.env["NODE_ENV"] === "development") +); + + +Promise.longStackTraces = function Promise$LongStackTraces() { + if (async.haveItemsQueued() && + debugging === false + ) { + throw new Error("cannot enable long stack traces after promises have been created"); + } + debugging = CapturedTrace.isSupported(); +}; + +Promise.hasLongStackTraces = function Promise$HasLongStackTraces() { + return debugging && CapturedTrace.isSupported(); +}; + +Promise.prototype._setProxyHandlers = +function Promise$_setProxyHandlers(receiver, promiseSlotValue) { + var index = this._length(); + + if (index >= 524287 - 5) { + index = 0; + this._setLength(0); + } + if (index === 0) { + this._promise0 = promiseSlotValue; + this._receiver0 = receiver; + } + else { + var i = index - 5; + this[i + 3] = promiseSlotValue; + this[i + 4] = receiver; + this[i + 0] = + this[i + 1] = + this[i + 2] = void 0; + } + this._setLength(index + 5); +}; + +Promise.prototype._proxyPromiseArray = +function Promise$_proxyPromiseArray(promiseArray, index) { + this._setProxyHandlers(promiseArray, index); +}; + +Promise.prototype._proxyPromise = function Promise$_proxyPromise(promise) { + promise._setProxied(); + this._setProxyHandlers(promise, -1); +}; + +Promise.prototype._then = +function Promise$_then( + didFulfill, + didReject, + didProgress, + receiver, + internalData +) { + var haveInternalData = internalData !== void 0; + var ret = haveInternalData ? internalData : new Promise(INTERNAL); + + if (debugging && !haveInternalData) { + var haveSameContext = this._peekContext() === this._traceParent; + ret._traceParent = haveSameContext ? this._traceParent : this; + ret._setTrace(this); + } + + if (!haveInternalData && this._isBound()) { + ret._setBoundTo(this._boundTo); + } + + var callbackIndex = + this._addCallbacks(didFulfill, didReject, didProgress, ret, receiver); + + if (!haveInternalData && this._cancellable()) { + ret._setCancellable(); + ret._cancellationParent = this; + } + + if (this.isResolved()) { + async.invoke(this._queueSettleAt, this, callbackIndex); + } + + return ret; +}; + +Promise.prototype._length = function Promise$_length() { + return this._bitField & 524287; +}; + +Promise.prototype._isFollowingOrFulfilledOrRejected = +function Promise$_isFollowingOrFulfilledOrRejected() { + return (this._bitField & 939524096) > 0; +}; + +Promise.prototype._isFollowing = function Promise$_isFollowing() { + return (this._bitField & 536870912) === 536870912; +}; + +Promise.prototype._setLength = function Promise$_setLength(len) { + this._bitField = (this._bitField & -524288) | + (len & 524287); +}; + +Promise.prototype._setFulfilled = function Promise$_setFulfilled() { + this._bitField = this._bitField | 268435456; +}; + +Promise.prototype._setRejected = function Promise$_setRejected() { + this._bitField = this._bitField | 134217728; +}; + +Promise.prototype._setFollowing = function Promise$_setFollowing() { + this._bitField = this._bitField | 536870912; +}; + +Promise.prototype._setIsFinal = function Promise$_setIsFinal() { + this._bitField = this._bitField | 33554432; +}; + +Promise.prototype._isFinal = function Promise$_isFinal() { + return (this._bitField & 33554432) > 0; +}; + +Promise.prototype._cancellable = function Promise$_cancellable() { + return (this._bitField & 67108864) > 0; +}; + +Promise.prototype._setCancellable = function Promise$_setCancellable() { + this._bitField = this._bitField | 67108864; +}; + +Promise.prototype._unsetCancellable = function Promise$_unsetCancellable() { + this._bitField = this._bitField & (~67108864); +}; + +Promise.prototype._setRejectionIsUnhandled = +function Promise$_setRejectionIsUnhandled() { + this._bitField = this._bitField | 2097152; +}; + +Promise.prototype._unsetRejectionIsUnhandled = +function Promise$_unsetRejectionIsUnhandled() { + this._bitField = this._bitField & (~2097152); + if (this._isUnhandledRejectionNotified()) { + this._unsetUnhandledRejectionIsNotified(); + this._notifyUnhandledRejectionIsHandled(); + } +}; + +Promise.prototype._isRejectionUnhandled = +function Promise$_isRejectionUnhandled() { + return (this._bitField & 2097152) > 0; +}; + +Promise.prototype._setUnhandledRejectionIsNotified = +function Promise$_setUnhandledRejectionIsNotified() { + this._bitField = this._bitField | 524288; +}; + +Promise.prototype._unsetUnhandledRejectionIsNotified = +function Promise$_unsetUnhandledRejectionIsNotified() { + this._bitField = this._bitField & (~524288); +}; + +Promise.prototype._isUnhandledRejectionNotified = +function Promise$_isUnhandledRejectionNotified() { + return (this._bitField & 524288) > 0; +}; + +Promise.prototype._setCarriedStackTrace = +function Promise$_setCarriedStackTrace(capturedTrace) { + this._bitField = this._bitField | 1048576; + this._fulfillmentHandler0 = capturedTrace; +}; + +Promise.prototype._unsetCarriedStackTrace = +function Promise$_unsetCarriedStackTrace() { + this._bitField = this._bitField & (~1048576); + this._fulfillmentHandler0 = void 0; +}; + +Promise.prototype._isCarryingStackTrace = +function Promise$_isCarryingStackTrace() { + return (this._bitField & 1048576) > 0; +}; + +Promise.prototype._getCarriedStackTrace = +function Promise$_getCarriedStackTrace() { + return this._isCarryingStackTrace() + ? this._fulfillmentHandler0 + : void 0; +}; + +Promise.prototype._receiverAt = function Promise$_receiverAt(index) { + var ret; + if (index === 0) { + ret = this._receiver0; + } + else { + ret = this[index + 4 - 5]; + } + if (this._isBound() && ret === void 0) { + return this._boundTo; + } + return ret; +}; + +Promise.prototype._promiseAt = function Promise$_promiseAt(index) { + if (index === 0) return this._promise0; + return this[index + 3 - 5]; +}; + +Promise.prototype._fulfillmentHandlerAt = +function Promise$_fulfillmentHandlerAt(index) { + if (index === 0) return this._fulfillmentHandler0; + return this[index + 0 - 5]; +}; + +Promise.prototype._rejectionHandlerAt = +function Promise$_rejectionHandlerAt(index) { + if (index === 0) return this._rejectionHandler0; + return this[index + 1 - 5]; +}; + +Promise.prototype._unsetAt = function Promise$_unsetAt(index) { + if (index === 0) { + this._rejectionHandler0 = + this._progressHandler0 = + this._promise0 = + this._receiver0 = void 0; + if (!this._isCarryingStackTrace()) { + this._fulfillmentHandler0 = void 0; + } + } + else { + this[index - 5 + 0] = + this[index - 5 + 1] = + this[index - 5 + 2] = + this[index - 5 + 3] = + this[index - 5 + 4] = void 0; + } +}; + +Promise.prototype._resolveFromResolver = +function Promise$_resolveFromResolver(resolver) { + var promise = this; + this._setTrace(void 0); + this._pushContext(); + + function Promise$_resolver(val) { + if (promise._tryFollow(val)) { + return; + } + promise._fulfill(val); + } + function Promise$_rejecter(val) { + var trace = canAttach(val) ? val : new Error(val + ""); + promise._attachExtraTrace(trace); + markAsOriginatingFromRejection(val); + promise._reject(val, trace === val ? void 0 : trace); + } + var r = tryCatch2(resolver, void 0, Promise$_resolver, Promise$_rejecter); + this._popContext(); + + if (r !== void 0 && r === errorObj) { + var e = r.e; + var trace = canAttach(e) ? e : new Error(e + ""); + promise._reject(e, trace); + } +}; + +Promise.prototype._addCallbacks = function Promise$_addCallbacks( + fulfill, + reject, + progress, + promise, + receiver +) { + var index = this._length(); + + if (index >= 524287 - 5) { + index = 0; + this._setLength(0); + } + + if (index === 0) { + this._promise0 = promise; + if (receiver !== void 0) this._receiver0 = receiver; + if (typeof fulfill === "function" && !this._isCarryingStackTrace()) + this._fulfillmentHandler0 = fulfill; + if (typeof reject === "function") this._rejectionHandler0 = reject; + if (typeof progress === "function") this._progressHandler0 = progress; + } + else { + var i = index - 5; + this[i + 3] = promise; + this[i + 4] = receiver; + this[i + 0] = typeof fulfill === "function" + ? fulfill : void 0; + this[i + 1] = typeof reject === "function" + ? reject : void 0; + this[i + 2] = typeof progress === "function" + ? progress : void 0; + } + this._setLength(index + 5); + return index; +}; + + + +Promise.prototype._setBoundTo = function Promise$_setBoundTo(obj) { + if (obj !== void 0) { + this._bitField = this._bitField | 8388608; + this._boundTo = obj; + } + else { + this._bitField = this._bitField & (~8388608); + } +}; + +Promise.prototype._isBound = function Promise$_isBound() { + return (this._bitField & 8388608) === 8388608; +}; + +Promise.prototype._spreadSlowCase = +function Promise$_spreadSlowCase(targetFn, promise, values, boundTo) { + var promiseForAll = + Promise$_CreatePromiseArray + (values, PromiseArray, boundTo) + .promise() + ._then(function() { + return targetFn.apply(boundTo, arguments); + }, void 0, void 0, APPLY, void 0); + + promise._follow(promiseForAll); +}; + +Promise.prototype._callSpread = +function Promise$_callSpread(handler, promise, value, localDebugging) { + var boundTo = this._isBound() ? this._boundTo : void 0; + if (isArray(value)) { + for (var i = 0, len = value.length; i < len; ++i) { + if (isPromise(Promise._cast(value[i], void 0))) { + this._spreadSlowCase(handler, promise, value, boundTo); + return; + } + } + } + if (localDebugging) promise._pushContext(); + return tryCatchApply(handler, value, boundTo); +}; + +Promise.prototype._callHandler = +function Promise$_callHandler( + handler, receiver, promise, value, localDebugging) { + var x; + if (receiver === APPLY && !this.isRejected()) { + x = this._callSpread(handler, promise, value, localDebugging); + } + else { + if (localDebugging) promise._pushContext(); + x = tryCatch1(handler, receiver, value); + } + if (localDebugging) promise._popContext(); + return x; +}; + +Promise.prototype._settlePromiseFromHandler = +function Promise$_settlePromiseFromHandler( + handler, receiver, value, promise +) { + if (!isPromise(promise)) { + handler.call(receiver, value, promise); + return; + } + + var localDebugging = debugging; + var x = this._callHandler(handler, receiver, + promise, value, localDebugging); + + if (promise._isFollowing()) return; + + if (x === errorObj || x === promise || x === NEXT_FILTER) { + var err = x === promise + ? makeSelfResolutionError() + : x.e; + var trace = canAttach(err) ? err : new Error(err + ""); + if (x !== NEXT_FILTER) promise._attachExtraTrace(trace); + promise._rejectUnchecked(err, trace); + } + else { + var castValue = Promise._cast(x, promise); + if (isPromise(castValue)) { + if (castValue.isRejected() && + !castValue._isCarryingStackTrace() && + !canAttach(castValue._settledValue)) { + var trace = new Error(castValue._settledValue + ""); + promise._attachExtraTrace(trace); + castValue._setCarriedStackTrace(trace); + } + promise._follow(castValue); + if (castValue._cancellable()) { + promise._cancellationParent = castValue; + promise._setCancellable(); + } + } + else { + promise._fulfillUnchecked(x); + } + } +}; + +Promise.prototype._follow = +function Promise$_follow(promise) { + this._setFollowing(); + + if (promise.isPending()) { + if (promise._cancellable() ) { + this._cancellationParent = promise; + this._setCancellable(); + } + promise._proxyPromise(this); + } + else if (promise.isFulfilled()) { + this._fulfillUnchecked(promise._settledValue); + } + else { + this._rejectUnchecked(promise._settledValue, + promise._getCarriedStackTrace()); + } + + if (promise._isRejectionUnhandled()) promise._unsetRejectionIsUnhandled(); + + if (debugging && + promise._traceParent == null) { + promise._traceParent = this; + } +}; + +Promise.prototype._tryFollow = +function Promise$_tryFollow(value) { + if (this._isFollowingOrFulfilledOrRejected() || + value === this) { + return false; + } + var maybePromise = Promise._cast(value, void 0); + if (!isPromise(maybePromise)) { + return false; + } + this._follow(maybePromise); + return true; +}; + +Promise.prototype._resetTrace = function Promise$_resetTrace() { + if (debugging) { + this._trace = new CapturedTrace(this._peekContext() === void 0); + } +}; + +Promise.prototype._setTrace = function Promise$_setTrace(parent) { + if (debugging) { + var context = this._peekContext(); + this._traceParent = context; + var isTopLevel = context === void 0; + if (parent !== void 0 && + parent._traceParent === context) { + this._trace = parent._trace; + } + else { + this._trace = new CapturedTrace(isTopLevel); + } + } + return this; +}; + +Promise.prototype._attachExtraTrace = +function Promise$_attachExtraTrace(error) { + if (debugging) { + var promise = this; + var stack = error.stack; + stack = typeof stack === "string" + ? stack.split("\n") : []; + var headerLineCount = 1; + + while(promise != null && + promise._trace != null) { + stack = CapturedTrace.combine( + stack, + promise._trace.stack.split("\n") + ); + promise = promise._traceParent; + } + + var max = Error.stackTraceLimit + headerLineCount; + var len = stack.length; + if (len > max) { + stack.length = max; + } + if (stack.length <= headerLineCount) { + error.stack = "(No stack trace)"; + } + else { + error.stack = stack.join("\n"); + } + } +}; + +Promise.prototype._cleanValues = function Promise$_cleanValues() { + if (this._cancellable()) { + this._cancellationParent = void 0; + } +}; + +Promise.prototype._fulfill = function Promise$_fulfill(value) { + if (this._isFollowingOrFulfilledOrRejected()) return; + this._fulfillUnchecked(value); +}; + +Promise.prototype._reject = +function Promise$_reject(reason, carriedStackTrace) { + if (this._isFollowingOrFulfilledOrRejected()) return; + this._rejectUnchecked(reason, carriedStackTrace); +}; + +Promise.prototype._settlePromiseAt = function Promise$_settlePromiseAt(index) { + var handler = this.isFulfilled() + ? this._fulfillmentHandlerAt(index) + : this._rejectionHandlerAt(index); + + var value = this._settledValue; + var receiver = this._receiverAt(index); + var promise = this._promiseAt(index); + + if (typeof handler === "function") { + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + else { + var done = false; + var isFulfilled = this.isFulfilled(); + if (receiver !== void 0) { + if (receiver instanceof Promise && + receiver._isProxied()) { + receiver._unsetProxied(); + + if (isFulfilled) receiver._fulfillUnchecked(value); + else receiver._rejectUnchecked(value, + this._getCarriedStackTrace()); + done = true; + } + else if (isPromiseArrayProxy(receiver, promise)) { + if (isFulfilled) receiver._promiseFulfilled(value, promise); + else receiver._promiseRejected(value, promise); + done = true; + } + } + + if (!done) { + if (isFulfilled) promise._fulfill(value); + else promise._reject(value, this._getCarriedStackTrace()); + } + } + + if (index >= 256) { + this._queueGC(); + } +}; + +Promise.prototype._isProxied = function Promise$_isProxied() { + return (this._bitField & 4194304) === 4194304; +}; + +Promise.prototype._setProxied = function Promise$_setProxied() { + this._bitField = this._bitField | 4194304; +}; + +Promise.prototype._unsetProxied = function Promise$_unsetProxied() { + this._bitField = this._bitField & (~4194304); +}; + +Promise.prototype._isGcQueued = function Promise$_isGcQueued() { + return (this._bitField & -1073741824) === -1073741824; +}; + +Promise.prototype._setGcQueued = function Promise$_setGcQueued() { + this._bitField = this._bitField | -1073741824; +}; + +Promise.prototype._unsetGcQueued = function Promise$_unsetGcQueued() { + this._bitField = this._bitField & (~-1073741824); +}; + +Promise.prototype._queueGC = function Promise$_queueGC() { + if (this._isGcQueued()) return; + this._setGcQueued(); + async.invokeLater(this._gc, this, void 0); +}; + +Promise.prototype._gc = function Promise$gc() { + var len = this._length(); + this._unsetAt(0); + for (var i = 0; i < len; i++) { + delete this[i]; + } + this._setLength(0); + this._unsetGcQueued(); +}; + +Promise.prototype._queueSettleAt = function Promise$_queueSettleAt(index) { + if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled(); + async.invoke(this._settlePromiseAt, this, index); +}; + +Promise.prototype._fulfillUnchecked = +function Promise$_fulfillUnchecked(value) { + if (!this.isPending()) return; + if (value === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._rejectUnchecked(err, void 0); + } + this._cleanValues(); + this._setFulfilled(); + this._settledValue = value; + var len = this._length(); + + if (len > 0) { + async.invoke(this._settlePromises, this, len); + } +}; + +Promise.prototype._rejectUncheckedCheckError = +function Promise$_rejectUncheckedCheckError(reason) { + var trace = canAttach(reason) ? reason : new Error(reason + ""); + this._rejectUnchecked(reason, trace === reason ? void 0 : trace); +}; + +Promise.prototype._rejectUnchecked = +function Promise$_rejectUnchecked(reason, trace) { + if (!this.isPending()) return; + if (reason === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._rejectUnchecked(err); + } + this._cleanValues(); + this._setRejected(); + this._settledValue = reason; + + if (this._isFinal()) { + async.invokeLater(thrower, void 0, trace === void 0 ? reason : trace); + return; + } + var len = this._length(); + + if (trace !== void 0) this._setCarriedStackTrace(trace); + + if (len > 0) { + async.invoke(this._rejectPromises, this, null); + } + else { + this._ensurePossibleRejectionHandled(); + } +}; + +Promise.prototype._rejectPromises = function Promise$_rejectPromises() { + this._settlePromises(); + this._unsetCarriedStackTrace(); +}; + +Promise.prototype._settlePromises = function Promise$_settlePromises() { + var len = this._length(); + for (var i = 0; i < len; i+= 5) { + this._settlePromiseAt(i); + } +}; + +Promise.prototype._ensurePossibleRejectionHandled = +function Promise$_ensurePossibleRejectionHandled() { + this._setRejectionIsUnhandled(); + if (CapturedTrace.possiblyUnhandledRejection !== void 0) { + async.invokeLater(this._notifyUnhandledRejection, this, void 0); + } +}; + +Promise.prototype._notifyUnhandledRejectionIsHandled = +function Promise$_notifyUnhandledRejectionIsHandled() { + if (typeof unhandledRejectionHandled === "function") { + async.invokeLater(unhandledRejectionHandled, void 0, this); + } +}; + +Promise.prototype._notifyUnhandledRejection = +function Promise$_notifyUnhandledRejection() { + if (this._isRejectionUnhandled()) { + var reason = this._settledValue; + var trace = this._getCarriedStackTrace(); + + this._setUnhandledRejectionIsNotified(); + + if (trace !== void 0) { + this._unsetCarriedStackTrace(); + reason = trace; + } + if (typeof CapturedTrace.possiblyUnhandledRejection === "function") { + CapturedTrace.possiblyUnhandledRejection(reason, this); + } + } +}; + +var contextStack = []; +Promise.prototype._peekContext = function Promise$_peekContext() { + var lastIndex = contextStack.length - 1; + if (lastIndex >= 0) { + return contextStack[lastIndex]; + } + return void 0; + +}; + +Promise.prototype._pushContext = function Promise$_pushContext() { + if (!debugging) return; + contextStack.push(this); +}; + +Promise.prototype._popContext = function Promise$_popContext() { + if (!debugging) return; + contextStack.pop(); +}; + +function Promise$_CreatePromiseArray( + promises, PromiseArrayConstructor, boundTo) { + + var list = null; + if (isArray(promises)) { + list = promises; + } + else { + list = Promise._cast(promises, void 0); + if (list !== promises) { + list._setBoundTo(boundTo); + } + else if (!isPromise(list)) { + list = null; + } + } + if (list !== null) { + return new PromiseArrayConstructor(list, boundTo); + } + return { + promise: function() {return apiRejection("expecting an array, a promise or a thenable");} + }; +} + +var old = global.Promise; +Promise.noConflict = function() { + if (global.Promise === Promise) { + global.Promise = old; + } + return Promise; +}; + +if (!CapturedTrace.isSupported()) { + Promise.longStackTraces = function(){}; + debugging = false; +} + +Promise._makeSelfResolutionError = makeSelfResolutionError; +require("./finally.js")(Promise, NEXT_FILTER); +require("./direct_resolve.js")(Promise); +require("./thenables.js")(Promise, INTERNAL); +require("./synchronous_inspection.js")(Promise); +Promise.RangeError = RangeError; +Promise.CancellationError = CancellationError; +Promise.TimeoutError = TimeoutError; +Promise.TypeError = TypeError; +Promise.RejectionError = RejectionError; + +util.toFastProperties(Promise); +util.toFastProperties(Promise.prototype); +require('./timers.js')(Promise,INTERNAL); +require('./any.js')(Promise,Promise$_CreatePromiseArray,PromiseArray); +require('./race.js')(Promise,INTERNAL); +require('./call_get.js')(Promise); +require('./filter.js')(Promise,Promise$_CreatePromiseArray,PromiseArray,apiRejection); +require('./generators.js')(Promise,apiRejection,INTERNAL); +require('./map.js')(Promise,PromiseArray,INTERNAL,apiRejection); +require('./nodeify.js')(Promise); +require('./promisify.js')(Promise,INTERNAL); +require('./props.js')(Promise,PromiseArray); +require('./reduce.js')(Promise,Promise$_CreatePromiseArray,PromiseArray,apiRejection,INTERNAL); +require('./settle.js')(Promise,Promise$_CreatePromiseArray,PromiseArray); +require('./some.js')(Promise,Promise$_CreatePromiseArray,PromiseArray,apiRejection); +require('./progress.js')(Promise,isPromiseArrayProxy); +require('./cancel.js')(Promise,INTERNAL); + +Promise.prototype = Promise.prototype; +return Promise; + +}; + +},{"./any.js":1,"./async.js":2,"./call_get.js":4,"./cancel.js":5,"./captured_trace.js":6,"./catch_filter.js":7,"./direct_resolve.js":8,"./errors.js":9,"./errors_api_rejection":10,"./filter.js":12,"./finally.js":13,"./generators.js":14,"./global.js":15,"./map.js":16,"./nodeify.js":17,"./progress.js":18,"./promise_array.js":20,"./promise_resolver.js":21,"./promisify.js":23,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":32,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./util.js":37,"__browserify_process":50}],20:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var canAttach = require("./errors.js").canAttach; +var util = require("./util.js"); +var async = require("./async.js"); +var hasOwn = {}.hasOwnProperty; +var isArray = util.isArray; + +function toResolutionValue(val) { + switch(val) { + case -1: return void 0; + case -2: return []; + case -3: return {}; + } +} + +function PromiseArray(values, boundTo) { + var promise = this._promise = new Promise(INTERNAL); + var parent = void 0; + if (values instanceof Promise) { + parent = values; + if (values._cancellable()) { + promise._setCancellable(); + promise._cancellationParent = values; + } + if (values._isBound()) { + promise._setBoundTo(boundTo); + } + } + promise._setTrace(parent); + this._values = values; + this._length = 0; + this._totalResolved = 0; + this._init(void 0, -2); +} +PromiseArray.PropertiesPromiseArray = function() {}; + +PromiseArray.prototype.length = function PromiseArray$length() { + return this._length; +}; + +PromiseArray.prototype.promise = function PromiseArray$promise() { + return this._promise; +}; + +PromiseArray.prototype._init = +function PromiseArray$_init(_, resolveValueIfEmpty) { + var values = this._values; + if (values instanceof Promise) { + if (values.isFulfilled()) { + values = values._settledValue; + if (!isArray(values)) { + var err = new Promise.TypeError("expecting an array, a promise or a thenable"); + this.__hardReject__(err); + return; + } + this._values = values; + } + else if (values.isPending()) { + values._then( + this._init, + this._reject, + void 0, + this, + resolveValueIfEmpty + ); + return; + } + else { + values._unsetRejectionIsUnhandled(); + this._reject(values._settledValue); + return; + } + } + + if (values.length === 0) { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + return; + } + var len = values.length; + var newLen = len; + var newValues; + if (this instanceof PromiseArray.PropertiesPromiseArray) { + newValues = this._values; + } + else { + newValues = new Array(len); + } + var isDirectScanNeeded = false; + for (var i = 0; i < len; ++i) { + var promise = values[i]; + if (promise === void 0 && !hasOwn.call(values, i)) { + newLen--; + continue; + } + var maybePromise = Promise._cast(promise, void 0); + if (maybePromise instanceof Promise) { + if (maybePromise.isPending()) { + maybePromise._proxyPromiseArray(this, i); + } + else { + maybePromise._unsetRejectionIsUnhandled(); + isDirectScanNeeded = true; + } + } + else { + isDirectScanNeeded = true; + } + newValues[i] = maybePromise; + } + if (newLen === 0) { + if (resolveValueIfEmpty === -2) { + this._resolve(newValues); + } + else { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + } + return; + } + this._values = newValues; + this._length = newLen; + if (isDirectScanNeeded) { + var scanMethod = newLen === len + ? this._scanDirectValues + : this._scanDirectValuesHoled; + async.invoke(scanMethod, this, len); + } +}; + +PromiseArray.prototype._settlePromiseAt = +function PromiseArray$_settlePromiseAt(index) { + var value = this._values[index]; + if (!(value instanceof Promise)) { + this._promiseFulfilled(value, index); + } + else if (value.isFulfilled()) { + this._promiseFulfilled(value._settledValue, index); + } + else if (value.isRejected()) { + this._promiseRejected(value._settledValue, index); + } +}; + +PromiseArray.prototype._scanDirectValuesHoled = +function PromiseArray$_scanDirectValuesHoled(len) { + for (var i = 0; i < len; ++i) { + if (this._isResolved()) { + break; + } + if (hasOwn.call(this._values, i)) { + this._settlePromiseAt(i); + } + } +}; + +PromiseArray.prototype._scanDirectValues = +function PromiseArray$_scanDirectValues(len) { + for (var i = 0; i < len; ++i) { + if (this._isResolved()) { + break; + } + this._settlePromiseAt(i); + } +}; + +PromiseArray.prototype._isResolved = function PromiseArray$_isResolved() { + return this._values === null; +}; + +PromiseArray.prototype._resolve = function PromiseArray$_resolve(value) { + this._values = null; + this._promise._fulfill(value); +}; + +PromiseArray.prototype.__hardReject__ = +PromiseArray.prototype._reject = function PromiseArray$_reject(reason) { + this._values = null; + var trace = canAttach(reason) ? reason : new Error(reason + ""); + this._promise._attachExtraTrace(trace); + this._promise._reject(reason, trace); +}; + +PromiseArray.prototype._promiseProgressed = +function PromiseArray$_promiseProgressed(progressValue, index) { + if (this._isResolved()) return; + this._promise._progress({ + index: index, + value: progressValue + }); +}; + + +PromiseArray.prototype._promiseFulfilled = +function PromiseArray$_promiseFulfilled(value, index) { + if (this._isResolved()) return; + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + } +}; + +PromiseArray.prototype._promiseRejected = +function PromiseArray$_promiseRejected(reason, index) { + if (this._isResolved()) return; + this._totalResolved++; + this._reject(reason); +}; + +return PromiseArray; +}; + +},{"./async.js":2,"./errors.js":9,"./util.js":37}],21:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +var util = require("./util.js"); +var maybeWrapAsError = util.maybeWrapAsError; +var errors = require("./errors.js"); +var TimeoutError = errors.TimeoutError; +var RejectionError = errors.RejectionError; +var async = require("./async.js"); +var haveGetters = util.haveGetters; +var es5 = require("./es5.js"); + +function isUntypedError(obj) { + return obj instanceof Error && + es5.getPrototypeOf(obj) === Error.prototype; +} + +function wrapAsRejectionError(obj) { + var ret; + if (isUntypedError(obj)) { + ret = new RejectionError(obj); + } + else { + ret = obj; + } + errors.markAsOriginatingFromRejection(ret); + return ret; +} + +function nodebackForPromise(promise) { + function PromiseResolver$_callback(err, value) { + if (promise === null) return; + + if (err) { + var wrapped = wrapAsRejectionError(maybeWrapAsError(err)); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } + else { + if (arguments.length > 2) { + var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];} + promise._fulfill(args); + } + else { + promise._fulfill(value); + } + } + + promise = null; + } + return PromiseResolver$_callback; +} + + +var PromiseResolver; +if (!haveGetters) { + PromiseResolver = function PromiseResolver(promise) { + this.promise = promise; + this.asCallback = nodebackForPromise(promise); + this.callback = this.asCallback; + }; +} +else { + PromiseResolver = function PromiseResolver(promise) { + this.promise = promise; + }; +} +if (haveGetters) { + var prop = { + get: function() { + return nodebackForPromise(this.promise); + } + }; + es5.defineProperty(PromiseResolver.prototype, "asCallback", prop); + es5.defineProperty(PromiseResolver.prototype, "callback", prop); +} + +PromiseResolver._nodebackForPromise = nodebackForPromise; + +PromiseResolver.prototype.toString = function PromiseResolver$toString() { + return "[object PromiseResolver]"; +}; + +PromiseResolver.prototype.resolve = +PromiseResolver.prototype.fulfill = function PromiseResolver$resolve(value) { + var promise = this.promise; + if ((promise === void 0) || (promise._tryFollow === void 0)) { + throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead."); + } + if (promise._tryFollow(value)) { + return; + } + async.invoke(promise._fulfill, promise, value); +}; + +PromiseResolver.prototype.reject = function PromiseResolver$reject(reason) { + var promise = this.promise; + if ((promise === void 0) || (promise._attachExtraTrace === void 0)) { + throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead."); + } + errors.markAsOriginatingFromRejection(reason); + var trace = errors.canAttach(reason) ? reason : new Error(reason + ""); + promise._attachExtraTrace(trace); + async.invoke(promise._reject, promise, reason); + if (trace !== reason) { + async.invoke(this._setCarriedStackTrace, this, trace); + } +}; + +PromiseResolver.prototype.progress = +function PromiseResolver$progress(value) { + async.invoke(this.promise._progress, this.promise, value); +}; + +PromiseResolver.prototype.cancel = function PromiseResolver$cancel() { + async.invoke(this.promise.cancel, this.promise, void 0); +}; + +PromiseResolver.prototype.timeout = function PromiseResolver$timeout() { + this.reject(new TimeoutError("timeout")); +}; + +PromiseResolver.prototype.isResolved = function PromiseResolver$isResolved() { + return this.promise.isResolved(); +}; + +PromiseResolver.prototype.toJSON = function PromiseResolver$toJSON() { + return this.promise.toJSON(); +}; + +PromiseResolver.prototype._setCarriedStackTrace = +function PromiseResolver$_setCarriedStackTrace(trace) { + if (this.promise.isRejected()) { + this.promise._setCarriedStackTrace(trace); + } +}; + +module.exports = PromiseResolver; + +},{"./async.js":2,"./errors.js":9,"./es5.js":11,"./util.js":37}],22:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var errors = require("./errors.js"); +var TypeError = errors.TypeError; +var util = require("./util.js"); +var isArray = util.isArray; +var errorObj = util.errorObj; +var tryCatch1 = util.tryCatch1; +var yieldHandlers = []; + +function promiseFromYieldHandler(value) { + var _yieldHandlers = yieldHandlers; + var _errorObj = errorObj; + var _Promise = Promise; + var len = _yieldHandlers.length; + for (var i = 0; i < len; ++i) { + var result = tryCatch1(_yieldHandlers[i], void 0, value); + if (result === _errorObj) { + return _Promise.reject(_errorObj.e); + } + var maybePromise = _Promise._cast(result, + promiseFromYieldHandler, void 0); + if (maybePromise instanceof _Promise) return maybePromise; + } + return null; +} + +function PromiseSpawn(generatorFunction, receiver) { + var promise = this._promise = new Promise(INTERNAL); + promise._setTrace(void 0); + this._generatorFunction = generatorFunction; + this._receiver = receiver; + this._generator = void 0; +} + +PromiseSpawn.prototype.promise = function PromiseSpawn$promise() { + return this._promise; +}; + +PromiseSpawn.prototype._run = function PromiseSpawn$_run() { + this._generator = this._generatorFunction.call(this._receiver); + this._receiver = + this._generatorFunction = void 0; + this._next(void 0); +}; + +PromiseSpawn.prototype._continue = function PromiseSpawn$_continue(result) { + if (result === errorObj) { + this._generator = void 0; + var trace = errors.canAttach(result.e) + ? result.e : new Error(result.e + ""); + this._promise._attachExtraTrace(trace); + this._promise._reject(result.e, trace); + return; + } + + var value = result.value; + if (result.done === true) { + this._generator = void 0; + if (!this._promise._tryFollow(value)) { + this._promise._fulfill(value); + } + } + else { + var maybePromise = Promise._cast(value, PromiseSpawn$_continue, void 0); + if (!(maybePromise instanceof Promise)) { + if (isArray(maybePromise)) { + maybePromise = Promise.all(maybePromise); + } + else { + maybePromise = promiseFromYieldHandler(maybePromise); + } + if (maybePromise === null) { + this._throw(new TypeError("A value was yielded that could not be treated as a promise")); + return; + } + } + maybePromise._then( + this._next, + this._throw, + void 0, + this, + null + ); + } +}; + +PromiseSpawn.prototype._throw = function PromiseSpawn$_throw(reason) { + if (errors.canAttach(reason)) + this._promise._attachExtraTrace(reason); + this._continue( + tryCatch1(this._generator["throw"], this._generator, reason) + ); +}; + +PromiseSpawn.prototype._next = function PromiseSpawn$_next(value) { + this._continue( + tryCatch1(this._generator.next, this._generator, value) + ); +}; + +PromiseSpawn.addYieldHandler = function PromiseSpawn$AddYieldHandler(fn) { + if (typeof fn !== "function") throw new TypeError("fn must be a function"); + yieldHandlers.push(fn); +}; + +return PromiseSpawn; +}; + +},{"./errors.js":9,"./util.js":37}],23:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var THIS = {}; +var util = require("./util.js"); +var es5 = require("./es5.js"); +var nodebackForPromise = require("./promise_resolver.js") + ._nodebackForPromise; +var withAppended = util.withAppended; +var maybeWrapAsError = util.maybeWrapAsError; +var canEvaluate = util.canEvaluate; +var deprecated = util.deprecated; +var TypeError = require("./errors").TypeError; + + +var rasyncSuffix = new RegExp("Async" + "$"); +function isPromisified(fn) { + return fn.__isPromisified__ === true; +} +function hasPromisified(obj, key) { + var containsKey = ((key + "Async") in obj); + return containsKey ? isPromisified(obj[key + "Async"]) + : false; +} +function checkValid(ret) { + for (var i = 0; i < ret.length; i += 2) { + var key = ret[i]; + if (rasyncSuffix.test(key)) { + var keyWithoutAsyncSuffix = key.replace(rasyncSuffix, ""); + for (var j = 0; j < ret.length; j += 2) { + if (ret[j] === keyWithoutAsyncSuffix) { + throw new TypeError("Cannot promisify an API " + + "that has normal methods with Async-suffix"); + } + } + } + } +} +var inheritedMethods = (function() { + if (es5.isES5) { + var create = Object.create; + var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + return function(cur) { + var ret = []; + var visitedKeys = create(null); + var original = cur; + while (cur !== null) { + var keys = es5.keys(cur); + for (var i = 0, len = keys.length; i < len; ++i) { + var key = keys[i]; + if (visitedKeys[key]) continue; + visitedKeys[key] = true; + var desc = getOwnPropertyDescriptor(cur, key); + + if (desc != null && + typeof desc.value === "function" && + !isPromisified(desc.value) && + !hasPromisified(original, key)) { + ret.push(key, desc.value); + } + } + cur = es5.getPrototypeOf(cur); + } + checkValid(ret); + return ret; + }; + } + else { + return function(obj) { + var ret = []; + /*jshint forin:false */ + for (var key in obj) { + var fn = obj[key]; + if (typeof fn === "function" && + !isPromisified(fn) && + !hasPromisified(obj, key)) { + ret.push(key, fn); + } + } + checkValid(ret); + return ret; + }; + } +})(); + +function switchCaseArgumentOrder(likelyArgumentCount) { + var ret = [likelyArgumentCount]; + var min = Math.max(0, likelyArgumentCount - 1 - 5); + for(var i = likelyArgumentCount - 1; i >= min; --i) { + if (i === likelyArgumentCount) continue; + ret.push(i); + } + for(var i = likelyArgumentCount + 1; i <= 5; ++i) { + ret.push(i); + } + return ret; +} + +function parameterDeclaration(parameterCount) { + var ret = new Array(parameterCount); + for(var i = 0; i < ret.length; ++i) { + ret[i] = "_arg" + i; + } + return ret.join(", "); +} + +function parameterCount(fn) { + if (typeof fn.length === "number") { + return Math.max(Math.min(fn.length, 1023 + 1), 0); + } + return 0; +} + +var rident = /^[a-z$_][a-z$_0-9]*$/i; +function propertyAccess(id) { + if (rident.test(id)) { + return "." + id; + } + else return "['" + id.replace(/(['\\])/g, "\\$1") + "']"; +} + +function makeNodePromisifiedEval(callback, receiver, originalName, fn) { + var newParameterCount = Math.max(0, parameterCount(fn) - 1); + var argumentOrder = switchCaseArgumentOrder(newParameterCount); + + var callbackName = (typeof originalName === "string" ? + originalName + "Async" : + "promisified"); + + function generateCallForArgumentCount(count) { + var args = new Array(count); + for (var i = 0, len = args.length; i < len; ++i) { + args[i] = "arguments[" + i + "]"; + } + var comma = count > 0 ? "," : ""; + + if (typeof callback === "string" && + receiver === THIS) { + return "this" + propertyAccess(callback) + "("+args.join(",") + + comma +" fn);"+ + "break;"; + } + return (receiver === void 0 + ? "callback("+args.join(",")+ comma +" fn);" + : "callback.call("+(receiver === THIS + ? "this" + : "receiver")+", "+args.join(",") + comma + " fn);") + + "break;"; + } + + if (!rident.test(callbackName)) { + callbackName = "promisified"; + } + + function generateArgumentSwitchCase() { + var ret = ""; + for(var i = 0; i < argumentOrder.length; ++i) { + ret += "case " + argumentOrder[i] +":" + + generateCallForArgumentCount(argumentOrder[i]); + } + ret += "default: var args = new Array(len + 1);" + + "var i = 0;" + + "for (var i = 0; i < len; ++i) { " + + " args[i] = arguments[i];" + + "}" + + "args[i] = fn;" + + + (typeof callback === "string" + ? "this" + propertyAccess(callback) + ".apply(" + : "callback.apply(") + + + (receiver === THIS ? "this" : "receiver") + + ", args); break;"; + return ret; + } + + return new Function("Promise", "callback", "receiver", + "withAppended", "maybeWrapAsError", "nodebackForPromise", + "INTERNAL", + "var ret = function " + callbackName + + "(" + parameterDeclaration(newParameterCount) + ") {\"use strict\";" + + "var len = arguments.length;" + + "var promise = new Promise(INTERNAL);"+ + "promise._setTrace(void 0);" + + "var fn = nodebackForPromise(promise);"+ + "try {" + + "switch(len) {" + + generateArgumentSwitchCase() + + "}" + + "}" + + "catch(e){ " + + "var wrapped = maybeWrapAsError(e);" + + "promise._attachExtraTrace(wrapped);" + + "promise._reject(wrapped);" + + "}" + + "return promise;" + + "" + + "}; ret.__isPromisified__ = true; return ret;" + )(Promise, callback, receiver, withAppended, + maybeWrapAsError, nodebackForPromise, INTERNAL); +} + +function makeNodePromisifiedClosure(callback, receiver) { + function promisified() { + var _receiver = receiver; + if (receiver === THIS) _receiver = this; + if (typeof callback === "string") { + callback = _receiver[callback]; + } + var promise = new Promise(INTERNAL); + promise._setTrace(void 0); + var fn = nodebackForPromise(promise); + try { + callback.apply(_receiver, withAppended(arguments, fn)); + } + catch(e) { + var wrapped = maybeWrapAsError(e); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } + return promise; + } + promisified.__isPromisified__ = true; + return promisified; +} + +var makeNodePromisified = canEvaluate + ? makeNodePromisifiedEval + : makeNodePromisifiedClosure; + +function _promisify(callback, receiver, isAll) { + if (isAll) { + var methods = inheritedMethods(callback); + for (var i = 0, len = methods.length; i < len; i+= 2) { + var key = methods[i]; + var fn = methods[i+1]; + var promisifiedKey = key + "Async"; + callback[promisifiedKey] = makeNodePromisified(key, THIS, key, fn); + } + util.toFastProperties(callback); + return callback; + } + else { + return makeNodePromisified(callback, receiver, void 0, callback); + } +} + +Promise.promisify = function Promise$Promisify(fn, receiver) { + if (typeof fn === "object" && fn !== null) { + deprecated("Promise.promisify for promisifying entire objects is deprecated. Use Promise.promisifyAll instead."); + return _promisify(fn, receiver, true); + } + if (typeof fn !== "function") { + throw new TypeError("fn must be a function"); + } + if (isPromisified(fn)) { + return fn; + } + return _promisify( + fn, + arguments.length < 2 ? THIS : receiver, + false); +}; + +Promise.promisifyAll = function Promise$PromisifyAll(target) { + if (typeof target !== "function" && typeof target !== "object") { + throw new TypeError("the target of promisifyAll must be an object or a function"); + } + return _promisify(target, void 0, true); +}; +}; + + +},{"./errors":9,"./es5.js":11,"./promise_resolver.js":21,"./util.js":37}],24:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, PromiseArray) { +var util = require("./util.js"); +var inherits = util.inherits; +var es5 = require("./es5.js"); + +function PropertiesPromiseArray(obj, boundTo) { + var keys = es5.keys(obj); + var values = new Array(keys.length); + for (var i = 0, len = values.length; i < len; ++i) { + values[i] = obj[keys[i]]; + } + this.constructor$(values, boundTo); + if (!this._isResolved()) { + for (var i = 0, len = keys.length; i < len; ++i) { + values.push(keys[i]); + } + } +} +inherits(PropertiesPromiseArray, PromiseArray); + +PropertiesPromiseArray.prototype._init = +function PropertiesPromiseArray$_init() { + this._init$(void 0, -3) ; +}; + +PropertiesPromiseArray.prototype._promiseFulfilled = +function PropertiesPromiseArray$_promiseFulfilled(value, index) { + if (this._isResolved()) return; + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + var val = {}; + var keyOffset = this.length(); + for (var i = 0, len = this.length(); i < len; ++i) { + val[this._values[i + keyOffset]] = this._values[i]; + } + this._resolve(val); + } +}; + +PropertiesPromiseArray.prototype._promiseProgressed = +function PropertiesPromiseArray$_promiseProgressed(value, index) { + if (this._isResolved()) return; + + this._promise._progress({ + key: this._values[index + this.length()], + value: value + }); +}; + +PromiseArray.PropertiesPromiseArray = PropertiesPromiseArray; + +return PropertiesPromiseArray; +}; + +},{"./es5.js":11,"./util.js":37}],25:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, PromiseArray) { +var PropertiesPromiseArray = require("./properties_promise_array.js")( + Promise, PromiseArray); +var util = require("./util.js"); +var apiRejection = require("./errors_api_rejection")(Promise); +var isObject = util.isObject; + +function Promise$_Props(promises, useBound) { + var ret; + var castValue = Promise._cast(promises, void 0); + + if (!isObject(castValue)) { + return apiRejection("cannot await properties of a non-object"); + } + else if (castValue instanceof Promise) { + ret = castValue._then(Promise.props, void 0, void 0, + void 0, void 0); + } + else { + ret = new PropertiesPromiseArray( + castValue, + useBound === true && castValue._isBound() + ? castValue._boundTo + : void 0 + ).promise(); + useBound = false; + } + if (useBound === true && castValue._isBound()) { + ret._setBoundTo(castValue._boundTo); + } + return ret; +} + +Promise.prototype.props = function Promise$props() { + return Promise$_Props(this, true); +}; + +Promise.props = function Promise$Props(promises) { + return Promise$_Props(promises, false); +}; +}; + +},{"./errors_api_rejection":10,"./properties_promise_array.js":24,"./util.js":37}],26:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +function arrayCopy(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + } +} + +function pow2AtLeast(n) { + n = n >>> 0; + n = n - 1; + n = n | (n >> 1); + n = n | (n >> 2); + n = n | (n >> 4); + n = n | (n >> 8); + n = n | (n >> 16); + return n + 1; +} + +function getCapacity(capacity) { + if (typeof capacity !== "number") return 16; + return pow2AtLeast( + Math.min( + Math.max(16, capacity), 1073741824) + ); +} + +function Queue(capacity) { + this._capacity = getCapacity(capacity); + this._length = 0; + this._front = 0; + this._makeCapacity(); +} + +Queue.prototype._willBeOverCapacity = +function Queue$_willBeOverCapacity(size) { + return this._capacity < size; +}; + +Queue.prototype._pushOne = function Queue$_pushOne(arg) { + var length = this.length(); + this._checkCapacity(length + 1); + var i = (this._front + length) & (this._capacity - 1); + this[i] = arg; + this._length = length + 1; +}; + +Queue.prototype.push = function Queue$push(fn, receiver, arg) { + var length = this.length() + 3; + if (this._willBeOverCapacity(length)) { + this._pushOne(fn); + this._pushOne(receiver); + this._pushOne(arg); + return; + } + var j = this._front + length - 3; + this._checkCapacity(length); + var wrapMask = this._capacity - 1; + this[(j + 0) & wrapMask] = fn; + this[(j + 1) & wrapMask] = receiver; + this[(j + 2) & wrapMask] = arg; + this._length = length; +}; + +Queue.prototype.shift = function Queue$shift() { + var front = this._front, + ret = this[front]; + + this[front] = void 0; + this._front = (front + 1) & (this._capacity - 1); + this._length--; + return ret; +}; + +Queue.prototype.length = function Queue$length() { + return this._length; +}; + +Queue.prototype._makeCapacity = function Queue$_makeCapacity() { + var len = this._capacity; + for (var i = 0; i < len; ++i) { + this[i] = void 0; + } +}; + +Queue.prototype._checkCapacity = function Queue$_checkCapacity(size) { + if (this._capacity < size) { + this._resizeTo(this._capacity << 3); + } +}; + +Queue.prototype._resizeTo = function Queue$_resizeTo(capacity) { + var oldFront = this._front; + var oldCapacity = this._capacity; + var oldQueue = new Array(oldCapacity); + var length = this.length(); + + arrayCopy(this, 0, oldQueue, 0, oldCapacity); + this._capacity = capacity; + this._makeCapacity(); + this._front = 0; + if (oldFront + length <= oldCapacity) { + arrayCopy(oldQueue, oldFront, this, 0, length); + } + else { var lengthBeforeWrapping = + length - ((oldFront + length) & (oldCapacity - 1)); + + arrayCopy(oldQueue, oldFront, this, 0, lengthBeforeWrapping); + arrayCopy(oldQueue, 0, this, lengthBeforeWrapping, + length - lengthBeforeWrapping); + } +}; + +module.exports = Queue; + +},{}],27:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var apiRejection = require("./errors_api_rejection.js")(Promise); +var isArray = require("./util.js").isArray; + +var raceLater = function Promise$_raceLater(promise) { + return promise.then(function(array) { + return Promise$_Race(array, promise); + }); +}; + +var hasOwn = {}.hasOwnProperty; +function Promise$_Race(promises, parent) { + var maybePromise = Promise._cast(promises, void 0); + + if (maybePromise instanceof Promise) { + return raceLater(maybePromise); + } + else if (!isArray(promises)) { + return apiRejection("expecting an array, a promise or a thenable"); + } + + var ret = new Promise(INTERNAL); + ret._setTrace(parent); + if (parent !== void 0) { + if (parent._isBound()) { + ret._setBoundTo(parent._boundTo); + } + if (parent._cancellable()) { + ret._setCancellable(); + ret._cancellationParent = parent; + } + } + var fulfill = ret._fulfill; + var reject = ret._reject; + for (var i = 0, len = promises.length; i < len; ++i) { + var val = promises[i]; + + if (val === void 0 && !(hasOwn.call(promises, i))) { + continue; + } + + Promise.cast(val)._then( + fulfill, + reject, + void 0, + ret, + null + ); + } + return ret; +} + +Promise.race = function Promise$Race(promises) { + return Promise$_Race(promises, void 0); +}; + +Promise.prototype.race = function Promise$race() { + return Promise$_Race(this, void 0); +}; + +}; + +},{"./errors_api_rejection.js":10,"./util.js":37}],28:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function( + Promise, Promise$_CreatePromiseArray, + PromiseArray, apiRejection, INTERNAL) { + +function Reduction(callback, index, accum, items, receiver) { + this.promise = new Promise(INTERNAL); + this.index = index; + this.length = items.length; + this.items = items; + this.callback = callback; + this.receiver = receiver; + this.accum = accum; +} + +Reduction.prototype.reject = function Reduction$reject(e) { + this.promise._reject(e); +}; + +Reduction.prototype.fulfill = function Reduction$fulfill(value, index) { + this.accum = value; + this.index = index + 1; + this.iterate(); +}; + +Reduction.prototype.iterate = function Reduction$iterate() { + var i = this.index; + var len = this.length; + var items = this.items; + var result = this.accum; + var receiver = this.receiver; + var callback = this.callback; + + for (; i < len; ++i) { + result = callback.call(receiver, result, items[i], i, len); + result = Promise._cast(result, void 0); + + if (result instanceof Promise) { + result._then( + this.fulfill, this.reject, void 0, this, i); + return; + } + } + this.promise._fulfill(result); +}; + +function Promise$_reducer(fulfilleds, initialValue) { + var fn = this; + var receiver = void 0; + if (typeof fn !== "function") { + receiver = fn.receiver; + fn = fn.fn; + } + var len = fulfilleds.length; + var accum = void 0; + var startIndex = 0; + + if (initialValue !== void 0) { + accum = initialValue; + startIndex = 0; + } + else { + startIndex = 1; + if (len > 0) accum = fulfilleds[0]; + } + var i = startIndex; + + if (i >= len) { + return accum; + } + + var reduction = new Reduction(fn, i, accum, fulfilleds, receiver); + reduction.iterate(); + return reduction.promise; +} + +function Promise$_unpackReducer(fulfilleds) { + var fn = this.fn; + var initialValue = this.initialValue; + return Promise$_reducer.call(fn, fulfilleds, initialValue); +} + +function Promise$_slowReduce( + promises, fn, initialValue, useBound) { + return initialValue._then(function(initialValue) { + return Promise$_Reduce( + promises, fn, initialValue, useBound); + }, void 0, void 0, void 0, void 0); +} + +function Promise$_Reduce(promises, fn, initialValue, useBound) { + if (typeof fn !== "function") { + return apiRejection("fn must be a function"); + } + + if (useBound === true && promises._isBound()) { + fn = { + fn: fn, + receiver: promises._boundTo + }; + } + + if (initialValue !== void 0) { + if (initialValue instanceof Promise) { + if (initialValue.isFulfilled()) { + initialValue = initialValue._settledValue; + } + else { + return Promise$_slowReduce(promises, + fn, initialValue, useBound); + } + } + + return Promise$_CreatePromiseArray(promises, PromiseArray, + useBound === true && promises._isBound() + ? promises._boundTo + : void 0) + .promise() + ._then(Promise$_unpackReducer, void 0, void 0, { + fn: fn, + initialValue: initialValue + }, void 0); + } + return Promise$_CreatePromiseArray(promises, PromiseArray, + useBound === true && promises._isBound() + ? promises._boundTo + : void 0).promise() + ._then(Promise$_reducer, void 0, void 0, fn, void 0); +} + + +Promise.reduce = function Promise$Reduce(promises, fn, initialValue) { + return Promise$_Reduce(promises, fn, initialValue, false); +}; + +Promise.prototype.reduce = function Promise$reduce(fn, initialValue) { + return Promise$_Reduce(this, fn, initialValue, true); +}; +}; + +},{}],29:[function(require,module,exports){ +var process=require("__browserify_process");/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +var global = require("./global.js"); +var schedule; +if (typeof process !== "undefined" && process !== null && + typeof process.cwd === "function" && + typeof process.nextTick === "function" && + typeof process.version === "string") { + schedule = function Promise$_Scheduler(fn) { + process.nextTick(fn); + }; +} +else if ((typeof global.MutationObserver === "function" || + typeof global.WebkitMutationObserver === "function" || + typeof global.WebKitMutationObserver === "function") && + typeof document !== "undefined" && + typeof document.createElement === "function") { + + + schedule = (function(){ + var MutationObserver = global.MutationObserver || + global.WebkitMutationObserver || + global.WebKitMutationObserver; + var div = document.createElement("div"); + var queuedFn = void 0; + var observer = new MutationObserver( + function Promise$_Scheduler() { + var fn = queuedFn; + queuedFn = void 0; + fn(); + } + ); + observer.observe(div, { + attributes: true + }); + return function Promise$_Scheduler(fn) { + queuedFn = fn; + div.setAttribute("class", "foo"); + }; + + })(); +} +else if (typeof global.postMessage === "function" && + typeof global.importScripts !== "function" && + typeof global.addEventListener === "function" && + typeof global.removeEventListener === "function") { + + var MESSAGE_KEY = "bluebird_message_key_" + Math.random(); + schedule = (function(){ + var queuedFn = void 0; + + function Promise$_Scheduler(e) { + if (e.source === global && + e.data === MESSAGE_KEY) { + var fn = queuedFn; + queuedFn = void 0; + fn(); + } + } + + global.addEventListener("message", Promise$_Scheduler, false); + + return function Promise$_Scheduler(fn) { + queuedFn = fn; + global.postMessage( + MESSAGE_KEY, "*" + ); + }; + + })(); +} +else if (typeof global.MessageChannel === "function") { + schedule = (function(){ + var queuedFn = void 0; + + var channel = new global.MessageChannel(); + channel.port1.onmessage = function Promise$_Scheduler() { + var fn = queuedFn; + queuedFn = void 0; + fn(); + }; + + return function Promise$_Scheduler(fn) { + queuedFn = fn; + channel.port2.postMessage(null); + }; + })(); +} +else if (global.setTimeout) { + schedule = function Promise$_Scheduler(fn) { + setTimeout(fn, 4); + }; +} +else { + schedule = function Promise$_Scheduler(fn) { + fn(); + }; +} + +module.exports = schedule; + +},{"./global.js":15,"__browserify_process":50}],30:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = + function(Promise, Promise$_CreatePromiseArray, PromiseArray) { + +var SettledPromiseArray = require("./settled_promise_array.js")( + Promise, PromiseArray); + +function Promise$_Settle(promises, useBound) { + return Promise$_CreatePromiseArray( + promises, + SettledPromiseArray, + useBound === true && promises._isBound() + ? promises._boundTo + : void 0 + ).promise(); +} + +Promise.settle = function Promise$Settle(promises) { + return Promise$_Settle(promises, false); +}; + +Promise.prototype.settle = function Promise$settle() { + return Promise$_Settle(this, true); +}; +}; + +},{"./settled_promise_array.js":31}],31:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, PromiseArray) { +var PromiseInspection = Promise.PromiseInspection; +var util = require("./util.js"); +var inherits = util.inherits; +function SettledPromiseArray(values, boundTo) { + this.constructor$(values, boundTo); +} +inherits(SettledPromiseArray, PromiseArray); + +SettledPromiseArray.prototype._promiseResolved = +function SettledPromiseArray$_promiseResolved(index, inspection) { + this._values[index] = inspection; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + } +}; + +SettledPromiseArray.prototype._promiseFulfilled = +function SettledPromiseArray$_promiseFulfilled(value, index) { + if (this._isResolved()) return; + var ret = new PromiseInspection(); + ret._bitField = 268435456; + ret._settledValue = value; + this._promiseResolved(index, ret); +}; +SettledPromiseArray.prototype._promiseRejected = +function SettledPromiseArray$_promiseRejected(reason, index) { + if (this._isResolved()) return; + var ret = new PromiseInspection(); + ret._bitField = 134217728; + ret._settledValue = reason; + this._promiseResolved(index, ret); +}; + +return SettledPromiseArray; +}; + +},{"./util.js":37}],32:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = +function(Promise, Promise$_CreatePromiseArray, PromiseArray, apiRejection) { + +var SomePromiseArray = require("./some_promise_array.js")(PromiseArray); +function Promise$_Some(promises, howMany, useBound) { + if ((howMany | 0) !== howMany || howMany < 0) { + return apiRejection("expecting a positive integer"); + } + var ret = Promise$_CreatePromiseArray( + promises, + SomePromiseArray, + useBound === true && promises._isBound() + ? promises._boundTo + : void 0 + ); + var promise = ret.promise(); + if (promise.isRejected()) { + return promise; + } + ret.setHowMany(howMany); + ret.init(); + return promise; +} + +Promise.some = function Promise$Some(promises, howMany) { + return Promise$_Some(promises, howMany, false); +}; + +Promise.prototype.some = function Promise$some(count) { + return Promise$_Some(this, count, true); +}; + +}; + +},{"./some_promise_array.js":33}],33:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function (PromiseArray) { +var util = require("./util.js"); +var RangeError = require("./errors.js").RangeError; +var inherits = util.inherits; +var isArray = util.isArray; + +function SomePromiseArray(values, boundTo) { + this.constructor$(values, boundTo); + this._howMany = 0; + this._unwrap = false; + this._initialized = false; +} +inherits(SomePromiseArray, PromiseArray); + +SomePromiseArray.prototype._init = function SomePromiseArray$_init() { + if (!this._initialized) { + return; + } + if (this._howMany === 0) { + this._resolve([]); + return; + } + this._init$(void 0, -2); + var isArrayResolved = isArray(this._values); + this._holes = isArrayResolved ? this._values.length - this.length() : 0; + + if (!this._isResolved() && + isArrayResolved && + this._howMany > this._canPossiblyFulfill()) { + var message = "(Promise.some) input array contains less than " + + this._howMany + " promises"; + this._reject(new RangeError(message)); + } +}; + +SomePromiseArray.prototype.init = function SomePromiseArray$init() { + this._initialized = true; + this._init(); +}; + +SomePromiseArray.prototype.setUnwrap = function SomePromiseArray$setUnwrap() { + this._unwrap = true; +}; + +SomePromiseArray.prototype.howMany = function SomePromiseArray$howMany() { + return this._howMany; +}; + +SomePromiseArray.prototype.setHowMany = +function SomePromiseArray$setHowMany(count) { + if (this._isResolved()) return; + this._howMany = count; +}; + +SomePromiseArray.prototype._promiseFulfilled = +function SomePromiseArray$_promiseFulfilled(value) { + if (this._isResolved()) return; + this._addFulfilled(value); + if (this._fulfilled() === this.howMany()) { + this._values.length = this.howMany(); + if (this.howMany() === 1 && this._unwrap) { + this._resolve(this._values[0]); + } + else { + this._resolve(this._values); + } + } + +}; +SomePromiseArray.prototype._promiseRejected = +function SomePromiseArray$_promiseRejected(reason) { + if (this._isResolved()) return; + this._addRejected(reason); + if (this.howMany() > this._canPossiblyFulfill()) { + if (this._values.length === this.length()) { + this._reject([]); + } + else { + this._reject(this._values.slice(this.length() + this._holes)); + } + } +}; + +SomePromiseArray.prototype._fulfilled = function SomePromiseArray$_fulfilled() { + return this._totalResolved; +}; + +SomePromiseArray.prototype._rejected = function SomePromiseArray$_rejected() { + return this._values.length - this.length() - this._holes; +}; + +SomePromiseArray.prototype._addRejected = +function SomePromiseArray$_addRejected(reason) { + this._values.push(reason); +}; + +SomePromiseArray.prototype._addFulfilled = +function SomePromiseArray$_addFulfilled(value) { + this._values[this._totalResolved++] = value; +}; + +SomePromiseArray.prototype._canPossiblyFulfill = +function SomePromiseArray$_canPossiblyFulfill() { + return this.length() - this._rejected(); +}; + +return SomePromiseArray; +}; + +},{"./errors.js":9,"./util.js":37}],34:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise) { +function PromiseInspection(promise) { + if (promise !== void 0) { + this._bitField = promise._bitField; + this._settledValue = promise.isResolved() + ? promise._settledValue + : void 0; + } + else { + this._bitField = 0; + this._settledValue = void 0; + } +} + +PromiseInspection.prototype.isFulfilled = +Promise.prototype.isFulfilled = function Promise$isFulfilled() { + return (this._bitField & 268435456) > 0; +}; + +PromiseInspection.prototype.isRejected = +Promise.prototype.isRejected = function Promise$isRejected() { + return (this._bitField & 134217728) > 0; +}; + +PromiseInspection.prototype.isPending = +Promise.prototype.isPending = function Promise$isPending() { + return (this._bitField & 402653184) === 0; +}; + +PromiseInspection.prototype.value = +Promise.prototype.value = function Promise$value() { + if (!this.isFulfilled()) { + throw new TypeError("cannot get fulfillment value of a non-fulfilled promise"); + } + return this._settledValue; +}; + +PromiseInspection.prototype.error = +Promise.prototype.reason = function Promise$reason() { + if (!this.isRejected()) { + throw new TypeError("cannot get rejection reason of a non-rejected promise"); + } + return this._settledValue; +}; + +PromiseInspection.prototype.isResolved = +Promise.prototype.isResolved = function Promise$isResolved() { + return (this._bitField & 402653184) > 0; +}; + +Promise.prototype.inspect = function Promise$inspect() { + return new PromiseInspection(this); +}; + +Promise.PromiseInspection = PromiseInspection; +}; + +},{}],35:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var util = require("./util.js"); +var canAttach = require("./errors.js").canAttach; +var errorObj = util.errorObj; +var isObject = util.isObject; + +function getThen(obj) { + try { + return obj.then; + } + catch(e) { + errorObj.e = e; + return errorObj; + } +} + +function Promise$_Cast(obj, originalPromise) { + if (isObject(obj)) { + if (obj instanceof Promise) { + return obj; + } + else if (isAnyBluebirdPromise(obj)) { + var ret = new Promise(INTERNAL); + ret._setTrace(void 0); + obj._then( + ret._fulfillUnchecked, + ret._rejectUncheckedCheckError, + ret._progressUnchecked, + ret, + null + ); + ret._setFollowing(); + return ret; + } + var then = getThen(obj); + if (then === errorObj) { + if (originalPromise !== void 0 && canAttach(then.e)) { + originalPromise._attachExtraTrace(then.e); + } + return Promise.reject(then.e); + } + else if (typeof then === "function") { + return Promise$_doThenable(obj, then, originalPromise); + } + } + return obj; +} + +var hasProp = {}.hasOwnProperty; +function isAnyBluebirdPromise(obj) { + return hasProp.call(obj, "_promise0"); +} + +function Promise$_doThenable(x, then, originalPromise) { + var resolver = Promise.defer(); + var called = false; + try { + then.call( + x, + Promise$_resolveFromThenable, + Promise$_rejectFromThenable, + Promise$_progressFromThenable + ); + } + catch(e) { + if (!called) { + called = true; + var trace = canAttach(e) ? e : new Error(e + ""); + if (originalPromise !== void 0) { + originalPromise._attachExtraTrace(trace); + } + resolver.promise._reject(e, trace); + } + } + return resolver.promise; + + function Promise$_resolveFromThenable(y) { + if (called) return; + called = true; + + if (x === y) { + var e = Promise._makeSelfResolutionError(); + if (originalPromise !== void 0) { + originalPromise._attachExtraTrace(e); + } + resolver.promise._reject(e, void 0); + return; + } + resolver.resolve(y); + } + + function Promise$_rejectFromThenable(r) { + if (called) return; + called = true; + var trace = canAttach(r) ? r : new Error(r + ""); + if (originalPromise !== void 0) { + originalPromise._attachExtraTrace(trace); + } + resolver.promise._reject(r, trace); + } + + function Promise$_progressFromThenable(v) { + if (called) return; + var promise = resolver.promise; + if (typeof promise._progress === "function") { + promise._progress(v); + } + } +} + +Promise._cast = Promise$_Cast; +}; + +},{"./errors.js":9,"./util.js":37}],36:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +var global = require("./global.js"); +var setTimeout = function(fn, ms) { + var $_len = arguments.length;var args = new Array($_len - 2); for(var $_i = 2; $_i < $_len; ++$_i) {args[$_i - 2] = arguments[$_i];} + global.setTimeout(function(){ + fn.apply(void 0, args); + }, ms); +}; + +module.exports = function(Promise, INTERNAL) { +var util = require("./util.js"); +var errors = require("./errors.js"); +var apiRejection = require("./errors_api_rejection")(Promise); +var TimeoutError = Promise.TimeoutError; + +var afterTimeout = function Promise$_afterTimeout(promise, message, ms) { + if (!promise.isPending()) return; + if (typeof message !== "string") { + message = "operation timed out after" + " " + ms + " ms" + } + var err = new TimeoutError(message); + errors.markAsOriginatingFromRejection(err); + promise._attachExtraTrace(err); + promise._rejectUnchecked(err); +}; + +var afterDelay = function Promise$_afterDelay(value, promise) { + promise._fulfill(value); +}; + +var delay = Promise.delay = function Promise$Delay(value, ms) { + if (ms === void 0) { + ms = value; + value = void 0; + } + ms = +ms; + var maybePromise = Promise._cast(value, void 0); + var promise = new Promise(INTERNAL); + + if (maybePromise instanceof Promise) { + if (maybePromise._isBound()) { + promise._setBoundTo(maybePromise._boundTo); + } + if (maybePromise._cancellable()) { + promise._setCancellable(); + promise._cancellationParent = maybePromise; + } + promise._setTrace(maybePromise); + promise._follow(maybePromise); + return promise.then(function(value) { + return Promise.delay(value, ms); + }); + } + else { + promise._setTrace(void 0); + setTimeout(afterDelay, ms, value, promise); + } + return promise; +}; + +Promise.prototype.delay = function Promise$delay(ms) { + return delay(this, ms); +}; + +Promise.prototype.timeout = function Promise$timeout(ms, message) { + ms = +ms; + + var ret = new Promise(INTERNAL); + ret._setTrace(this); + + if (this._isBound()) ret._setBoundTo(this._boundTo); + if (this._cancellable()) { + ret._setCancellable(); + ret._cancellationParent = this; + } + ret._follow(this); + setTimeout(afterTimeout, ms, ret, message, ms); + return ret; +}; + +}; + +},{"./errors.js":9,"./errors_api_rejection":10,"./global.js":15,"./util.js":37}],37:[function(require,module,exports){ +/** + * Copyright (c) 2014 Petka Antonov + * + * 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. + * + */ +"use strict"; +var global = require("./global.js"); +var es5 = require("./es5.js"); +var haveGetters = (function(){ + try { + var o = {}; + es5.defineProperty(o, "f", { + get: function () { + return 3; + } + }); + return o.f === 3; + } + catch (e) { + return false; + } + +})(); + +var canEvaluate = (function() { + if (typeof window !== "undefined" && window !== null && + typeof window.document !== "undefined" && + typeof navigator !== "undefined" && navigator !== null && + typeof navigator.appName === "string" && + window === global) { + return false; + } + return true; +})(); + +function deprecated(msg) { + if (typeof console !== "undefined" && console !== null && + typeof console.warn === "function") { + console.warn("Bluebird: " + msg); + } +} + +var errorObj = {e: {}}; +function tryCatch1(fn, receiver, arg) { + try { + return fn.call(receiver, arg); + } + catch (e) { + errorObj.e = e; + return errorObj; + } +} + +function tryCatch2(fn, receiver, arg, arg2) { + try { + return fn.call(receiver, arg, arg2); + } + catch (e) { + errorObj.e = e; + return errorObj; + } +} + +function tryCatchApply(fn, args, receiver) { + try { + return fn.apply(receiver, args); + } + catch (e) { + errorObj.e = e; + return errorObj; + } +} + +var inherits = function(Child, Parent) { + var hasProp = {}.hasOwnProperty; + + function T() { + this.constructor = Child; + this.constructor$ = Parent; + for (var propertyName in Parent.prototype) { + if (hasProp.call(Parent.prototype, propertyName) && + propertyName.charAt(propertyName.length-1) !== "$" + ) { + this[propertyName + "$"] = Parent.prototype[propertyName]; + } + } + } + T.prototype = Parent.prototype; + Child.prototype = new T(); + return Child.prototype; +}; + +function asString(val) { + return typeof val === "string" ? val : ("" + val); +} + +function isPrimitive(val) { + return val == null || val === true || val === false || + typeof val === "string" || typeof val === "number"; + +} + +function isObject(value) { + return !isPrimitive(value); +} + +function maybeWrapAsError(maybeError) { + if (!isPrimitive(maybeError)) return maybeError; + + return new Error(asString(maybeError)); +} + +function withAppended(target, appendee) { + var len = target.length; + var ret = new Array(len + 1); + var i; + for (i = 0; i < len; ++i) { + ret[i] = target[i]; + } + ret[i] = appendee; + return ret; +} + + +function notEnumerableProp(obj, name, value) { + if (isPrimitive(obj)) return obj; + var descriptor = { + value: value, + configurable: true, + enumerable: false, + writable: true + }; + es5.defineProperty(obj, name, descriptor); + return obj; +} + + +var wrapsPrimitiveReceiver = (function() { + return this !== "string"; +}).call("string"); + +function thrower(r) { + throw r; +} + + +function toFastProperties(obj) { + /*jshint -W027*/ + function f() {} + f.prototype = obj; + return f; + eval(obj); +} + +var ret = { + thrower: thrower, + isArray: es5.isArray, + haveGetters: haveGetters, + notEnumerableProp: notEnumerableProp, + isPrimitive: isPrimitive, + isObject: isObject, + canEvaluate: canEvaluate, + deprecated: deprecated, + errorObj: errorObj, + tryCatch1: tryCatch1, + tryCatch2: tryCatch2, + tryCatchApply: tryCatchApply, + inherits: inherits, + withAppended: withAppended, + asString: asString, + maybeWrapAsError: maybeWrapAsError, + wrapsPrimitiveReceiver: wrapsPrimitiveReceiver, + toFastProperties: toFastProperties +}; + +module.exports = ret; + +},{"./es5.js":11,"./global.js":15}],38:[function(require,module,exports){ + +},{}],39:[function(require,module,exports){ // @@ -221,7 +5249,7 @@ if (typeof Object.getOwnPropertyDescriptor === 'function') { exports.getOwnPropertyDescriptor = valueObject; } -},{}],3:[function(require,module,exports){ +},{}],40:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -538,7 +5566,7 @@ assert.doesNotThrow = function(block, /*optional*/message) { }; assert.ifError = function(err) { if (err) {throw err;}}; -},{"_shims":2,"util":8}],4:[function(require,module,exports){ +},{"_shims":39,"util":45}],41:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -819,7 +5847,7 @@ EventEmitter.listenerCount = function(emitter, type) { ret = emitter._events[type].length; return ret; }; -},{"util":8}],5:[function(require,module,exports){ +},{"util":45}],42:[function(require,module,exports){ var process=require("__browserify_process");// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -1030,7 +6058,7 @@ exports.extname = function(path) { return splitPath(path)[3]; }; -},{"__browserify_process":13,"_shims":2,"util":8}],6:[function(require,module,exports){ +},{"__browserify_process":50,"_shims":39,"util":45}],43:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -1241,7 +6269,7 @@ QueryString.parse = QueryString.decode = function(qs, sep, eq, options) { return obj; }; -},{"_shims":2,"buffer":10,"util":8}],7:[function(require,module,exports){ +},{"_shims":39,"buffer":47,"util":45}],44:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -1936,7 +6964,7 @@ Url.prototype.parseHost = function() { } if (host) this.hostname = host; }; -},{"_shims":2,"querystring":6,"util":8}],8:[function(require,module,exports){ +},{"_shims":39,"querystring":43,"util":45}],45:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -2481,7 +7509,7 @@ function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -},{"_shims":2}],9:[function(require,module,exports){ +},{"_shims":39}],46:[function(require,module,exports){ exports.readIEEE754 = function(buffer, offset, isBE, mLen, nBytes) { var e, m, eLen = nBytes * 8 - mLen - 1, @@ -2567,7 +7595,7 @@ exports.writeIEEE754 = function(buffer, value, offset, isBE, mLen, nBytes) { buffer[offset + i - d] |= s * 128; }; -},{}],10:[function(require,module,exports){ +},{}],47:[function(require,module,exports){ var assert; exports.Buffer = Buffer; exports.SlowBuffer = Buffer; @@ -3693,7 +8721,7 @@ Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) { writeDouble(this, value, offset, true, noAssert); }; -},{"./buffer_ieee754":9,"assert":3,"base64-js":11}],11:[function(require,module,exports){ +},{"./buffer_ieee754":46,"assert":40,"base64-js":48}],48:[function(require,module,exports){ (function (exports) { 'use strict'; @@ -3779,7 +8807,7 @@ Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) { module.exports.fromByteArray = uint8ToBase64; }()); -},{}],12:[function(require,module,exports){ +},{}],49:[function(require,module,exports){ require=(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6256,7 +11284,7 @@ module.exports = { 'zipObject': require('./arrays/zipObject') }; -},{"./arrays/compact":15,"./arrays/difference":16,"./arrays/findIndex":17,"./arrays/findLastIndex":18,"./arrays/first":19,"./arrays/flatten":20,"./arrays/indexOf":21,"./arrays/initial":22,"./arrays/intersection":23,"./arrays/last":24,"./arrays/lastIndexOf":25,"./arrays/pull":26,"./arrays/range":27,"./arrays/remove":28,"./arrays/rest":29,"./arrays/sortedIndex":30,"./arrays/union":31,"./arrays/uniq":32,"./arrays/without":33,"./arrays/xor":34,"./arrays/zip":35,"./arrays/zipObject":36}],15:[function(require,module,exports){ +},{"./arrays/compact":52,"./arrays/difference":53,"./arrays/findIndex":54,"./arrays/findLastIndex":55,"./arrays/first":56,"./arrays/flatten":57,"./arrays/indexOf":58,"./arrays/initial":59,"./arrays/intersection":60,"./arrays/last":61,"./arrays/lastIndexOf":62,"./arrays/pull":63,"./arrays/range":64,"./arrays/remove":65,"./arrays/rest":66,"./arrays/sortedIndex":67,"./arrays/union":68,"./arrays/uniq":69,"./arrays/without":70,"./arrays/xor":71,"./arrays/zip":72,"./arrays/zipObject":73}],52:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6296,7 +11324,7 @@ function compact(array) { module.exports = compact; -},{}],16:[function(require,module,exports){ +},{}],53:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6329,7 +11357,7 @@ function difference(array) { module.exports = difference; -},{"../internals/baseDifference":94,"../internals/baseFlatten":95}],17:[function(require,module,exports){ +},{"../internals/baseDifference":131,"../internals/baseFlatten":132}],54:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6396,7 +11424,7 @@ function findIndex(array, callback, thisArg) { module.exports = findIndex; -},{"../functions/createCallback":76}],18:[function(require,module,exports){ +},{"../functions/createCallback":113}],55:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6461,7 +11489,7 @@ function findLastIndex(array, callback, thisArg) { module.exports = findLastIndex; -},{"../functions/createCallback":76}],19:[function(require,module,exports){ +},{"../functions/createCallback":113}],56:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6549,7 +11577,7 @@ function first(array, callback, thisArg) { module.exports = first; -},{"../functions/createCallback":76,"../internals/slice":129}],20:[function(require,module,exports){ +},{"../functions/createCallback":113,"../internals/slice":166}],57:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6617,7 +11645,7 @@ function flatten(array, isShallow, callback, thisArg) { module.exports = flatten; -},{"../collections/map":56,"../internals/baseFlatten":95}],21:[function(require,module,exports){ +},{"../collections/map":93,"../internals/baseFlatten":132}],58:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6669,7 +11697,7 @@ function indexOf(array, value, fromIndex) { module.exports = indexOf; -},{"../internals/baseIndexOf":96,"./sortedIndex":30}],22:[function(require,module,exports){ +},{"../internals/baseIndexOf":133,"./sortedIndex":67}],59:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6753,7 +11781,7 @@ function initial(array, callback, thisArg) { module.exports = initial; -},{"../functions/createCallback":76,"../internals/slice":129}],23:[function(require,module,exports){ +},{"../functions/createCallback":113,"../internals/slice":166}],60:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6838,7 +11866,7 @@ function intersection() { module.exports = intersection; -},{"../internals/baseIndexOf":96,"../internals/cacheIndexOf":101,"../internals/createCache":106,"../internals/getArray":110,"../internals/largeArraySize":116,"../internals/releaseArray":124,"../internals/releaseObject":125,"../objects/isArguments":146,"../objects/isArray":147}],24:[function(require,module,exports){ +},{"../internals/baseIndexOf":133,"../internals/cacheIndexOf":138,"../internals/createCache":143,"../internals/getArray":147,"../internals/largeArraySize":153,"../internals/releaseArray":161,"../internals/releaseObject":162,"../objects/isArguments":183,"../objects/isArray":184}],61:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6924,7 +11952,7 @@ function last(array, callback, thisArg) { module.exports = last; -},{"../functions/createCallback":76,"../internals/slice":129}],25:[function(require,module,exports){ +},{"../functions/createCallback":113,"../internals/slice":166}],62:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -6980,7 +12008,7 @@ function lastIndexOf(array, value, fromIndex) { module.exports = lastIndexOf; -},{}],26:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7039,7 +12067,7 @@ function pull(array) { module.exports = pull; -},{}],27:[function(require,module,exports){ +},{}],64:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7110,7 +12138,7 @@ function range(start, end, step) { module.exports = range; -},{}],28:[function(require,module,exports){ +},{}],65:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7183,7 +12211,7 @@ function remove(array, callback, thisArg) { module.exports = remove; -},{"../functions/createCallback":76}],29:[function(require,module,exports){ +},{"../functions/createCallback":113}],66:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7268,7 +12296,7 @@ function rest(array, callback, thisArg) { module.exports = rest; -},{"../functions/createCallback":76,"../internals/slice":129}],30:[function(require,module,exports){ +},{"../functions/createCallback":113,"../internals/slice":166}],67:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7347,7 +12375,7 @@ function sortedIndex(array, value, callback, thisArg) { module.exports = sortedIndex; -},{"../functions/createCallback":76,"../utilities/identity":175}],31:[function(require,module,exports){ +},{"../functions/createCallback":113,"../utilities/identity":212}],68:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7379,7 +12407,7 @@ function union() { module.exports = union; -},{"../internals/baseFlatten":95,"../internals/baseUniq":100}],32:[function(require,module,exports){ +},{"../internals/baseFlatten":132,"../internals/baseUniq":137}],69:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7450,7 +12478,7 @@ function uniq(array, isSorted, callback, thisArg) { module.exports = uniq; -},{"../functions/createCallback":76,"../internals/baseUniq":100}],33:[function(require,module,exports){ +},{"../functions/createCallback":113,"../internals/baseUniq":137}],70:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7483,7 +12511,7 @@ function without(array) { module.exports = without; -},{"../internals/baseDifference":94,"../internals/slice":129}],34:[function(require,module,exports){ +},{"../internals/baseDifference":131,"../internals/slice":166}],71:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7531,7 +12559,7 @@ function xor() { module.exports = xor; -},{"../internals/baseDifference":94,"../internals/baseUniq":100,"../objects/isArguments":146,"../objects/isArray":147}],35:[function(require,module,exports){ +},{"../internals/baseDifference":131,"../internals/baseUniq":137,"../objects/isArguments":183,"../objects/isArray":184}],72:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7573,7 +12601,7 @@ function zip() { module.exports = zip; -},{"../collections/max":57,"../collections/pluck":59}],36:[function(require,module,exports){ +},{"../collections/max":94,"../collections/pluck":96}],73:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7623,7 +12651,7 @@ function zipObject(keys, values) { module.exports = zipObject; -},{"../objects/isArray":147}],37:[function(require,module,exports){ +},{"../objects/isArray":184}],74:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7642,7 +12670,7 @@ module.exports = { 'wrapperValueOf': require('./chaining/wrapperValueOf') }; -},{"./chaining/chain":38,"./chaining/tap":39,"./chaining/wrapperChain":40,"./chaining/wrapperToString":41,"./chaining/wrapperValueOf":42}],38:[function(require,module,exports){ +},{"./chaining/chain":75,"./chaining/tap":76,"./chaining/wrapperChain":77,"./chaining/wrapperToString":78,"./chaining/wrapperValueOf":79}],75:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7685,7 +12713,7 @@ function chain(value) { module.exports = chain; -},{"../internals/lodashWrapper":117}],39:[function(require,module,exports){ +},{"../internals/lodashWrapper":154}],76:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7722,7 +12750,7 @@ function tap(value, interceptor) { module.exports = tap; -},{}],40:[function(require,module,exports){ +},{}],77:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7764,7 +12792,7 @@ function wrapperChain() { module.exports = wrapperChain; -},{}],41:[function(require,module,exports){ +},{}],78:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7792,7 +12820,7 @@ function wrapperToString() { module.exports = wrapperToString; -},{}],42:[function(require,module,exports){ +},{}],79:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7823,7 +12851,7 @@ function wrapperValueOf() { module.exports = wrapperValueOf; -},{"../collections/forEach":51,"../support":171}],43:[function(require,module,exports){ +},{"../collections/forEach":88,"../support":208}],80:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7874,7 +12902,7 @@ module.exports = { 'where': require('./collections/where') }; -},{"./collections/at":44,"./collections/contains":45,"./collections/countBy":46,"./collections/every":47,"./collections/filter":48,"./collections/find":49,"./collections/findLast":50,"./collections/forEach":51,"./collections/forEachRight":52,"./collections/groupBy":53,"./collections/indexBy":54,"./collections/invoke":55,"./collections/map":56,"./collections/max":57,"./collections/min":58,"./collections/pluck":59,"./collections/reduce":60,"./collections/reduceRight":61,"./collections/reject":62,"./collections/sample":63,"./collections/shuffle":64,"./collections/size":65,"./collections/some":66,"./collections/sortBy":67,"./collections/toArray":68,"./collections/where":69}],44:[function(require,module,exports){ +},{"./collections/at":81,"./collections/contains":82,"./collections/countBy":83,"./collections/every":84,"./collections/filter":85,"./collections/find":86,"./collections/findLast":87,"./collections/forEach":88,"./collections/forEachRight":89,"./collections/groupBy":90,"./collections/indexBy":91,"./collections/invoke":92,"./collections/map":93,"./collections/max":94,"./collections/min":95,"./collections/pluck":96,"./collections/reduce":97,"./collections/reduceRight":98,"./collections/reject":99,"./collections/sample":100,"./collections/shuffle":101,"./collections/size":102,"./collections/some":103,"./collections/sortBy":104,"./collections/toArray":105,"./collections/where":106}],81:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7922,7 +12950,7 @@ function at(collection) { module.exports = at; -},{"../internals/baseFlatten":95,"../objects/isString":161}],45:[function(require,module,exports){ +},{"../internals/baseFlatten":132,"../objects/isString":198}],82:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -7989,7 +13017,7 @@ function contains(collection, target, fromIndex) { module.exports = contains; -},{"../internals/baseIndexOf":96,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161}],46:[function(require,module,exports){ +},{"../internals/baseIndexOf":133,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isString":198}],83:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8046,7 +13074,7 @@ var countBy = createAggregator(function(result, value, key) { module.exports = countBy; -},{"../internals/createAggregator":105}],47:[function(require,module,exports){ +},{"../internals/createAggregator":142}],84:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8122,7 +13150,7 @@ function every(collection, callback, thisArg) { module.exports = every; -},{"../functions/createCallback":76,"../objects/forOwn":141}],48:[function(require,module,exports){ +},{"../functions/createCallback":113,"../objects/forOwn":178}],85:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8200,7 +13228,7 @@ function filter(collection, callback, thisArg) { module.exports = filter; -},{"../functions/createCallback":76,"../objects/forOwn":141}],49:[function(require,module,exports){ +},{"../functions/createCallback":113,"../objects/forOwn":178}],86:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8282,7 +13310,7 @@ function find(collection, callback, thisArg) { module.exports = find; -},{"../functions/createCallback":76,"../objects/forOwn":141}],50:[function(require,module,exports){ +},{"../functions/createCallback":113,"../objects/forOwn":178}],87:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8328,7 +13356,7 @@ function findLast(collection, callback, thisArg) { module.exports = findLast; -},{"../functions/createCallback":76,"./forEachRight":52}],51:[function(require,module,exports){ +},{"../functions/createCallback":113,"./forEachRight":89}],88:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8385,7 +13413,7 @@ function forEach(collection, callback, thisArg) { module.exports = forEach; -},{"../internals/baseCreateCallback":92,"../objects/forOwn":141}],52:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129,"../objects/forOwn":178}],89:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8439,7 +13467,7 @@ function forEachRight(collection, callback, thisArg) { module.exports = forEachRight; -},{"../internals/baseCreateCallback":92,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161,"../objects/keys":163}],53:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isString":198,"../objects/keys":200}],90:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8497,7 +13525,7 @@ var groupBy = createAggregator(function(result, value, key) { module.exports = groupBy; -},{"../internals/createAggregator":105}],54:[function(require,module,exports){ +},{"../internals/createAggregator":142}],91:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8553,7 +13581,7 @@ var indexBy = createAggregator(function(result, value, key) { module.exports = indexBy; -},{"../internals/createAggregator":105}],55:[function(require,module,exports){ +},{"../internals/createAggregator":142}],92:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8602,7 +13630,7 @@ function invoke(collection, methodName) { module.exports = invoke; -},{"../internals/slice":129,"./forEach":51}],56:[function(require,module,exports){ +},{"../internals/slice":166,"./forEach":88}],93:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8674,7 +13702,7 @@ function map(collection, callback, thisArg) { module.exports = map; -},{"../functions/createCallback":76,"../objects/forOwn":141}],57:[function(require,module,exports){ +},{"../functions/createCallback":113,"../objects/forOwn":178}],94:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8767,7 +13795,7 @@ function max(collection, callback, thisArg) { module.exports = max; -},{"../functions/createCallback":76,"../internals/charAtCallback":103,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161,"./forEach":51}],58:[function(require,module,exports){ +},{"../functions/createCallback":113,"../internals/charAtCallback":140,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isString":198,"./forEach":88}],95:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8860,7 +13888,7 @@ function min(collection, callback, thisArg) { module.exports = min; -},{"../functions/createCallback":76,"../internals/charAtCallback":103,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161,"./forEach":51}],59:[function(require,module,exports){ +},{"../functions/createCallback":113,"../internals/charAtCallback":140,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isString":198,"./forEach":88}],96:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8895,7 +13923,7 @@ var pluck = map; module.exports = pluck; -},{"./map":56}],60:[function(require,module,exports){ +},{"./map":93}],97:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -8964,7 +13992,7 @@ function reduce(collection, callback, accumulator, thisArg) { module.exports = reduce; -},{"../functions/createCallback":76,"../objects/forOwn":141}],61:[function(require,module,exports){ +},{"../functions/createCallback":113,"../objects/forOwn":178}],98:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9008,7 +14036,7 @@ function reduceRight(collection, callback, accumulator, thisArg) { module.exports = reduceRight; -},{"../functions/createCallback":76,"./forEachRight":52}],62:[function(require,module,exports){ +},{"../functions/createCallback":113,"./forEachRight":89}],99:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9067,7 +14095,7 @@ function reject(collection, callback, thisArg) { module.exports = reject; -},{"../functions/createCallback":76,"./filter":48}],63:[function(require,module,exports){ +},{"../functions/createCallback":113,"./filter":85}],100:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9118,7 +14146,7 @@ function sample(collection, n, guard) { module.exports = sample; -},{"../internals/baseRandom":99,"../objects/isString":161,"../objects/values":170,"./shuffle":64}],64:[function(require,module,exports){ +},{"../internals/baseRandom":136,"../objects/isString":198,"../objects/values":207,"./shuffle":101}],101:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9159,7 +14187,7 @@ function shuffle(collection) { module.exports = shuffle; -},{"../internals/baseRandom":99,"./forEach":51}],65:[function(require,module,exports){ +},{"../internals/baseRandom":136,"./forEach":88}],102:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9197,7 +14225,7 @@ function size(collection) { module.exports = size; -},{"../objects/keys":163}],66:[function(require,module,exports){ +},{"../objects/keys":200}],103:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9275,7 +14303,7 @@ function some(collection, callback, thisArg) { module.exports = some; -},{"../functions/createCallback":76,"../objects/forOwn":141,"../objects/isArray":147}],67:[function(require,module,exports){ +},{"../functions/createCallback":113,"../objects/forOwn":178,"../objects/isArray":184}],104:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9378,7 +14406,7 @@ function sortBy(collection, callback, thisArg) { module.exports = sortBy; -},{"../functions/createCallback":76,"../internals/compareAscending":104,"../internals/getArray":110,"../internals/getObject":111,"../internals/releaseArray":124,"../internals/releaseObject":125,"../objects/isArray":147,"./forEach":51,"./map":56}],68:[function(require,module,exports){ +},{"../functions/createCallback":113,"../internals/compareAscending":141,"../internals/getArray":147,"../internals/getObject":148,"../internals/releaseArray":161,"../internals/releaseObject":162,"../objects/isArray":184,"./forEach":88,"./map":93}],105:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9413,7 +14441,7 @@ function toArray(collection) { module.exports = toArray; -},{"../internals/slice":129,"../objects/isString":161,"../objects/values":170}],69:[function(require,module,exports){ +},{"../internals/slice":166,"../objects/isString":198,"../objects/values":207}],106:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9453,7 +14481,7 @@ var where = filter; module.exports = where; -},{"./filter":48}],70:[function(require,module,exports){ +},{"./filter":85}],107:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9482,7 +14510,7 @@ module.exports = { 'wrap': require('./functions/wrap') }; -},{"./functions/after":71,"./functions/bind":72,"./functions/bindAll":73,"./functions/bindKey":74,"./functions/compose":75,"./functions/createCallback":76,"./functions/curry":77,"./functions/debounce":78,"./functions/defer":79,"./functions/delay":80,"./functions/memoize":81,"./functions/once":82,"./functions/partial":83,"./functions/partialRight":84,"./functions/throttle":85,"./functions/wrap":86}],71:[function(require,module,exports){ +},{"./functions/after":108,"./functions/bind":109,"./functions/bindAll":110,"./functions/bindKey":111,"./functions/compose":112,"./functions/createCallback":113,"./functions/curry":114,"./functions/debounce":115,"./functions/defer":116,"./functions/delay":117,"./functions/memoize":118,"./functions/once":119,"./functions/partial":120,"./functions/partialRight":121,"./functions/throttle":122,"./functions/wrap":123}],108:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9530,7 +14558,7 @@ function after(n, func) { module.exports = after; -},{"../objects/isFunction":154}],72:[function(require,module,exports){ +},{"../objects/isFunction":191}],109:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9572,7 +14600,7 @@ function bind(func, thisArg) { module.exports = bind; -},{"../internals/createWrapper":107,"../internals/slice":129}],73:[function(require,module,exports){ +},{"../internals/createWrapper":144,"../internals/slice":166}],110:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9623,7 +14651,7 @@ function bindAll(object) { module.exports = bindAll; -},{"../internals/baseFlatten":95,"../internals/createWrapper":107,"../objects/functions":143}],74:[function(require,module,exports){ +},{"../internals/baseFlatten":132,"../internals/createWrapper":144,"../objects/functions":180}],111:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9677,7 +14705,7 @@ function bindKey(object, key) { module.exports = bindKey; -},{"../internals/createWrapper":107,"../internals/slice":129}],75:[function(require,module,exports){ +},{"../internals/createWrapper":144,"../internals/slice":166}],112:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9740,7 +14768,7 @@ function compose() { module.exports = compose; -},{"../objects/isFunction":154}],76:[function(require,module,exports){ +},{"../objects/isFunction":191}],113:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9823,7 +14851,7 @@ function createCallback(func, thisArg, argCount) { module.exports = createCallback; -},{"../internals/baseCreateCallback":92,"../internals/baseIsEqual":97,"../objects/isObject":158,"../objects/keys":163,"../utilities/property":181}],77:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129,"../internals/baseIsEqual":134,"../objects/isObject":195,"../objects/keys":200,"../utilities/property":218}],114:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -9869,7 +14897,7 @@ function curry(func, arity) { module.exports = curry; -},{"../internals/createWrapper":107}],78:[function(require,module,exports){ +},{"../internals/createWrapper":144}],115:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10027,7 +15055,7 @@ function debounce(func, wait, options) { module.exports = debounce; -},{"../objects/isFunction":154,"../objects/isObject":158,"../utilities/now":179}],79:[function(require,module,exports){ +},{"../objects/isFunction":191,"../objects/isObject":195,"../utilities/now":216}],116:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10064,7 +15092,7 @@ function defer(func) { module.exports = defer; -},{"../internals/slice":129,"../objects/isFunction":154}],80:[function(require,module,exports){ +},{"../internals/slice":166,"../objects/isFunction":191}],117:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10102,7 +15130,7 @@ function delay(func, wait) { module.exports = delay; -},{"../internals/slice":129,"../objects/isFunction":154}],81:[function(require,module,exports){ +},{"../internals/slice":166,"../objects/isFunction":191}],118:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10175,7 +15203,7 @@ function memoize(func, resolver) { module.exports = memoize; -},{"../internals/keyPrefix":115,"../objects/isFunction":154}],82:[function(require,module,exports){ +},{"../internals/keyPrefix":152,"../objects/isFunction":191}],119:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10225,7 +15253,7 @@ function once(func) { module.exports = once; -},{"../objects/isFunction":154}],83:[function(require,module,exports){ +},{"../objects/isFunction":191}],120:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10261,7 +15289,7 @@ function partial(func) { module.exports = partial; -},{"../internals/createWrapper":107,"../internals/slice":129}],84:[function(require,module,exports){ +},{"../internals/createWrapper":144,"../internals/slice":166}],121:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10306,7 +15334,7 @@ function partialRight(func) { module.exports = partialRight; -},{"../internals/createWrapper":107,"../internals/slice":129}],85:[function(require,module,exports){ +},{"../internals/createWrapper":144,"../internals/slice":166}],122:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10379,7 +15407,7 @@ function throttle(func, wait, options) { module.exports = throttle; -},{"../objects/isFunction":154,"../objects/isObject":158,"./debounce":78}],86:[function(require,module,exports){ +},{"../objects/isFunction":191,"../objects/isObject":195,"./debounce":115}],123:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10417,7 +15445,7 @@ function wrap(value, wrapper) { module.exports = wrap; -},{"../internals/createWrapper":107}],87:[function(require,module,exports){ +},{"../internals/createWrapper":144}],124:[function(require,module,exports){ /** * @license * Lo-Dash 2.4.1 (Custom Build) @@ -10773,7 +15801,7 @@ lodash.support = support; (lodash.templateSettings = utilities.templateSettings).imports._ = lodash; module.exports = lodash; -},{"./arrays":14,"./chaining":37,"./collections":43,"./collections/forEach":51,"./functions":70,"./internals/lodashWrapper":117,"./objects":131,"./objects/forOwn":141,"./objects/isArray":147,"./support":171,"./utilities":172,"./utilities/mixin":176,"./utilities/templateSettings":185}],88:[function(require,module,exports){ +},{"./arrays":51,"./chaining":74,"./collections":80,"./collections/forEach":88,"./functions":107,"./internals/lodashWrapper":154,"./objects":168,"./objects/forOwn":178,"./objects/isArray":184,"./support":208,"./utilities":209,"./utilities/mixin":213,"./utilities/templateSettings":222}],125:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10788,7 +15816,7 @@ var arrayPool = []; module.exports = arrayPool; -},{}],89:[function(require,module,exports){ +},{}],126:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -10852,7 +15880,7 @@ function baseBind(bindData) { module.exports = baseBind; -},{"../objects/isObject":158,"./baseCreate":91,"./setBindData":126,"./slice":129}],90:[function(require,module,exports){ +},{"../objects/isObject":195,"./baseCreate":128,"./setBindData":163,"./slice":166}],127:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11006,7 +16034,7 @@ function baseClone(value, isDeep, callback, stackA, stackB) { module.exports = baseClone; -},{"../collections/forEach":51,"../objects/assign":132,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isObject":158,"./getArray":110,"./releaseArray":124,"./slice":129}],91:[function(require,module,exports){ +},{"../collections/forEach":88,"../objects/assign":169,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isObject":195,"./getArray":147,"./releaseArray":161,"./slice":166}],128:[function(require,module,exports){ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};/** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11050,7 +16078,7 @@ if (!nativeCreate) { module.exports = baseCreate; -},{"../objects/isObject":158,"../utilities/noop":178,"./isNative":114}],92:[function(require,module,exports){ +},{"../objects/isObject":195,"../utilities/noop":215,"./isNative":151}],129:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11132,7 +16160,7 @@ function baseCreateCallback(func, thisArg, argCount) { module.exports = baseCreateCallback; -},{"../functions/bind":72,"../support":171,"../utilities/identity":175,"./setBindData":126}],93:[function(require,module,exports){ +},{"../functions/bind":109,"../support":208,"../utilities/identity":212,"./setBindData":163}],130:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11212,7 +16240,7 @@ function baseCreateWrapper(bindData) { module.exports = baseCreateWrapper; -},{"../objects/isObject":158,"./baseCreate":91,"./setBindData":126,"./slice":129}],94:[function(require,module,exports){ +},{"../objects/isObject":195,"./baseCreate":128,"./setBindData":163,"./slice":166}],131:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11266,7 +16294,7 @@ function baseDifference(array, values) { module.exports = baseDifference; -},{"./baseIndexOf":96,"./cacheIndexOf":101,"./createCache":106,"./largeArraySize":116,"./releaseObject":125}],95:[function(require,module,exports){ +},{"./baseIndexOf":133,"./cacheIndexOf":138,"./createCache":143,"./largeArraySize":153,"./releaseObject":162}],132:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11320,7 +16348,7 @@ function baseFlatten(array, isShallow, isStrict, fromIndex) { module.exports = baseFlatten; -},{"../objects/isArguments":146,"../objects/isArray":147}],96:[function(require,module,exports){ +},{"../objects/isArguments":183,"../objects/isArray":184}],133:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11354,7 +16382,7 @@ function baseIndexOf(array, value, fromIndex) { module.exports = baseIndexOf; -},{}],97:[function(require,module,exports){ +},{}],134:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11565,7 +16593,7 @@ function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { module.exports = baseIsEqual; -},{"../objects/forIn":139,"../objects/isFunction":154,"./getArray":110,"./objectTypes":120,"./releaseArray":124}],98:[function(require,module,exports){ +},{"../objects/forIn":176,"../objects/isFunction":191,"./getArray":147,"./objectTypes":157,"./releaseArray":161}],135:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11646,7 +16674,7 @@ function baseMerge(object, source, callback, stackA, stackB) { module.exports = baseMerge; -},{"../collections/forEach":51,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isPlainObject":159}],99:[function(require,module,exports){ +},{"../collections/forEach":88,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isPlainObject":196}],136:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11677,7 +16705,7 @@ function baseRandom(min, max) { module.exports = baseRandom; -},{}],100:[function(require,module,exports){ +},{}],137:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11743,7 +16771,7 @@ function baseUniq(array, isSorted, callback) { module.exports = baseUniq; -},{"./baseIndexOf":96,"./cacheIndexOf":101,"./createCache":106,"./getArray":110,"./largeArraySize":116,"./releaseArray":124,"./releaseObject":125}],101:[function(require,module,exports){ +},{"./baseIndexOf":133,"./cacheIndexOf":138,"./createCache":143,"./getArray":147,"./largeArraySize":153,"./releaseArray":161,"./releaseObject":162}],138:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11784,7 +16812,7 @@ function cacheIndexOf(cache, value) { module.exports = cacheIndexOf; -},{"./baseIndexOf":96,"./keyPrefix":115}],102:[function(require,module,exports){ +},{"./baseIndexOf":133,"./keyPrefix":152}],139:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11824,7 +16852,7 @@ function cachePush(value) { module.exports = cachePush; -},{"./keyPrefix":115}],103:[function(require,module,exports){ +},{"./keyPrefix":152}],140:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11848,7 +16876,7 @@ function charAtCallback(value) { module.exports = charAtCallback; -},{}],104:[function(require,module,exports){ +},{}],141:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11897,7 +16925,7 @@ function compareAscending(a, b) { module.exports = compareAscending; -},{}],105:[function(require,module,exports){ +},{}],142:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11944,7 +16972,7 @@ function createAggregator(setter) { module.exports = createAggregator; -},{"../functions/createCallback":76,"../objects/forOwn":141,"../objects/isArray":147}],106:[function(require,module,exports){ +},{"../functions/createCallback":113,"../objects/forOwn":178,"../objects/isArray":184}],143:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -11991,7 +17019,7 @@ function createCache(array) { module.exports = createCache; -},{"./cachePush":102,"./getObject":111,"./releaseObject":125}],107:[function(require,module,exports){ +},{"./cachePush":139,"./getObject":148,"./releaseObject":162}],144:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12099,7 +17127,7 @@ function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, ar module.exports = createWrapper; -},{"../objects/isFunction":154,"./baseBind":89,"./baseCreateWrapper":93,"./slice":129}],108:[function(require,module,exports){ +},{"../objects/isFunction":191,"./baseBind":126,"./baseCreateWrapper":130,"./slice":166}],145:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12123,7 +17151,7 @@ function escapeHtmlChar(match) { module.exports = escapeHtmlChar; -},{"./htmlEscapes":112}],109:[function(require,module,exports){ +},{"./htmlEscapes":149}],146:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12158,7 +17186,7 @@ function escapeStringChar(match) { module.exports = escapeStringChar; -},{}],110:[function(require,module,exports){ +},{}],147:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12181,7 +17209,7 @@ function getArray() { module.exports = getArray; -},{"./arrayPool":88}],111:[function(require,module,exports){ +},{"./arrayPool":125}],148:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12218,7 +17246,7 @@ function getObject() { module.exports = getObject; -},{"./objectPool":119}],112:[function(require,module,exports){ +},{"./objectPool":156}],149:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12246,7 +17274,7 @@ var htmlEscapes = { module.exports = htmlEscapes; -},{}],113:[function(require,module,exports){ +},{}],150:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12263,7 +17291,7 @@ var htmlUnescapes = invert(htmlEscapes); module.exports = htmlUnescapes; -},{"../objects/invert":145,"./htmlEscapes":112}],114:[function(require,module,exports){ +},{"../objects/invert":182,"./htmlEscapes":149}],151:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12299,7 +17327,7 @@ function isNative(value) { module.exports = isNative; -},{}],115:[function(require,module,exports){ +},{}],152:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12314,7 +17342,7 @@ var keyPrefix = +new Date + ''; module.exports = keyPrefix; -},{}],116:[function(require,module,exports){ +},{}],153:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12329,7 +17357,7 @@ var largeArraySize = 75; module.exports = largeArraySize; -},{}],117:[function(require,module,exports){ +},{}],154:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12354,7 +17382,7 @@ function lodashWrapper(value, chainAll) { module.exports = lodashWrapper; -},{}],118:[function(require,module,exports){ +},{}],155:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12369,7 +17397,7 @@ var maxPoolSize = 40; module.exports = maxPoolSize; -},{}],119:[function(require,module,exports){ +},{}],156:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12384,7 +17412,7 @@ var objectPool = []; module.exports = objectPool; -},{}],120:[function(require,module,exports){ +},{}],157:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12406,7 +17434,7 @@ var objectTypes = { module.exports = objectTypes; -},{}],121:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12423,7 +17451,7 @@ var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'); module.exports = reEscapedHtml; -},{"../objects/keys":163,"./htmlUnescapes":113}],122:[function(require,module,exports){ +},{"../objects/keys":200,"./htmlUnescapes":150}],159:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12438,7 +17466,7 @@ var reInterpolate = /<%=([\s\S]+?)%>/g; module.exports = reInterpolate; -},{}],123:[function(require,module,exports){ +},{}],160:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12455,7 +17483,7 @@ var reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); module.exports = reUnescapedHtml; -},{"../objects/keys":163,"./htmlEscapes":112}],124:[function(require,module,exports){ +},{"../objects/keys":200,"./htmlEscapes":149}],161:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12482,7 +17510,7 @@ function releaseArray(array) { module.exports = releaseArray; -},{"./arrayPool":88,"./maxPoolSize":118}],125:[function(require,module,exports){ +},{"./arrayPool":125,"./maxPoolSize":155}],162:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12513,7 +17541,7 @@ function releaseObject(object) { module.exports = releaseObject; -},{"./maxPoolSize":118,"./objectPool":119}],126:[function(require,module,exports){ +},{"./maxPoolSize":155,"./objectPool":156}],163:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12558,7 +17586,7 @@ var setBindData = !defineProperty ? noop : function(func, value) { module.exports = setBindData; -},{"../utilities/noop":178,"./isNative":114}],127:[function(require,module,exports){ +},{"../utilities/noop":215,"./isNative":151}],164:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12612,7 +17640,7 @@ function shimIsPlainObject(value) { module.exports = shimIsPlainObject; -},{"../objects/forIn":139,"../objects/isFunction":154}],128:[function(require,module,exports){ +},{"../objects/forIn":176,"../objects/isFunction":191}],165:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12652,7 +17680,7 @@ var shimKeys = function(object) { module.exports = shimKeys; -},{"./objectTypes":120}],129:[function(require,module,exports){ +},{"./objectTypes":157}],166:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12692,7 +17720,7 @@ function slice(array, start, end) { module.exports = slice; -},{}],130:[function(require,module,exports){ +},{}],167:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12716,7 +17744,7 @@ function unescapeHtmlChar(match) { module.exports = unescapeHtmlChar; -},{"./htmlUnescapes":113}],131:[function(require,module,exports){ +},{"./htmlUnescapes":150}],168:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12770,7 +17798,7 @@ module.exports = { 'values': require('./objects/values') }; -},{"./objects/assign":132,"./objects/clone":133,"./objects/cloneDeep":134,"./objects/create":135,"./objects/defaults":136,"./objects/findKey":137,"./objects/findLastKey":138,"./objects/forIn":139,"./objects/forInRight":140,"./objects/forOwn":141,"./objects/forOwnRight":142,"./objects/functions":143,"./objects/has":144,"./objects/invert":145,"./objects/isArguments":146,"./objects/isArray":147,"./objects/isBoolean":148,"./objects/isDate":149,"./objects/isElement":150,"./objects/isEmpty":151,"./objects/isEqual":152,"./objects/isFinite":153,"./objects/isFunction":154,"./objects/isNaN":155,"./objects/isNull":156,"./objects/isNumber":157,"./objects/isObject":158,"./objects/isPlainObject":159,"./objects/isRegExp":160,"./objects/isString":161,"./objects/isUndefined":162,"./objects/keys":163,"./objects/mapValues":164,"./objects/merge":165,"./objects/omit":166,"./objects/pairs":167,"./objects/pick":168,"./objects/transform":169,"./objects/values":170}],132:[function(require,module,exports){ +},{"./objects/assign":169,"./objects/clone":170,"./objects/cloneDeep":171,"./objects/create":172,"./objects/defaults":173,"./objects/findKey":174,"./objects/findLastKey":175,"./objects/forIn":176,"./objects/forInRight":177,"./objects/forOwn":178,"./objects/forOwnRight":179,"./objects/functions":180,"./objects/has":181,"./objects/invert":182,"./objects/isArguments":183,"./objects/isArray":184,"./objects/isBoolean":185,"./objects/isDate":186,"./objects/isElement":187,"./objects/isEmpty":188,"./objects/isEqual":189,"./objects/isFinite":190,"./objects/isFunction":191,"./objects/isNaN":192,"./objects/isNull":193,"./objects/isNumber":194,"./objects/isObject":195,"./objects/isPlainObject":196,"./objects/isRegExp":197,"./objects/isString":198,"./objects/isUndefined":199,"./objects/keys":200,"./objects/mapValues":201,"./objects/merge":202,"./objects/omit":203,"./objects/pairs":204,"./objects/pick":205,"./objects/transform":206,"./objects/values":207}],169:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12842,7 +17870,7 @@ var assign = function(object, source, guard) { module.exports = assign; -},{"../internals/baseCreateCallback":92,"../internals/objectTypes":120,"./keys":163}],133:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129,"../internals/objectTypes":157,"./keys":200}],170:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12907,7 +17935,7 @@ function clone(value, isDeep, callback, thisArg) { module.exports = clone; -},{"../internals/baseClone":90,"../internals/baseCreateCallback":92}],134:[function(require,module,exports){ +},{"../internals/baseClone":127,"../internals/baseCreateCallback":129}],171:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -12966,7 +17994,7 @@ function cloneDeep(value, callback, thisArg) { module.exports = cloneDeep; -},{"../internals/baseClone":90,"../internals/baseCreateCallback":92}],135:[function(require,module,exports){ +},{"../internals/baseClone":127,"../internals/baseCreateCallback":129}],172:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13016,7 +18044,7 @@ function create(prototype, properties) { module.exports = create; -},{"../internals/baseCreate":91,"./assign":132}],136:[function(require,module,exports){ +},{"../internals/baseCreate":128,"./assign":169}],173:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13072,7 +18100,7 @@ var defaults = function(object, source, guard) { module.exports = defaults; -},{"../internals/objectTypes":120,"./keys":163}],137:[function(require,module,exports){ +},{"../internals/objectTypes":157,"./keys":200}],174:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13139,7 +18167,7 @@ function findKey(object, callback, thisArg) { module.exports = findKey; -},{"../functions/createCallback":76,"./forOwn":141}],138:[function(require,module,exports){ +},{"../functions/createCallback":113,"./forOwn":178}],175:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13206,7 +18234,7 @@ function findLastKey(object, callback, thisArg) { module.exports = findLastKey; -},{"../functions/createCallback":76,"./forOwnRight":142}],139:[function(require,module,exports){ +},{"../functions/createCallback":113,"./forOwnRight":179}],176:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13262,7 +18290,7 @@ var forIn = function(collection, callback, thisArg) { module.exports = forIn; -},{"../internals/baseCreateCallback":92,"../internals/objectTypes":120}],140:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129,"../internals/objectTypes":157}],177:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13321,7 +18349,7 @@ function forInRight(object, callback, thisArg) { module.exports = forInRight; -},{"../internals/baseCreateCallback":92,"./forIn":139}],141:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129,"./forIn":176}],178:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13373,7 +18401,7 @@ var forOwn = function(collection, callback, thisArg) { module.exports = forOwn; -},{"../internals/baseCreateCallback":92,"../internals/objectTypes":120,"./keys":163}],142:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129,"../internals/objectTypes":157,"./keys":200}],179:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13419,7 +18447,7 @@ function forOwnRight(object, callback, thisArg) { module.exports = forOwnRight; -},{"../internals/baseCreateCallback":92,"./keys":163}],143:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129,"./keys":200}],180:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13458,7 +18486,7 @@ function functions(object) { module.exports = functions; -},{"./forIn":139,"./isFunction":154}],144:[function(require,module,exports){ +},{"./forIn":176,"./isFunction":191}],181:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13495,7 +18523,7 @@ function has(object, key) { module.exports = has; -},{}],145:[function(require,module,exports){ +},{}],182:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13534,7 +18562,7 @@ function invert(object) { module.exports = invert; -},{"./keys":163}],146:[function(require,module,exports){ +},{"./keys":200}],183:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13576,7 +18604,7 @@ function isArguments(value) { module.exports = isArguments; -},{}],147:[function(require,module,exports){ +},{}],184:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13623,7 +18651,7 @@ var isArray = nativeIsArray || function(value) { module.exports = isArray; -},{"../internals/isNative":114}],148:[function(require,module,exports){ +},{"../internals/isNative":151}],185:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13662,7 +18690,7 @@ function isBoolean(value) { module.exports = isBoolean; -},{}],149:[function(require,module,exports){ +},{}],186:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13700,7 +18728,7 @@ function isDate(value) { module.exports = isDate; -},{}],150:[function(require,module,exports){ +},{}],187:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13729,7 +18757,7 @@ function isElement(value) { module.exports = isElement; -},{}],151:[function(require,module,exports){ +},{}],188:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13794,7 +18822,7 @@ function isEmpty(value) { module.exports = isEmpty; -},{"./forOwn":141,"./isFunction":154}],152:[function(require,module,exports){ +},{"./forOwn":178,"./isFunction":191}],189:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13850,7 +18878,7 @@ function isEqual(a, b, callback, thisArg) { module.exports = isEqual; -},{"../internals/baseCreateCallback":92,"../internals/baseIsEqual":97}],153:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129,"../internals/baseIsEqual":134}],190:[function(require,module,exports){ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};/** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13898,7 +18926,7 @@ function isFinite(value) { module.exports = isFinite; -},{}],154:[function(require,module,exports){ +},{}],191:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13927,7 +18955,7 @@ function isFunction(value) { module.exports = isFunction; -},{}],155:[function(require,module,exports){ +},{}],192:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -13971,7 +18999,7 @@ function isNaN(value) { module.exports = isNaN; -},{"./isNumber":157}],156:[function(require,module,exports){ +},{"./isNumber":194}],193:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14003,7 +19031,7 @@ function isNull(value) { module.exports = isNull; -},{}],157:[function(require,module,exports){ +},{}],194:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14044,7 +19072,7 @@ function isNumber(value) { module.exports = isNumber; -},{}],158:[function(require,module,exports){ +},{}],195:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14085,7 +19113,7 @@ function isObject(value) { module.exports = isObject; -},{"../internals/objectTypes":120}],159:[function(require,module,exports){ +},{"../internals/objectTypes":157}],196:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14147,7 +19175,7 @@ var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { module.exports = isPlainObject; -},{"../internals/isNative":114,"../internals/shimIsPlainObject":127}],160:[function(require,module,exports){ +},{"../internals/isNative":151,"../internals/shimIsPlainObject":164}],197:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14185,7 +19213,7 @@ function isRegExp(value) { module.exports = isRegExp; -},{}],161:[function(require,module,exports){ +},{}],198:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14224,7 +19252,7 @@ function isString(value) { module.exports = isString; -},{}],162:[function(require,module,exports){ +},{}],199:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14253,7 +19281,7 @@ function isUndefined(value) { module.exports = isUndefined; -},{}],163:[function(require,module,exports){ +},{}],200:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14291,7 +19319,7 @@ var keys = !nativeKeys ? shimKeys : function(object) { module.exports = keys; -},{"../internals/isNative":114,"../internals/shimKeys":128,"./isObject":158}],164:[function(require,module,exports){ +},{"../internals/isNative":151,"../internals/shimKeys":165,"./isObject":195}],201:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14351,7 +19379,7 @@ function mapValues(object, callback, thisArg) { module.exports = mapValues; -},{"../functions/createCallback":76,"./forOwn":141}],165:[function(require,module,exports){ +},{"../functions/createCallback":113,"./forOwn":178}],202:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14450,7 +19478,7 @@ function merge(object) { module.exports = merge; -},{"../internals/baseCreateCallback":92,"../internals/baseMerge":98,"../internals/getArray":110,"../internals/releaseArray":124,"../internals/slice":129,"./isObject":158}],166:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129,"../internals/baseMerge":135,"../internals/getArray":147,"../internals/releaseArray":161,"../internals/slice":166,"./isObject":195}],203:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14519,7 +19547,7 @@ function omit(object, callback, thisArg) { module.exports = omit; -},{"../functions/createCallback":76,"../internals/baseDifference":94,"../internals/baseFlatten":95,"./forIn":139}],167:[function(require,module,exports){ +},{"../functions/createCallback":113,"../internals/baseDifference":131,"../internals/baseFlatten":132,"./forIn":176}],204:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14559,7 +19587,7 @@ function pairs(object) { module.exports = pairs; -},{"./keys":163}],168:[function(require,module,exports){ +},{"./keys":200}],205:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14626,7 +19654,7 @@ function pick(object, callback, thisArg) { module.exports = pick; -},{"../functions/createCallback":76,"../internals/baseFlatten":95,"./forIn":139,"./isObject":158}],169:[function(require,module,exports){ +},{"../functions/createCallback":113,"../internals/baseFlatten":132,"./forIn":176,"./isObject":195}],206:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14695,7 +19723,7 @@ function transform(object, callback, accumulator, thisArg) { module.exports = transform; -},{"../collections/forEach":51,"../functions/createCallback":76,"../internals/baseCreate":91,"./forOwn":141,"./isArray":147}],170:[function(require,module,exports){ +},{"../collections/forEach":88,"../functions/createCallback":113,"../internals/baseCreate":128,"./forOwn":178,"./isArray":184}],207:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14733,7 +19761,7 @@ function values(object) { module.exports = values; -},{"./keys":163}],171:[function(require,module,exports){ +},{"./keys":200}],208:[function(require,module,exports){ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};/** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14775,7 +19803,7 @@ support.funcNames = typeof Function.name == 'string'; module.exports = support; -},{"./internals/isNative":114}],172:[function(require,module,exports){ +},{"./internals/isNative":151}],209:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14805,7 +19833,7 @@ module.exports = { 'uniqueId': require('./utilities/uniqueId') }; -},{"./functions/createCallback":76,"./utilities/constant":173,"./utilities/escape":174,"./utilities/identity":175,"./utilities/mixin":176,"./utilities/noConflict":177,"./utilities/noop":178,"./utilities/now":179,"./utilities/parseInt":180,"./utilities/property":181,"./utilities/random":182,"./utilities/result":183,"./utilities/template":184,"./utilities/templateSettings":185,"./utilities/times":186,"./utilities/unescape":187,"./utilities/uniqueId":188}],173:[function(require,module,exports){ +},{"./functions/createCallback":113,"./utilities/constant":210,"./utilities/escape":211,"./utilities/identity":212,"./utilities/mixin":213,"./utilities/noConflict":214,"./utilities/noop":215,"./utilities/now":216,"./utilities/parseInt":217,"./utilities/property":218,"./utilities/random":219,"./utilities/result":220,"./utilities/template":221,"./utilities/templateSettings":222,"./utilities/times":223,"./utilities/unescape":224,"./utilities/uniqueId":225}],210:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14838,7 +19866,7 @@ function constant(value) { module.exports = constant; -},{}],174:[function(require,module,exports){ +},{}],211:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14871,7 +19899,7 @@ function escape(string) { module.exports = escape; -},{"../internals/escapeHtmlChar":108,"../internals/reUnescapedHtml":123,"../objects/keys":163}],175:[function(require,module,exports){ +},{"../internals/escapeHtmlChar":145,"../internals/reUnescapedHtml":160,"../objects/keys":200}],212:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14901,7 +19929,7 @@ function identity(value) { module.exports = identity; -},{}],176:[function(require,module,exports){ +},{}],213:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -14991,7 +20019,7 @@ function mixin(object, source, options) { module.exports = mixin; -},{"../collections/forEach":51,"../objects/functions":143,"../objects/isFunction":154,"../objects/isObject":158}],177:[function(require,module,exports){ +},{"../collections/forEach":88,"../objects/functions":180,"../objects/isFunction":191,"../objects/isObject":195}],214:[function(require,module,exports){ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};/** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15023,7 +20051,7 @@ function noConflict() { module.exports = noConflict; -},{}],178:[function(require,module,exports){ +},{}],215:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15051,7 +20079,7 @@ function noop() { module.exports = noop; -},{}],179:[function(require,module,exports){ +},{}],216:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15081,7 +20109,7 @@ var now = isNative(now = Date.now) && now || function() { module.exports = now; -},{"../internals/isNative":114}],180:[function(require,module,exports){ +},{"../internals/isNative":151}],217:[function(require,module,exports){ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};/** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15136,7 +20164,7 @@ var parseInt = nativeParseInt(whitespace + '08') == 8 ? nativeParseInt : functio module.exports = parseInt; -},{"../objects/isString":161}],181:[function(require,module,exports){ +},{"../objects/isString":198}],218:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15178,7 +20206,7 @@ function property(key) { module.exports = property; -},{}],182:[function(require,module,exports){ +},{}],219:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15253,7 +20281,7 @@ function random(min, max, floating) { module.exports = random; -},{"../internals/baseRandom":99}],183:[function(require,module,exports){ +},{"../internals/baseRandom":136}],220:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15300,7 +20328,7 @@ function result(object, key) { module.exports = result; -},{"../objects/isFunction":154}],184:[function(require,module,exports){ +},{"../objects/isFunction":191}],221:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15518,7 +20546,7 @@ function template(text, data, options) { module.exports = template; -},{"../internals/escapeStringChar":109,"../internals/reInterpolate":122,"../objects/defaults":136,"../objects/keys":163,"../objects/values":170,"./escape":174,"./templateSettings":185}],185:[function(require,module,exports){ +},{"../internals/escapeStringChar":146,"../internals/reInterpolate":159,"../objects/defaults":173,"../objects/keys":200,"../objects/values":207,"./escape":211,"./templateSettings":222}],222:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15593,7 +20621,7 @@ var templateSettings = { module.exports = templateSettings; -},{"../internals/reInterpolate":122,"./escape":174}],186:[function(require,module,exports){ +},{"../internals/reInterpolate":159,"./escape":211}],223:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15641,7 +20669,7 @@ function times(n, callback, thisArg) { module.exports = times; -},{"../internals/baseCreateCallback":92}],187:[function(require,module,exports){ +},{"../internals/baseCreateCallback":129}],224:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15675,7 +20703,7 @@ function unescape(string) { module.exports = unescape; -},{"../internals/reEscapedHtml":121,"../internals/unescapeHtmlChar":130,"../objects/keys":163}],188:[function(require,module,exports){ +},{"../internals/reEscapedHtml":158,"../internals/unescapeHtmlChar":167,"../objects/keys":200}],225:[function(require,module,exports){ /** * Lo-Dash 2.4.1 (Custom Build) * Build: `lodash modularize modern exports="node" -o ./modern/` @@ -15711,961 +20739,7 @@ function uniqueId(prefix) { module.exports = uniqueId; -},{}],189:[function(require,module,exports){ -var process=require("__browserify_process");/** @license MIT License (c) copyright 2011-2013 original author or authors */ - -/** - * A lightweight CommonJS Promises/A and when() implementation - * when is part of the cujo.js family of libraries (http://cujojs.com/) - * - * Licensed under the MIT License at: - * http://www.opensource.org/licenses/mit-license.php - * - * @author Brian Cavalier - * @author John Hann - * @version 2.6.0 - */ -(function(define, global) { 'use strict'; -define(function (require) { - - // Public API - - when.promise = promise; // Create a pending promise - when.resolve = resolve; // Create a resolved promise - when.reject = reject; // Create a rejected promise - when.defer = defer; // Create a {promise, resolver} pair - - when.join = join; // Join 2 or more promises - - when.all = all; // Resolve a list of promises - when.map = map; // Array.map() for promises - when.reduce = reduce; // Array.reduce() for promises - when.settle = settle; // Settle a list of promises - - when.any = any; // One-winner race - when.some = some; // Multi-winner race - - when.isPromise = isPromiseLike; // DEPRECATED: use isPromiseLike - when.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable - - /** - * Register an observer for a promise or immediate value. - * - * @param {*} promiseOrValue - * @param {function?} [onFulfilled] callback to be called when promiseOrValue is - * successfully fulfilled. If promiseOrValue is an immediate value, callback - * will be invoked immediately. - * @param {function?} [onRejected] callback to be called when promiseOrValue is - * rejected. - * @param {function?} [onProgress] callback to be called when progress updates - * are issued for promiseOrValue. - * @returns {Promise} a new {@link Promise} that will complete with the return - * value of callback or errback or the completion value of promiseOrValue if - * callback and/or errback is not supplied. - */ - function when(promiseOrValue, onFulfilled, onRejected, onProgress) { - // Get a trusted promise for the input promiseOrValue, and then - // register promise handlers - return cast(promiseOrValue).then(onFulfilled, onRejected, onProgress); - } - - function cast(x) { - return x instanceof Promise ? x : resolve(x); - } - - /** - * Trusted Promise constructor. A Promise created from this constructor is - * a trusted when.js promise. Any other duck-typed promise is considered - * untrusted. - * @constructor - * @param {function} sendMessage function to deliver messages to the promise's handler - * @param {function?} inspect function that reports the promise's state - * @name Promise - */ - function Promise(sendMessage, inspect) { - this._message = sendMessage; - this.inspect = inspect; - } - - Promise.prototype = { - /** - * Register handlers for this promise. - * @param [onFulfilled] {Function} fulfillment handler - * @param [onRejected] {Function} rejection handler - * @param [onProgress] {Function} progress handler - * @return {Promise} new Promise - */ - then: function(onFulfilled, onRejected, onProgress) { - /*jshint unused:false*/ - var args, sendMessage; - - args = arguments; - sendMessage = this._message; - - return _promise(function(resolve, reject, notify) { - sendMessage('when', args, resolve, notify); - }, this._status && this._status.observed()); - }, - - /** - * Register a rejection handler. Shortcut for .then(undefined, onRejected) - * @param {function?} onRejected - * @return {Promise} - */ - otherwise: function(onRejected) { - return this.then(undef, onRejected); - }, - - /** - * Ensures that onFulfilledOrRejected will be called regardless of whether - * this promise is fulfilled or rejected. onFulfilledOrRejected WILL NOT - * receive the promises' value or reason. Any returned value will be disregarded. - * onFulfilledOrRejected may throw or return a rejected promise to signal - * an additional error. - * @param {function} onFulfilledOrRejected handler to be called regardless of - * fulfillment or rejection - * @returns {Promise} - */ - ensure: function(onFulfilledOrRejected) { - return typeof onFulfilledOrRejected === 'function' - ? this.then(injectHandler, injectHandler)['yield'](this) - : this; - - function injectHandler() { - return resolve(onFulfilledOrRejected()); - } - }, - - /** - * Terminate a promise chain by handling the ultimate fulfillment value or - * rejection reason, and assuming responsibility for all errors. if an - * error propagates out of handleResult or handleFatalError, it will be - * rethrown to the host, resulting in a loud stack track on most platforms - * and a crash on some. - * @param {function?} handleResult - * @param {function?} handleError - * @returns {undefined} - */ - done: function(handleResult, handleError) { - this.then(handleResult, handleError).otherwise(crash); - }, - - /** - * Shortcut for .then(function() { return value; }) - * @param {*} value - * @return {Promise} a promise that: - * - is fulfilled if value is not a promise, or - * - if value is a promise, will fulfill with its value, or reject - * with its reason. - */ - 'yield': function(value) { - return this.then(function() { - return value; - }); - }, - - /** - * Runs a side effect when this promise fulfills, without changing the - * fulfillment value. - * @param {function} onFulfilledSideEffect - * @returns {Promise} - */ - tap: function(onFulfilledSideEffect) { - return this.then(onFulfilledSideEffect)['yield'](this); - }, - - /** - * Assumes that this promise will fulfill with an array, and arranges - * for the onFulfilled to be called with the array as its argument list - * i.e. onFulfilled.apply(undefined, array). - * @param {function} onFulfilled function to receive spread arguments - * @return {Promise} - */ - spread: function(onFulfilled) { - return this.then(function(array) { - // array may contain promises, so resolve its contents. - return all(array, function(array) { - return onFulfilled.apply(undef, array); - }); - }); - }, - - /** - * Shortcut for .then(onFulfilledOrRejected, onFulfilledOrRejected) - * @deprecated - */ - always: function(onFulfilledOrRejected, onProgress) { - return this.then(onFulfilledOrRejected, onFulfilledOrRejected, onProgress); - } - }; - - /** - * Returns a resolved promise. The returned promise will be - * - fulfilled with promiseOrValue if it is a value, or - * - if promiseOrValue is a promise - * - fulfilled with promiseOrValue's value after it is fulfilled - * - rejected with promiseOrValue's reason after it is rejected - * @param {*} value - * @return {Promise} - */ - function resolve(value) { - return promise(function(resolve) { - resolve(value); - }); - } - - /** - * Returns a rejected promise for the supplied promiseOrValue. The returned - * promise will be rejected with: - * - promiseOrValue, if it is a value, or - * - if promiseOrValue is a promise - * - promiseOrValue's value after it is fulfilled - * - promiseOrValue's reason after it is rejected - * @param {*} promiseOrValue the rejected value of the returned {@link Promise} - * @return {Promise} rejected {@link Promise} - */ - function reject(promiseOrValue) { - return when(promiseOrValue, rejected); - } - - /** - * Creates a {promise, resolver} pair, either or both of which - * may be given out safely to consumers. - * The resolver has resolve, reject, and progress. The promise - * has then plus extended promise API. - * - * @return {{ - * promise: Promise, - * resolve: function:Promise, - * reject: function:Promise, - * notify: function:Promise - * resolver: { - * resolve: function:Promise, - * reject: function:Promise, - * notify: function:Promise - * }}} - */ - function defer() { - var deferred, pending, resolved; - - // Optimize object shape - deferred = { - promise: undef, resolve: undef, reject: undef, notify: undef, - resolver: { resolve: undef, reject: undef, notify: undef } - }; - - deferred.promise = pending = promise(makeDeferred); - - return deferred; - - function makeDeferred(resolvePending, rejectPending, notifyPending) { - deferred.resolve = deferred.resolver.resolve = function(value) { - if(resolved) { - return resolve(value); - } - resolved = true; - resolvePending(value); - return pending; - }; - - deferred.reject = deferred.resolver.reject = function(reason) { - if(resolved) { - return resolve(rejected(reason)); - } - resolved = true; - rejectPending(reason); - return pending; - }; - - deferred.notify = deferred.resolver.notify = function(update) { - notifyPending(update); - return update; - }; - } - } - - /** - * Creates a new promise whose fate is determined by resolver. - * @param {function} resolver function(resolve, reject, notify) - * @returns {Promise} promise whose fate is determine by resolver - */ - function promise(resolver) { - return _promise(resolver, monitorApi.PromiseStatus && monitorApi.PromiseStatus()); - } - - /** - * Creates a new promise, linked to parent, whose fate is determined - * by resolver. - * @param {function} resolver function(resolve, reject, notify) - * @param {Promise?} status promise from which the new promise is begotten - * @returns {Promise} promise whose fate is determine by resolver - * @private - */ - function _promise(resolver, status) { - var self, value, consumers = []; - - self = new Promise(_message, inspect); - self._status = status; - - // Call the provider resolver to seal the promise's fate - try { - resolver(promiseResolve, promiseReject, promiseNotify); - } catch(e) { - promiseReject(e); - } - - // Return the promise - return self; - - /** - * Private message delivery. Queues and delivers messages to - * the promise's ultimate fulfillment value or rejection reason. - * @private - * @param {String} type - * @param {Array} args - * @param {Function} resolve - * @param {Function} notify - */ - function _message(type, args, resolve, notify) { - consumers ? consumers.push(deliver) : enqueue(function() { deliver(value); }); - - function deliver(p) { - p._message(type, args, resolve, notify); - } - } - - /** - * Returns a snapshot of the promise's state at the instant inspect() - * is called. The returned object is not live and will not update as - * the promise's state changes. - * @returns {{ state:String, value?:*, reason?:* }} status snapshot - * of the promise. - */ - function inspect() { - return value ? value.inspect() : toPendingState(); - } - - /** - * Transition from pre-resolution state to post-resolution state, notifying - * all listeners of the ultimate fulfillment or rejection - * @param {*|Promise} val resolution value - */ - function promiseResolve(val) { - if(!consumers) { - return; - } - - var queue = consumers; - consumers = undef; - - enqueue(function () { - value = coerce(self, val); - if(status) { - updateStatus(value, status); - } - runHandlers(queue, value); - }); - - } - - /** - * Reject this promise with the supplied reason, which will be used verbatim. - * @param {*} reason reason for the rejection - */ - function promiseReject(reason) { - promiseResolve(rejected(reason)); - } - - /** - * Issue a progress event, notifying all progress listeners - * @param {*} update progress event payload to pass to all listeners - */ - function promiseNotify(update) { - if(consumers) { - var queue = consumers; - enqueue(function () { - runHandlers(queue, progressed(update)); - }); - } - } - } - - /** - * Run a queue of functions as quickly as possible, passing - * value to each. - */ - function runHandlers(queue, value) { - for (var i = 0; i < queue.length; i++) { - queue[i](value); - } - } - - /** - * Creates a fulfilled, local promise as a proxy for a value - * NOTE: must never be exposed - * @param {*} value fulfillment value - * @returns {Promise} - */ - function fulfilled(value) { - return near( - new NearFulfilledProxy(value), - function() { return toFulfilledState(value); } - ); - } - - /** - * Creates a rejected, local promise with the supplied reason - * NOTE: must never be exposed - * @param {*} reason rejection reason - * @returns {Promise} - */ - function rejected(reason) { - return near( - new NearRejectedProxy(reason), - function() { return toRejectedState(reason); } - ); - } - - /** - * Creates a near promise using the provided proxy - * NOTE: must never be exposed - * @param {object} proxy proxy for the promise's ultimate value or reason - * @param {function} inspect function that returns a snapshot of the - * returned near promise's state - * @returns {Promise} - */ - function near(proxy, inspect) { - return new Promise(function (type, args, resolve) { - try { - resolve(proxy[type].apply(proxy, args)); - } catch(e) { - resolve(rejected(e)); - } - }, inspect); - } - - /** - * Create a progress promise with the supplied update. - * @private - * @param {*} update - * @return {Promise} progress promise - */ - function progressed(update) { - return new Promise(function (type, args, _, notify) { - var onProgress = args[2]; - try { - notify(typeof onProgress === 'function' ? onProgress(update) : update); - } catch(e) { - notify(e); - } - }); - } - - /** - * Coerces x to a trusted Promise - * @param {*} x thing to coerce - * @returns {*} Guaranteed to return a trusted Promise. If x - * is trusted, returns x, otherwise, returns a new, trusted, already-resolved - * Promise whose resolution value is: - * * the resolution value of x if it's a foreign promise, or - * * x if it's a value - */ - function coerce(self, x) { - if (x === self) { - return rejected(new TypeError()); - } - - if (x instanceof Promise) { - return x; - } - - try { - var untrustedThen = x === Object(x) && x.then; - - return typeof untrustedThen === 'function' - ? assimilate(untrustedThen, x) - : fulfilled(x); - } catch(e) { - return rejected(e); - } - } - - /** - * Safely assimilates a foreign thenable by wrapping it in a trusted promise - * @param {function} untrustedThen x's then() method - * @param {object|function} x thenable - * @returns {Promise} - */ - function assimilate(untrustedThen, x) { - return promise(function (resolve, reject) { - fcall(untrustedThen, x, resolve, reject); - }); - } - - /** - * Proxy for a near, fulfilled value - * @param {*} value - * @constructor - */ - function NearFulfilledProxy(value) { - this.value = value; - } - - NearFulfilledProxy.prototype.when = function(onResult) { - return typeof onResult === 'function' ? onResult(this.value) : this.value; - }; - - /** - * Proxy for a near rejection - * @param {*} reason - * @constructor - */ - function NearRejectedProxy(reason) { - this.reason = reason; - } - - NearRejectedProxy.prototype.when = function(_, onError) { - if(typeof onError === 'function') { - return onError(this.reason); - } else { - throw this.reason; - } - }; - - function updateStatus(value, status) { - value.then(statusFulfilled, statusRejected); - - function statusFulfilled() { status.fulfilled(); } - function statusRejected(r) { status.rejected(r); } - } - - /** - * Determines if x is promise-like, i.e. a thenable object - * NOTE: Will return true for *any thenable object*, and isn't truly - * safe, since it may attempt to access the `then` property of x (i.e. - * clever/malicious getters may do weird things) - * @param {*} x anything - * @returns {boolean} true if x is promise-like - */ - function isPromiseLike(x) { - return x && typeof x.then === 'function'; - } - - /** - * Initiates a competitive race, returning a promise that will resolve when - * howMany of the supplied promisesOrValues have resolved, or will reject when - * it becomes impossible for howMany to resolve, for example, when - * (promisesOrValues.length - howMany) + 1 input promises reject. - * - * @param {Array} promisesOrValues array of anything, may contain a mix - * of promises and values - * @param howMany {number} number of promisesOrValues to resolve - * @param {function?} [onFulfilled] DEPRECATED, use returnedPromise.then() - * @param {function?} [onRejected] DEPRECATED, use returnedPromise.then() - * @param {function?} [onProgress] DEPRECATED, use returnedPromise.then() - * @returns {Promise} promise that will resolve to an array of howMany values that - * resolved first, or will reject with an array of - * (promisesOrValues.length - howMany) + 1 rejection reasons. - */ - function some(promisesOrValues, howMany, onFulfilled, onRejected, onProgress) { - - return when(promisesOrValues, function(promisesOrValues) { - - return promise(resolveSome).then(onFulfilled, onRejected, onProgress); - - function resolveSome(resolve, reject, notify) { - var toResolve, toReject, values, reasons, fulfillOne, rejectOne, len, i; - - len = promisesOrValues.length >>> 0; - - toResolve = Math.max(0, Math.min(howMany, len)); - values = []; - - toReject = (len - toResolve) + 1; - reasons = []; - - // No items in the input, resolve immediately - if (!toResolve) { - resolve(values); - - } else { - rejectOne = function(reason) { - reasons.push(reason); - if(!--toReject) { - fulfillOne = rejectOne = identity; - reject(reasons); - } - }; - - fulfillOne = function(val) { - // This orders the values based on promise resolution order - values.push(val); - if (!--toResolve) { - fulfillOne = rejectOne = identity; - resolve(values); - } - }; - - for(i = 0; i < len; ++i) { - if(i in promisesOrValues) { - when(promisesOrValues[i], fulfiller, rejecter, notify); - } - } - } - - function rejecter(reason) { - rejectOne(reason); - } - - function fulfiller(val) { - fulfillOne(val); - } - } - }); - } - - /** - * Initiates a competitive race, returning a promise that will resolve when - * any one of the supplied promisesOrValues has resolved or will reject when - * *all* promisesOrValues have rejected. - * - * @param {Array|Promise} promisesOrValues array of anything, may contain a mix - * of {@link Promise}s and values - * @param {function?} [onFulfilled] DEPRECATED, use returnedPromise.then() - * @param {function?} [onRejected] DEPRECATED, use returnedPromise.then() - * @param {function?} [onProgress] DEPRECATED, use returnedPromise.then() - * @returns {Promise} promise that will resolve to the value that resolved first, or - * will reject with an array of all rejected inputs. - */ - function any(promisesOrValues, onFulfilled, onRejected, onProgress) { - - function unwrapSingleResult(val) { - return onFulfilled ? onFulfilled(val[0]) : val[0]; - } - - return some(promisesOrValues, 1, unwrapSingleResult, onRejected, onProgress); - } - - /** - * Return a promise that will resolve only once all the supplied promisesOrValues - * have resolved. The resolution value of the returned promise will be an array - * containing the resolution values of each of the promisesOrValues. - * @memberOf when - * - * @param {Array|Promise} promisesOrValues array of anything, may contain a mix - * of {@link Promise}s and values - * @param {function?} [onFulfilled] DEPRECATED, use returnedPromise.then() - * @param {function?} [onRejected] DEPRECATED, use returnedPromise.then() - * @param {function?} [onProgress] DEPRECATED, use returnedPromise.then() - * @returns {Promise} - */ - function all(promisesOrValues, onFulfilled, onRejected, onProgress) { - return _map(promisesOrValues, identity).then(onFulfilled, onRejected, onProgress); - } - - /** - * Joins multiple promises into a single returned promise. - * @return {Promise} a promise that will fulfill when *all* the input promises - * have fulfilled, or will reject when *any one* of the input promises rejects. - */ - function join(/* ...promises */) { - return _map(arguments, identity); - } - - /** - * Settles all input promises such that they are guaranteed not to - * be pending once the returned promise fulfills. The returned promise - * will always fulfill, except in the case where `array` is a promise - * that rejects. - * @param {Array|Promise} array or promise for array of promises to settle - * @returns {Promise} promise that always fulfills with an array of - * outcome snapshots for each input promise. - */ - function settle(array) { - return _map(array, toFulfilledState, toRejectedState); - } - - /** - * Promise-aware array map function, similar to `Array.prototype.map()`, - * but input array may contain promises or values. - * @param {Array|Promise} array array of anything, may contain promises and values - * @param {function} mapFunc map function which may return a promise or value - * @returns {Promise} promise that will fulfill with an array of mapped values - * or reject if any input promise rejects. - */ - function map(array, mapFunc) { - return _map(array, mapFunc); - } - - /** - * Internal map that allows a fallback to handle rejections - * @param {Array|Promise} array array of anything, may contain promises and values - * @param {function} mapFunc map function which may return a promise or value - * @param {function?} fallback function to handle rejected promises - * @returns {Promise} promise that will fulfill with an array of mapped values - * or reject if any input promise rejects. - */ - function _map(array, mapFunc, fallback) { - return when(array, function(array) { - - return _promise(resolveMap); - - function resolveMap(resolve, reject, notify) { - var results, len, toResolve, i; - - // Since we know the resulting length, we can preallocate the results - // array to avoid array expansions. - toResolve = len = array.length >>> 0; - results = []; - - if(!toResolve) { - resolve(results); - return; - } - - // Since mapFunc may be async, get all invocations of it into flight - for(i = 0; i < len; i++) { - if(i in array) { - resolveOne(array[i], i); - } else { - --toResolve; - } - } - - function resolveOne(item, i) { - when(item, mapFunc, fallback).then(function(mapped) { - results[i] = mapped; - - if(!--toResolve) { - resolve(results); - } - }, reject, notify); - } - } - }); - } - - /** - * Traditional reduce function, similar to `Array.prototype.reduce()`, but - * input may contain promises and/or values, and reduceFunc - * may return either a value or a promise, *and* initialValue may - * be a promise for the starting value. - * - * @param {Array|Promise} promise array or promise for an array of anything, - * may contain a mix of promises and values. - * @param {function} reduceFunc reduce function reduce(currentValue, nextValue, index, total), - * where total is the total number of items being reduced, and will be the same - * in each call to reduceFunc. - * @returns {Promise} that will resolve to the final reduced value - */ - function reduce(promise, reduceFunc /*, initialValue */) { - var args = fcall(slice, arguments, 1); - - return when(promise, function(array) { - var total; - - total = array.length; - - // Wrap the supplied reduceFunc with one that handles promises and then - // delegates to the supplied. - args[0] = function (current, val, i) { - return when(current, function (c) { - return when(val, function (value) { - return reduceFunc(c, value, i, total); - }); - }); - }; - - return reduceArray.apply(array, args); - }); - } - - // Snapshot states - - /** - * Creates a fulfilled state snapshot - * @private - * @param {*} x any value - * @returns {{state:'fulfilled',value:*}} - */ - function toFulfilledState(x) { - return { state: 'fulfilled', value: x }; - } - - /** - * Creates a rejected state snapshot - * @private - * @param {*} x any reason - * @returns {{state:'rejected',reason:*}} - */ - function toRejectedState(x) { - return { state: 'rejected', reason: x }; - } - - /** - * Creates a pending state snapshot - * @private - * @returns {{state:'pending'}} - */ - function toPendingState() { - return { state: 'pending' }; - } - - // - // Internals, utilities, etc. - // - - var reduceArray, slice, fcall, nextTick, handlerQueue, - setTimeout, funcProto, call, arrayProto, monitorApi, - cjsRequire, MutationObserver, undef; - - cjsRequire = require; - - // - // Shared handler queue processing - // - // Credit to Twisol (https://github.com/Twisol) for suggesting - // this type of extensible queue + trampoline approach for - // next-tick conflation. - - handlerQueue = []; - - /** - * Enqueue a task. If the queue is not currently scheduled to be - * drained, schedule it. - * @param {function} task - */ - function enqueue(task) { - if(handlerQueue.push(task) === 1) { - nextTick(drainQueue); - } - } - - /** - * Drain the handler queue entirely, being careful to allow the - * queue to be extended while it is being processed, and to continue - * processing until it is truly empty. - */ - function drainQueue() { - runHandlers(handlerQueue); - handlerQueue = []; - } - - // capture setTimeout to avoid being caught by fake timers - // used in time based tests - setTimeout = global.setTimeout; - - // Allow attaching the monitor to when() if env has no console - monitorApi = typeof console !== 'undefined' ? console : when; - - // Sniff "best" async scheduling option - // Prefer process.nextTick or MutationObserver, then check for - // vertx and finally fall back to setTimeout - /*global process*/ - if (typeof process === 'object' && process.nextTick) { - nextTick = process.nextTick; - } else if(MutationObserver = global.MutationObserver || global.WebKitMutationObserver) { - nextTick = (function(document, MutationObserver, drainQueue) { - var el = document.createElement('div'); - new MutationObserver(drainQueue).observe(el, { attributes: true }); - - return function() { - el.setAttribute('x', 'x'); - }; - }(document, MutationObserver, drainQueue)); - } else { - try { - // vert.x 1.x || 2.x - nextTick = cjsRequire('vertx').runOnLoop || cjsRequire('vertx').runOnContext; - } catch(ignore) { - nextTick = function(t) { setTimeout(t, 0); }; - } - } - - // - // Capture/polyfill function and array utils - // - - // Safe function calls - funcProto = Function.prototype; - call = funcProto.call; - fcall = funcProto.bind - ? call.bind(call) - : function(f, context) { - return f.apply(context, slice.call(arguments, 2)); - }; - - // Safe array ops - arrayProto = []; - slice = arrayProto.slice; - - // ES5 reduce implementation if native not available - // See: http://es5.github.com/#x15.4.4.21 as there are many - // specifics and edge cases. ES5 dictates that reduce.length === 1 - // This implementation deviates from ES5 spec in the following ways: - // 1. It does not check if reduceFunc is a Callable - reduceArray = arrayProto.reduce || - function(reduceFunc /*, initialValue */) { - /*jshint maxcomplexity: 7*/ - var arr, args, reduced, len, i; - - i = 0; - arr = Object(this); - len = arr.length >>> 0; - args = arguments; - - // If no initialValue, use first item of array (we know length !== 0 here) - // and adjust i to start at second item - if(args.length <= 1) { - // Skip to the first real element in the array - for(;;) { - if(i in arr) { - reduced = arr[i++]; - break; - } - - // If we reached the end of the array without finding any real - // elements, it's a TypeError - if(++i >= len) { - throw new TypeError(); - } - } - } else { - // If initialValue provided, use it - reduced = args[1]; - } - - // Do the actual reduce - for(;i < len; ++i) { - if(i in arr) { - reduced = reduceFunc(reduced, arr[i], i, arr); - } - } - - return reduced; - }; - - function identity(x) { - return x; - } - - function crash(fatalError) { - if(typeof monitorApi.reportUnhandled === 'function') { - monitorApi.reportUnhandled(); - } else { - enqueue(function() { - throw fatalError; - }); - } - - throw fatalError; - } - - return when; -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }, this); - -},{"__browserify_process":13}],190:[function(require,module,exports){ +},{}],226:[function(require,module,exports){ // In order to help people who were accidentally upgraded to this ES client, // throw an error when they try to instanciate the exported function. // previous "elasticsearch" module -> https://github.com/ncb000gt/node-es @@ -16682,7 +20756,7 @@ es.errors = require('./lib/errors'); module.exports = es; -},{"./lib/client":194,"./lib/connection_pool":197,"./lib/errors":200,"./lib/transport":211}],191:[function(require,module,exports){ +},{"./lib/client":231,"./lib/connection_pool":234,"./lib/errors":237,"./lib/transport":248}],227:[function(require,module,exports){ /* jshint maxlen: false */ var ca = require('../client_action'); @@ -19952,7 +24026,7 @@ api.create = ca.proxy(api.index, { params.op_type = 'create'; } }); -},{"../client_action":195}],192:[function(require,module,exports){ +},{"../client_action":232}],228:[function(require,module,exports){ /* jshint maxlen: false */ var ca = require('../client_action'); @@ -20569,14 +24643,19 @@ api.cat.prototype.threadPool = ca({ * @param {String, String[], Boolean} params.scrollId - A comma-separated list of scroll IDs to clear */ api.clearScroll = ca({ - url: { - fmt: '/_search/scroll/<%=scrollId%>', - req: { - scrollId: { - type: 'list' + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'list' + } } + }, + { + fmt: '/_search/scroll' } - }, + ], method: 'DELETE' }); @@ -23213,7 +27292,7 @@ api.indices.prototype.segments = ca({ }); /** - * Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-gateway-snapshot.html) request + * Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-gateway-snapshot.html) request * * @param {Object} params - An object with parameters used to carry out this action * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -24629,6 +28708,75 @@ api.search = ca({ method: 'POST' }); +/** + * Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search_shards', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + api.snapshot = function SnapshotNS(transport) { this.transport = transport; }; @@ -25111,14 +29259,5417 @@ api.create = ca.proxy(api.index, { params.op_type = 'create'; } }); -},{"../client_action":195}],193:[function(require,module,exports){ -module.exports = { - '1.0': require('./1_0'), - '0.90': require('./0_90'), - _default: '0.90' +},{"../client_action":232}],229:[function(require,module,exports){ +/* jshint maxlen: false */ + +var ca = require('../client_action'); +var api = module.exports = {}; + +api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot']; + +/** + * Perform a [bulk](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-bulk.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Explicitely set the replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String} params.type - Default document type for items which don't provide one + * @param {String} params.index - Default index for items which don't provide one + */ +api.bulk = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + type: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_bulk', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_bulk', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_bulk' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +api.cat = function CatNS(transport) { + this.transport = transport; }; -},{"./0_90":191,"./1_0":192}],194:[function(require,module,exports){ +/** + * Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to return + */ +api.cat.prototype.aliases = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/aliases/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_cat/aliases' + } + ] +}); + +/** + * Perform a [cat.allocation](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-allocation.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.bytes - The unit in which to display byte values + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information + */ +api.cat.prototype.allocation = ca({ + params: { + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/allocation/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_cat/allocation' + } + ] +}); + +/** + * Perform a [cat.count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-count.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.count = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/count/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/count' + } + ] +}); + +/** + * Perform a [cat.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-health.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} [params.ts=true] - Set to false to disable timestamping + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.health = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + ts: { + type: 'boolean', + 'default': true + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/health' + } +}); + +/** + * Perform a [cat.help](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.help - Return help information + */ +api.cat.prototype.help = ca({ + params: { + help: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat' + } +}); + +/** + * Perform a [cat.indices](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-indices.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.bytes - The unit in which to display byte values + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.pri - Set to true to return stats only for primary shards + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.indices = ca({ + params: { + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + pri: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/indices/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/indices' + } + ] +}); + +/** + * Perform a [cat.master](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-master.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.master = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/master' + } +}); + +/** + * Perform a [cat.nodes](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-nodes.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.nodes = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/nodes' + } +}); + +/** + * Perform a [cat.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-pending-tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.pendingTasks = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/pending_tasks' + } +}); + +/** + * Perform a [cat.plugins](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-plugins.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.plugins = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/plugins' + } +}); + +/** + * Perform a [cat.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-recovery.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.bytes - The unit in which to display byte values + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.recovery = ca({ + params: { + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/recovery/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/recovery' + } + ] +}); + +/** + * Perform a [cat.shards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.shards = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/shards/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/shards' + } + ] +}); + +/** + * Perform a [cat.threadPool](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-thread-pool.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} params.fullId - Enables displaying the complete node ids + */ +api.cat.prototype.threadPool = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': false + }, + fullId: { + type: 'boolean', + 'default': false, + name: 'full_id' + } + }, + url: { + fmt: '/_cat/thread_pool' + } +}); + +/** + * Perform a [clearScroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.scrollId - A comma-separated list of scroll IDs to clear + */ +api.clearScroll = ca({ + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'list' + } + } + }, + { + fmt: '/_search/scroll' + } + ], + method: 'DELETE' +}); + +api.cluster = function ClusterNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + */ +api.cluster.prototype.getSettings = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_cluster/settings' + } +}); + +/** + * Perform a [cluster.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-health.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} [params.level=cluster] - Specify the level of detail for returned information + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Number} params.waitForActiveShards - Wait until the specified number of shards is active + * @param {String} params.waitForNodes - Wait until the specified number of nodes is available + * @param {Number} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished + * @param {String} params.waitForStatus - Wait until cluster is in a specific state + * @param {String} params.index - Limit the information returned to a specific index + */ +api.cluster.prototype.health = ca({ + params: { + level: { + type: 'enum', + 'default': 'cluster', + options: [ + 'cluster', + 'indices', + 'shards' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + waitForActiveShards: { + type: 'number', + name: 'wait_for_active_shards' + }, + waitForNodes: { + type: 'string', + name: 'wait_for_nodes' + }, + waitForRelocatingShards: { + type: 'number', + name: 'wait_for_relocating_shards' + }, + waitForStatus: { + type: 'enum', + 'default': null, + options: [ + 'green', + 'yellow', + 'red' + ], + name: 'wait_for_status' + } + }, + urls: [ + { + fmt: '/_cluster/health/<%=index%>', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_cluster/health' + } + ] +}); + +/** + * Perform a [cluster.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-pending.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + */ +api.cluster.prototype.pendingTasks = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_cluster/pending_tasks' + } +}); + +/** + * Perform a [cluster.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + */ +api.cluster.prototype.putSettings = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + url: { + fmt: '/_cluster/settings' + }, + method: 'PUT' +}); + +/** + * Perform a [cluster.reroute](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-reroute.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.dryRun - Simulate the operation only and return the resulting state + * @param {Boolean} params.explain - Return an explanation of why the commands can or cannot be executed + * @param {Boolean} params.filterMetadata - Don't return cluster state metadata (default: false) + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + */ +api.cluster.prototype.reroute = ca({ + params: { + dryRun: { + type: 'boolean', + name: 'dry_run' + }, + explain: { + type: 'boolean' + }, + filterMetadata: { + type: 'boolean', + name: 'filter_metadata' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_cluster/reroute' + }, + method: 'POST' +}); + +/** + * Perform a [cluster.state](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-state.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.indexTemplates - A comma separated list to return specific index templates when returning metadata + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.metric - Limit the information returned to the specified metrics + */ +api.cluster.prototype.state = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + indexTemplates: { + type: 'list', + name: 'index_templates' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + urls: [ + { + fmt: '/_cluster/state/<%=metric%>/<%=index%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'master_node', + 'version' + ] + }, + index: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/state/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'master_node', + 'version' + ] + } + } + }, + { + fmt: '/_cluster/state' + } + ] +}); + +/** + * Perform a [cluster.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.cluster.prototype.stats = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + human: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cluster/stats/nodes/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/stats' + } + ] +}); + +/** + * Perform a [count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-count.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Number} params.minScore - Include only documents with a specific `_score` value in the result + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the results + * @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the results + */ +api.count = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + minScore: { + type: 'number', + name: 'min_score' + }, + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_count', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_count', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_count' + } + ], + method: 'POST' +}); + +/** + * Perform a [countPercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.percolateIndex - The index to count percolate the document into. Defaults to index. + * @param {String} params.percolateType - The type to count percolate document into. Defaults to type. + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.index - The index of the document being count percolated. + * @param {String} params.type - The type of the document being count percolated. + * @param {String} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster. + */ +api.countPercolate = ca({ + params: { + routing: { + type: 'list' + }, + preference: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + percolateIndex: { + type: 'string', + name: 'percolate_index' + }, + percolateType: { + type: 'string', + name: 'percolate_type' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>/_percolate/count', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-delete.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Specific write consistency setting for the operation + * @param {String} params.parent - ID of parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api['delete'] = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + parent: { + type: 'string' + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [deleteByQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-delete-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.analyzer - The analyzer to use for the query string + * @param {String} params.consistency - Specific write consistency setting for the operation + * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {String} params.df - The field to use as default where no field prefix is given in the query string + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the operation + */ +api.deleteByQuery = ca({ + params: { + analyzer: { + type: 'string' + }, + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + q: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + }, + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_query', + req: { + index: { + type: 'list' + } + } + } + ], + method: 'DELETE' +}); + +/** + * Perform a [exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.exists = ca({ + params: { + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [explain](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-explain.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) + * @param {String} params.analyzer - The analyzer for the query string query + * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {String} params.df - The default field for query string query (default: _all) + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.explain = ca({ + params: { + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + analyzer: { + type: 'string' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + fields: { + type: 'list' + }, + lenient: { + type: 'boolean' + }, + lowercaseExpandedTerms: { + type: 'boolean', + name: 'lowercase_expanded_terms' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.get = ca({ + params: { + fields: { + type: 'list' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [getSource](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.parent - The ID of the parent document + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types + */ +api.getSource = ca({ + params: { + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_source', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [index](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} params.parent - ID of the parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.timestamp - Explicit timestamp for the document + * @param {Duration} params.ttl - Expiration time for the document + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - Document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.index = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + opType: { + type: 'enum', + 'default': 'index', + options: [ + 'index', + 'create' + ], + name: 'op_type' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + timestamp: { + type: 'time' + }, + ttl: { + type: 'duration' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'POST' +}); + +api.indices = function IndicesNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-analyze.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.analyzer - The name of the analyzer to use + * @param {String} params.field - Use the analyzer configured for this field (instead of passing the analyzer name) + * @param {String, String[], Boolean} params.filters - A comma-separated list of filters to use for the analysis + * @param {String} params.index - The name of the index to scope the operation + * @param {Boolean} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true) + * @param {String} params.text - The text on which the analysis should be performed (when request body is not used) + * @param {String} params.tokenizer - The name of the tokenizer to use for the analysis + * @param {String} [params.format=detailed] - Format of the output + */ +api.indices.prototype.analyze = ca({ + params: { + analyzer: { + type: 'string' + }, + field: { + type: 'string' + }, + filters: { + type: 'list' + }, + index: { + type: 'string' + }, + preferLocal: { + type: 'boolean', + name: 'prefer_local' + }, + text: { + type: 'string' + }, + tokenizer: { + type: 'string' + }, + format: { + type: 'enum', + 'default': 'detailed', + options: [ + 'detailed', + 'text' + ] + } + }, + urls: [ + { + fmt: '/<%=index%>/_analyze', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_analyze' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.clearCache](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-clearcache.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.fieldData - Clear field data + * @param {Boolean} params.fielddata - Clear field data + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all) + * @param {Boolean} params.filter - Clear filter caches + * @param {Boolean} params.filterCache - Clear filter caches + * @param {Boolean} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all) + * @param {Boolean} params.id - Clear ID caches for parent/child + * @param {Boolean} params.idCache - Clear ID caches for parent/child + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index name to limit the operation + * @param {Boolean} params.recycler - Clear the recycler cache + */ +api.indices.prototype.clearCache = ca({ + params: { + fieldData: { + type: 'boolean', + name: 'field_data' + }, + fielddata: { + type: 'boolean' + }, + fields: { + type: 'list' + }, + filter: { + type: 'boolean' + }, + filterCache: { + type: 'boolean', + name: 'filter_cache' + }, + filterKeys: { + type: 'boolean', + name: 'filter_keys' + }, + id: { + type: 'boolean' + }, + idCache: { + type: 'boolean', + name: 'id_cache' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + index: { + type: 'list' + }, + recycler: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_cache/clear', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cache/clear' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.close](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + */ +api.indices.prototype.close = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + url: { + fmt: '/<%=index%>/_close', + req: { + index: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-create-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String} params.index - The name of the index + */ +api.indices.prototype.create = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-delete-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices + */ +api.indices.prototype['delete'] = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit timestamp for the document + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices + * @param {String, String[], Boolean} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. + */ +api.indices.prototype.deleteAlias = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-delete-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices. + */ +api.indices.prototype.deleteMapping = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/_mapping', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String} params.name - The name of the template + */ +api.indices.prototype.deleteTemplate = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices. + */ +api.indices.prototype.deleteWarmer = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + name: { + type: 'list' + } + }, + url: { + fmt: '/<%=index%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of indices to check + */ +api.indices.prototype.exists = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.existsAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to return + */ +api.indices.prototype.existsAlias = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': [ + 'open', + 'closed' + ], + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_alias', + req: { + index: { + type: 'list' + } + } + } + ], + method: 'HEAD' +}); + +/** + * Perform a [indices.existsTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String} params.name - The name of the template + */ +api.indices.prototype.existsTemplate = ca({ + params: { + local: { + type: 'boolean' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.existsType](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-types-exists.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` to check the types across all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to check + */ +api.indices.prototype.existsType = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.flush](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-flush.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) + * @param {Boolean} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + */ +api.indices.prototype.flush = ca({ + params: { + force: { + type: 'boolean' + }, + full: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_flush', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_flush' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.getAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to return + */ +api.indices.prototype.getAlias = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_alias', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_alias' + } + ] +}); + +/** + * Perform a [indices.getAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases + * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to filter + */ +api.indices.prototype.getAliases = ca({ + params: { + timeout: { + type: 'time' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_aliases/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_aliases', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_aliases/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_aliases' + } + ] +}); + +/** + * Perform a [indices.getFieldMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-field-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.includeDefaults - Whether the default mapping values should be returned as well + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names + * @param {String, String[], Boolean} params.type - A comma-separated list of document types + * @param {String, String[], Boolean} params.field - A comma-separated list of fields + */ +api.indices.prototype.getFieldMapping = ca({ + params: { + includeDefaults: { + type: 'boolean', + name: 'include_defaults' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + field: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_mapping/field/<%=field%>', + req: { + index: { + type: 'list' + }, + field: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/<%=type%>/field/<%=field%>', + req: { + type: { + type: 'list' + }, + field: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/field/<%=field%>', + req: { + field: { + type: 'list' + } + } + } + ] +}); + +/** + * Perform a [indices.getMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names + * @param {String, String[], Boolean} params.type - A comma-separated list of document types + */ +api.indices.prototype.getMapping = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_mapping', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/<%=type%>', + req: { + type: { + type: 'list' + } + } + }, + { + fmt: '/_mapping' + } + ] +}); + +/** + * Perform a [indices.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.name - The name of the settings that should be included + */ +api.indices.prototype.getSettings = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': [ + 'open', + 'closed' + ], + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_settings/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_settings', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_settings/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_settings' + } + ] +}); + +/** + * Perform a [indices.getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String} params.name - The name of the template + */ +api.indices.prototype.getTemplate = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + { + fmt: '/_template' + } + ] +}); + +/** + * Perform a [indices.getWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices + * @param {String, String[], Boolean} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types + */ +api.indices.prototype.getWarmer = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_warmer', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_warmer/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_warmer' + } + ] +}); + +/** + * Perform a [indices.open](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + */ +api.indices.prototype.open = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'closed', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + url: { + fmt: '/<%=index%>/_open', + req: { + index: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.optimize](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-optimize.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flush - Specify whether the index should be flushed after performing the operation (default: true) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Number} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic) + * @param {Boolean} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents + * @param {Anything} params.operationThreading - TODO: ? + * @param {Boolean} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true) + * @param {Boolean} params.force - Force a merge operation to run, even if there is a single segment in the index (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.optimize = ca({ + params: { + flush: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + maxNumSegments: { + type: 'number', + name: 'max_num_segments' + }, + onlyExpungeDeletes: { + type: 'boolean', + name: 'only_expunge_deletes' + }, + operationThreading: { + name: 'operation_threading' + }, + waitForMerge: { + type: 'boolean', + name: 'wait_for_merge' + }, + force: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_optimize', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_optimize' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.putAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Explicit timestamp for the document + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {String, String[], Boolean} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` or omit to perform the operation on all indices. + * @param {String} params.name - The name of the alias to be created or updated + */ +api.indices.prototype.putAlias = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'string' + } + } + } + ], + method: 'PUT' +}); + +/** + * Perform a [indices.putMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-put-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. + * @param {String} params.type - The name of the document type + */ +api.indices.prototype.putMapping = ca({ + params: { + ignoreConflicts: { + type: 'boolean', + name: 'ignore_conflicts' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/_mapping/<%=type%>', + req: { + type: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.putSettings = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + urls: [ + { + fmt: '/<%=index%>/_settings', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_settings' + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Number} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {String} params.name - The name of the template + */ +api.indices.prototype.putTemplate = ca({ + params: { + order: { + type: 'number' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices + * @param {String} params.name - The name of the warmer + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types + */ +api.indices.prototype.putWarmer = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_warmer/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + { + fmt: '/_warmer/<%=name%>', + req: { + name: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-recovery.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.detailed - Whether to display detailed information about shard recovery + * @param {Boolean} params.activeOnly - Display only those recoveries that are currently on-going + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.recovery = ca({ + params: { + detailed: { + type: 'boolean', + 'default': false + }, + activeOnly: { + type: 'boolean', + 'default': false, + name: 'active_only' + }, + human: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/<%=index%>/_recovery', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_recovery' + } + ] +}); + +/** + * Perform a [indices.refresh](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-refresh.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.force - Force a refresh even if not required + * @param {Anything} params.operationThreading - TODO: ? + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.refresh = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + force: { + type: 'boolean', + 'default': false + }, + operationThreading: { + name: 'operation_threading' + } + }, + urls: [ + { + fmt: '/<%=index%>/_refresh', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_refresh' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.segments](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-segments.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {Anything} params.operationThreading - TODO: ? + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.segments = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + human: { + type: 'boolean', + 'default': false + }, + operationThreading: { + name: 'operation_threading' + } + }, + urls: [ + { + fmt: '/<%=index%>/_segments', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_segments' + } + ] +}); + +/** + * Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-gateway-snapshot.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + */ +api.indices.prototype.snapshotIndex = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_gateway/snapshot', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_gateway/snapshot' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * @param {Boolean} params.groups - A comma-separated list of search groups for `search` index metric + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String} [params.level=indices] - Return stats aggregated at cluster, index or shard level + * @param {String, String[], Boolean} params.types - A comma-separated list of document types for the `indexing` index metric + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.metric - Limit the information returned the specific metrics. + */ +api.indices.prototype.stats = ca({ + params: { + completionFields: { + type: 'list', + name: 'completion_fields' + }, + fielddataFields: { + type: 'list', + name: 'fielddata_fields' + }, + fields: { + type: 'list' + }, + groups: { + type: 'boolean' + }, + human: { + type: 'boolean', + 'default': false + }, + level: { + type: 'enum', + 'default': 'indices', + options: [ + 'cluster', + 'indices', + 'shards' + ] + }, + types: { + type: 'list' + } + }, + urls: [ + { + fmt: '/<%=index%>/_stats/<%=metric%>', + req: { + index: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/_stats/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/<%=index%>/_stats', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_stats' + } + ] +}); + +/** + * Perform a [indices.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-status.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {Anything} params.operationThreading - TODO: ? + * @param {Boolean} params.recovery - Return information about shard recovery + * @param {Boolean} params.snapshot - TODO: ? + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.status = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + human: { + type: 'boolean', + 'default': false + }, + operationThreading: { + name: 'operation_threading' + }, + recovery: { + type: 'boolean' + }, + snapshot: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_status', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_status' + } + ] +}); + +/** + * Perform a [indices.updateAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.timeout - Request timeout + * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master + */ +api.indices.prototype.updateAliases = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_aliases' + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [indices.validateQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-validate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.explain - Return detailed information about the error + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {Anything} params.operationThreading - TODO: ? + * @param {String} params.source - The URL-encoded query definition (instead of using the request body) + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types + */ +api.indices.prototype.validateQuery = ca({ + params: { + explain: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + operationThreading: { + name: 'operation_threading' + }, + source: { + type: 'string' + }, + q: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_validate/query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_validate/query', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_validate/query' + } + ], + method: 'POST' +}); + +/** + * Perform a [info](http://www.elasticsearch.org/guide/) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.info = ca({ + url: { + fmt: '/' + } +}); + +/** + * Perform a [mget](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-multi-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.mget = ca({ + params: { + fields: { + type: 'list' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mget', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mget', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mget' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [mlt](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-more-like-this.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Number} params.boostTerms - The boost factor + * @param {Number} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored + * @param {Number} params.maxQueryTerms - The maximum query terms to be included in the generated query + * @param {Number} params.maxWordLength - The minimum length of the word: longer words will be ignored + * @param {Number} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored + * @param {Number} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored + * @param {Number} params.minWordLength - The minimum length of the word: shorter words will be ignored + * @param {String, String[], Boolean} params.mltFields - Specific fields to perform the query against + * @param {Number} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3) + * @param {String} params.routing - Specific routing value + * @param {Number} params.searchFrom - The offset from which to return results + * @param {String, String[], Boolean} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document) + * @param {String} params.searchQueryHint - The search query hint + * @param {String} params.searchScroll - A scroll search request definition + * @param {Number} params.searchSize - The number of documents to return (default: 10) + * @param {String} params.searchSource - A specific search request definition (instead of using the request body) + * @param {String} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc) + * @param {String, String[], Boolean} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document) + * @param {String, String[], Boolean} params.stopWords - A list of stop words to be ignored + * @param {String} params.id - The document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.mlt = ca({ + params: { + boostTerms: { + type: 'number', + name: 'boost_terms' + }, + maxDocFreq: { + type: 'number', + name: 'max_doc_freq' + }, + maxQueryTerms: { + type: 'number', + name: 'max_query_terms' + }, + maxWordLength: { + type: 'number', + name: 'max_word_length' + }, + minDocFreq: { + type: 'number', + name: 'min_doc_freq' + }, + minTermFreq: { + type: 'number', + name: 'min_term_freq' + }, + minWordLength: { + type: 'number', + name: 'min_word_length' + }, + mltFields: { + type: 'list', + name: 'mlt_fields' + }, + percentTermsToMatch: { + type: 'number', + name: 'percent_terms_to_match' + }, + routing: { + type: 'string' + }, + searchFrom: { + type: 'number', + name: 'search_from' + }, + searchIndices: { + type: 'list', + name: 'search_indices' + }, + searchQueryHint: { + type: 'string', + name: 'search_query_hint' + }, + searchScroll: { + type: 'string', + name: 'search_scroll' + }, + searchSize: { + type: 'number', + name: 'search_size' + }, + searchSource: { + type: 'string', + name: 'search_source' + }, + searchType: { + type: 'string', + name: 'search_type' + }, + searchTypes: { + type: 'list', + name: 'search_types' + }, + stopWords: { + type: 'list', + name: 'stop_words' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [mpercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The index of the document being count percolated to use as default + * @param {String} params.type - The type of the document being percolated to use as default. + */ +api.mpercolate = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mpercolate', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mpercolate', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mpercolate' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +/** + * Perform a [msearch](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-multi-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.searchType - Search operation type + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to use as default + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to use as default + */ +api.msearch = ca({ + params: { + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch', + 'count', + 'scan' + ], + name: 'search_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_msearch', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_msearch', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_msearch' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +/** + * Perform a [mtermvectors](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-multi-termvectors.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body + * @param {Boolean} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {Boolean} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {String} params.index - The index in which the document resides. + * @param {String} params.type - The type of the document. + * @param {String} params.id - The id of the document. + */ +api.mtermvectors = ca({ + params: { + ids: { + type: 'list', + required: false + }, + termStatistics: { + type: 'boolean', + 'default': false, + required: false, + name: 'term_statistics' + }, + fieldStatistics: { + type: 'boolean', + 'default': true, + required: false, + name: 'field_statistics' + }, + fields: { + type: 'list', + required: false + }, + offsets: { + type: 'boolean', + 'default': true, + required: false + }, + positions: { + type: 'boolean', + 'default': true, + required: false + }, + payloads: { + type: 'boolean', + 'default': true, + required: false + }, + preference: { + type: 'string', + required: false + }, + routing: { + type: 'string', + required: false + }, + parent: { + type: 'string', + required: false + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mtermvectors', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mtermvectors', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mtermvectors' + } + ], + method: 'POST' +}); + +api.nodes = function NodesNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-hot-threads.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.interval - The interval for the second sampling of threads + * @param {Number} params.snapshots - Number of samples of thread stacktrace (default: 10) + * @param {Number} params.threads - Specify the number of threads to provide information for (default: 3) + * @param {String} params.type - The type to sample (default: cpu) + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.hotThreads = ca({ + params: { + interval: { + type: 'time' + }, + snapshots: { + type: 'number' + }, + threads: { + type: 'number' + }, + type: { + type: 'enum', + options: [ + 'cpu', + 'wait', + 'block' + ] + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/hotthreads', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/hotthreads' + } + ] +}); + +/** + * Perform a [nodes.info](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-info.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.flatSettings - Return settings in flat format (default: false) + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {String, String[], Boolean} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all. + */ +api.nodes.prototype.info = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + human: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + 'settings', + 'os', + 'process', + 'jvm', + 'thread_pool', + 'network', + 'transport', + 'http', + 'plugins' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + 'settings', + 'os', + 'process', + 'jvm', + 'thread_pool', + 'network', + 'transport', + 'http', + 'plugins' + ] + } + } + }, + { + fmt: '/_nodes' + } + ] +}); + +/** + * Perform a [nodes.shutdown](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-shutdown.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.delay - Set the delay for the operation (default: 1s) + * @param {Boolean} params.exit - Exit the JVM as well (default: true) + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes + */ +api.nodes.prototype.shutdown = ca({ + params: { + delay: { + type: 'time' + }, + exit: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_shutdown' + } + ], + method: 'POST' +}); + +/** + * Perform a [nodes.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * @param {Boolean} params.groups - A comma-separated list of search groups for `search` index metric + * @param {Boolean} params.human - Whether to return time and byte values in human-readable format. + * @param {String} [params.level=node] - Return indices stats aggregated at node, index or shard level + * @param {String, String[], Boolean} params.types - A comma-separated list of document types for the `indexing` index metric + * @param {String, String[], Boolean} params.metric - Limit the information returned to the specified metrics + * @param {String, String[], Boolean} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. + * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.stats = ca({ + params: { + completionFields: { + type: 'list', + name: 'completion_fields' + }, + fielddataFields: { + type: 'list', + name: 'fielddata_fields' + }, + fields: { + type: 'list' + }, + groups: { + type: 'boolean' + }, + human: { + type: 'boolean', + 'default': false + }, + level: { + type: 'enum', + 'default': 'node', + options: [ + 'node', + 'indices', + 'shards' + ] + }, + types: { + type: 'list' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + }, + indexMetric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + } + } + }, + { + fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + }, + indexMetric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'filter_cache', + 'flush', + 'get', + 'id_cache', + 'indexing', + 'merge', + 'percolate', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/stats', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/stats/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'network', + 'os', + 'process', + 'thread_pool', + 'transport' + ] + } + } + }, + { + fmt: '/_nodes/stats' + } + ] +}); + +/** + * Perform a [percolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.percolateIndex - The index to percolate the document into. Defaults to index. + * @param {String} params.percolateType - The type to percolate document into. Defaults to type. + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.index - The index of the document being percolated. + * @param {String} params.type - The type of the document being percolated. + * @param {String} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster. + */ +api.percolate = ca({ + params: { + routing: { + type: 'list' + }, + preference: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + percolateIndex: { + type: 'string', + name: 'percolate_index' + }, + percolateType: { + type: 'string', + name: 'percolate_type' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>/_percolate', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [ping](http://www.elasticsearch.org/guide/) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.ping = ca({ + url: { + fmt: '/' + }, + requestTimeout: 100, + method: 'HEAD' +}); + +/** + * Perform a [scroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Duration} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {String} params.scrollId - The scroll ID + */ +api.scroll = ca({ + params: { + scroll: { + type: 'duration' + }, + scrollId: { + type: 'string', + name: 'scroll_id' + } + }, + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'string' + } + } + }, + { + fmt: '/_search/scroll' + } + ], + method: 'POST' +}); + +/** + * Perform a [search](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.analyzer - The analyzer to use for the query string + * @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {String} params.df - The field to use as default where no field prefix is given in the query string + * @param {Boolean} params.explain - Specify whether to return detailed information about score computation as part of a hit + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return as part of a hit + * @param {Number} params.from - Starting offset (default: 0) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.indicesBoost - Comma-separated list of index boosts + * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.q - Query in the Lucene query string syntax + * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values + * @param {Duration} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {String} params.searchType - Search operation type + * @param {Number} params.size - Number of hits to return (default: 10) + * @param {String, String[], Boolean} params.sort - A comma-separated list of : pairs + * @param {String} params.source - The URL-encoded request definition using the Query DSL (instead of using request body) + * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {String, String[], Boolean} params.stats - Specific 'tag' of the request for logging and statistical purposes + * @param {String} params.suggestField - Specify which field to use for suggestions + * @param {String} [params.suggestMode=missing] - Specify suggest mode + * @param {Number} params.suggestSize - How many suggestions to return in response + * @param {Text} params.suggestText - The source text for which the suggestions should be returned + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Boolean} params.version - Specify whether to return document version as part of a hit + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.search = ca({ + params: { + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + explain: { + type: 'boolean' + }, + fields: { + type: 'list' + }, + from: { + type: 'number' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + indicesBoost: { + type: 'list', + name: 'indices_boost' + }, + lenient: { + type: 'boolean' + }, + lowercaseExpandedTerms: { + type: 'boolean', + name: 'lowercase_expanded_terms' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'duration' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch', + 'count', + 'scan' + ], + name: 'search_type' + }, + size: { + type: 'number' + }, + sort: { + type: 'list' + }, + source: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + stats: { + type: 'list' + }, + suggestField: { + type: 'string', + name: 'suggest_field' + }, + suggestMode: { + type: 'enum', + 'default': 'missing', + options: [ + 'missing', + 'popular', + 'always' + ], + name: 'suggest_mode' + }, + suggestSize: { + type: 'number', + name: 'suggest_size' + }, + suggestText: { + type: 'text', + name: 'suggest_text' + }, + timeout: { + type: 'time' + }, + version: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_search', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search' + } + ], + method: 'POST' +}); + +/** + * Perform a [searchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.searchTemplate = ca({ + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search/template', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_search/template', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search/template' + } + ], + method: 'POST' +}); + +/** + * Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search_shards', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + +api.snapshot = function SnapshotNS(transport) { + this.transport = transport; +}; + +/** + * Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Boolean} params.waitForCompletion - Should this request wait until the operation has completed before returning + * @param {String} params.repository - A repository name + * @param {String} params.snapshot - A snapshot name + */ +api.snapshot.prototype.create = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForCompletion: { + type: 'boolean', + 'default': false, + name: 'wait_for_completion' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [snapshot.createRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String} params.repository - A repository name + */ +api.snapshot.prototype.createRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'string' + } + } + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [snapshot.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String} params.repository - A repository name + * @param {String} params.snapshot - A snapshot name + */ +api.snapshot.prototype['delete'] = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [snapshot.deleteRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {String, String[], Boolean} params.repository - A comma-separated list of repository names + */ +api.snapshot.prototype.deleteRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [snapshot.get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String} params.repository - A repository name + * @param {String, String[], Boolean} params.snapshot - A comma-separated list of snapshot names + */ +api.snapshot.prototype.get = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'list' + } + } + } +}); + +/** + * Perform a [snapshot.getRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {String, String[], Boolean} params.repository - A comma-separated list of repository names + */ +api.snapshot.prototype.getRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + { + fmt: '/_snapshot' + } + ] +}); + +/** + * Perform a [snapshot.restore](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {Boolean} params.waitForCompletion - Should this request wait until the operation has completed before returning + * @param {String} params.repository - A repository name + * @param {String} params.snapshot - A snapshot name + */ +api.snapshot.prototype.restore = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForCompletion: { + type: 'boolean', + 'default': false, + name: 'wait_for_completion' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [snapshot.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {String} params.repository - A repository name + * @param {String, String[], Boolean} params.snapshot - A comma-separated list of snapshot names + */ +api.snapshot.prototype.status = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + urls: [ + { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'list' + } + } + }, + { + fmt: '/_snapshot/<%=repository%>/_status', + req: { + repository: { + type: 'string' + } + } + }, + { + fmt: '/_snapshot/_status' + } + ] +}); + +/** + * Perform a [suggest](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {String} params.source - The URL-encoded request definition (instead of using request body) + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices + */ +api.suggest = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + }, + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + source: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/_suggest', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_suggest' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [termvector](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-termvectors.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.termStatistics - Specifies if total term frequency and document frequency should be returned. + * @param {Boolean} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return. + * @param {Boolean} [params.offsets=true] - Specifies if term offsets should be returned. + * @param {Boolean} [params.positions=true] - Specifies if term positions should be returned. + * @param {Boolean} [params.payloads=true] - Specifies if term payloads should be returned. + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random). + * @param {String} params.routing - Specific routing value. + * @param {String} params.parent - Parent id of documents. + * @param {String} params.index - The index in which the document resides. + * @param {String} params.type - The type of the document. + * @param {String} params.id - The id of the document. + */ +api.termvector = ca({ + params: { + termStatistics: { + type: 'boolean', + 'default': false, + required: false, + name: 'term_statistics' + }, + fieldStatistics: { + type: 'boolean', + 'default': true, + required: false, + name: 'field_statistics' + }, + fields: { + type: 'list', + required: false + }, + offsets: { + type: 'boolean', + 'default': true, + required: false + }, + positions: { + type: 'boolean', + 'default': true, + required: false + }, + payloads: { + type: 'boolean', + 'default': true, + required: false + }, + preference: { + type: 'string', + required: false + }, + routing: { + type: 'string', + required: false + }, + parent: { + type: 'string', + required: false + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [update](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-update.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response + * @param {String} params.lang - The script language (default: mvel) + * @param {String} params.parent - ID of the parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {Number} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0) + * @param {String} params.routing - Specific routing value + * @param {Anything} params.script - The URL-encoded script definition (instead of using request body) + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.timestamp - Explicit timestamp for the document + * @param {Duration} params.ttl - Expiration time for the document + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - Document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.update = ca({ + params: { + consistency: { + type: 'enum', + options: [ + 'one', + 'quorum', + 'all' + ] + }, + fields: { + type: 'list' + }, + lang: { + type: 'string' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'boolean' + }, + replication: { + type: 'enum', + 'default': 'sync', + options: [ + 'sync', + 'async' + ] + }, + retryOnConflict: { + type: 'number', + name: 'retry_on_conflict' + }, + routing: { + type: 'string' + }, + script: {}, + timeout: { + type: 'time' + }, + timestamp: { + type: 'time' + }, + ttl: { + type: 'duration' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_update', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} params.parent - ID of the parent document + * @param {Boolean} params.refresh - Refresh the index after performing the operation + * @param {String} [params.replication=sync] - Specific replication type + * @param {String} params.routing - Specific routing value + * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Date, Number} params.timestamp - Explicit timestamp for the document + * @param {Duration} params.ttl - Expiration time for the document + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type + * @param {String} params.id - Document ID + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.create = ca.proxy(api.index, { + transform: function (params) { + params.op_type = 'create'; + } +}); +},{"../client_action":232}],230:[function(require,module,exports){ +module.exports = { + '1.1': require('./1_1'), + '1.0': require('./1_0'), + '0.90': require('./0_90') +}; + +},{"./0_90":227,"./1_0":228,"./1_1":229}],231:[function(require,module,exports){ /** * A client that makes requests to Elasticsearch via a {{#crossLink "Transport"}}Transport{{/crossLink}} * @@ -25153,6 +34704,13 @@ var _ = require('./utils'); function Client(config) { config = config || {}; + if (config.__reused) { + throw new Error('Do not reuse objects to configure the elasticsearch Client class: ' + + 'https://github.com/elasticsearch/elasticsearch-js/issues/33'); + } else { + config.__reused = true; + } + function EsApiClient() { // our client will log minimally by default if (!config.hasOwnProperty('log')) { @@ -25177,7 +34735,7 @@ function Client(config) { delete this._namespaces; } - EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '0.90'); + EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '1.1'); if (!config.sniffEndpoint && EsApiClient.prototype === Client.apis['0.90']) { config.sniffEndpoint = '/_cluster/nodes'; } @@ -25186,7 +34744,7 @@ function Client(config) { } Client.apis = require('./apis'); -},{"./apis":193,"./transport":211,"./utils":212}],195:[function(require,module,exports){ +},{"./apis":230,"./transport":248,"./utils":250}],232:[function(require,module,exports){ /** * Constructs a function that can be called to make a request to ES * @type {[type]} @@ -25318,7 +34876,7 @@ function resolveUrl(url, params) { for (i = 0; i < url.reqParamKeys.length; i ++) { key = url.reqParamKeys[i]; - if (!params.hasOwnProperty(key)) { + if (!params.hasOwnProperty(key) || params[key] == null) { // missing a required param return false; } else { @@ -25341,7 +34899,7 @@ function resolveUrl(url, params) { for (i = 0; i < url.optParamKeys.length; i ++) { key = url.optParamKeys[i]; if (params[key]) { - if (castType[url.opt[key].type]) { + if (castType[url.opt[key].type] || params[key] == null) { vars[key] = castType[url.opt[key].type](url.opt[key], params[key], key); } else { vars[key] = params[key]; @@ -25493,7 +35051,7 @@ ClientAction.proxy = function (fn, spec) { }; }; -},{"./utils":212}],196:[function(require,module,exports){ +},{"./utils":250}],233:[function(require,module,exports){ module.exports = ConnectionAbstract; var _ = require('./utils'); @@ -25593,7 +35151,7 @@ ConnectionAbstract.prototype.setStatus = function (status) { this.removeAllListeners(); } }; -},{"./errors":200,"./host":201,"./log":202,"./utils":212,"events":4}],197:[function(require,module,exports){ +},{"./errors":237,"./host":238,"./log":239,"./utils":250,"events":41}],234:[function(require,module,exports){ var process=require("__browserify_process");/** * Manager of connections to a node(s), capable of ensuring that connections are clear and living * before providing them to the application @@ -25796,7 +35354,7 @@ ConnectionPool.prototype._onConnectionDied = function (connection, alreadyWasDea var ms = this.calcDeadTimeout(timeout.attempt, this.deadTimeout); timeout.id = setTimeout(timeout.revive, ms); - timeout.runAt = Date.now() + ms; + timeout.runAt = _.now() + ms; }; ConnectionPool.prototype._selectDeadConnection = function (cb) { @@ -25926,7 +35484,7 @@ ConnectionPool.prototype.close = function () { this.setHosts([]); }; ConnectionPool.prototype.empty = ConnectionPool.prototype.close; -},{"./connectors":198,"./log":202,"./selectors":207,"./utils":212,"__browserify_process":13}],198:[function(require,module,exports){ +},{"./connectors":235,"./log":239,"./selectors":244,"./utils":250,"__browserify_process":50}],235:[function(require,module,exports){ var opts = { xhr: require('./xhr'), jquery: require('./jquery'), @@ -25952,7 +35510,7 @@ if (opts.xhr) { module.exports = opts; -},{"../utils":212,"./angular":1,"./jquery":1,"./xhr":199}],199:[function(require,module,exports){ +},{"../utils":250,"./angular":38,"./jquery":38,"./xhr":236}],236:[function(require,module,exports){ /** * Generic Transport for the browser, using the XmlHttpRequest object * @@ -26006,6 +35564,8 @@ XhrConnector.prototype.request = function (params, cb) { var xhr = getXhr(); var timeoutId; var url = this.host.makeUrl(params); + var headers = this.host.getHeaders(params.headers); + var log = this.log; var async = params.async === false ? false : asyncDefault; @@ -26024,6 +35584,14 @@ XhrConnector.prototype.request = function (params, cb) { } }; + if (headers) { + for (var key in headers) { + if (headers[key] !== void 0) { + xhr.setRequestHeader(key, headers[key]); + } + } + } + xhr.send(params.body || void 0); return function () { @@ -26031,19 +35599,27 @@ XhrConnector.prototype.request = function (params, cb) { }; }; -},{"../connection":196,"../errors":200,"../utils":212}],200:[function(require,module,exports){ -var process=require("__browserify_process");var _ = require('./utils'); +},{"../connection":233,"../errors":237,"../utils":250}],237:[function(require,module,exports){ +var _ = require('./utils'); var errors = module.exports; +var canCapture = (typeof Error.captureStackTrace === 'function'); +var canStack = !!(new Error()).stack; + function ErrorAbstract(msg, constructor) { this.message = msg; Error.call(this, this.message); - if (process.browser) { - this.stack = ''; - } else { + + if (canCapture) { Error.captureStackTrace(this, constructor); } + else if (canStack) { + this.stack = (new Error()).stack; + } + else { + this.stack = ''; + } } errors._Abstract = ErrorAbstract; _.inherits(ErrorAbstract, Error); @@ -26158,7 +35734,7 @@ _.each(statusCodes, function (name, status) { errors[status] = StatusCodeError; }); -},{"./utils":212,"__browserify_process":13}],201:[function(require,module,exports){ +},{"./utils":250}],238:[function(require,module,exports){ /** * Class to wrap URLS, formatting them and maintaining their separate details * @type {[type]} @@ -26194,6 +35770,7 @@ function Host(config) { this.port = 9200; this.auth = null; this.query = null; + this.headers = null; if (typeof config === 'string') { if (!startsWithProtocolRE.test(config)) { @@ -26278,16 +35855,7 @@ Host.prototype.makeUrl = function (params) { } // build the query string - var query = ''; - if (params.query) { - // if the user passed in a query, merge it with the defaults from the host - query = qs.stringify( - _.defaults(typeof params.query === 'string' ? qs.parse(params.query) : params.query, this.query) - ); - } else if (this.query) { - // just stringify the hosts query - query = qs.stringify(this.query); - } + var query = qs.stringify(this.getQuery(params.query)); var auth = ''; if (params.auth) { @@ -26303,11 +35871,35 @@ Host.prototype.makeUrl = function (params) { } }; +function objectPropertyGetter(prop, preOverride) { + return function (overrides) { + if (preOverride) { + overrides = preOverride(overrides); + } + + var obj = this[prop]; + if (!obj && !overrides) { + return null; + } + + if (overrides) { + obj = _.assign({}, obj, overrides); + } + + return _.size(obj) ? obj : null; + }; +} + +Host.prototype.getHeaders = objectPropertyGetter('headers'); +Host.prototype.getQuery = objectPropertyGetter('query', function (query) { + return typeof query === 'string' ? qs.parse(query) : query; +}); + Host.prototype.toString = function () { return this.makeUrl(); }; -},{"./utils":212,"querystring":6,"url":7}],202:[function(require,module,exports){ +},{"./utils":250,"querystring":43,"url":44}],239:[function(require,module,exports){ var process=require("__browserify_process");var _ = require('./utils'); var url = require('url'); var EventEmitter = require('events').EventEmitter; @@ -26609,7 +36201,7 @@ Log.normalizeTraceArgs = function (method, requestUrl, body, responseBody, respo module.exports = Log; -},{"./loggers":204,"./utils":212,"__browserify_process":13,"events":4,"url":7}],203:[function(require,module,exports){ +},{"./loggers":241,"./utils":250,"__browserify_process":50,"events":41,"url":44}],240:[function(require,module,exports){ var _ = require('./utils'); /** @@ -26780,7 +36372,7 @@ LoggerAbstract.prototype._formatTraceMessage = function (req) { LoggerAbstract.prototype._prettyJson = function (body) { try { - if (typeof object === 'string') { + if (typeof body === 'string') { body = JSON.parse(body); } return JSON.stringify(body, null, ' ').replace(/'/g, '\\u0027'); @@ -26791,12 +36383,12 @@ LoggerAbstract.prototype._prettyJson = function (body) { module.exports = LoggerAbstract; -},{"./utils":212}],204:[function(require,module,exports){ +},{"./utils":250}],241:[function(require,module,exports){ module.exports = { console: require('./console') }; -},{"./console":205}],205:[function(require,module,exports){ +},{"./console":242}],242:[function(require,module,exports){ /** * Special version of the Stream logger, which logs errors and warnings to stderr and all other * levels to stdout. @@ -26897,15 +36489,23 @@ Console.prototype.onTrace = _.handler(function (msg) { this.write('TRACE', this._formatTraceMessage(msg), 'log'); }); -},{"../logger":203,"../utils":212}],206:[function(require,module,exports){ +},{"../logger":240,"../utils":250}],243:[function(require,module,exports){ var _ = require('./utils'); var extractHostPartsRE = /\[\/*([^:]+):(\d+)\]/; function makeNodeParser(hostProp) { return function (nodes) { - var hosts = []; - _.each(nodes, function (node, id) { + return _.transform(nodes, function (hosts, node, id) { + if (!node[hostProp]) { + return; + } + var hostnameMatches = extractHostPartsRE.exec(node[hostProp]); + if (!hostnameMatches) { + throw new Error('node\'s ' + hostProp + ' property (' + JSON.stringify(node[hostProp]) + + ') does not match the expected pattern ' + extractHostPartsRE + '.'); + } + hosts.push({ host: hostnameMatches[1], port: parseInt(hostnameMatches[2], 10), @@ -26916,21 +36516,20 @@ function makeNodeParser(hostProp) { version: node.version } }); - }); - return hosts; + }, []); }; } module.exports = makeNodeParser('http_address'); module.exports.thrift = makeNodeParser('transport_address'); -},{"./utils":212}],207:[function(require,module,exports){ +},{"./utils":250}],244:[function(require,module,exports){ module.exports = { random: require('./random'), roundRobin: require('./round_robin') }; -},{"./random":208,"./round_robin":209}],208:[function(require,module,exports){ +},{"./random":245,"./round_robin":246}],245:[function(require,module,exports){ /** * Selects a connection randomly * @@ -26943,7 +36542,7 @@ module.exports = function RandomSelector(connections) { return connections[Math.floor(Math.random() * connections.length)]; }; -},{}],209:[function(require,module,exports){ +},{}],246:[function(require,module,exports){ /** * Selects a connection the simplest way possible, Round Robin * @@ -26958,7 +36557,7 @@ module.exports = function (connections) { return connection; }; -},{}],210:[function(require,module,exports){ +},{}],247:[function(require,module,exports){ /** * Simple JSON serializer * @type {[type]} @@ -27019,7 +36618,7 @@ Json.prototype.bulkBody = function (val) { return body; }; -},{"../utils":212}],211:[function(require,module,exports){ +},{"../utils":250}],248:[function(require,module,exports){ /** * Class that manages making request, called by all of the API methods. * @type {[type]} @@ -27029,7 +36628,8 @@ module.exports = Transport; var _ = require('./utils'); var errors = require('./errors'); var Host = require('./host'); -var when = require('when'); +var Promise = require('bluebird'); +var patchSniffOnConnectionFault = require('./transport/sniff_on_connection_fault'); function Transport(config) { var self = this; @@ -27102,7 +36702,9 @@ function Transport(config) { }, config.sniffInterval); } - this.sniffAfterConnectionFault = config.sniffAfterConnectionFault; + if (config.sniffOnConnectionFault) { + patchSniffOnConnectionFault(this); + } } Transport.connectionPools = { @@ -27118,7 +36720,7 @@ Transport.nodesToHostCallbacks = { }; Transport.prototype.defer = function () { - return when.defer(); + return Promise.defer(); }; /** @@ -27138,7 +36740,6 @@ Transport.prototype.defer = function () { * @param {Function} cb - A function to call back with (error, responseBody, responseStatus) */ Transport.prototype.request = function (params, cb) { - var self = this; var remainingRetries = this.maxRetries; var requestTimeout = this.requestTimeout; @@ -27352,6 +36953,7 @@ Transport.prototype._timeout = function (cb, delay) { Transport.prototype.sniff = function (cb) { var connectionPool = this.connectionPool; var nodesToHostCallback = this.nodesToHostCallback; + var log = this.log; // make cb a function if it isn't cb = typeof cb === 'function' ? cb : _.noop; @@ -27361,10 +36963,19 @@ Transport.prototype.sniff = function (cb) { method: 'GET' }, function (err, resp, status) { if (!err && resp && resp.nodes) { - var hosts = _.map(nodesToHostCallback(resp.nodes), function (hostConfig) { + var hostsConfigs; + + try { + hostsConfigs = nodesToHostCallback(resp.nodes); + } catch (e) { + log.error(new Error('Unable to convert node list from ' + this.sniffEndpoint + + ' to hosts durring sniff. Encountered error:\n' + (e.stack || e.message))); + return; + } + + connectionPool.setHosts(_.map(hostsConfigs, function (hostConfig) { return new Host(hostConfig); - }); - connectionPool.setHosts(hosts); + })); } cb(err, resp, status); }); @@ -27379,8 +36990,67 @@ Transport.prototype.close = function () { _.each(this._timers, clearTimeout); this.connectionPool.close(); }; +},{"./connection_pool":234,"./errors":237,"./host":238,"./log":239,"./nodes_to_host":243,"./serializers/json":247,"./transport/sniff_on_connection_fault":249,"./utils":250,"bluebird":3}],249:[function(require,module,exports){ +var _ = require('../utils'); -},{"./connection_pool":197,"./errors":200,"./host":201,"./log":202,"./nodes_to_host":206,"./serializers/json":210,"./utils":212,"when":189}],212:[function(require,module,exports){ + +/** + * Patch the transport's connection pool to schedule a sniff after a connection fails. + * When a connection fails for the first time it will schedule a sniff 1 second in the + * future, and increase the timeout based on the deadTimeout algorithm chosen by the + * connectionPool, and the number of times the sniff has failed. + * + * @param {Transport} transport - the transport that will be using this behavior + * @return {undefined} + */ +module.exports = function setupSniffOnConnectionFault(transport) { + var failures = 0; + var pool = transport.connectionPool; + var originalOnDied = pool._onConnectionDied; + + // do the actual sniff, if the sniff is unable to + // connect to a node this function will be called again by the connectionPool + var work = function () { + work.timerId = transport._timeout(work.timerId); + transport.sniff(); + }; + + // create a function that will count down to a + // point n milliseconds into the future + var countdownTo = function (ms) { + var start = _.now(); + return function () { + return start - ms; + }; + }; + + // overwrite the function, but still call it + pool._onConnectionDied = function (connection, wasAlreadyDead) { + var ret = originalOnDied.call(pool, connection, wasAlreadyDead); + + // clear the failures if this is the first failure we have seen + failures = work.timerId ? failures + 1 : 0; + + var ms = pool.calcDeadTimeout(failures, 1000); + + if (work.timerId && ms < work.timerId && work.countdown()) { + // clear the timer + work.timerId = transport._timeout(work.timerId); + } + + if (!work.timerId) { + work.timerId = transport._timeout(work, ms); + work.countdown = countdownTo(ms); + } + + return ret; + }; + + pool._onConnectionDied.restore = function () { + pool._onConnectionDied = originalOnDied; + }; +}; +},{"../utils":250}],250:[function(require,module,exports){ var process=require("__browserify_process"),Buffer=require("__browserify_Buffer").Buffer;var path = require('path'); var _ = require('lodash-node/modern'); var nodeUtils = require('util'); @@ -27801,9 +37471,16 @@ _.getUnwrittenFromStream = function (stream) { } }; +/** + * return the current time in milliseconds since epoch + */ +_.now = function () { + return (typeof Date.now === 'function') ? Date.now() : (new Date()).getTime(); +}; + module.exports = utils; -},{"__browserify_Buffer":12,"__browserify_process":13,"lodash-node/modern":87,"path":5,"util":8}]},{},[190]) -(190) +},{"__browserify_Buffer":49,"__browserify_process":50,"lodash-node/modern":124,"path":42,"util":45}]},{},[226]) +(226) }); ; \ No newline at end of file diff --git a/src/bower_components/elasticsearch/elasticsearch.min.js b/src/bower_components/elasticsearch/elasticsearch.min.js index f6bc7b94af73..73d784402df3 100644 --- a/src/bower_components/elasticsearch/elasticsearch.min.js +++ b/src/bower_components/elasticsearch/elasticsearch.min.js @@ -1,10 +1,13 @@ -/*! elasticsearch - v1.5.10 - 2014-03-03 +/*! elasticsearch - v2.1.4 - 2014-05-02 * http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/index.html - * Copyright (c) 2014 Elasticsearch BV; Licensed Apache 2.0 */ -!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.elasticsearch=a():"undefined"!=typeof global?global.elasticsearch=a():"undefined"!=typeof self&&(self.elasticsearch=a())}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};a[g][0].call(j.exports,function(b){var c=a[g][1][b];return e(c?c:b)},j,j.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gf;++f)a.hasOwnProperty(f)&&(e?d=b(d,a[f],f,a):(d=a[f],e=!0));return d},c.substr="b"!=="ab".substr(-1)?function(a,b,c){return 0>b&&(b=a.length+b),a.substr(b,c)}:function(a,b,c){return a.substr(b,c)},c.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},c.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var c=a.shift();return function(){b.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}},c.create="function"==typeof Object.create?Object.create:e;var l="function"==typeof Object.keys?Object.keys:g,m="function"==typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:h;if((new Error).hasOwnProperty("description")){var n=function(a,b){return"[object Error]"===j.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a})),b};c.keys=function(a){return n(a,l(a))},c.getOwnPropertyNames=function(a){return n(a,m(a))}}else c.keys=l,c.getOwnPropertyNames=m;if("function"==typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(o){c.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return i(a,b)}}}else c.getOwnPropertyDescriptor=i},{}],3:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:!m.isNumber(b)||!isNaN(b)&&isFinite(b)?m.isFunction(b)||m.isRegExp(b)?b.toString():b:b.toString()}function d(a,b){return m.isString(a)?a.length=0;d--)if(e[d]!=f[d])return!1;for(d=e.length-1;d>=0;d--)if(c=e[d],!h(a[c],b[c]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util"),n=a("_shims"),o=Array.prototype.slice,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,this.message=a.message||e(this)},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p.throws=function(){l.apply(this,[!0].concat(o.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(o.call(arguments)))},p.ifError=function(a){if(a)throw a}},{_shims:2,util:8}],4:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var d=a("util");b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!d.isNumber(a)||0>a)throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,f,g,h;if(this._events||(this._events={}),"error"===a&&(!this._events.error||d.isObject(this._events.error)&&!this._events.error.length))throw b=arguments[1],b instanceof Error?b:TypeError('Uncaught, unspecified "error" event.');if(c=this._events[a],d.isUndefined(c))return!1;if(d.isFunction(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];c.apply(this,f)}else if(d.isObject(c)){for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];for(h=c.slice(),e=h.length,g=0;e>g;g++)h[g].apply(this,f)}return!0},c.prototype.addListener=function(a,b){var e;if(!d.isFunction(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d.isFunction(b.listener)?b.listener:b),this._events[a]?d.isObject(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,d.isObject(this._events[a])&&!this._events[a].warned){var e;e=d.isUndefined(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),b.apply(this,arguments)}if(!d.isFunction(b))throw TypeError("listener must be a function");return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,f,g;if(!d.isFunction(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,e=-1,c===b||d.isFunction(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(d.isObject(c)){for(g=f;g-->0;)if(c[g]===b||c[g].listener&&c[g].listener===b){e=g;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d.isFunction(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d.isFunction(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d.isFunction(a._events[b])?1:a._events[b].length:0}},{util:8}],5:[function(a,b,c){function d(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var e=a("__browserify_process"),f=a("util"),g=a("_shims"),h=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(a){return h.exec(a).slice(1)};c.resolve=function(){for(var a="",b=!1,c=arguments.length-1;c>=-1&&!b;c--){var h=c>=0?arguments[c]:e.cwd();if(!f.isString(h))throw new TypeError("Arguments to path.resolve must be strings");h&&(a=h+"/"+a,b="/"===h.charAt(0))}return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=c.isAbsolute(a),e="/"===g.substr(a,-1);return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),a||b||(a="."),a&&e&&(a+="/"),(b?"/":"")+a},c.isAbsolute=function(a){return"/"===a.charAt(0)},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(g.filter(a,function(a){if(!f.isString(a))throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},c.relative=function(a,b){function d(a){for(var b=0;b=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=c.resolve(a).substr(1),b=c.resolve(b).substr(1);for(var e=d(a.split("/")),f=d(b.split("/")),g=Math.min(e.length,f.length),h=g,i=0;g>i;i++)if(e[i]!==f[i]){h=i;break}for(var j=[],i=h;i0&&k>j&&(k=j);for(var l=0;k>l;++l){var m,n,o,p,q=a[l].replace(i,"%20"),r=q.indexOf(c);r>=0?(m=q.substr(0,r),n=q.substr(r+1)):(m=q,n="");try{o=decodeURIComponent(m),p=decodeURIComponent(n)}catch(s){o=f.unescape(m,!0),p=f.unescape(n,!0)}d(h,o)?g.isArray(h[o])?h[o].push(p):h[o]=[h[o],p]:h[o]=p}return h}},{_shims:2,buffer:10,util:8}],7:[function(a,b,c){function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function e(a,b,c){if(a&&j.isObject(a)&&a instanceof d)return a;var e=new d;return e.parse(a,b,c),e}function f(a){return j.isString(a)&&(a=e(a)),a instanceof d?a.format():d.prototype.format.call(a)}function g(a,b){return e(a,!1,!0).resolve(b)}function h(a,b){return a?e(a,!1,!0).resolveObject(b):b}var i={encode:function(a){return a}},j=a("util"),k=a("_shims");c.parse=e,c.resolve=g,c.resolveObject=h,c.format=f,c.Url=d;var l=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,n=["<",">",'"',"`"," ","\r","\n"," "],o=["{","}","|","\\","^","`"].concat(n),p=["'"].concat(o),q=["%","/","?",";","#"].concat(p),r=["/","?","#"],s=255,t=/^[a-z0-9A-Z_-]{0,63}$/,u=/^([a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=a("querystring");d.prototype.parse=function(a,b,c){if(!j.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=k.trim(d);var e=l.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&w[e]||(d=d.substr(2),this.slashes=!0)}if(!w[e]&&(g||e&&!x[e])){for(var h=-1,m=0;mn)&&(h=n)}var o,z;z=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==z&&(o=d.slice(0,z),d=d.slice(z+1),this.auth=decodeURIComponent(o)),h=-1;for(var m=0;mn)&&(h=n)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var B=this.hostname.split(/\./),m=0,C=B.length;C>m;m++){var D=B[m];if(D&&!D.match(t)){for(var E="",F=0,G=D.length;G>F;F++)E+=D.charCodeAt(F)>127?"x":D[F];if(!E.match(t)){var H=B.slice(0,m),I=B.slice(m+1),J=D.match(u);J&&(H.push(J[1]),I.unshift(J[2])),I.length&&(d="/"+I.join(".")+d),this.hostname=H.join(".");break}}}if(this.hostname=this.hostname.length>s?"":this.hostname.toLowerCase(),!A){for(var K=this.hostname.split("."),L=[],m=0;mm;m++){var P=p[m],Q=encodeURIComponent(P);Q===P&&(Q=escape(P)),d=d.split(P).join(Q)}var R=d.indexOf("#");-1!==R&&(this.hash=d.substr(R),d=d.slice(0,R));var S=d.indexOf("?");if(-1!==S?(this.search=d.substr(S),this.query=d.substr(S+1),b&&(this.query=y.parse(this.query)),d=d.slice(0,S)):b&&(this.search="",this.query={}),d&&(this.pathname=d),x[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var N=this.pathname||"",M=this.search||"";this.path=N+M}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j.isObject(this.query)&&k.keys(this.query).length&&(f=y.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==k.substr(b,-1)&&(b+=":"),this.slashes||(!b||x[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(j.isString(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(k.forEach(k.keys(this),function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return k.forEach(k.keys(a),function(b){"protocol"!==b&&(c[b]=a[b])}),x[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!x[a.protocol])return k.forEach(k.keys(a),function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||w[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),i=a.host||a.pathname&&"/"===a.pathname.charAt(0),l=i||h||c.host&&a.pathname,m=l,n=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],o=c.protocol&&!x[c.protocol];if(o&&(c.hostname="",c.port=null,c.host&&(""===n[0]?n[0]=c.host:n.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),l=l&&(""===e[0]||""===n[0])),i)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,n=e;else if(e.length)n||(n=[]),n.pop(),n=n.concat(e),c.search=a.search,c.query=a.query;else if(!j.isNullOrUndefined(a.search)){if(o){c.hostname=c.host=n.shift();var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return c.search=a.search,c.query=a.query,j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!n.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var q=n.slice(-1)[0],r=(c.host||a.host)&&("."===q||".."===q)||""===q,s=0,t=n.length;t>=0;t--)q=n[t],"."==q?n.splice(t,1):".."===q?(n.splice(t,1),s++):s&&(n.splice(t,1),s--);if(!l&&!m)for(;s--;s)n.unshift("..");!l||""===n[0]||n[0]&&"/"===n[0].charAt(0)||n.unshift(""),r&&"/"!==k.substr(n.join("/"),-1)&&n.push("");var u=""===n[0]||n[0]&&"/"===n[0].charAt(0);if(o){c.hostname=c.host=u?"":n.length?n.shift():"";var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return l=l||c.host&&n.length,l&&!u&&n.unshift(""),n.length?c.pathname=n.join("/"):(c.pathname=null,c.path=null),j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=m.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{_shims:2,querystring:6,util:8}],8:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a){return a}function g(a){var b={};return G.forEach(a,function(a){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=G.keys(b),p=g(o);if(a.showHidden&&(o=G.getOwnPropertyNames(b)),0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?l(a,b,c,d,String(g),!0):"");return G.forEach(e,function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=G.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),i||(G.indexOf(a.seen,j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=G.reduce(a,function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return G.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===C(a)}function w(a){return"object"==typeof a&&a}function x(a){return w(a)&&"[object Date]"===C(a)}function y(a){return w(a)&&"[object Error]"===C(a)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.binarySlice}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),I[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=a("_shims"),H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=B;var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=function(a,b){a.super_=b,a.prototype=G.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},c._extend=function(a,b){if(!b||!w(b))return a;for(var c=G.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{_shims:2}],9:[function(a,b,c){c.readIEEE754=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],10:[function(a,b,c){function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(b,c,f){if(E||(E=a("assert")),!(this instanceof e))return new e(b,c,f);if(this.parent=this,this.offset=0,"base64"==c&&"string"==typeof b)for(b=d(b);b.length%4!=0;)b+="=";var h;if("number"==typeof f){this.length=g(c);for(var j=0;j=b?b:a>=0?a:(a+=b,a>=0?a:0))}function g(a){return a=~~Math.ceil(+a),0>a?0:a}function h(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}function i(a){return h(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function j(a){return 16>a?"0"+a.toString(16):a.toString(16)}function k(a){for(var b=[],c=0;ce&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function o(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function p(a,b,c,d){var e=0;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=a.length?0:(c?(e=a[b]<<8,b+1=a.length?0:(c?(b+1>>0):(b+2>>0)),e)}function r(a,b,c,d){var e,f;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=0,"specified a negative value for writing an unsigned value"),E.ok(b>=a,"value is larger than maximum value for type"),E.ok(Math.floor(a)===a,"value has a fractional component")}function w(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1>>8*(d?1-f:f)}function x(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3>>8*(d?3-f:f)&255}function y(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value"),E.ok(Math.floor(a)===a,"value has a fractional component")}function z(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value")}function A(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e)}function B(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e) -}function C(b,c,d,e,f){f||(E.ok(void 0!==c&&null!==c,"missing value"),E.ok("boolean"==typeof e,"missing or invalid endian"),E.ok(void 0!==d&&null!==d,"missing offset"),E.ok(d+3a||a>=this.length)throw new Error("oob");return this[a]},e.prototype.set=function(a,b){if(0>a||a>=this.length)throw new Error("oob");return this[a]=b},e.byteLength=function(a,b){switch(b||"utf8"){case"hex":return a.length/2;case"utf8":case"utf-8":return k(a).length;case"ascii":case"binary":return a.length;case"base64":return m(a).length;default:throw new Error("Unknown encoding")}},e.prototype.utf8Write=function(a,b,c){return e._charsWritten=n(k(a),this,b,c)},e.prototype.asciiWrite=function(a,b,c){return e._charsWritten=n(l(a),this,b,c)},e.prototype.binaryWrite=e.prototype.asciiWrite,e.prototype.base64Write=function(a,b,c){return e._charsWritten=n(m(a),this,b,c)},e.prototype.base64Slice=function(){var b=Array.prototype.slice.apply(this,arguments);return a("base64-js").fromByteArray(b)},e.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",d=0;dd;d++)if(a[d]=j(this[d]),d==c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},e.prototype.hexSlice=function(a,b){var c=this.length;(!a||0>a)&&(a=0),(!b||0>b||b>c)&&(b=c);for(var d="",e=a;b>e;e++)d+=j(this[e]);return d},e.prototype.toString=function(a,b,c){if(a=String(a||"utf8").toLowerCase(),b=+b||0,"undefined"==typeof c&&(c=this.length),+c==b)return"";switch(a){case"hex":return this.hexSlice(b,c);case"utf8":case"utf-8":return this.utf8Slice(b,c);case"ascii":return this.asciiSlice(b,c);case"binary":return this.binarySlice(b,c);case"base64":return this.base64Slice(b,c);case"ucs2":case"ucs-2":return this.ucs2Slice(b,c);default:throw new Error("Unknown encoding")}},e.prototype.hexWrite=function(a,b,c){b=+b||0;var d=this.length-b;c?(c=+c,c>d&&(c=d)):c=d;var f=a.length;if(f%2)throw new Error("Invalid hex string");c>f/2&&(c=f/2);for(var g=0;c>g;g++){var h=parseInt(a.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");this[b+g]=h}return e._charsWritten=2*g,g},e.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b,b=c,c=e}b=+b||0;var f=this.length-b;switch(c?(c=+c,c>f&&(c=f)):c=f,d=String(d||"utf8").toLowerCase()){case"hex":return this.hexWrite(a,b,c);case"utf8":case"utf-8":return this.utf8Write(a,b,c);case"ascii":return this.asciiWrite(a,b,c);case"binary":return this.binaryWrite(a,b,c);case"base64":return this.base64Write(a,b,c);case"ucs2":case"ucs-2":return this.ucs2Write(a,b,c);default:throw new Error("Unknown encoding")}},e.prototype.slice=function(a,b){var c=this.length;return a=f(a,c,0),b=f(b,c,c),new e(this,b-a,+a)},e.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),(void 0===d||isNaN(d))&&(d=this.length),b||(b=0),c>d)throw new Error("sourceEnd < sourceStart");if(d===c)return 0;if(0==a.length||0==e.length)return 0;if(0>b||b>=a.length)throw new Error("targetStart out of bounds");if(0>c||c>=e.length)throw new Error("sourceStart out of bounds");if(0>d||d>e.length)throw new Error("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bg;g++)E.ok("undefined"!=typeof this[g],"copying undefined buffer bytes!"),f.push(this[g]);for(var g=b;gc)throw new Error("end < start");if(c===b)return 0;if(0==this.length)return 0;if(0>b||b>=this.length)throw new Error("start out of bounds");if(0>c||c>this.length)throw new Error("end out of bounds");for(var d=b;c>d;d++)this[d]=a},e.isBuffer=function(a){return a instanceof e||a instanceof e},e.concat=function(a,b){if(!h(a))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new e(0);if(1===a.length)return a[0];if("number"!=typeof b){b=0;for(var c=0;c=c.length?void 0:c[a]},e.prototype.readUInt16LE=function(a,b){return p(this,a,!1,b)},e.prototype.readUInt16BE=function(a,b){return p(this,a,!0,b)},e.prototype.readUInt32LE=function(a,b){return q(this,a,!1,b)},e.prototype.readUInt32BE=function(a,b){return q(this,a,!0,b)},e.prototype.readInt8=function(a,b){var c,d=this;return b||(E.ok(void 0!==a&&null!==a,"missing offset"),E.ok(a=d.length?void 0:(c=128&d[a],c?-1*(255-d[a]+1):d[a])},e.prototype.readInt16LE=function(a,b){return r(this,a,!1,b)},e.prototype.readInt16BE=function(a,b){return r(this,a,!0,b)},e.prototype.readInt32LE=function(a,b){return s(this,a,!1,b)},e.prototype.readInt32BE=function(a,b){return s(this,a,!0,b)},e.prototype.readFloatLE=function(a,b){return t(this,a,!1,b)},e.prototype.readFloatBE=function(a,b){return t(this,a,!0,b)},e.prototype.readDoubleLE=function(a,b){return u(this,a,!1,b)},e.prototype.readDoubleBE=function(a,b){return u(this,a,!0,b)},e.prototype.writeUInt8=function(a,b,c){var d=this;c||(E.ok(void 0!==a&&null!==a,"missing value"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b=0?d.writeUInt8(a,b,c):d.writeUInt8(255+a+1,b,c)},e.prototype.writeInt16LE=function(a,b,c){A(this,a,b,!1,c)},e.prototype.writeInt16BE=function(a,b,c){A(this,a,b,!0,c)},e.prototype.writeInt32LE=function(a,b,c){B(this,a,b,!1,c)},e.prototype.writeInt32BE=function(a,b,c){B(this,a,b,!0,c)},e.prototype.writeFloatLE=function(a,b,c){C(this,a,b,!1,c)},e.prototype.writeFloatBE=function(a,b,c){C(this,a,b,!0,c)},e.prototype.writeDoubleLE=function(a,b,c){D(this,a,b,!1,c)},e.prototype.writeDoubleBE=function(a,b,c){D(this,a,b,!0,c)}},{"./buffer_ieee754":9,assert:3,"base64-js":11}],11:[function(a,b){!function(){"use strict";function a(a){var b,c,e,f,g,h;if(a.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(g=a.indexOf("="),g=g>0?a.length-g:0,h=[],e=g>0?a.length-4:a.length,b=0,c=0;e>b;b+=4,c+=3)f=d.indexOf(a[b])<<18|d.indexOf(a[b+1])<<12|d.indexOf(a[b+2])<<6|d.indexOf(a[b+3]),h.push((16711680&f)>>16),h.push((65280&f)>>8),h.push(255&f);return 2===g?(f=d.indexOf(a[b])<<2|d.indexOf(a[b+1])>>4,h.push(255&f)):1===g&&(f=d.indexOf(a[b])<<10|d.indexOf(a[b+1])<<4|d.indexOf(a[b+2])>>2,h.push(f>>8&255),h.push(255&f)),h}function c(a){function b(a){return d[a>>18&63]+d[a>>12&63]+d[a>>6&63]+d[63&a]}var c,e,f,g=a.length%3,h="";for(c=0,f=a.length-g;f>c;c+=3)e=(a[c]<<16)+(a[c+1]<<8)+a[c+2],h+=b(e);switch(g){case 1:e=a[a.length-1],h+=d[e>>2],h+=d[e<<4&63],h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=d[e>>10],h+=d[e>>4&63],h+=d[e<<2&63],h+="="}return h}var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports.toByteArray=a,b.exports.fromByteArray=c}()},{}],12:[function(a,b){a=function c(b,d,e){function f(h,i){if(!d[h]){if(!b[h]){var j="function"==typeof a&&a;if(!i&&j)return j(h,!0);if(g)return g(h,!0);throw new Error("Cannot find module '"+h+"'")}var k=d[h]={exports:{}};b[h][0].call(k.exports,function(a){var c=b[h][1][a];return f(c?c:a)},k,k.exports,c,b,d,e)}return d[h].exports}for(var g="function"==typeof a&&a,h=0;h>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],q9TxCC:[function(a,b,c){function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(b,c,f){if(E||(E=a("assert")),!(this instanceof e))return new e(b,c,f);if(this.parent=this,this.offset=0,"base64"==c&&"string"==typeof b)for(b=d(b);b.length%4!=0;)b+="=";var h;if("number"==typeof f){this.length=g(c);for(var j=0;j=b?b:a>=0?a:(a+=b,a>=0?a:0))}function g(a){return a=~~Math.ceil(+a),0>a?0:a}function h(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}function i(a){return h(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function j(a){return 16>a?"0"+a.toString(16):a.toString(16)}function k(a){for(var b=[],c=0;ce&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function o(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function p(a,b,c,d){var e=0;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=a.length?0:(c?(e=a[b]<<8,b+1=a.length?0:(c?(b+1>>0):(b+2>>0)),e)}function r(a,b,c,d){var e,f;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=0,"specified a negative value for writing an unsigned value"),E.ok(b>=a,"value is larger than maximum value for type"),E.ok(Math.floor(a)===a,"value has a fractional component")}function w(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1>>8*(d?1-f:f)}function x(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3>>8*(d?3-f:f)&255}function y(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value"),E.ok(Math.floor(a)===a,"value has a fractional component")}function z(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value")}function A(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e)}function B(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e)}function C(b,c,d,e,f){f||(E.ok(void 0!==c&&null!==c,"missing value"),E.ok("boolean"==typeof e,"missing or invalid endian"),E.ok(void 0!==d&&null!==d,"missing offset"),E.ok(d+3a||a>=this.length)throw new Error("oob");return this[a]},e.prototype.set=function(a,b){if(0>a||a>=this.length)throw new Error("oob");return this[a]=b},e.byteLength=function(a,b){switch(b||"utf8"){case"hex":return a.length/2;case"utf8":case"utf-8":return k(a).length;case"ascii":case"binary":return a.length;case"base64":return m(a).length;default:throw new Error("Unknown encoding")}},e.prototype.utf8Write=function(a,b,c){return e._charsWritten=n(k(a),this,b,c)},e.prototype.asciiWrite=function(a,b,c){return e._charsWritten=n(l(a),this,b,c)},e.prototype.binaryWrite=e.prototype.asciiWrite,e.prototype.base64Write=function(a,b,c){return e._charsWritten=n(m(a),this,b,c)},e.prototype.base64Slice=function(){var b=Array.prototype.slice.apply(this,arguments);return a("base64-js").fromByteArray(b)},e.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",d=0;dd;d++)if(a[d]=j(this[d]),d==c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},e.prototype.hexSlice=function(a,b){var c=this.length;(!a||0>a)&&(a=0),(!b||0>b||b>c)&&(b=c);for(var d="",e=a;b>e;e++)d+=j(this[e]);return d},e.prototype.toString=function(a,b,c){if(a=String(a||"utf8").toLowerCase(),b=+b||0,"undefined"==typeof c&&(c=this.length),+c==b)return"";switch(a){case"hex":return this.hexSlice(b,c);case"utf8":case"utf-8":return this.utf8Slice(b,c);case"ascii":return this.asciiSlice(b,c);case"binary":return this.binarySlice(b,c);case"base64":return this.base64Slice(b,c);case"ucs2":case"ucs-2":return this.ucs2Slice(b,c);default:throw new Error("Unknown encoding")}},e.prototype.hexWrite=function(a,b,c){b=+b||0;var d=this.length-b;c?(c=+c,c>d&&(c=d)):c=d;var f=a.length;if(f%2)throw new Error("Invalid hex string");c>f/2&&(c=f/2);for(var g=0;c>g;g++){var h=parseInt(a.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");this[b+g]=h}return e._charsWritten=2*g,g},e.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b,b=c,c=e}b=+b||0;var f=this.length-b;switch(c?(c=+c,c>f&&(c=f)):c=f,d=String(d||"utf8").toLowerCase()){case"hex":return this.hexWrite(a,b,c);case"utf8":case"utf-8":return this.utf8Write(a,b,c);case"ascii":return this.asciiWrite(a,b,c);case"binary":return this.binaryWrite(a,b,c);case"base64":return this.base64Write(a,b,c);case"ucs2":case"ucs-2":return this.ucs2Write(a,b,c);default:throw new Error("Unknown encoding")}},e.prototype.slice=function(a,b){var c=this.length;return a=f(a,c,0),b=f(b,c,c),new e(this,b-a,+a)},e.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),(void 0===d||isNaN(d))&&(d=this.length),b||(b=0),c>d)throw new Error("sourceEnd < sourceStart");if(d===c)return 0;if(0==a.length||0==e.length)return 0;if(0>b||b>=a.length)throw new Error("targetStart out of bounds");if(0>c||c>=e.length)throw new Error("sourceStart out of bounds");if(0>d||d>e.length)throw new Error("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bg;g++)E.ok("undefined"!=typeof this[g],"copying undefined buffer bytes!"),f.push(this[g]);for(var g=b;gc)throw new Error("end < start");if(c===b)return 0;if(0==this.length)return 0;if(0>b||b>=this.length)throw new Error("start out of bounds");if(0>c||c>this.length)throw new Error("end out of bounds");for(var d=b;c>d;d++)this[d]=a},e.isBuffer=function(a){return a instanceof e||a instanceof e},e.concat=function(a,b){if(!h(a))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new e(0);if(1===a.length)return a[0];if("number"!=typeof b){b=0;for(var c=0;c=c.length?void 0:c[a]},e.prototype.readUInt16LE=function(a,b){return p(this,a,!1,b)},e.prototype.readUInt16BE=function(a,b){return p(this,a,!0,b)},e.prototype.readUInt32LE=function(a,b){return q(this,a,!1,b)},e.prototype.readUInt32BE=function(a,b){return q(this,a,!0,b)},e.prototype.readInt8=function(a,b){var c,d=this;return b||(E.ok(void 0!==a&&null!==a,"missing offset"),E.ok(a=d.length?void 0:(c=128&d[a],c?-1*(255-d[a]+1):d[a])},e.prototype.readInt16LE=function(a,b){return r(this,a,!1,b)},e.prototype.readInt16BE=function(a,b){return r(this,a,!0,b)},e.prototype.readInt32LE=function(a,b){return s(this,a,!1,b)},e.prototype.readInt32BE=function(a,b){return s(this,a,!0,b)},e.prototype.readFloatLE=function(a,b){return t(this,a,!1,b)},e.prototype.readFloatBE=function(a,b){return t(this,a,!0,b)},e.prototype.readDoubleLE=function(a,b){return u(this,a,!1,b)},e.prototype.readDoubleBE=function(a,b){return u(this,a,!0,b)},e.prototype.writeUInt8=function(a,b,c){var d=this;c||(E.ok(void 0!==a&&null!==a,"missing value"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b=0?d.writeUInt8(a,b,c):d.writeUInt8(255+a+1,b,c)},e.prototype.writeInt16LE=function(a,b,c){A(this,a,b,!1,c)},e.prototype.writeInt16BE=function(a,b,c){A(this,a,b,!0,c)},e.prototype.writeInt32LE=function(a,b,c){B(this,a,b,!1,c)},e.prototype.writeInt32BE=function(a,b,c){B(this,a,b,!0,c)},e.prototype.writeFloatLE=function(a,b,c){C(this,a,b,!1,c)},e.prototype.writeFloatBE=function(a,b,c){C(this,a,b,!0,c)},e.prototype.writeDoubleLE=function(a,b,c){D(this,a,b,!1,c)},e.prototype.writeDoubleBE=function(a,b,c){D(this,a,b,!0,c)}},{"./buffer_ieee754":1,assert:6,"base64-js":4}],"buffer-browserify":[function(a,b){b.exports=a("q9TxCC")},{}],4:[function(a,b){!function(){"use strict";function a(a){var b,c,e,f,g,h;if(a.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(g=a.indexOf("="),g=g>0?a.length-g:0,h=[],e=g>0?a.length-4:a.length,b=0,c=0;e>b;b+=4,c+=3)f=d.indexOf(a[b])<<18|d.indexOf(a[b+1])<<12|d.indexOf(a[b+2])<<6|d.indexOf(a[b+3]),h.push((16711680&f)>>16),h.push((65280&f)>>8),h.push(255&f);return 2===g?(f=d.indexOf(a[b])<<2|d.indexOf(a[b+1])>>4,h.push(255&f)):1===g&&(f=d.indexOf(a[b])<<10|d.indexOf(a[b+1])<<4|d.indexOf(a[b+2])>>2,h.push(f>>8&255),h.push(255&f)),h}function c(a){function b(a){return d[a>>18&63]+d[a>>12&63]+d[a>>6&63]+d[63&a]}var c,e,f,g=a.length%3,h="";for(c=0,f=a.length-g;f>c;c+=3)e=(a[c]<<16)+(a[c+1]<<8)+a[c+2],h+=b(e);switch(g){case 1:e=a[a.length-1],h+=d[e>>2],h+=d[e<<4&63],h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=d[e>>10],h+=d[e>>4&63],h+=d[e<<2&63],h+="="}return h}var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports.toByteArray=a,b.exports.fromByteArray=c}()},{}],5:[function(a,b,c){function d(a){return"[object Array]"===j.call(a)}function e(a,b){var c;if(null===a)c={__proto__:null};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return"undefined"!=typeof b&&Object.defineProperties&&Object.defineProperties(c,b),c}function f(a){return"object"!=typeof a&&"function"!=typeof a||null===a}function g(a){if(f(a))throw new TypeError("Object.keys called on a non-object");var b=[];for(var c in a)k.call(a,c)&&b.push(c);return b}function h(a){if(f(a))throw new TypeError("Object.getOwnPropertyNames called on a non-object");var b=g(a);return c.isArray(a)&&-1===c.indexOf(a,"length")&&b.push("length"),b}function i(a,b){return{value:a[b]}}var j=Object.prototype.toString,k=Object.prototype.hasOwnProperty;c.isArray="function"==typeof Array.isArray?Array.isArray:d,c.indexOf=function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;cf;++f)a.hasOwnProperty(f)&&(e?d=b(d,a[f],f,a):(d=a[f],e=!0));return d},c.substr="b"!=="ab".substr(-1)?function(a,b,c){return 0>b&&(b=a.length+b),a.substr(b,c)}:function(a,b,c){return a.substr(b,c)},c.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},c.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var c=a.shift();return function(){b.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}},c.create="function"==typeof Object.create?Object.create:e;var l="function"==typeof Object.keys?Object.keys:g,m="function"==typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:h;if((new Error).hasOwnProperty("description")){var n=function(a,b){return"[object Error]"===j.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a})),b};c.keys=function(a){return n(a,l(a))},c.getOwnPropertyNames=function(a){return n(a,m(a))}}else c.keys=l,c.getOwnPropertyNames=m;if("function"==typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(o){c.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return i(a,b)}}}else c.getOwnPropertyDescriptor=i},{}],6:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:!m.isNumber(b)||!isNaN(b)&&isFinite(b)?m.isFunction(b)||m.isRegExp(b)?b.toString():b:b.toString()}function d(a,b){return m.isString(a)?a.length=0;d--)if(e[d]!=f[d])return!1;for(d=e.length-1;d>=0;d--)if(c=e[d],!h(a[c],b[c]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util"),n=a("_shims"),o=Array.prototype.slice,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,this.message=a.message||e(this)},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p.throws=function(){l.apply(this,[!0].concat(o.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(o.call(arguments)))},p.ifError=function(a){if(a)throw a}},{_shims:5,util:7}],7:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a){return a}function g(a){var b={};return G.forEach(a,function(a){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=G.keys(b),p=g(o);if(a.showHidden&&(o=G.getOwnPropertyNames(b)),0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?l(a,b,c,d,String(g),!0):"");return G.forEach(e,function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=G.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),i||(G.indexOf(a.seen,j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i; -g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=G.reduce(a,function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return G.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===C(a)}function w(a){return"object"==typeof a&&a}function x(a){return w(a)&&"[object Date]"===C(a)}function y(a){return w(a)&&"[object Error]"===C(a)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return a instanceof Buffer}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),I[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=a("_shims"),H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=B;var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=function(a,b){a.super_=b,a.prototype=G.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},c._extend=function(a,b){if(!b||!w(b))return a;for(var c=G.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{_shims:5}]},{},[]),b.exports=a("buffer-browserify")},{}],13:[function(a,b){var c=b.exports={};c.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],14:[function(a,b){b.exports={compact:a("./arrays/compact"),difference:a("./arrays/difference"),drop:a("./arrays/rest"),findIndex:a("./arrays/findIndex"),findLastIndex:a("./arrays/findLastIndex"),first:a("./arrays/first"),flatten:a("./arrays/flatten"),head:a("./arrays/first"),indexOf:a("./arrays/indexOf"),initial:a("./arrays/initial"),intersection:a("./arrays/intersection"),last:a("./arrays/last"),lastIndexOf:a("./arrays/lastIndexOf"),object:a("./arrays/zipObject"),pull:a("./arrays/pull"),range:a("./arrays/range"),remove:a("./arrays/remove"),rest:a("./arrays/rest"),sortedIndex:a("./arrays/sortedIndex"),tail:a("./arrays/rest"),take:a("./arrays/first"),union:a("./arrays/union"),uniq:a("./arrays/uniq"),unique:a("./arrays/uniq"),unzip:a("./arrays/zip"),without:a("./arrays/without"),xor:a("./arrays/xor"),zip:a("./arrays/zip"),zipObject:a("./arrays/zipObject")}},{"./arrays/compact":15,"./arrays/difference":16,"./arrays/findIndex":17,"./arrays/findLastIndex":18,"./arrays/first":19,"./arrays/flatten":20,"./arrays/indexOf":21,"./arrays/initial":22,"./arrays/intersection":23,"./arrays/last":24,"./arrays/lastIndexOf":25,"./arrays/pull":26,"./arrays/range":27,"./arrays/remove":28,"./arrays/rest":29,"./arrays/sortedIndex":30,"./arrays/union":31,"./arrays/uniq":32,"./arrays/without":33,"./arrays/xor":34,"./arrays/zip":35,"./arrays/zipObject":36}],15:[function(a,b){function c(a){for(var b=-1,c=a?a.length:0,d=[];++bc?f(0,g+c):c||0}else if(c){var h=e(a,b);return a[h]===b?h:-1}return d(a,b,c)}var d=a("../internals/baseIndexOf"),e=a("./sortedIndex"),f=Math.max;b.exports=c},{"../internals/baseIndexOf":96,"./sortedIndex":30}],22:[function(a,b){function c(a,b,c){var h=0,i=a?a.length:0;if("number"!=typeof b&&null!=b){var j=i;for(b=d(b,c,3);j--&&b(a[j],j,a);)h++}else h=null==b||c?1:b||h;return e(a,0,g(f(0,i-h),i))}var d=a("../functions/createCallback"),e=a("../internals/slice"),f=Math.max,g=Math.min;b.exports=c},{"../functions/createCallback":76,"../internals/slice":129}],23:[function(a,b){function c(){for(var a=[],b=-1,c=arguments.length,m=g(),n=d,o=n===d,p=g();++b=j&&f(b?a[b]:p)))}var r=a[0],s=-1,t=r?r.length:0,u=[];a:for(;++sc?d(0,f+c):e(c,f-1))+1);f--;)if(a[f]===b)return f;return-1}var d=Math.max,e=Math.min;b.exports=c},{}],26:[function(a,b){function c(a){for(var b=arguments,c=0,d=b.length,f=a?a.length:0;++cg;){var i=g+h>>>1;c(a[i])1?arguments:arguments[0],b=-1,c=a?d(e(a,"length")):0,f=Array(0>c?0:c);++bc?h(0,k+c):c)||0,f(a)?l=j(a,b,c)>-1:"number"==typeof k?l=(g(a)?a.indexOf(b,c):j(a,b,c))>-1:e(a,function(a){return++i>=c?!(l=a===b):void 0}),l}var d=a("../internals/baseIndexOf"),e=a("../objects/forOwn"),f=a("../objects/isArray"),g=a("../objects/isString"),h=Math.max;b.exports=c},{"../internals/baseIndexOf":96,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161}],46:[function(a,b){var c=a("../internals/createAggregator"),d=Object.prototype,e=d.hasOwnProperty,f=c(function(a,b,c){e.call(a,c)?a[c]++:a[c]=1});b.exports=f},{"../internals/createAggregator":105}],47:[function(a,b){function c(a,b,c){var f=!0;b=d(b,c,3);var g=-1,h=a?a.length:0;if("number"==typeof h)for(;++gj&&(j=m)}else b=null==b&&h(a)?d:e(b,c,3),f(a,function(a,c,d){var e=b(a,c,d);e>i&&(i=e,j=a)});return j}var d=a("../internals/charAtCallback"),e=a("../functions/createCallback"),f=a("./forEach"),g=(a("../objects/forOwn"),a("../objects/isArray")),h=a("../objects/isString");b.exports=c},{"../functions/createCallback":76,"../internals/charAtCallback":103,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161,"./forEach":51}],58:[function(a,b){function c(a,b,c){var i=1/0,j=i;if("function"!=typeof b&&c&&c[b]===a&&(b=null),null==b&&g(a))for(var k=-1,l=a.length;++km&&(j=m)}else b=null==b&&h(a)?d:e(b,c,3),f(a,function(a,c,d){var e=b(a,c,d);i>e&&(i=e,j=a)});return j}var d=a("../internals/charAtCallback"),e=a("../functions/createCallback"),f=a("./forEach"),g=(a("../objects/forOwn"),a("../objects/isArray")),h=a("../objects/isString");b.exports=c},{"../functions/createCallback":76,"../internals/charAtCallback":103,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isString":161,"./forEach":51}],59:[function(a,b){var c=a("./map"),d=c;b.exports=d},{"./map":56}],60:[function(a,b){function c(a,b,c,f){if(!a)return c;var g=arguments.length<3;b=d(b,f,4);var h=-1,i=a.length;if("number"==typeof i)for(g&&(c=a[++h]);++h2?d(a,17,e(arguments,2),null,b):d(a,1,null,null,b)}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],73:[function(a,b){function c(a){for(var b=arguments.length>1?d(arguments,!0,!1,1):f(a),c=-1,g=b.length;++c2?d(b,19,e(arguments,2),null,a):d(b,3,null,null,a)}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],75:[function(a,b){function c(){for(var a=arguments,b=a.length;b--;)if(!d(a[b]))throw new TypeError;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}var d=a("../objects/isFunction");b.exports=c},{"../objects/isFunction":154}],76:[function(a,b){function c(a,b,c){var i=typeof a;if(null==a||"function"==i)return d(a,b,c);if("object"!=i)return h(a);var j=g(a),k=j[0],l=a[k];return 1!=j.length||l!==l||f(l)?function(b){for(var c=j.length,d=!1;c--&&(d=e(b[j[c]],a[j[c]],null,!0)););return d}:function(a){var b=a[k];return l===b&&(0!==l||1/l==1/b)}}var d=a("../internals/baseCreateCallback"),e=a("../internals/baseIsEqual"),f=a("../objects/isObject"),g=a("../objects/keys"),h=a("../utilities/property");b.exports=c},{"../internals/baseCreateCallback":92,"../internals/baseIsEqual":97,"../objects/isObject":158,"../objects/keys":163,"../utilities/property":181}],77:[function(a,b){function c(a,b){return b="number"==typeof b?b:+b||a.length,d(a,4,null,null,null,b)}var d=a("../internals/createWrapper");b.exports=c},{"../internals/createWrapper":107}],78:[function(a,b){function c(a,b,c){var h,i,j,k,l,m,n,o=0,p=!1,q=!0;if(!d(a))throw new TypeError;if(b=g(0,b)||0,c===!0){var r=!0;q=!1}else e(c)&&(r=c.leading,p="maxWait"in c&&(g(b,c.maxWait)||0),q="trailing"in c?c.trailing:q);var s=function(){var c=b-(f()-k);if(0>=c){i&&clearTimeout(i);var d=n;i=m=n=void 0,d&&(o=f(),j=a.apply(l,h),m||i||(h=l=null))}else m=setTimeout(s,c)},t=function(){m&&clearTimeout(m),i=m=n=void 0,(q||p!==b)&&(o=f(),j=a.apply(l,h),m||i||(h=l=null))};return function(){if(h=arguments,k=f(),l=this,n=q&&(m||!r),p===!1)var c=r&&!m;else{i||r||(o=k);var d=p-(k-o),e=0>=d;e?(i&&(i=clearTimeout(i)),o=k,j=a.apply(l,h)):i||(i=setTimeout(t,d))}return e&&m?m=clearTimeout(m):m||b===p||(m=setTimeout(s,b)),c&&(e=!0,j=a.apply(l,h)),!e||m||i||(h=l=null),j}}var d=a("../objects/isFunction"),e=a("../objects/isObject"),f=a("../utilities/now"),g=Math.max;b.exports=c},{"../objects/isFunction":154,"../objects/isObject":158,"../utilities/now":179}],79:[function(a,b){function c(a){if(!d(a))throw new TypeError;var b=e(arguments,1);return setTimeout(function(){a.apply(void 0,b)},1)}var d=a("../objects/isFunction"),e=a("../internals/slice");b.exports=c},{"../internals/slice":129,"../objects/isFunction":154}],80:[function(a,b){function c(a,b){if(!d(a))throw new TypeError;var c=e(arguments,2);return setTimeout(function(){a.apply(void 0,c)},b)}var d=a("../objects/isFunction"),e=a("../internals/slice");b.exports=c},{"../internals/slice":129,"../objects/isFunction":154}],81:[function(a,b){function c(a,b){if(!d(a))throw new TypeError;var c=function(){var d=c.cache,f=b?b.apply(this,arguments):e+arguments[0];return g.call(d,f)?d[f]:d[f]=a.apply(this,arguments)};return c.cache={},c}var d=a("../objects/isFunction"),e=a("../internals/keyPrefix"),f=Object.prototype,g=f.hasOwnProperty;b.exports=c},{"../internals/keyPrefix":115,"../objects/isFunction":154}],82:[function(a,b){function c(a){var b,c;if(!d(a))throw new TypeError;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}var d=a("../objects/isFunction");b.exports=c},{"../objects/isFunction":154}],83:[function(a,b){function c(a){return d(a,16,e(arguments,1))}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],84:[function(a,b){function c(a){return d(a,32,null,e(arguments,1))}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":107,"../internals/slice":129}],85:[function(a,b){function c(a,b,c){var h=!0,i=!0;if(!e(a))throw new TypeError;return c===!1?h=!1:f(c)&&(h="leading"in c?c.leading:h,i="trailing"in c?c.trailing:i),g.leading=h,g.maxWait=b,g.trailing=i,d(a,b,g)}var d=a("./debounce"),e=a("../objects/isFunction"),f=a("../objects/isObject"),g={leading:!1,maxWait:0,trailing:!1};b.exports=c},{"../objects/isFunction":154,"../objects/isObject":158,"./debounce":78}],86:[function(a,b){function c(a,b){return d(b,16,[a])}var d=a("../internals/createWrapper");b.exports=c},{"../internals/createWrapper":107}],87:[function(a,b){function c(a){return a&&"object"==typeof a&&!l(a)&&r.call(a,"__wrapped__")?a:new m(a)}var d=a("./arrays"),e=a("./chaining"),f=a("./collections"),g=a("./functions"),h=a("./objects"),i=a("./utilities"),j=a("./collections/forEach"),k=a("./objects/forOwn"),l=a("./objects/isArray"),m=a("./internals/lodashWrapper"),n=a("./utilities/mixin"),o=a("./support"),p=(a("./utilities/templateSettings"),[]),q=Object.prototype,r=q.hasOwnProperty;m.prototype=c.prototype,n=function(a){var b=h.functions;return function(d,e,f){return e&&(f||b(e).length)||(null==f&&(f=e),e=d,d=c),a(d,e,f)}}(n),c.after=g.after,c.assign=h.assign,c.at=f.at,c.bind=g.bind,c.bindAll=g.bindAll,c.bindKey=g.bindKey,c.chain=e.chain,c.compact=d.compact,c.compose=g.compose,c.constant=i.constant,c.countBy=f.countBy,c.create=h.create,c.createCallback=g.createCallback,c.curry=g.curry,c.debounce=g.debounce,c.defaults=h.defaults,c.defer=g.defer,c.delay=g.delay,c.difference=d.difference,c.filter=f.filter,c.flatten=d.flatten,c.forEach=j,c.forEachRight=f.forEachRight,c.forIn=h.forIn,c.forInRight=h.forInRight,c.forOwn=k,c.forOwnRight=h.forOwnRight,c.functions=h.functions,c.groupBy=f.groupBy,c.indexBy=f.indexBy,c.initial=d.initial,c.intersection=d.intersection,c.invert=h.invert,c.invoke=f.invoke,c.keys=h.keys,c.map=f.map,c.mapValues=h.mapValues,c.max=f.max,c.memoize=g.memoize,c.merge=h.merge,c.min=f.min,c.omit=h.omit,c.once=g.once,c.pairs=h.pairs,c.partial=g.partial,c.partialRight=g.partialRight,c.pick=h.pick,c.pluck=f.pluck,c.property=i.property,c.pull=d.pull,c.range=d.range,c.reject=f.reject,c.remove=d.remove,c.rest=d.rest,c.shuffle=f.shuffle,c.sortBy=f.sortBy,c.tap=e.tap,c.throttle=g.throttle,c.times=i.times,c.toArray=f.toArray,c.transform=h.transform,c.union=d.union,c.uniq=d.uniq,c.values=h.values,c.where=f.where,c.without=d.without,c.wrap=g.wrap,c.xor=d.xor,c.zip=d.zip,c.zipObject=d.zipObject,c.collect=f.map,c.drop=d.rest,c.each=j,c.eachRight=f.forEachRight,c.extend=h.assign,c.methods=h.functions,c.object=d.zipObject,c.select=f.filter,c.tail=d.rest,c.unique=d.uniq,c.unzip=d.zip,n(c),c.clone=h.clone,c.cloneDeep=h.cloneDeep,c.contains=f.contains,c.escape=i.escape,c.every=f.every,c.find=f.find,c.findIndex=d.findIndex,c.findKey=h.findKey,c.findLast=f.findLast,c.findLastIndex=d.findLastIndex,c.findLastKey=h.findLastKey,c.has=h.has,c.identity=i.identity,c.indexOf=d.indexOf,c.isArguments=h.isArguments,c.isArray=l,c.isBoolean=h.isBoolean,c.isDate=h.isDate,c.isElement=h.isElement,c.isEmpty=h.isEmpty,c.isEqual=h.isEqual,c.isFinite=h.isFinite,c.isFunction=h.isFunction,c.isNaN=h.isNaN,c.isNull=h.isNull,c.isNumber=h.isNumber,c.isObject=h.isObject,c.isPlainObject=h.isPlainObject,c.isRegExp=h.isRegExp,c.isString=h.isString,c.isUndefined=h.isUndefined,c.lastIndexOf=d.lastIndexOf,c.mixin=n,c.noConflict=i.noConflict,c.noop=i.noop,c.now=i.now,c.parseInt=i.parseInt,c.random=i.random,c.reduce=f.reduce,c.reduceRight=f.reduceRight,c.result=i.result,c.size=f.size,c.some=f.some,c.sortedIndex=d.sortedIndex,c.template=i.template,c.unescape=i.unescape,c.uniqueId=i.uniqueId,c.all=f.every,c.any=f.some,c.detect=f.find,c.findWhere=f.find,c.foldl=f.reduce,c.foldr=f.reduceRight,c.include=f.contains,c.inject=f.reduce,n(function(){var a={}; -return k(c,function(b,d){c.prototype[d]||(a[d]=b)}),a}(),!1),c.first=d.first,c.last=d.last,c.sample=f.sample,c.take=d.first,c.head=d.first,k(c,function(a,b){var d="sample"!==b;c.prototype[b]||(c.prototype[b]=function(b,c){var e=this.__chain__,f=a(this.__wrapped__,b,c);return e||null!=b&&(!c||d&&"function"==typeof b)?new m(f,e):f})}),c.VERSION="2.4.1",c.prototype.chain=e.wrapperChain,c.prototype.toString=e.wrapperToString,c.prototype.value=e.wrapperValueOf,c.prototype.valueOf=e.wrapperValueOf,j(["join","pop","shift"],function(a){var b=p[a];c.prototype[a]=function(){var a=this.__chain__,c=b.apply(this.__wrapped__,arguments);return a?new m(c,a):c}}),j(["push","reverse","sort","unshift"],function(a){var b=p[a];c.prototype[a]=function(){return b.apply(this.__wrapped__,arguments),this}}),j(["concat","slice","splice"],function(a){var b=p[a];c.prototype[a]=function(){return new m(b.apply(this.__wrapped__,arguments),this.__chain__)}}),c.support=o,(c.templateSettings=i.templateSettings).imports._=c,b.exports=c},{"./arrays":14,"./chaining":37,"./collections":43,"./collections/forEach":51,"./functions":70,"./internals/lodashWrapper":117,"./objects":131,"./objects/forOwn":141,"./objects/isArray":147,"./support":171,"./utilities":172,"./utilities/mixin":176,"./utilities/templateSettings":185}],88:[function(a,b){var c=[];b.exports=c},{}],89:[function(a,b){function c(a){function b(){if(h){var a=g(h);i.apply(a,arguments)}if(this instanceof b){var f=d(c.prototype),k=c.apply(f,a||arguments);return e(k)?k:f}return c.apply(j,a||arguments)}var c=a[0],h=a[2],j=a[4];return f(b,a),b}var d=a("./baseCreate"),e=a("../objects/isObject"),f=a("./setBindData"),g=a("./slice"),h=[],i=h.push;b.exports=c},{"../objects/isObject":158,"./baseCreate":91,"./setBindData":126,"./slice":129}],90:[function(a,b){function c(a,b,m,n,q){if(m){var s=m(a);if("undefined"!=typeof s)return s}var w=i(a);if(!w)return a;var A=x.call(a);if(!v[A])return a;var B=z[A];switch(A){case o:case p:return new B(+a);case r:case u:return new B(a);case t:return s=B(a.source,l.exec(a)),s.lastIndex=a.lastIndex,s}var C=h(a);if(b){var D=!n;n||(n=g()),q||(q=g());for(var E=n.length;E--;)if(n[E]==a)return q[E];s=C?B(a.length):{}}else s=C?k(a):d({},a);return C&&(y.call(a,"index")&&(s.index=a.index),y.call(a,"input")&&(s.input=a.input)),b?(n.push(a),q.push(s),(C?e:f)(a,function(a,d){s[d]=c(a,b,m,n,q)}),D&&(j(n),j(q)),s):s}var d=a("../objects/assign"),e=a("../collections/forEach"),f=a("../objects/forOwn"),g=a("./getArray"),h=a("../objects/isArray"),i=a("../objects/isObject"),j=a("./releaseArray"),k=a("./slice"),l=/\w*$/,m="[object Arguments]",n="[object Array]",o="[object Boolean]",p="[object Date]",q="[object Function]",r="[object Number]",s="[object Object]",t="[object RegExp]",u="[object String]",v={};v[q]=!1,v[m]=v[n]=v[o]=v[p]=v[r]=v[s]=v[t]=v[u]=!0;var w=Object.prototype,x=w.toString,y=w.hasOwnProperty,z={};z[n]=Array,z[o]=Boolean,z[p]=Date,z[q]=Function,z[s]=Object,z[r]=Number,z[t]=RegExp,z[u]=String,b.exports=c},{"../collections/forEach":51,"../objects/assign":132,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isObject":158,"./getArray":110,"./releaseArray":124,"./slice":129}],91:[function(a,b){function c(a){return f(a)?g(a):{}}var d="undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e=a("./isNative"),f=a("../objects/isObject"),g=(a("../utilities/noop"),e(g=Object.create)&&g);g||(c=function(){function a(){}return function(b){if(f(b)){a.prototype=b;var c=new a;a.prototype=null}return c||d.Object()}}()),b.exports=c},{"../objects/isObject":158,"../utilities/noop":178,"./isNative":114}],92:[function(a,b){function c(a,b,c){if("function"!=typeof a)return e;if("undefined"==typeof b||!("prototype"in a))return a;var k=a.__bindData__;if("undefined"==typeof k&&(g.funcNames&&(k=!a.name),k=k||!g.funcDecomp,!k)){var l=j.call(a);g.funcNames||(k=!h.test(l)),k||(k=i.test(l),f(a,k))}if(k===!1||k!==!0&&1&k[1])return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return d(a,b)}var d=a("../functions/bind"),e=a("../utilities/identity"),f=a("./setBindData"),g=a("../support"),h=/^\s*function[ \n\r\t]+\w/,i=/\bthis\b/,j=Function.prototype.toString;b.exports=c},{"../functions/bind":72,"../support":171,"../utilities/identity":175,"./setBindData":126}],93:[function(a,b){function c(a){function b(){var a=o?m:this;if(k){var f=g(k);i.apply(f,arguments)}if((l||q)&&(f||(f=g(arguments)),l&&i.apply(f,l),q&&f.length=g,l=[];if(k){var m=f(b);m?(i=e,b=m):k=!1}for(;++c-1:void 0});return u.pop(),v.pop(),G&&(h(u),h(v)),w}var d=a("../objects/forIn"),e=a("./getArray"),f=a("../objects/isFunction"),g=a("./objectTypes"),h=a("./releaseArray"),i="[object Arguments]",j="[object Array]",k="[object Boolean]",l="[object Date]",m="[object Number]",n="[object Object]",o="[object RegExp]",p="[object String]",q=Object.prototype,r=q.toString,s=q.hasOwnProperty;b.exports=c},{"../objects/forIn":139,"../objects/isFunction":154,"./getArray":110,"./objectTypes":120,"./releaseArray":124}],98:[function(a,b){function c(a,b,h,i,j){(f(b)?d:e)(b,function(b,d){var e,k,l=b,m=a[d];if(b&&((k=f(b))||g(b))){for(var n=i.length;n--;)if(e=i[n]==b){m=j[n];break}if(!e){var o;h&&(l=h(m,b),(o="undefined"!=typeof l)&&(m=l)),o||(m=k?f(m)?m:[]:g(m)?m:{}),i.push(b),j.push(m),o||c(m,b,h,i,j)}}else h&&(l=h(m,b),"undefined"==typeof l&&(l=b)),"undefined"!=typeof l&&(m=l);a[d]=m})}var d=a("../collections/forEach"),e=a("../objects/forOwn"),f=a("../objects/isArray"),g=a("../objects/isPlainObject");b.exports=c},{"../collections/forEach":51,"../objects/forOwn":141,"../objects/isArray":147,"../objects/isPlainObject":159}],99:[function(a,b){function c(a,b){return a+d(e()*(b-a+1))}var d=Math.floor,e=Math.random;b.exports=c},{}],100:[function(a,b){function c(a,b,c){var k=-1,l=d,m=a?a.length:0,n=[],o=!b&&m>=h,p=c||o?g():n;if(o){var q=f(p);l=e,p=q}for(;++k-1?0:-1:a?0:-1}var d=a("./baseIndexOf"),e=a("./keyPrefix");b.exports=c},{"./baseIndexOf":96,"./keyPrefix":115}],102:[function(a,b){function c(a){var b=this.cache,c=typeof a;if("boolean"==c||null==a)b[a]=!0;else{"number"!=c&&"string"!=c&&(c="object");var e="number"==c?a:d+a,f=b[c]||(b[c]={});"object"==c?(f[e]||(f[e]=[])).push(a):f[e]=!0}}var d=a("./keyPrefix");b.exports=c},{"./keyPrefix":115}],103:[function(a,b){function c(a){return a.charCodeAt(0)}b.exports=c},{}],104:[function(a,b){function c(a,b){for(var c=a.criteria,d=b.criteria,e=-1,f=c.length;++eh||"undefined"==typeof g)return 1;if(h>g||"undefined"==typeof h)return-1}}return a.index-b.index}b.exports=c},{}],105:[function(a,b){function c(a){return function(b,c,f){var g={};c=d(c,f,3);var h=-1,i=b?b.length:0;if("number"==typeof i)for(;++h":">",'"':""","'":"'"};b.exports=c},{}],113:[function(a,b){var c=a("./htmlEscapes"),d=a("../objects/invert"),e=d(c);b.exports=e},{"../objects/invert":145,"./htmlEscapes":112}],114:[function(a,b){function c(a){return"function"==typeof a&&f.test(a)}var d=Object.prototype,e=d.toString,f=RegExp("^"+String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$");b.exports=c},{}],115:[function(a,b){var c=+new Date+"";b.exports=c},{}],116:[function(a,b){var c=75;b.exports=c},{}],117:[function(a,b){function c(a,b){this.__chain__=!!b,this.__wrapped__=a}b.exports=c},{}],118:[function(a,b){var c=40;b.exports=c},{}],119:[function(a,b){var c=[];b.exports=c},{}],120:[function(a,b){var c={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};b.exports=c},{}],121:[function(a,b){var c=a("./htmlUnescapes"),d=a("../objects/keys"),e=RegExp("("+d(c).join("|")+")","g");b.exports=e},{"../objects/keys":163,"./htmlUnescapes":113}],122:[function(a,b){var c=/<%=([\s\S]+?)%>/g;b.exports=c},{}],123:[function(a,b){var c=a("./htmlEscapes"),d=a("../objects/keys"),e=RegExp("["+d(c).join("")+"]","g");b.exports=e},{"../objects/keys":163,"./htmlEscapes":112}],124:[function(a,b){function c(a){a.length=0,d.lengthe?0:e);++d3&&"function"==typeof j[l-2])var m=c(j[--l-1],j[l--],2);else l>2&&"function"==typeof j[l-1]&&(m=j[--l]);for(;++k3&&"function"==typeof b[c-2])var j=d(b[--c-1],b[c--],2);else c>2&&"function"==typeof b[c-1]&&(j=b[--c]);for(var k=i(arguments,1,c),l=-1,m=f(),n=f();++l/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:{escape:c}}}; -b.exports=e},{"../internals/reInterpolate":122,"./escape":174}],186:[function(a,b){function c(a,b,c){a=(a=+a)>-1?a:0;var e=-1,f=Array(a);for(b=d(b,c,1);++e>>0,i=Math.max(0,Math.min(b,o)),k=[],j=o-i+1,l=[],i)for(n=function(a){l.push(a),--j||(m=n=J,e(l))},m=function(a){k.push(a),--i||(m=n=J,d(k))},p=0;o>p;++p)p in a&&c(a[p],h,g,f);else d(k)}return j(g).then(d,e,f)})}function x(a,b,c,d){function e(a){return b?b(a[0]):a[0]}return w(a,1,e,c,d)}function y(a,b,c,d){return C(a,J).then(b,c,d)}function z(){return C(arguments,J)}function A(a){return C(a,E,F)}function B(a,b){return C(a,b)}function C(a,b,d){return c(a,function(a){function e(e,f,g){function h(a,h){c(a,b,d).then(function(a){i[h]=a,--k||e(i)},f,g)}var i,j,k,l;if(k=j=a.length>>>0,i=[],!k)return void e(i);for(l=0;j>l;l++)l in a?h(a[l],l):--k}return k(e)})}function D(a,b){var d=N(M,arguments,1);return c(a,function(a){var e;return e=a.length,d[0]=function(a,d,f){return c(a,function(a){return c(d,function(c){return b(a,c,f,e)})})},L.apply(a,d)})}function E(a){return{state:"fulfilled",value:a}}function F(a){return{state:"rejected",reason:a}}function G(){return{state:"pending"}}function H(a){1===P.push(a)&&O(I)}function I(){l(P),P=[]}function J(a){return a}function K(a){throw"function"==typeof U.reportUnhandled?U.reportUnhandled():H(function(){throw a}),a}c.promise=j,c.resolve=g,c.reject=h,c.defer=i,c.join=z,c.all=y,c.map=B,c.reduce=D,c.settle=A,c.any=x,c.some=w,c.isPromise=v,c.isPromiseLike=v,f.prototype={then:function(){var a,b;return a=arguments,b=this._message,k(function(c,d,e){b("when",a,c,e)},this._status&&this._status.observed())},otherwise:function(a){return this.then(X,a)},ensure:function(a){function b(){return g(a())}return"function"==typeof a?this.then(b,b)["yield"](this):this},done:function(a,b){this.then(a,b).otherwise(K)},"yield":function(a){return this.then(function(){return a})},tap:function(a){return this.then(a)["yield"](this)},spread:function(a){return this.then(function(b){return y(b,function(b){return a.apply(X,b)})})},always:function(a,b){return this.then(a,a,b)}},s.prototype.when=function(a){return"function"==typeof a?a(this.value):this.value},t.prototype.when=function(a,b){if("function"==typeof b)return b(this.reason);throw this.reason};var L,M,N,O,P,Q,R,S,T,U,V,W,X;if(V=a,P=[],Q=b.setTimeout,U="undefined"!=typeof console?console:c,"object"==typeof d&&d.nextTick)O=d.nextTick;else if(W=b.MutationObserver||b.WebKitMutationObserver)O=function(a,b,c){var d=a.createElement("div");return new b(c).observe(d,{attributes:!0}),function(){d.setAttribute("x","x")}}(document,W,I);else try{O=V("vertx").runOnLoop||V("vertx").runOnContext}catch(Y){O=function(a){Q(a,0)}}return R=Function.prototype,S=R.call,N=R.bind?S.bind(S):function(a,b){return a.apply(b,M.call(arguments,2))},T=[],M=T.slice,L=T.reduce||function(a){var b,c,d,e,f;if(f=0,b=Object(this),e=b.length>>>0,c=arguments,c.length<=1)for(;;){if(f in b){d=b[f++];break}if(++f>=e)throw new TypeError}else d=c[1];for(;e>f;++f)f in b&&(d=a(d,b[f],f,b));return d},c})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)},this)},{__browserify_process:13}],190:[function(a,b){function c(){throw new Error('Looks like you are expecting the previous "elasticsearch" module. It is now the "es" module. To create a client with this module use `new es.Client(params)`.')}c.Client=a("./lib/client"),c.ConnectionPool=a("./lib/connection_pool"),c.Transport=a("./lib/transport"),c.errors=a("./lib/errors"),b.exports=c},{"./lib/client":194,"./lib/connection_pool":197,"./lib/errors":200,"./lib/transport":211}],191:[function(a,b){var c=a("../client_action"),d=b.exports={};d._namespaces=["cluster","indices"],d.bulk=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},type:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.clearScroll=c({url:{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.nodeHotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.cluster.prototype.nodeInfo=c({params:{all:{type:"boolean"},clear:{type:"boolean"},http:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},plugin:{type:"boolean"},process:{type:"boolean"},settings:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},timeout:{type:"time"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes"}]}),d.cluster.prototype.nodeShutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.cluster.prototype.nodeStats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},fields:{type:"list"},fs:{type:"boolean"},http:{type:"boolean"},indices:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},process:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{filterBlocks:{type:"boolean",name:"filter_blocks"},filterIndexTemplates:{type:"boolean",name:"filter_index_templates"},filterIndices:{type:"list",name:"filter_indices"},filterMetadata:{type:"boolean",name:"filter_metadata"},filterNodes:{type:"boolean",name:"filter_nodes"},filterRoutingTable:{type:"boolean",name:"filter_routing_table"},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/state"}}),d.count=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>",req:{index:{type:"list"}}},{fmt:"/"}],method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}],method:"DELETE"}),d.indices.prototype.exists=c({url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},refresh:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mapping/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({urls:[{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},refresh:{type:"boolean"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"string"}}},{fmt:"/_alias"}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},completion:{type:"boolean"},completionFields:{type:"list",name:"completion_fields"},docs:{type:"boolean"},fielddata:{type:"boolean"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},filterCache:{type:"boolean",name:"filter_cache"},flush:{type:"boolean"},get:{type:"boolean"},groups:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indexing:{type:"boolean"},merge:{type:"boolean"},refresh:{type:"boolean"},search:{type:"boolean"},store:{type:"boolean"},warmer:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLen:{type:"number",name:"max_word_len"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLen:{type:"number",name:"min_word_len"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.percolate=c({params:{preferLocal:{type:"boolean",name:"prefer_local"}},url:{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}},needBody:!0,method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.suggest=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":195}],192:[function(a,b){var c=a("../client_action"),d=b.exports={};d._namespaces=["cat","cluster","indices","nodes","snapshot"],d.bulk=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},type:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.cat=function(a){this.transport=a},d.cat.prototype.aliases=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_cat/aliases"}]}),d.cat.prototype.allocation=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/allocation/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cat/allocation"}]}),d.cat.prototype.count=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/count/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/count"}]}),d.cat.prototype.health=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},ts:{type:"boolean","default":!0},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/health"}}),d.cat.prototype.help=c({params:{help:{type:"boolean","default":!1}},url:{fmt:"/_cat"}}),d.cat.prototype.indices=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},pri:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/indices/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/indices"}]}),d.cat.prototype.master=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/master"}}),d.cat.prototype.nodes=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/nodes"}}),d.cat.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/pending_tasks"}}),d.cat.prototype.recovery=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/recovery/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/recovery"}]}),d.cat.prototype.shards=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/shards/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/shards"}]}),d.cat.prototype.threadPool=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1},fullId:{type:"boolean","default":!1,name:"full_id"}},url:{fmt:"/_cat/thread_pool"}}),d.clearScroll=c({url:{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},indexTemplates:{type:"list",name:"index_templates"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/_cluster/state/<%=metric%>/<%=index%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]},index:{type:"list"}}},{fmt:"/_cluster/state/<%=metric%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]}}},{fmt:"/_cluster/state"}]}),d.cluster.prototype.stats=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_cluster/stats/nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cluster/stats"}]}),d.count=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d.countPercolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a -},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},name:{type:"list"}},url:{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.exists=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsTemplate=c({params:{local:{type:"boolean"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}},{fmt:"/_alias"}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_aliases/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/<%=type%>/field/<%=field%>",req:{type:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_settings/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_warmer"}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"closed",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},force:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"indices",options:["cluster","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/<%=index%>/_stats/<%=metric%>",req:{index:{type:"list"},metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_stats/<%=metric%>",req:{metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLength:{type:"number",name:"max_word_length"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLength:{type:"number",name:"min_word_length"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.mpercolate=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mpercolate",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mpercolate",req:{index:{type:"string"}}},{fmt:"/_mpercolate"}],needBody:!0,bulkBody:!0,method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.mtermvectors=c({params:{ids:{type:"list",required:!1},termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},urls:[{fmt:"/<%=index%>/<%=type%>/_mtermvectors",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mtermvectors",req:{index:{type:"string"}}},{fmt:"/_mtermvectors"}],method:"POST"}),d.nodes=function(a){this.transport=a},d.nodes.prototype.hotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.nodes.prototype.info=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_nodes/<%=nodeId%>/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/<%=metric%>",req:{metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes"}]}),d.nodes.prototype.shutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.nodes.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"node",options:["node","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats/<%=metric%>/<%=indexMetric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats/<%=metric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats"}]}),d.percolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.snapshot=function(a){this.transport=a},d.snapshot.prototype.create=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.createRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"string"}}},needBody:!0,method:"POST"}),d.snapshot.prototype["delete"]=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"DELETE"}),d.snapshot.prototype.deleteRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},method:"DELETE"}),d.snapshot.prototype.get=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"list"}}}}),d.snapshot.prototype.getRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},local:{type:"boolean"}},urls:[{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},{fmt:"/_snapshot"}]}),d.snapshot.prototype.restore=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_restore",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.suggest=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],needBody:!0,method:"POST"}),d.termvector=c({params:{termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_termvector",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":195}],193:[function(a,b){b.exports={"1.0":a("./1_0"),"0.90":a("./0_90"),_default:"0.90"}},{"./0_90":191,"./1_0":192}],194:[function(a,b){function c(a){function b(){a.hasOwnProperty("log")||(a.log="warning"),a.hosts||a.host||(a.host="http://localhost:9200"),this.close=function(){this.transport.close()},this.transport=new d(a);for(var b=0;b1?"one of "+a.options.join(","):a.options[0]))},duration:function(a,b,c){if(f.isNumeric(b)||f.isInterval(b))return b;throw new TypeError("Invalid "+c+": expected a number or interval (an integer followed by one of Mwdhmsy).")},list:function(a,b,c){switch(typeof b){case"number":case"string":case"boolean":return""+b;case"object":if(f.isArray(b))return b.join(",");default:throw new TypeError("Invalid "+c+": expected be a comma seperated list, array, number or string.")}},"boolean":function(a,b){return b=f.isString(b)?b.toLowerCase():b,"no"===b||"off"===b?!1:!!b},number:function(a,b,c){if(f.isNumeric(b))return 1*b;throw new TypeError("Invalid "+c+": expected a number.")},string:function(a,b,c){switch(typeof b){case"number":case"string":return""+b;default:throw new TypeError("Invalid "+c+": expected a string.")}},time:function(a,b,c){if("string"==typeof b)return b;if(f.isNumeric(b))return""+b;if(b instanceof Date)return""+b.getTime();throw new TypeError("Invalid "+c+": expected some sort of time.")}};c.resolveUrl=d,c.proxy=function(a,b){return function(c,d){return"function"==typeof c?(d=c,c={}):(c=c||{},d="function"==typeof d?d:null),b.transform&&b.transform(c),a.call(this,c,d)}}},{"./utils":212}],196:[function(a,b){function c(a,b){if(b=b||{},e.call(this),this.requestTimeout=b.hasOwnProperty("requestTimeout")?b.requestTimeout:3e4,this.log=b.log||new f,!a)throw new TypeError("Missing host");if(!(a instanceof g))throw new TypeError("Invalid host");this.host=a,d.makeBoundMethods(this)}b.exports=c;var d=a("./utils"),e=a("events").EventEmitter,f=a("./log"),g=a("./host"),h=a("./errors");d.inherits(c,e),c.prototype.request=function(){throw new Error("Connection#request must be overwritten by the Connector")},c.prototype.ping=function(a,b){"function"==typeof a?(b=a,a=null):b="function"==typeof b?b:null;var c,e,f,g=100;a&&a.hasOwnProperty("requestTimeout")&&(g=a.requestTimeout),f=this.request(d.defaults(a||{},{path:"/",method:"HEAD"}),function(a){e||(clearTimeout(c),b&&b(a))}),g&&(c=setTimeout(function(){f&&f(),e=!0,b&&b(new h.RequestTimeout("Ping Timeout after "+g+"ms"))},g))},c.prototype.setStatus=function(a){var b=this.status;this.status=a,this.emit("status set",a,b,this),"closed"===a&&this.removeAllListeners()}},{"./errors":200,"./host":201,"./log":202,"./utils":212,events:4}],197:[function(a,b){function c(a){a=a||{},e.makeBoundMethods(this),a.log?this.log=a.log:(this.log=new f,a.log=this.log),this._config=a,this.selector=e.funcEnum(a,"selector",c.selectors,c.defaultSelector),this.Connection=e.funcEnum(a,"connectionClass",c.connectionClasses,c.defaultConnectionClass),this.deadTimeout=a.hasOwnProperty("deadTimeout")?a.deadTimeout:6e4,this.maxDeadTimeout=a.hasOwnProperty("maxDeadTimeout")?a.maxDeadTimeout:18e5,this.calcDeadTimeout=e.funcEnum(a,"calcDeadTimeout",c.calcDeadTimeoutOptions,"exponential"),this.index={},this._conns={alive:[],dead:[]},this._timeouts=[]}var d=a("__browserify_process");b.exports=c; -var e=a("./utils"),f=a("./log");c.selectors=a("./selectors"),c.defaultSelector="roundRobin",c.connectionClasses=a("./connectors"),c.defaultConnectionClass=c.connectionClasses._default,delete c.connectionClasses._default,c.calcDeadTimeoutOptions={flat:function(a,b){return b},exponential:function(a,b){return Math.min(2*b*Math.pow(2,.5*a-1),this.maxDeadTimeout)}},c.prototype.select=function(a){if(this._conns.alive.length)if(this.selector.length>1)this.selector(this._conns.alive,a);else try{e.nextTick(a,void 0,this.selector(this._conns.alive))}catch(b){a(b)}else this._timeouts.length?this._selectDeadConnection(a):e.nextTick(a,void 0)},c.prototype.onStatusSet=e.handler(function(a,b,c){var d,f="dead"===a,g=f&&"dead"===b,h=!f&&"dead"===b,i=b===a,j=this._conns[b],k=this._conns[a];return i&&!f?!0:(j!==k&&(e.isArray(j)&&(d=j.indexOf(c),-1!==d&&j.splice(d,1)),e.isArray(k)&&(d=k.indexOf(c),-1===d&&k.push(c))),f&&this._onConnectionDied(c,g),void(h&&this._onConnectionRevived(c)))}),c.prototype._onConnectionRevived=function(a){for(var b,c=0;c=0)return c.levels.slice(0,b+1);case"object":if(e.isArray(a)){var d=e.intersection(a,c.levels);if(d.length===a.length)return d}default:throw new TypeError("invalid logging level "+a+". Expected zero or more of these options: "+c.levels.join(", "))}},c.join=function(a){return e.map(a,function(a){return e.isPlainObject(a)?e.inspect(a)+"\n":a.toString()}).join(" ")},c.prototype.addOutput=function(a){a=a||{},a.levels=c.parseLevels(a.levels||a.level||"warning"),delete a.level;var b=e.funcEnum(a,"type",c.loggers,d.browser?"console":"stdio");return new b(this,a)},c.prototype.error=function(a){return this.listenerCount("error")?this.emit("error",a instanceof Error?a:new Error(a)):void 0},c.prototype.warning=function(){return this.listenerCount("warning")?this.emit("warning",c.join(arguments)):void 0},c.prototype.info=function(){return this.listenerCount("info")?this.emit("info",c.join(arguments)):void 0},c.prototype.debug=function(){return this.listenerCount("debug")?this.emit("debug",c.join(arguments)):void 0},c.prototype.trace=function(a,b,d,e,f){return this.listenerCount("trace")?this.emit("trace",c.normalizeTraceArgs(a,b,d,e,f)):void 0},c.normalizeTraceArgs=function(a,b,c,d,g){return"string"==typeof b?b=f.parse(b,!0,!0):(b=e.clone(b),b.path&&(b.query=f.parse(b.path,!0,!1).query),!b.pathname&&b.path&&(b.pathname=b.path.split("?").shift())),delete b.auth,{method:a,url:f.format(b),body:c,status:g,response:d}},b.exports=c},{"./loggers":204,"./utils":212,__browserify_process:13,events:4,url:7}],203:[function(a,b){function c(a,b){this.log=a,this.listeningLevels=[],f.makeBoundMethods(this),this.log.once("closing",this.bound.cleanUpListeners),this.setupListeners(b.levels)}function d(a){return 10>a?"0"+a.toString(10):a.toString(10)}function e(a,b){var c=f.repeat(" ",b||2);return(a||"").split(/\r?\n/).map(function(a){return c+a}).join("\n")}var f=a("./utils");c.prototype.timestamp=function(){var a=new Date;return a.getUTCFullYear()+"-"+d(a.getUTCMonth()+1)+"-"+d(a.getUTCDate())+"T"+d(a.getUTCHours())+":"+d(a.getUTCMinutes())+":"+d(a.getUTCSeconds())+"Z"},c.prototype.format=function(a,b){return a+": "+this.timestamp()+"\n"+e(b)+"\n\n"},c.prototype.write=function(){throw new Error("This should be overwritten by the logger")},c.prototype.setupListeners=function(a){this.cleanUpListeners(),this.listeningLevels=[],f.each(a,function(a){var b="on"+f.ucfirst(a);if(!this.bound[b])throw new Error('Unable to listen for level "'+a+'"');this.listeningLevels.push(a),this.log.on(a,this.bound[b])},this)},c.prototype.cleanUpListeners=f.handler(function(){f.each(this.listeningLevels,function(a){this.log.removeListener(a,this.bound["on"+f.ucfirst(a)])},this)}),c.prototype.onError=f.handler(function(a){this.write("Error"===a.name?"ERROR":a.name,a.stack)}),c.prototype.onWarning=f.handler(function(a){this.write("WARNING",a)}),c.prototype.onInfo=f.handler(function(a){this.write("INFO",a)}),c.prototype.onDebug=f.handler(function(a){this.write("DEBUG",a)}),c.prototype.onTrace=f.handler(function(a){this.write("TRACE",this._formatTraceMessage(a))}),c.prototype._formatTraceMessage=function(a){return"-> "+a.method+" "+a.url+"\n"+this._prettyJson(a.body)+"\n<- "+a.status+"\n"+this._prettyJson(a.response)},c.prototype._prettyJson=function(a){try{return"string"==typeof object&&(a=JSON.parse(a)),JSON.stringify(a,null," ").replace(/'/g,"\\u0027")}catch(b){return"string"==typeof a?a:""}},b.exports=c},{"./utils":212}],204:[function(a,b){b.exports={console:a("./console")}},{"./console":205}],205:[function(a,b){function c(a,b){d.call(this,a,b),this.color=e.has(b,"color")?!!b.color:!0}b.exports=c;var d=a("../logger"),e=a("../utils");e.inherits(c,d),c.prototype.setupListeners=function(a){d.prototype.setupListeners.call(this,a)},c.prototype.write=function(a,b,c){console[c]&&console[c](this.format(a,b))},c.prototype.onError=e.handler(function(a){var b=console.error?"error":"log";this.write("Error"===a.name?"ERROR":a.name,a.stack||a.message,b)}),c.prototype.onWarning=e.handler(function(a){this.write("WARNING",a,console.warn?"warn":"log")}),c.prototype.onInfo=e.handler(function(a){this.write("INFO",a,console.info?"info":"log")}),c.prototype.onDebug=e.handler(function(a){this.write("DEBUG",a,console.debug?"debug":"log")}),c.prototype.onTrace=e.handler(function(a){this.write("TRACE",this._formatTraceMessage(a),"log")})},{"../logger":203,"../utils":212}],206:[function(a,b){function c(a){return function(b){var c=[];return d.each(b,function(b,d){var f=e.exec(b[a]);c.push({host:f[1],port:parseInt(f[2],10),_meta:{id:d,name:b.name,hostname:b.hostname,version:b.version}})}),c}}var d=a("./utils"),e=/\[\/*([^:]+):(\d+)\]/;b.exports=c("http_address"),b.exports.thrift=c("transport_address")},{"./utils":212}],207:[function(a,b){b.exports={random:a("./random"),roundRobin:a("./round_robin")}},{"./random":208,"./round_robin":209}],208:[function(a,b){b.exports=function(a){return a[Math.floor(Math.random()*a.length)]}},{}],209:[function(a,b){b.exports=function(a){var b=a[0];return a.push(a.shift()),b}},{}],210:[function(a,b){function c(){}b.exports=c;var d=a("../utils");c.prototype.serialize=function(a,b,c){switch(typeof a){case"string":return a;case"object":if(a)return JSON.stringify(a,b,c);default:return}},c.prototype.deserialize=function(a){if("string"==typeof a)try{return JSON.parse(a)}catch(b){}},c.prototype.bulkBody=function(a){var b,c="";if(d.isArray(a))for(b=0;bg||g>=300)||a.ignore&&d.contains(a.ignore,g)||(c=e[g]?new e[g](i&&i.error):new e.Generic("unknown error")),a.castExists&&(c&&c instanceof e.NotFound?(i=!1,c=void 0):i=!c),"function"==typeof b?c?b(c,i,g):b(void 0,i,g):c?(c.body=i,c.status=g,m.reject(c)):m.resolve(i)}}function h(){q||(q=!0,o=0,n._timeout(k),"function"==typeof j&&j())}var i,j,k,l,m,n=this,o=this.maxRetries,p=this.requestTimeout,q=!1;return n.log.debug("starting request",a),a.body&&"GET"===a.method?void d.nextTick(g,new TypeError('Body can not be sent with method "GET"')):(a.body&&(a.body=n.serializer[a.bulkBody?"bulkBody":"serialize"](a.body)),a.hasOwnProperty("maxRetries")&&(o=a.maxRetries),a.hasOwnProperty("requestTimeout")&&(p=a.requestTimeout),a.req={method:a.method,path:a.path||"/",query:a.query,body:a.body},p&&1/0!==p&&(k=this._timeout(function(){g(new e.RequestTimeout("Request Timeout after "+p+"ms")),h()},p)),"function"==typeof b?l={abort:h}:(m=this.defer(),l=m.promise,l.abort=h),i?c(void 0,i):n.connectionPool.select(c),l)},c.prototype._timeout=function(a,b){this._timers=this._timers||[];var c;if("function"!=typeof a&&(c=a,a=void 0),a)return c=setTimeout(a,b),this._timers.push(c),c;if(c){clearTimeout(c);var d=this._timers.indexOf(c);-1!==d&&this._timers.splice(d,1)}},c.prototype.sniff=function(a){var b=this.connectionPool,c=this.nodesToHostCallback;a="function"==typeof a?a:d.noop,this.request({path:this.sniffEndpoint,method:"GET"},function(e,g,h){if(!e&&g&&g.nodes){var i=d.map(c(g.nodes),function(a){return new f(a)});b.setHosts(i)}a(e,g,h)})},c.prototype.close=function(){this.log.close(),d.each(this._timers,clearTimeout),this.connectionPool.close()}},{"./connection_pool":197,"./errors":200,"./host":201,"./log":202,"./nodes_to_host":206,"./serializers/json":210,"./utils":212,when:189}],212:[function(a,b){function c(a,b,c){return function(d){for(var e,f,g,h,i=0,j=[],k="";i=97&&122>=e||e>=48&&57>=e,g=e>=65&&90>=e,(g||!h)&&(k.length&&j.push(k),k=""),(g||h)&&(h&&k.length?k+=f:k=!j.length&&a||j.length&&b?f.toUpperCase():f.toLowerCase());return k.length&&j.push(k),j.length&&"_"===d.charAt(0)&&(j[0]="_"+j[0]),j.join(c)}}var d=a("__browserify_process"),e=a("__browserify_Buffer").Buffer,f=a("path"),g=a("lodash-node/modern"),h=a("util"),i=g.extend({},g,h);g=i,i.joinPath=f.join,i.deepMerge=function(a,b){return g.each(b,function(c,d){switch(typeof a[d]){case"undefined":a[d]=b[d];break;case"object":g.isArray(a[d])&&g.isArray(b[d])?a[d]=a[d].concat(b[d]):g.isPlainObject(a[d])&&g.isPlainObject(b[d])&&i.deepMerge(a[d],b[d])}}),a},g.each(["String","Object","PlainObject","Array","Finite","Function","RegExp"],function(a){var b=g["is"+a];i["isArrayOf"+a+"s"]=function(a){return g.isArray(a)&&g.every(a.slice(0,10),b)}}),i.ucfirst=function(a){return a[0].toUpperCase()+a.substring(1).toLowerCase()},i.studlyCase=c(!0,!0,""),i.camelCase=c(!1,!0,""),i.snakeCase=c(!1,!1,"_"),i.toLowerString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toLowerCase()},i.toUpperString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toUpperCase()},i.isNumeric=function(a){return"object"!=typeof a&&a-parseFloat(a)>=0};var j=/^(\d+(?:\.\d+)?)([Mwdhmsy])$/;i.isInterval=function(a){return!(!a.match||!a.match(j))},i.repeat=function(a,b){return new Array(b+1).join(a)},i.applyArgs=function(a,b,c,d){switch(d=d||0,c.length-d){case 0:return a.call(b);case 1:return a.call(b,c[0+d]);case 2:return a.call(b,c[0+d],c[1+d]);case 3:return a.call(b,c[0+d],c[1+d],c[2+d]);case 4:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d]);case 5:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d],c[4+d]);default:return a.apply(b,Array.prototype.slice.call(c,d))}},g.nextTick=function(a){d.nextTick(g.bindKey(g,"applyArgs",a,null,arguments,1))},g.handler=function(a){return a._provideBound=!0,a},g.scheduled=g.handler,g.makeBoundMethods=function(a){a.bound={};for(var b in a)"function"==typeof a[b]&&a[b]._provideBound===!0&&(a.bound[b]=g.bind(a[b],a))},g.noop=function(){},g.funcEnum=function(a,b,c,d){var e=a[b];switch(typeof e){case"undefined":return c[d];case"function":return e;case"string":if(c.hasOwnProperty(e))return c[e];default:var f="Invalid "+b+' "'+e+'", expected a function';switch(g.size(c)){case 0:break;case 1:f+=" or "+g.keys(c)[0];break;default:f+=" or one of "+g.keys(c).join(", ")}throw new TypeError(f)}},g.createArray=function(a,b){b="function"==typeof b?b:g.identity;var c,d,e=[];for(g.isArray(a)||(a=[a]),d=0;d0},c.prototype.invokeLater=function(a,b,c){void 0===h||null==h.domain||a.domain||(a=h.domain.bind(a)),this._lateBuffer.push(a,b,c),this._queueTick()},c.prototype.invoke=function(a,b,c){void 0===h||null==h.domain||a.domain||(a=h.domain.bind(a));var d=this._functionBuffer;d.push(a,b,c),this._length=d.length(),this._queueTick()},c.prototype._consumeFunctionBuffer=function(){for(var a=this._functionBuffer;a.length()>0;){var b=a.shift(),c=a.shift(),d=a.shift();b.call(c,d)}this._reset(),this._consumeLateBuffer()},c.prototype._consumeLateBuffer=function(){for(var a=this._lateBuffer;a.length()>0;){var b=a.shift(),c=a.shift(),d=a.shift(),e=g(b,c,d);if(e===f){if(this._queueTick(),null==b.domain)throw e.e;b.domain.emit("error",e.e)}}},c.prototype._queueTick=function(){this._isTickUsed||(d(this.consumeFunctionBuffer),this._isTickUsed=!0)},c.prototype._reset=function(){this._isTickUsed=!1,this._length=0},b.exports=new c},{"./global.js":15,"./queue.js":26,"./schedule.js":29,"./util.js":37}],3:[function(a,b){"use strict";var c=a("./promise.js")();b.exports=c},{"./promise.js":19}],4:[function(a,b){"use strict";b.exports=function(a){function b(a){var b="string"==typeof this?this:""+this;return a[b]}a.prototype.call=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;++d)c[d-1]=arguments[d];return this._then(function(b){return b[a].apply(b,c)},void 0,void 0,void 0,void 0)},a.prototype.get=function(a){return this._then(b,void 0,void 0,a,void 0)}}},{}],5:[function(a,b){"use strict";b.exports=function(b,c){var d=a("./errors.js"),e=a("./async.js"),f=d.CancellationError;b.prototype._cancel=function(){if(!this.isCancellable())return this;for(var a,b=this;void 0!==(a=b._cancellationParent)&&a.isCancellable();)b=a;var c=new f;b._attachExtraTrace(c),b._rejectUnchecked(c)},b.prototype.cancel=function(){return this.isCancellable()?(e.invokeLater(this._cancel,this,void 0),this):this},b.prototype.cancellable=function(){return this._cancellable()?this:(this._setCancellable(),this._cancellationParent=void 0,this)},b.prototype.uncancellable=function(){var a=new b(c);return a._setTrace(this),a._follow(this),a._unsetCancellable(),this._isBound()&&a._setBoundTo(this._boundTo),a},b.prototype.fork=function(a,b,c){var d=this._then(a,b,c,void 0,void 0);return d._setCancellable(),d._cancellationParent=void 0,d}}},{"./async.js":2,"./errors.js":9}],6:[function(a,b){"use strict";b.exports=function(){function b(a){var b;if("function"==typeof a)b="[function "+(a.name||"anonymous")+"]";else{b=a.toString();var d=/\[object [a-zA-Z0-9$_]+\]/;if(d.test(b))try{var e=JSON.stringify(a);b=e}catch(f){}0===b.length&&(b="(empty array)")}return"(<"+c(b)+">, no stack trace)"}function c(a){var b=41;return a.length=0;--d){var e=b[d];if(a[c]!==e)break;a.pop(),c--}a.push("From previous event:");for(var f=a.concat(b),i=[],d=0,j=f.length;j>d;++d)g.test(f[d])||d>0&&!h.test(f[d])&&"From previous event:"!==f[d]||i.push(f[d]);return i},d.isSupported=function(){return"function"==typeof j};var j=function k(){if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){h=/^\s*at\s*/,i=function(a,c){return"string"==typeof a?a:void 0!==c.name&&void 0!==c.message?c.name+". "+c.message:b(c)};var a=Error.captureStackTrace;return function(b,c){a(b,c)}}var c=new Error;if("string"==typeof c.stack&&"function"==typeof"".startsWith&&c.stack.startsWith("stackDetection@")&&"stackDetection"===k.name){f(Error,"stackTraceLimit",{writable:!0,enumerable:!1,configurable:!1,value:25}),h=/@/;var d=/[@\n]/;return i=function(a,c){return"string"==typeof a?c.name+". "+c.message+"\n"+a:void 0!==c.name&&void 0!==c.message?c.name+". "+c.message:b(c)},function(a){for(var b=(new Error).stack,c=b.split(d),e=c.length,f="",g=0;e>g;g+=2)f+=c[g],f+="@",f+=c[g+1],f+="\n";a.stack=f}}return i=function(a,c){return"string"==typeof a?a:"object"!=typeof c&&"function"!=typeof c||void 0===c.name||void 0===c.message?b(c):c.name+". "+c.message},null}();return d}},{"./es5.js":11,"./util.js":37}],7:[function(a,b){"use strict";b.exports=function(b){function c(a,b,c){this._instances=a,this._callback=b,this._promise=c}function d(a,b){var c={},d=g(a,c,b);if(d===h)return d;var e=i(c);return e.length?(h.e=new j("Catch filter must inherit from Error or be a simple predicate function"),h):d}var e=a("./util.js"),f=a("./errors.js"),g=e.tryCatch1,h=e.errorObj,i=a("./es5.js").keys,j=f.TypeError;return c.prototype.doFilter=function(a){for(var c=this._callback,e=this._promise,i=e._isBound()?e._boundTo:void 0,j=0,k=this._instances.length;k>j;++j){var l=this._instances[j],m=l===Error||null!=l&&l.prototype instanceof Error;if(m&&a instanceof l){var n=g(c,i,a);return n===h?(b.e=n.e,b):n}if("function"==typeof l&&!m){var o=d(l,a);if(o===h){var p=f.canAttach(h.e)?h.e:new Error(h.e+"");this._promise._attachExtraTrace(p),a=h.e;break}if(o){var n=g(c,i,a);return n===h?(b.e=n.e,b):n}}}return b.e=a,b},c}},{"./errors.js":9,"./es5.js":11,"./util.js":37}],8:[function(a,b){"use strict";var c=a("./util.js"),d=c.isPrimitive,e=c.wrapsPrimitiveReceiver;b.exports=function(a){var b=function(){return this},c=function(){throw this},f=function(a,b){return 1===b?function(){throw a}:2===b?function(){return a}:void 0};a.prototype["return"]=a.prototype.thenReturn=function(a){return e&&d(a)?this._then(f(a,2),void 0,void 0,void 0,void 0):this._then(b,void 0,void 0,a,void 0)},a.prototype["throw"]=a.prototype.thenThrow=function(a){return e&&d(a)?this._then(f(a,1),void 0,void 0,void 0,void 0):this._then(c,void 0,void 0,a,void 0)}}},{"./util.js":37}],9:[function(a,b){"use strict";function c(a){try{m(a,"isAsync",!0)}catch(b){}}function d(a){return null==a?!1:a instanceof h||a.isAsync===!0}function e(a){return a instanceof n}function f(a){return e(a)}function g(a,b){function c(d){return this instanceof c?(this.message="string"==typeof d?d:b,this.name=a,void(n.captureStackTrace&&n.captureStackTrace(this,this.constructor))):new c(d)}return l(c,n),c}function h(a){this.name="RejectionError",this.message=a,this.cause=a,this.isAsync=!0,a instanceof n?(this.message=a.message,this.stack=a.stack):n.captureStackTrace&&n.captureStackTrace(this,this.constructor)}var i=a("./global.js"),j=a("./es5.js").freeze,k=a("./util.js"),l=k.inherits,m=k.notEnumerableProp,n=i.Error,o=i.TypeError;"function"!=typeof o&&(o=g("TypeError","type error"));var p=i.RangeError;"function"!=typeof p&&(p=g("RangeError","range error"));var q=g("CancellationError","cancellation error"),r=g("TimeoutError","timeout error");l(h,n);var s="__BluebirdErrorTypes__",t=i[s];t||(t=j({CancellationError:q,TimeoutError:r,RejectionError:h}),m(i,s,t)),b.exports={Error:n,TypeError:o,RangeError:p,CancellationError:t.CancellationError,RejectionError:t.RejectionError,TimeoutError:t.TimeoutError,originatesFromRejection:d,markAsOriginatingFromRejection:c,canAttach:f}},{"./es5.js":11,"./global.js":15,"./util.js":37}],10:[function(a,b){"use strict";b.exports=function(b){function c(a){var c=new d(a),e=b.rejected(c),f=e._peekContext();return null!=f&&f._attachExtraTrace(c),e}var d=a("./errors.js").TypeError;return c}},{"./errors.js":9}],11:[function(a,b){var c=function(){"use strict";return void 0===this}();if(c)b.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,keys:Object.keys,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:c};else{var d={}.hasOwnProperty,e={}.toString,f={}.constructor.prototype,g=function(a){var b=[];for(var c in a)d.call(a,c)&&b.push(c);return b},h=function(a,b,c){return a[b]=c.value,a},i=function(a){return a},j=function(a){try{return Object(a).constructor.prototype}catch(b){return f}},k=function(a){try{return"[object Array]"===e.call(a)}catch(b){return!1}};b.exports={isArray:k,keys:g,defineProperty:h,freeze:i,getPrototypeOf:j,isES5:c}}},{}],12:[function(a,b){"use strict";b.exports=function(b){function c(a){for(var c=this instanceof b?this._settledValue:this,d=c.length,e=new Array(d),f=0,g=0;d>g;++g)a[g]&&(e[f++]=c[g]);return e.length=f,e}var d=(a("./util.js").isArray,{ref:null});b.filter=function(a,e){return b.map(a,e,d)._then(c,void 0,void 0,d.ref,void 0)},b.prototype.filter=function(a){return this.map(a,d)._then(c,void 0,void 0,d.ref,void 0)}}},{"./util.js":37}],13:[function(a,b){"use strict";b.exports=function(b,c){function d(){return this}function e(){throw this}function f(a){return function(){return a}}function g(a){return function(){throw a}}function h(a,b,c){var h;return h=l&&m(b)?c?f(b):g(b):c?d:e,a._then(h,n,void 0,b,void 0)}function i(a){var d=this.promise,e=this.handler,f=d._isBound()?e.call(d._boundTo):e();if(void 0!==f){var g=b._cast(f,void 0);if(g instanceof b)return h(g,a,d.isFulfilled())}return d.isRejected()?(c.e=a,c):a}function j(a){var c=this.promise,d=this.handler,e=c._isBound()?d.call(c._boundTo,a):d(a);if(void 0!==e){var f=b._cast(e,void 0);if(f instanceof b)return h(f,a,!0)}return a}var k=a("./util.js"),l=k.wrapsPrimitiveReceiver,m=k.isPrimitive,n=k.thrower;b.prototype._passThroughHandler=function(a,b){if("function"!=typeof a)return this.then();var c={promise:this,handler:a};return this._then(b?i:j,b?i:void 0,void 0,c,void 0)},b.prototype.lastly=b.prototype["finally"]=function(a){return this._passThroughHandler(a,!0)},b.prototype.tap=function(a){return this._passThroughHandler(a,!1)}}},{"./util.js":37}],14:[function(a,b){"use strict";b.exports=function(b,c,d){var e=a("./promise_spawn.js")(b,d),f=a("./errors.js"),g=f.TypeError,h=a("./util.js").deprecated;b.coroutine=function(a){if("function"!=typeof a)throw new g("generatorFunction must be a function");var b=e;return function(){var c=a.apply(this,arguments),d=new b(void 0,void 0);return d._generator=c,d._next(void 0),d.promise()}},b.coroutine.addYieldHandler=e.addYieldHandler,b.spawn=function(a){if(h("Promise.spawn is deprecated. Use Promise.coroutine instead."),"function"!=typeof a)return c("generatorFunction must be a function");var d=new e(a,this),f=d.promise();return d._run(b.spawn),f}}},{"./errors.js":9,"./promise_spawn.js":22,"./util.js":37}],15:[function(a,b){var c="undefined"!=typeof self?self:"undefined"!=typeof window?window:{};b.exports=function(){if(void 0!==this)return this;try{return c}catch(a){}try{return window}catch(a){}try{return self}catch(a){}}()},{}],16:[function(a,b){"use strict";b.exports=function(b,c,d,e){function f(a){return g(a,this[0],this[1],this[2])}function g(a,c,g,i){if("function"!=typeof c)return e("fn must be a function");var j=void 0;g===!0?a._isBound()&&(j=a._boundTo):g!==!1&&(j=g);var k=void 0!==i;if(k&&(i.ref=a),a instanceof b){var m=[c,j,i];return a._then(f,void 0,void 0,m,void 0)}if(!l(a))return e("expecting an array, a promise or a thenable");var n=new b(d);void 0!==j&&n._setBoundTo(j),n._setTrace(void 0);var o=new h(n,c,a,j,k);return o.init(),n}function h(a,b,c,d,e){this.shouldUnwrapItems=e,this.index=0,this.items=c,this.callback=b,this.receiver=d,this.promise=a,this.result=new Array(c.length)}var i=b.all,j=a("./util.js"),k=a("./errors.js").canAttach,l=j.isArray,m=b._cast,n={};j.inherits(h,c),h.prototype.init=function(){for(var a=this.items,c=a.length,d=this.result,e=!1,f=0;c>f;++f){var g=m(a[f],void 0);g instanceof b?g.isPending()?(d[f]=n,g._proxyPromiseArray(this,f)):g.isFulfilled()?d[f]=g.value():(g._unsetRejectionIsUnhandled(),e||(this.reject(g.reason()),e=!0)):d[f]=g}e||this.iterate()},h.prototype.isResolved=function(){return null===this.promise},h.prototype._promiseProgressed=function(a){this.isResolved()||this.promise._progress(a)},h.prototype._promiseFulfilled=function(a,b){this.isResolved()||(this.result[b]=a,this.shouldUnwrapItems&&(this.items[b]=a),this.index===b&&this.iterate())},h.prototype._promiseRejected=function(a){this.reject(a)},h.prototype.reject=function(a){if(!this.isResolved()){var b=k(a)?a:new Error(a+"");this.promise._attachExtraTrace(b),this.promise._reject(a,b)}},h.prototype.iterate=function(){for(var a=this.index,b=this.items,c=this.result,d=b.length,c=this.result,e=this.receiver,f=this.callback;d>a;++a){var g=c[a];if(g===n)return void(this.index=a);try{c[a]=f.call(e,g,a,d)}catch(h){return this.reject(h)}}this.promise._follow(i(c)),this.items=this.result=this.callback=this.promise=null},b.prototype.map=function(a,b){return g(this,a,!0,b)},b.map=function(a,b,c){return g(a,b,!1,c)}}},{"./errors.js":9,"./util.js":37}],17:[function(a,b){"use strict";b.exports=function(b){function c(a){throw a}function d(a,b){var d=this,e=void 0===a?i(d,b,null):h(d,b,null,a);e===j&&g.invokeLater(c,void 0,e.e)}function e(a,b){var d=this,e=i(d,b,a);e===j&&g.invokeLater(c,void 0,e.e)}var f=a("./util.js"),g=a("./async.js"),h=f.tryCatch2,i=f.tryCatch1,j=f.errorObj;b.prototype.nodeify=function(a){return"function"==typeof a&&this._then(d,e,void 0,a,this._isBound()?this._boundTo:null),this}}},{"./async.js":2,"./util.js":37}],18:[function(a,b){"use strict";b.exports=function(b,c){var d=a("./util.js"),e=a("./async.js"),f=a("./errors.js"),g=d.tryCatch1,h=d.errorObj;b.prototype.progressed=function(a){return this._then(void 0,void 0,a,void 0,void 0)},b.prototype._progress=function(a){this._isFollowingOrFulfilledOrRejected()||this._progressUnchecked(a)},b.prototype._progressHandlerAt=function(a){return 0===a?this._progressHandler0:this[a+2-5]},b.prototype._doProgressWith=function(a){var c=a.value,d=a.handler,e=a.promise,i=a.receiver;this._pushContext();var j=g(d,i,c);if(this._popContext(),j===h){if(null!=j.e&&"StopProgressPropagation"!==j.e.name){var k=f.canAttach(j.e)?j.e:new Error(j.e+"");e._attachExtraTrace(k),e._progress(j.e)}}else j instanceof b?j._then(e._progress,null,null,e,void 0):e._progress(j)},b.prototype._progressUnchecked=function(a){if(this.isPending())for(var d=this._length(),f=this._progress,g=0;d>g;g+=5){var h=this._progressHandlerAt(g),i=this._promiseAt(g);if(i instanceof b)"function"==typeof h?e.invoke(this._doProgressWith,this,{handler:h,promise:i,receiver:this._receiverAt(g),value:a}):e.invoke(f,i,a);else{var j=this._receiverAt(g);"function"==typeof h?h.call(j,a,i):j instanceof b&&j._isProxied()?j._progressUnchecked(a):c(j,i)&&j._promiseProgressed(a,i)}}}}},{"./async.js":2,"./errors.js":9,"./util.js":37}],19:[function(a,b){var c=a("__browserify_process");b.exports=function(){function b(a){return void 0===a?!1:a instanceof e}function d(a,b){return a instanceof o?b>=0:!1}function e(a){if("function"!=typeof a)throw new y("the promise constructor requires a resolver function");if(this.constructor!==e)throw new y("the promise constructor cannot be invoked directly");this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._settledValue=void 0,this._boundTo=void 0,a!==l&&this._resolveFromResolver(a)}function f(a,b){return g(a,o,b===!0&&a._isBound()?a._boundTo:void 0).promise()}function g(a,c,d){var f=null;return s(a)?f=a:(f=e._cast(a,void 0),f!==a?f._setBoundTo(d):b(f)||(f=null)),null!==f?new c(f,d):{promise:function(){return G("expecting an array, a promise or a thenable")}}}var h=a("./global.js"),i=a("./util.js"),j=a("./async.js"),k=a("./errors.js"),l=function(){},m={},n={e:null},o=a("./promise_array.js")(e,l),p=a("./captured_trace.js")(),q=a("./catch_filter.js")(n),r=a("./promise_resolver.js"),s=i.isArray,t=i.errorObj,u=i.tryCatch1,v=i.tryCatch2,w=i.tryCatchApply,x=k.RangeError,y=k.TypeError,z=k.CancellationError,A=k.TimeoutError,B=k.RejectionError,C=k.originatesFromRejection,D=k.markAsOriginatingFromRejection,E=k.canAttach,F=i.thrower,G=a("./errors_api_rejection")(e),H=function(){return new y("circular promise resolution chain")};e.prototype.bind=function(a){var b=new e(l);return b._setTrace(this),b._follow(this),b._setBoundTo(a),this._cancellable()&&(b._setCancellable(),b._cancellationParent=this),b},e.prototype.toString=function(){return"[object Promise]"},e.prototype.caught=e.prototype["catch"]=function(a){var b=arguments.length;if(b>1){var c,d=new Array(b-1),e=0;for(c=0;b-1>c;++c){var f=arguments[c];if("function"!=typeof f){var g=new y("A catch filter must be an error constructor or a filter function");return this._attachExtraTrace(g),void j.invoke(this._reject,this,g)}d[e++]=f}d.length=e,a=arguments[c],this._resetTrace();var h=new q(d,a,this);return this._then(void 0,h.doFilter,void 0,h,void 0)}return this._then(void 0,a,void 0,void 0,void 0)},e.prototype.then=function(a,b,c){return this._then(a,b,c,void 0,void 0)},e.prototype.done=function(a,b,c){var d=this._then(a,b,c,void 0,void 0);d._setIsFinal()},e.prototype.spread=function(a,b){return this._then(a,b,void 0,m,void 0)},e.prototype.isCancellable=function(){return!this.isResolved()&&this._cancellable()},e.prototype.toJSON=function(){var a={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(a.fulfillmentValue=this._settledValue,a.isFulfilled=!0):this.isRejected()&&(a.rejectionReason=this._settledValue,a.isRejected=!0),a},e.prototype.all=function(){return f(this,!0)},e.is=b,e.all=function(a){return f(a,!1)},e.join=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;++c)b[c]=arguments[c];return g(b,o,void 0).promise()},e.resolve=e.fulfilled=function(a){var b=new e(l);return b._setTrace(void 0),b._tryFollow(a)?b:(b._cleanValues(),b._setFulfilled(),b._settledValue=a,b)},e.reject=e.rejected=function(a){var b=new e(l);if(b._setTrace(void 0),D(a),b._cleanValues(),b._setRejected(),b._settledValue=a,!E(a)){var c=new Error(a+"");b._setCarriedStackTrace(c)}return b._ensurePossibleRejectionHandled(),b},e.prototype.error=function(a){return this.caught(C,a)},e.prototype._resolveFromSyncValue=function(a){if(a===t)this._cleanValues(),this._setRejected(),this._settledValue=a.e,this._ensurePossibleRejectionHandled();else{var b=e._cast(a,void 0);b instanceof e?this._follow(b):(this._cleanValues(),this._setFulfilled(),this._settledValue=a)}},e.method=function(a){if("function"!=typeof a)throw new y("fn must be a function");return function(){var b;switch(arguments.length){case 0:b=u(a,this,void 0);break;case 1:b=u(a,this,arguments[0]);break;case 2:b=v(a,this,arguments[0],arguments[1]);break;default:for(var c=arguments.length,d=new Array(c),f=0;c>f;++f)d[f]=arguments[f];b=w(a,d,this)}var g=new e(l);return g._setTrace(void 0),g._resolveFromSyncValue(b),g}},e.attempt=e["try"]=function(a,b,c){if("function"!=typeof a)return G("fn must be a function");var d=s(b)?w(a,b,c):u(a,c,b),f=new e(l);return f._setTrace(void 0),f._resolveFromSyncValue(d),f},e.defer=e.pending=function(){var a=new e(l);return a._setTrace(void 0),new r(a)},e.bind=function(a){var b=new e(l);return b._setTrace(void 0),b._setFulfilled(),b._setBoundTo(a),b},e.cast=function(a){var b=e._cast(a,void 0);return b instanceof e?b:e.resolve(b)},e.onPossiblyUnhandledRejection=function(a){p.possiblyUnhandledRejection="function"==typeof a?a:void 0};var I;e.onUnhandledRejectionHandled=function(a){I="function"==typeof a?a:void 0};var J=!1||!("undefined"==typeof c||"string"!=typeof c.execPath||"object"!=typeof c.env||!c.env.BLUEBIRD_DEBUG&&"development"!==c.env.NODE_ENV);e.longStackTraces=function(){if(j.haveItemsQueued()&&J===!1)throw new Error("cannot enable long stack traces after promises have been created");J=p.isSupported()},e.hasLongStackTraces=function(){return J&&p.isSupported()},e.prototype._setProxyHandlers=function(a,b){var c=this._length();if(c>=524282&&(c=0,this._setLength(0)),0===c)this._promise0=b,this._receiver0=a;else{var d=c-5;this[d+3]=b,this[d+4]=a,this[d+0]=this[d+1]=this[d+2]=void 0}this._setLength(c+5)},e.prototype._proxyPromiseArray=function(a,b){this._setProxyHandlers(a,b)},e.prototype._proxyPromise=function(a){a._setProxied(),this._setProxyHandlers(a,-1)},e.prototype._then=function(a,b,c,d,f){var g=void 0!==f,h=g?f:new e(l);if(J&&!g){var i=this._peekContext()===this._traceParent;h._traceParent=i?this._traceParent:this,h._setTrace(this)}!g&&this._isBound()&&h._setBoundTo(this._boundTo);var k=this._addCallbacks(a,b,c,h,d);return!g&&this._cancellable()&&(h._setCancellable(),h._cancellationParent=this),this.isResolved()&&j.invoke(this._queueSettleAt,this,k),h},e.prototype._length=function(){return 524287&this._bitField},e.prototype._isFollowingOrFulfilledOrRejected=function(){return(939524096&this._bitField)>0},e.prototype._isFollowing=function(){return 536870912===(536870912&this._bitField)},e.prototype._setLength=function(a){this._bitField=-524288&this._bitField|524287&a},e.prototype._setFulfilled=function(){this._bitField=268435456|this._bitField},e.prototype._setRejected=function(){this._bitField=134217728|this._bitField},e.prototype._setFollowing=function(){this._bitField=536870912|this._bitField},e.prototype._setIsFinal=function(){this._bitField=33554432|this._bitField},e.prototype._isFinal=function(){return(33554432&this._bitField)>0},e.prototype._cancellable=function(){return(67108864&this._bitField)>0},e.prototype._setCancellable=function(){this._bitField=67108864|this._bitField},e.prototype._unsetCancellable=function(){this._bitField=-67108865&this._bitField},e.prototype._setRejectionIsUnhandled=function(){this._bitField=2097152|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-2097153&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(2097152&this._bitField)>0},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=524288|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-524289&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(524288&this._bitField)>0},e.prototype._setCarriedStackTrace=function(a){this._bitField=1048576|this._bitField,this._fulfillmentHandler0=a},e.prototype._unsetCarriedStackTrace=function(){this._bitField=-1048577&this._bitField,this._fulfillmentHandler0=void 0},e.prototype._isCarryingStackTrace=function(){return(1048576&this._bitField)>0},e.prototype._getCarriedStackTrace=function(){return this._isCarryingStackTrace()?this._fulfillmentHandler0:void 0},e.prototype._receiverAt=function(a){var b;return b=0===a?this._receiver0:this[a+4-5],this._isBound()&&void 0===b?this._boundTo:b},e.prototype._promiseAt=function(a){return 0===a?this._promise0:this[a+3-5]},e.prototype._fulfillmentHandlerAt=function(a){return 0===a?this._fulfillmentHandler0:this[a+0-5]},e.prototype._rejectionHandlerAt=function(a){return 0===a?this._rejectionHandler0:this[a+1-5]},e.prototype._unsetAt=function(a){0===a?(this._rejectionHandler0=this._progressHandler0=this._promise0=this._receiver0=void 0,this._isCarryingStackTrace()||(this._fulfillmentHandler0=void 0)):this[a-5+0]=this[a-5+1]=this[a-5+2]=this[a-5+3]=this[a-5+4]=void 0},e.prototype._resolveFromResolver=function(a){function b(a){d._tryFollow(a)||d._fulfill(a)}function c(a){var b=E(a)?a:new Error(a+"");d._attachExtraTrace(b),D(a),d._reject(a,b===a?void 0:b)}var d=this;this._setTrace(void 0),this._pushContext();var e=v(a,void 0,b,c);if(this._popContext(),void 0!==e&&e===t){var f=e.e,g=E(f)?f:new Error(f+"");d._reject(f,g)}},e.prototype._addCallbacks=function(a,b,c,d,e){var f=this._length();if(f>=524282&&(f=0,this._setLength(0)),0===f)this._promise0=d,void 0!==e&&(this._receiver0=e),"function"!=typeof a||this._isCarryingStackTrace()||(this._fulfillmentHandler0=a),"function"==typeof b&&(this._rejectionHandler0=b),"function"==typeof c&&(this._progressHandler0=c);else{var g=f-5;this[g+3]=d,this[g+4]=e,this[g+0]="function"==typeof a?a:void 0,this[g+1]="function"==typeof b?b:void 0,this[g+2]="function"==typeof c?c:void 0}return this._setLength(f+5),f},e.prototype._setBoundTo=function(a){void 0!==a?(this._bitField=8388608|this._bitField,this._boundTo=a):this._bitField=-8388609&this._bitField},e.prototype._isBound=function(){return 8388608===(8388608&this._bitField)},e.prototype._spreadSlowCase=function(a,b,c,d){var e=g(c,o,d).promise()._then(function(){return a.apply(d,arguments)},void 0,void 0,m,void 0);b._follow(e)},e.prototype._callSpread=function(a,c,d,f){var g=this._isBound()?this._boundTo:void 0;if(s(d))for(var h=0,i=d.length;i>h;++h)if(b(e._cast(d[h],void 0)))return void this._spreadSlowCase(a,c,d,g);return f&&c._pushContext(),w(a,d,g)},e.prototype._callHandler=function(a,b,c,d,e){var f;return b!==m||this.isRejected()?(e&&c._pushContext(),f=u(a,b,d)):f=this._callSpread(a,c,d,e),e&&c._popContext(),f},e.prototype._settlePromiseFromHandler=function(a,c,d,f){if(!b(f))return void a.call(c,d,f);var g=J,h=this._callHandler(a,c,f,d,g);if(!f._isFollowing())if(h===t||h===f||h===n){var i=h===f?H():h.e,j=E(i)?i:new Error(i+"");h!==n&&f._attachExtraTrace(j),f._rejectUnchecked(i,j)}else{var k=e._cast(h,f);if(b(k)){if(k.isRejected()&&!k._isCarryingStackTrace()&&!E(k._settledValue)){var j=new Error(k._settledValue+"");f._attachExtraTrace(j),k._setCarriedStackTrace(j)}f._follow(k),k._cancellable()&&(f._cancellationParent=k,f._setCancellable())}else f._fulfillUnchecked(h)}},e.prototype._follow=function(a){this._setFollowing(),a.isPending()?(a._cancellable()&&(this._cancellationParent=a,this._setCancellable()),a._proxyPromise(this)):a.isFulfilled()?this._fulfillUnchecked(a._settledValue):this._rejectUnchecked(a._settledValue,a._getCarriedStackTrace()),a._isRejectionUnhandled()&&a._unsetRejectionIsUnhandled(),J&&null==a._traceParent&&(a._traceParent=this)},e.prototype._tryFollow=function(a){if(this._isFollowingOrFulfilledOrRejected()||a===this)return!1;var c=e._cast(a,void 0);return b(c)?(this._follow(c),!0):!1},e.prototype._resetTrace=function(){J&&(this._trace=new p(void 0===this._peekContext()))},e.prototype._setTrace=function(a){if(J){var b=this._peekContext();this._traceParent=b;var c=void 0===b;this._trace=void 0!==a&&a._traceParent===b?a._trace:new p(c)}return this},e.prototype._attachExtraTrace=function(a){if(J){var b=this,c=a.stack;c="string"==typeof c?c.split("\n"):[];for(var d=1;null!=b&&null!=b._trace;)c=p.combine(c,b._trace.stack.split("\n")),b=b._traceParent;var e=Error.stackTraceLimit+d,f=c.length;f>e&&(c.length=e),a.stack=c.length<=d?"(No stack trace)":c.join("\n")}},e.prototype._cleanValues=function(){this._cancellable()&&(this._cancellationParent=void 0)},e.prototype._fulfill=function(a){this._isFollowingOrFulfilledOrRejected()||this._fulfillUnchecked(a)},e.prototype._reject=function(a,b){this._isFollowingOrFulfilledOrRejected()||this._rejectUnchecked(a,b)},e.prototype._settlePromiseAt=function(a){var b=this.isFulfilled()?this._fulfillmentHandlerAt(a):this._rejectionHandlerAt(a),c=this._settledValue,f=this._receiverAt(a),g=this._promiseAt(a);if("function"==typeof b)this._settlePromiseFromHandler(b,f,c,g);else{var h=!1,i=this.isFulfilled();void 0!==f&&(f instanceof e&&f._isProxied()?(f._unsetProxied(),i?f._fulfillUnchecked(c):f._rejectUnchecked(c,this._getCarriedStackTrace()),h=!0):d(f,g)&&(i?f._promiseFulfilled(c,g):f._promiseRejected(c,g),h=!0)),h||(i?g._fulfill(c):g._reject(c,this._getCarriedStackTrace()))}a>=256&&this._queueGC()},e.prototype._isProxied=function(){return 4194304===(4194304&this._bitField)},e.prototype._setProxied=function(){this._bitField=4194304|this._bitField},e.prototype._unsetProxied=function(){this._bitField=-4194305&this._bitField},e.prototype._isGcQueued=function(){return-1073741824===(-1073741824&this._bitField)},e.prototype._setGcQueued=function(){this._bitField=-1073741824|this._bitField},e.prototype._unsetGcQueued=function(){this._bitField=1073741823&this._bitField},e.prototype._queueGC=function(){this._isGcQueued()||(this._setGcQueued(),j.invokeLater(this._gc,this,void 0))},e.prototype._gc=function(){var a=this._length();this._unsetAt(0);for(var b=0;a>b;b++)delete this[b];this._setLength(0),this._unsetGcQueued()},e.prototype._queueSettleAt=function(a){this._isRejectionUnhandled()&&this._unsetRejectionIsUnhandled(),j.invoke(this._settlePromiseAt,this,a)},e.prototype._fulfillUnchecked=function(a){if(this.isPending()){if(a===this){var b=H();return this._attachExtraTrace(b),this._rejectUnchecked(b,void 0)}this._cleanValues(),this._setFulfilled(),this._settledValue=a;var c=this._length();c>0&&j.invoke(this._settlePromises,this,c)}},e.prototype._rejectUncheckedCheckError=function(a){var b=E(a)?a:new Error(a+"");this._rejectUnchecked(a,b===a?void 0:b)},e.prototype._rejectUnchecked=function(a,b){if(this.isPending()){if(a===this){var c=H();return this._attachExtraTrace(c),this._rejectUnchecked(c)}if(this._cleanValues(),this._setRejected(),this._settledValue=a,this._isFinal())return void j.invokeLater(F,void 0,void 0===b?a:b);var d=this._length();void 0!==b&&this._setCarriedStackTrace(b),d>0?j.invoke(this._rejectPromises,this,null):this._ensurePossibleRejectionHandled()}},e.prototype._rejectPromises=function(){this._settlePromises(),this._unsetCarriedStackTrace()},e.prototype._settlePromises=function(){for(var a=this._length(),b=0;a>b;b+=5)this._settlePromiseAt(b)},e.prototype._ensurePossibleRejectionHandled=function(){this._setRejectionIsUnhandled(),void 0!==p.possiblyUnhandledRejection&&j.invokeLater(this._notifyUnhandledRejection,this,void 0)},e.prototype._notifyUnhandledRejectionIsHandled=function(){"function"==typeof I&&j.invokeLater(I,void 0,this)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var a=this._settledValue,b=this._getCarriedStackTrace();this._setUnhandledRejectionIsNotified(),void 0!==b&&(this._unsetCarriedStackTrace(),a=b),"function"==typeof p.possiblyUnhandledRejection&&p.possiblyUnhandledRejection(a,this)}};var K=[];e.prototype._peekContext=function(){var a=K.length-1;return a>=0?K[a]:void 0},e.prototype._pushContext=function(){J&&K.push(this)},e.prototype._popContext=function(){J&&K.pop()};var L=h.Promise;return e.noConflict=function(){return h.Promise===e&&(h.Promise=L),e},p.isSupported()||(e.longStackTraces=function(){},J=!1),e._makeSelfResolutionError=H,a("./finally.js")(e,n),a("./direct_resolve.js")(e),a("./thenables.js")(e,l),a("./synchronous_inspection.js")(e),e.RangeError=x,e.CancellationError=z,e.TimeoutError=A,e.TypeError=y,e.RejectionError=B,i.toFastProperties(e),i.toFastProperties(e.prototype),a("./timers.js")(e,l),a("./any.js")(e,g,o),a("./race.js")(e,l),a("./call_get.js")(e),a("./filter.js")(e,g,o,G),a("./generators.js")(e,G,l),a("./map.js")(e,o,l,G),a("./nodeify.js")(e),a("./promisify.js")(e,l),a("./props.js")(e,o),a("./reduce.js")(e,g,o,G,l),a("./settle.js")(e,g,o),a("./some.js")(e,g,o,G),a("./progress.js")(e,d),a("./cancel.js")(e,l),e.prototype=e.prototype,e +}},{"./any.js":1,"./async.js":2,"./call_get.js":4,"./cancel.js":5,"./captured_trace.js":6,"./catch_filter.js":7,"./direct_resolve.js":8,"./errors.js":9,"./errors_api_rejection":10,"./filter.js":12,"./finally.js":13,"./generators.js":14,"./global.js":15,"./map.js":16,"./nodeify.js":17,"./progress.js":18,"./promise_array.js":20,"./promise_resolver.js":21,"./promisify.js":23,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":32,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./util.js":37,__browserify_process:50}],20:[function(a,b){"use strict";b.exports=function(b,c){function d(a){switch(a){case-1:return void 0;case-2:return[];case-3:return{}}}function e(a,d){var e=this._promise=new b(c),f=void 0;a instanceof b&&(f=a,a._cancellable()&&(e._setCancellable(),e._cancellationParent=a),a._isBound()&&e._setBoundTo(d)),e._setTrace(f),this._values=a,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var f=a("./errors.js").canAttach,g=a("./util.js"),h=a("./async.js"),i={}.hasOwnProperty,j=g.isArray;return e.PropertiesPromiseArray=function(){},e.prototype.length=function(){return this._length},e.prototype.promise=function(){return this._promise},e.prototype._init=function(a,c){var f=this._values;if(f instanceof b){if(!f.isFulfilled())return f.isPending()?void f._then(this._init,this._reject,void 0,this,c):(f._unsetRejectionIsUnhandled(),void this._reject(f._settledValue));if(f=f._settledValue,!j(f)){var g=new b.TypeError("expecting an array, a promise or a thenable");return void this.__hardReject__(g)}this._values=f}if(0===f.length)return void this._resolve(d(c));var k,l=f.length,m=l;k=this instanceof e.PropertiesPromiseArray?this._values:new Array(l);for(var n=!1,o=0;l>o;++o){var p=f[o];if(void 0!==p||i.call(f,o)){var q=b._cast(p,void 0);q instanceof b?q.isPending()?q._proxyPromiseArray(this,o):(q._unsetRejectionIsUnhandled(),n=!0):n=!0,k[o]=q}else m--}if(0===m)return void this._resolve(-2===c?k:d(c));if(this._values=k,this._length=m,n){var r=m===l?this._scanDirectValues:this._scanDirectValuesHoled;h.invoke(r,this,l)}},e.prototype._settlePromiseAt=function(a){var c=this._values[a];c instanceof b?c.isFulfilled()?this._promiseFulfilled(c._settledValue,a):c.isRejected()&&this._promiseRejected(c._settledValue,a):this._promiseFulfilled(c,a)},e.prototype._scanDirectValuesHoled=function(a){for(var b=0;a>b&&!this._isResolved();++b)i.call(this._values,b)&&this._settlePromiseAt(b)},e.prototype._scanDirectValues=function(a){for(var b=0;a>b&&!this._isResolved();++b)this._settlePromiseAt(b)},e.prototype._isResolved=function(){return null===this._values},e.prototype._resolve=function(a){this._values=null,this._promise._fulfill(a)},e.prototype.__hardReject__=e.prototype._reject=function(a){this._values=null;var b=f(a)?a:new Error(a+"");this._promise._attachExtraTrace(b),this._promise._reject(a,b)},e.prototype._promiseProgressed=function(a,b){this._isResolved()||this._promise._progress({index:b,value:a})},e.prototype._promiseFulfilled=function(a,b){if(!this._isResolved()){this._values[b]=a;var c=++this._totalResolved;c>=this._length&&this._resolve(this._values)}},e.prototype._promiseRejected=function(a){this._isResolved()||(this._totalResolved++,this._reject(a))},e}},{"./async.js":2,"./errors.js":9,"./util.js":37}],21:[function(a,b){"use strict";function c(a){return a instanceof Error&&n.getPrototypeOf(a)===Error.prototype}function d(a){var b;return b=c(a)?new k(a):a,i.markAsOriginatingFromRejection(b),b}function e(a){function b(b,c){if(null!==a){if(b){var e=d(h(b));a._attachExtraTrace(e),a._reject(e)}else if(arguments.length>2){for(var f=arguments.length,g=new Array(f-1),i=1;f>i;++i)g[i-1]=arguments[i];a._fulfill(g)}else a._fulfill(c);a=null}}return b}var f,g=a("./util.js"),h=g.maybeWrapAsError,i=a("./errors.js"),j=i.TimeoutError,k=i.RejectionError,l=a("./async.js"),m=g.haveGetters,n=a("./es5.js");if(f=m?function(a){this.promise=a}:function(a){this.promise=a,this.asCallback=e(a),this.callback=this.asCallback},m){var o={get:function(){return e(this.promise)}};n.defineProperty(f.prototype,"asCallback",o),n.defineProperty(f.prototype,"callback",o)}f._nodebackForPromise=e,f.prototype.toString=function(){return"[object PromiseResolver]"},f.prototype.resolve=f.prototype.fulfill=function(a){var b=this.promise;if(void 0===b||void 0===b._tryFollow)throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.");b._tryFollow(a)||l.invoke(b._fulfill,b,a)},f.prototype.reject=function(a){var b=this.promise;if(void 0===b||void 0===b._attachExtraTrace)throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.");i.markAsOriginatingFromRejection(a);var c=i.canAttach(a)?a:new Error(a+"");b._attachExtraTrace(c),l.invoke(b._reject,b,a),c!==a&&l.invoke(this._setCarriedStackTrace,this,c)},f.prototype.progress=function(a){l.invoke(this.promise._progress,this.promise,a)},f.prototype.cancel=function(){l.invoke(this.promise.cancel,this.promise,void 0)},f.prototype.timeout=function(){this.reject(new j("timeout"))},f.prototype.isResolved=function(){return this.promise.isResolved()},f.prototype.toJSON=function(){return this.promise.toJSON()},f.prototype._setCarriedStackTrace=function(a){this.promise.isRejected()&&this.promise._setCarriedStackTrace(a)},b.exports=f},{"./async.js":2,"./errors.js":9,"./es5.js":11,"./util.js":37}],22:[function(a,b){"use strict";b.exports=function(b,c){function d(a){for(var c=l,e=j,f=b,g=c.length,h=0;g>h;++h){var i=k(c[h],void 0,a);if(i===e)return f.reject(e.e);var m=f._cast(i,d,void 0);if(m instanceof f)return m}return null}function e(a,d){var e=this._promise=new b(c);e._setTrace(void 0),this._generatorFunction=a,this._receiver=d,this._generator=void 0}var f=a("./errors.js"),g=f.TypeError,h=a("./util.js"),i=h.isArray,j=h.errorObj,k=h.tryCatch1,l=[];return e.prototype.promise=function(){return this._promise},e.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._next(void 0)},e.prototype._continue=function m(a){if(a===j){this._generator=void 0;var c=f.canAttach(a.e)?a.e:new Error(a.e+"");return this._promise._attachExtraTrace(c),void this._promise._reject(a.e,c)}var e=a.value;if(a.done===!0)this._generator=void 0,this._promise._tryFollow(e)||this._promise._fulfill(e);else{var h=b._cast(e,m,void 0);if(!(h instanceof b)&&(h=i(h)?b.all(h):d(h),null===h))return void this._throw(new g("A value was yielded that could not be treated as a promise"));h._then(this._next,this._throw,void 0,this,null)}},e.prototype._throw=function(a){f.canAttach(a)&&this._promise._attachExtraTrace(a),this._continue(k(this._generator["throw"],this._generator,a))},e.prototype._next=function(a){this._continue(k(this._generator.next,this._generator,a))},e.addYieldHandler=function(a){if("function"!=typeof a)throw new g("fn must be a function");l.push(a)},e}},{"./errors.js":9,"./util.js":37}],23:[function(a,b){"use strict";b.exports=function(b,c){function d(a){return a.__isPromisified__===!0}function e(a,b){var c=b+"Async"in a;return c?d(a[b+"Async"]):!1}function f(a){for(var b=0;b=c;--d)d!==a&&b.push(d);for(var d=a+1;5>=d;++d)b.push(d);return b}function h(a){for(var b=new Array(a),c=0;ce;++e)c[e]="arguments["+e+"]";var g=b>0?",":"";return"string"==typeof a&&d===n?"this"+j(a)+"("+c.join(",")+g+" fn);break;":(void 0===d?"callback("+c.join(",")+g+" fn);":"callback.call("+(d===n?"this":"receiver")+", "+c.join(",")+g+" fn);")+"break;"}function l(){for(var b="",c=0;ce;e+=2){var g=d[e],h=d[e+1],i=g+"Async";a[i]=z(g,n,g,h)}return o.toFastProperties(a),a}return z(a,b,void 0,a)}var n={},o=a("./util.js"),p=a("./es5.js"),q=a("./promise_resolver.js")._nodebackForPromise,r=o.withAppended,s=o.maybeWrapAsError,t=o.canEvaluate,u=o.deprecated,v=a("./errors").TypeError,w=new RegExp("Async$"),x=function(){if(p.isES5){var a=Object.create,b=Object.getOwnPropertyDescriptor;return function(c){for(var g=[],h=a(null),i=c;null!==c;){for(var j=p.keys(c),k=0,l=j.length;l>k;++k){var m=j[k];if(!h[m]){h[m]=!0;var n=b(c,m);null==n||"function"!=typeof n.value||d(n.value)||e(i,m)||g.push(m,n.value)}}c=p.getPrototypeOf(c)}return f(g),g}}return function(a){var b=[];for(var c in a){var g=a[c];"function"!=typeof g||d(g)||e(a,c)||b.push(c,g)}return f(b),b}}(),y=/^[a-z$_][a-z$_0-9]*$/i,z=t?k:l;b.promisify=function(a,b){if("object"==typeof a&&null!==a)return u("Promise.promisify for promisifying entire objects is deprecated. Use Promise.promisifyAll instead."),m(a,b,!0);if("function"!=typeof a)throw new v("fn must be a function");return d(a)?a:m(a,arguments.length<2?n:b,!1)},b.promisifyAll=function(a){if("function"!=typeof a&&"object"!=typeof a)throw new v("the target of promisifyAll must be an object or a function");return m(a,void 0,!0)}}},{"./errors":9,"./es5.js":11,"./promise_resolver.js":21,"./util.js":37}],24:[function(a,b){"use strict";b.exports=function(b,c){function d(a,b){for(var c=g.keys(a),d=new Array(c.length),e=0,f=d.length;f>e;++e)d[e]=a[c[e]];if(this.constructor$(d,b),!this._isResolved())for(var e=0,f=c.length;f>e;++e)d.push(c[e])}var e=a("./util.js"),f=e.inherits,g=a("./es5.js");return f(d,c),d.prototype._init=function(){this._init$(void 0,-3)},d.prototype._promiseFulfilled=function(a,b){if(!this._isResolved()){this._values[b]=a;var c=++this._totalResolved;if(c>=this._length){for(var d={},e=this.length(),f=0,g=this.length();g>f;++f)d[this._values[f+e]]=this._values[f];this._resolve(d)}}},d.prototype._promiseProgressed=function(a,b){this._isResolved()||this._promise._progress({key:this._values[b+this.length()],value:a})},c.PropertiesPromiseArray=d,d}},{"./es5.js":11,"./util.js":37}],25:[function(a,b){"use strict";b.exports=function(b,c){function d(a,c){var d,f=b._cast(a,void 0);return h(f)?(f instanceof b?d=f._then(b.props,void 0,void 0,void 0,void 0):(d=new e(f,c===!0&&f._isBound()?f._boundTo:void 0).promise(),c=!1),c===!0&&f._isBound()&&d._setBoundTo(f._boundTo),d):g("cannot await properties of a non-object")}var e=a("./properties_promise_array.js")(b,c),f=a("./util.js"),g=a("./errors_api_rejection")(b),h=f.isObject;b.prototype.props=function(){return d(this,!0)},b.props=function(a){return d(a,!1)}}},{"./errors_api_rejection":10,"./properties_promise_array.js":24,"./util.js":37}],26:[function(a,b){"use strict";function c(a,b,c,d,e){for(var f=0;e>f;++f)c[f+d]=a[f+b]}function d(a){return a>>>=0,a-=1,a|=a>>1,a|=a>>2,a|=a>>4,a|=a>>8,a|=a>>16,a+1}function e(a){return"number"!=typeof a?16:d(Math.min(Math.max(16,a),1073741824))}function f(a){this._capacity=e(a),this._length=0,this._front=0,this._makeCapacity()}f.prototype._willBeOverCapacity=function(a){return this._capacityb;++b)this[b]=void 0},f.prototype._checkCapacity=function(a){this._capacity=b+f)c(e,b,this,0,f);else{var g=f-(b+f&d-1);c(e,b,this,0,g),c(e,0,this,g,f-g)}},b.exports=f},{}],27:[function(a,b){"use strict";b.exports=function(b,c){function d(a,d){var i=b._cast(a,void 0);if(i instanceof b)return g(i);if(!f(a))return e("expecting an array, a promise or a thenable");var j=new b(c);j._setTrace(d),void 0!==d&&(d._isBound()&&j._setBoundTo(d._boundTo),d._cancellable()&&(j._setCancellable(),j._cancellationParent=d));for(var k=j._fulfill,l=j._reject,m=0,n=a.length;n>m;++m){var o=a[m];(void 0!==o||h.call(a,m))&&b.cast(o)._then(k,l,void 0,j,null)}return j}var e=a("./errors_api_rejection.js")(b),f=a("./util.js").isArray,g=function(a){return a.then(function(b){return d(b,a)})},h={}.hasOwnProperty;b.race=function(a){return d(a,void 0)},b.prototype.race=function(){return d(this,void 0)}}},{"./errors_api_rejection.js":10,"./util.js":37}],28:[function(a,b){"use strict";b.exports=function(a,b,c,d,e){function f(b,c,d,f,g){this.promise=new a(e),this.index=c,this.length=f.length,this.items=f,this.callback=b,this.receiver=g,this.accum=d}function g(a,b){var c=this,d=void 0;"function"!=typeof c&&(d=c.receiver,c=c.fn);var e=a.length,g=void 0,h=0;void 0!==b?(g=b,h=0):(h=1,e>0&&(g=a[0]));var i=h;if(i>=e)return g;var j=new f(c,i,g,a,d);return j.iterate(),j.promise}function h(a){var b=this.fn,c=this.initialValue;return g.call(b,a,c)}function i(a,b,c,d){return c._then(function(c){return j(a,b,c,d)},void 0,void 0,void 0,void 0)}function j(e,f,j,k){if("function"!=typeof f)return d("fn must be a function");if(k===!0&&e._isBound()&&(f={fn:f,receiver:e._boundTo}),void 0!==j){if(j instanceof a){if(!j.isFulfilled())return i(e,f,j,k);j=j._settledValue}return b(e,c,k===!0&&e._isBound()?e._boundTo:void 0).promise()._then(h,void 0,void 0,{fn:f,initialValue:j},void 0)}return b(e,c,k===!0&&e._isBound()?e._boundTo:void 0).promise()._then(g,void 0,void 0,f,void 0)}f.prototype.reject=function(a){this.promise._reject(a)},f.prototype.fulfill=function(a,b){this.accum=a,this.index=b+1,this.iterate()},f.prototype.iterate=function(){for(var b=this.index,c=this.length,d=this.items,e=this.accum,f=this.receiver,g=this.callback;c>b;++b)if(e=g.call(f,e,d[b],b,c),e=a._cast(e,void 0),e instanceof a)return void e._then(this.fulfill,this.reject,void 0,this,b);this.promise._fulfill(e)},a.reduce=function(a,b,c){return j(a,b,c,!1)},a.prototype.reduce=function(a,b){return j(this,a,b,!0)}}},{}],29:[function(a,b){var c,d=a("__browserify_process"),e=a("./global.js");if("undefined"!=typeof d&&null!==d&&"function"==typeof d.cwd&&"function"==typeof d.nextTick&&"string"==typeof d.version)c=function(a){d.nextTick(a)};else if("function"!=typeof e.MutationObserver&&"function"!=typeof e.WebkitMutationObserver&&"function"!=typeof e.WebKitMutationObserver||"undefined"==typeof document||"function"!=typeof document.createElement)if("function"==typeof e.postMessage&&"function"!=typeof e.importScripts&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener){var f="bluebird_message_key_"+Math.random();c=function(){function a(a){if(a.source===e&&a.data===f){var c=b;b=void 0,c()}}var b=void 0;return e.addEventListener("message",a,!1),function(a){b=a,e.postMessage(f,"*")}}()}else c="function"==typeof e.MessageChannel?function(){var a=void 0,b=new e.MessageChannel;return b.port1.onmessage=function(){var b=a;a=void 0,b()},function(c){a=c,b.port2.postMessage(null)}}():e.setTimeout?function(a){setTimeout(a,4)}:function(a){a()};else c=function(){var a=e.MutationObserver||e.WebkitMutationObserver||e.WebKitMutationObserver,b=document.createElement("div"),c=void 0,d=new a(function(){var a=c;c=void 0,a()});return d.observe(b,{attributes:!0}),function(a){c=a,b.setAttribute("class","foo")}}();b.exports=c},{"./global.js":15,__browserify_process:50}],30:[function(a,b){"use strict";b.exports=function(b,c,d){function e(a,b){return c(a,f,b===!0&&a._isBound()?a._boundTo:void 0).promise()}var f=a("./settled_promise_array.js")(b,d);b.settle=function(a){return e(a,!1)},b.prototype.settle=function(){return e(this,!0)}}},{"./settled_promise_array.js":31}],31:[function(a,b){"use strict";b.exports=function(b,c){function d(a,b){this.constructor$(a,b)}var e=b.PromiseInspection,f=a("./util.js"),g=f.inherits;return g(d,c),d.prototype._promiseResolved=function(a,b){this._values[a]=b;var c=++this._totalResolved;c>=this._length&&this._resolve(this._values)},d.prototype._promiseFulfilled=function(a,b){if(!this._isResolved()){var c=new e;c._bitField=268435456,c._settledValue=a,this._promiseResolved(b,c)}},d.prototype._promiseRejected=function(a,b){if(!this._isResolved()){var c=new e;c._bitField=134217728,c._settledValue=a,this._promiseResolved(b,c)}},d}},{"./util.js":37}],32:[function(a,b){"use strict";b.exports=function(b,c,d,e){function f(a,b,d){if((0|b)!==b||0>b)return e("expecting a positive integer");var f=c(a,g,d===!0&&a._isBound()?a._boundTo:void 0),h=f.promise();return h.isRejected()?h:(f.setHowMany(b),f.init(),h)}var g=a("./some_promise_array.js")(d);b.some=function(a,b){return f(a,b,!1)},b.prototype.some=function(a){return f(this,a,!0)}}},{"./some_promise_array.js":33}],33:[function(a,b){"use strict";b.exports=function(b){function c(a,b){this.constructor$(a,b),this._howMany=0,this._unwrap=!1,this._initialized=!1}var d=a("./util.js"),e=a("./errors.js").RangeError,f=d.inherits,g=d.isArray;return f(c,b),c.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-2);var a=g(this._values);if(this._holes=a?this._values.length-this.length():0,!this._isResolved()&&a&&this._howMany>this._canPossiblyFulfill()){var b="(Promise.some) input array contains less than "+this._howMany+" promises";this._reject(new e(b))}}},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(a){this._isResolved()||(this._howMany=a)},c.prototype._promiseFulfilled=function(a){this._isResolved()||(this._addFulfilled(a),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),this._resolve(1===this.howMany()&&this._unwrap?this._values[0]:this._values)))},c.prototype._promiseRejected=function(a){this._isResolved()||(this._addRejected(a),this.howMany()>this._canPossiblyFulfill()&&this._reject(this._values.length===this.length()?[]:this._values.slice(this.length()+this._holes)))},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()-this._holes},c.prototype._addRejected=function(a){this._values.push(a)},c.prototype._addFulfilled=function(a){this._values[this._totalResolved++]=a},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c}},{"./errors.js":9,"./util.js":37}],34:[function(a,b){"use strict";b.exports=function(a){function b(a){void 0!==a?(this._bitField=a._bitField,this._settledValue=a.isResolved()?a._settledValue:void 0):(this._bitField=0,this._settledValue=void 0)}b.prototype.isFulfilled=a.prototype.isFulfilled=function(){return(268435456&this._bitField)>0},b.prototype.isRejected=a.prototype.isRejected=function(){return(134217728&this._bitField)>0},b.prototype.isPending=a.prototype.isPending=function(){return 0===(402653184&this._bitField)},b.prototype.value=a.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise");return this._settledValue},b.prototype.error=a.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise");return this._settledValue},b.prototype.isResolved=a.prototype.isResolved=function(){return(402653184&this._bitField)>0},a.prototype.inspect=function(){return new b(this)},a.PromiseInspection=b}},{}],35:[function(a,b){"use strict";b.exports=function(b,c){function d(a){try{return a.then}catch(b){return j.e=b,j}}function e(a,e){if(k(a)){if(a instanceof b)return a;if(f(a)){var h=new b(c);return h._setTrace(void 0),a._then(h._fulfillUnchecked,h._rejectUncheckedCheckError,h._progressUnchecked,h,null),h._setFollowing(),h}var l=d(a);if(l===j)return void 0!==e&&i(l.e)&&e._attachExtraTrace(l.e),b.reject(l.e);if("function"==typeof l)return g(a,l,e)}return a}function f(a){return l.call(a,"_promise0")}function g(a,c,d){function e(c){if(!j){if(j=!0,a===c){var e=b._makeSelfResolutionError();return void 0!==d&&d._attachExtraTrace(e),void h.promise._reject(e,void 0)}h.resolve(c)}}function f(a){if(!j){j=!0;var b=i(a)?a:new Error(a+"");void 0!==d&&d._attachExtraTrace(b),h.promise._reject(a,b)}}function g(a){if(!j){var b=h.promise;"function"==typeof b._progress&&b._progress(a)}}var h=b.defer(),j=!1;try{c.call(a,e,f,g)}catch(k){if(!j){j=!0;var l=i(k)?k:new Error(k+"");void 0!==d&&d._attachExtraTrace(l),h.promise._reject(k,l)}}return h.promise}var h=a("./util.js"),i=a("./errors.js").canAttach,j=h.errorObj,k=h.isObject,l={}.hasOwnProperty;b._cast=e}},{"./errors.js":9,"./util.js":37}],36:[function(a,b){"use strict";var c=a("./global.js"),d=function(a,b){for(var d=arguments.length,e=new Array(d-2),f=2;d>f;++f)e[f-2]=arguments[f];c.setTimeout(function(){a.apply(void 0,e)},b)};b.exports=function(b,c){var e=(a("./util.js"),a("./errors.js")),f=(a("./errors_api_rejection")(b),b.TimeoutError),g=function(a,b,c){if(a.isPending()){"string"!=typeof b&&(b="operation timed out after "+c+" ms");var d=new f(b);e.markAsOriginatingFromRejection(d),a._attachExtraTrace(d),a._rejectUnchecked(d)}},h=function(a,b){b._fulfill(a)},i=b.delay=function(a,e){void 0===e&&(e=a,a=void 0),e=+e;var f=b._cast(a,void 0),g=new b(c);return f instanceof b?(f._isBound()&&g._setBoundTo(f._boundTo),f._cancellable()&&(g._setCancellable(),g._cancellationParent=f),g._setTrace(f),g._follow(f),g.then(function(a){return b.delay(a,e)})):(g._setTrace(void 0),d(h,e,a,g),g)};b.prototype.delay=function(a){return i(this,a)},b.prototype.timeout=function(a,e){a=+a;var f=new b(c);return f._setTrace(this),this._isBound()&&f._setBoundTo(this._boundTo),this._cancellable()&&(f._setCancellable(),f._cancellationParent=this),f._follow(this),d(g,a,f,e,a),f}}},{"./errors.js":9,"./errors_api_rejection":10,"./global.js":15,"./util.js":37}],37:[function(a,b,c){"use strict";function d(a){"undefined"!=typeof console&&null!==console&&"function"==typeof console.warn&&console.warn("Bluebird: "+a)}function e(a,b,c){try{return a.call(b,c)}catch(d){return t.e=d,t}}function f(a,b,c,d){try{return a.call(b,c,d)}catch(e){return t.e=e,t}}function g(a,b,c){try{return a.apply(c,b)}catch(d){return t.e=d,t}}function h(a){return"string"==typeof a?a:""+a}function i(a){return null==a||a===!0||a===!1||"string"==typeof a||"number"==typeof a}function j(a){return!i(a)}function k(a){return i(a)?new Error(h(a)):a}function l(a,b){var c,d=a.length,e=new Array(d+1);for(c=0;d>c;++c)e[c]=a[c];return e[c]=b,e}function m(a,b,c){if(i(a))return a;var d={value:c,configurable:!0,enumerable:!1,writable:!0};return q.defineProperty(a,b,d),a}function n(a){throw a}function o(a){function b(){}return b.prototype=a,b}var p=a("./global.js"),q=a("./es5.js"),r=function(){try{var a={};return q.defineProperty(a,"f",{get:function(){return 3}}),3===a.f}catch(b){return!1}}(),s=function(){return"undefined"!=typeof window&&null!==window&&"undefined"!=typeof window.document&&"undefined"!=typeof navigator&&null!==navigator&&"string"==typeof navigator.appName&&window===p?!1:!0}(),t={e:{}},u=function(a,b){function c(){this.constructor=a,this.constructor$=b;for(var c in b.prototype)d.call(b.prototype,c)&&"$"!==c.charAt(c.length-1)&&(this[c+"$"]=b.prototype[c])}var d={}.hasOwnProperty;return c.prototype=b.prototype,a.prototype=new c,a.prototype},v=function(){return"string"!==this}.call("string"),w={thrower:n,isArray:q.isArray,haveGetters:r,notEnumerableProp:m,isPrimitive:i,isObject:j,canEvaluate:s,deprecated:d,errorObj:t,tryCatch1:e,tryCatch2:f,tryCatchApply:g,inherits:u,withAppended:l,asString:h,maybeWrapAsError:k,wrapsPrimitiveReceiver:v,toFastProperties:o};b.exports=w},{"./es5.js":11,"./global.js":15}],38:[function(){},{}],39:[function(a,b,c){function d(a){return"[object Array]"===j.call(a)}function e(a,b){var c;if(null===a)c={__proto__:null};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return"undefined"!=typeof b&&Object.defineProperties&&Object.defineProperties(c,b),c}function f(a){return"object"!=typeof a&&"function"!=typeof a||null===a}function g(a){if(f(a))throw new TypeError("Object.keys called on a non-object");var b=[];for(var c in a)k.call(a,c)&&b.push(c);return b}function h(a){if(f(a))throw new TypeError("Object.getOwnPropertyNames called on a non-object");var b=g(a);return c.isArray(a)&&-1===c.indexOf(a,"length")&&b.push("length"),b}function i(a,b){return{value:a[b]}}var j=Object.prototype.toString,k=Object.prototype.hasOwnProperty;c.isArray="function"==typeof Array.isArray?Array.isArray:d,c.indexOf=function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;cf;++f)a.hasOwnProperty(f)&&(e?d=b(d,a[f],f,a):(d=a[f],e=!0));return d},c.substr="b"!=="ab".substr(-1)?function(a,b,c){return 0>b&&(b=a.length+b),a.substr(b,c)}:function(a,b,c){return a.substr(b,c)},c.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},c.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var c=a.shift();return function(){b.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}},c.create="function"==typeof Object.create?Object.create:e;var l="function"==typeof Object.keys?Object.keys:g,m="function"==typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:h;if((new Error).hasOwnProperty("description")){var n=function(a,b){return"[object Error]"===j.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a})),b};c.keys=function(a){return n(a,l(a))},c.getOwnPropertyNames=function(a){return n(a,m(a))}}else c.keys=l,c.getOwnPropertyNames=m;if("function"==typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(o){c.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return i(a,b)}}}else c.getOwnPropertyDescriptor=i},{}],40:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:!m.isNumber(b)||!isNaN(b)&&isFinite(b)?m.isFunction(b)||m.isRegExp(b)?b.toString():b:b.toString()}function d(a,b){return m.isString(a)?a.length=0;d--)if(e[d]!=f[d])return!1;for(d=e.length-1;d>=0;d--)if(c=e[d],!h(a[c],b[c]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util"),n=a("_shims"),o=Array.prototype.slice,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,this.message=a.message||e(this)},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p.throws=function(){l.apply(this,[!0].concat(o.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(o.call(arguments)))},p.ifError=function(a){if(a)throw a}},{_shims:39,util:45}],41:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var d=a("util");b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!d.isNumber(a)||0>a)throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,f,g,h;if(this._events||(this._events={}),"error"===a&&(!this._events.error||d.isObject(this._events.error)&&!this._events.error.length))throw b=arguments[1],b instanceof Error?b:TypeError('Uncaught, unspecified "error" event.');if(c=this._events[a],d.isUndefined(c))return!1;if(d.isFunction(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g];c.apply(this,f)}else if(d.isObject(c)){for(e=arguments.length,f=new Array(e-1),g=1;e>g;g++)f[g-1]=arguments[g]; +for(h=c.slice(),e=h.length,g=0;e>g;g++)h[g].apply(this,f)}return!0},c.prototype.addListener=function(a,b){var e;if(!d.isFunction(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d.isFunction(b.listener)?b.listener:b),this._events[a]?d.isObject(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,d.isObject(this._events[a])&&!this._events[a].warned){var e;e=d.isUndefined(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),b.apply(this,arguments)}if(!d.isFunction(b))throw TypeError("listener must be a function");return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,f,g;if(!d.isFunction(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,e=-1,c===b||d.isFunction(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(d.isObject(c)){for(g=f;g-->0;)if(c[g]===b||c[g].listener&&c[g].listener===b){e=g;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d.isFunction(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d.isFunction(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d.isFunction(a._events[b])?1:a._events[b].length:0}},{util:45}],42:[function(a,b,c){function d(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var e=a("__browserify_process"),f=a("util"),g=a("_shims"),h=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(a){return h.exec(a).slice(1)};c.resolve=function(){for(var a="",b=!1,c=arguments.length-1;c>=-1&&!b;c--){var h=c>=0?arguments[c]:e.cwd();if(!f.isString(h))throw new TypeError("Arguments to path.resolve must be strings");h&&(a=h+"/"+a,b="/"===h.charAt(0))}return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=c.isAbsolute(a),e="/"===g.substr(a,-1);return a=d(g.filter(a.split("/"),function(a){return!!a}),!b).join("/"),a||b||(a="."),a&&e&&(a+="/"),(b?"/":"")+a},c.isAbsolute=function(a){return"/"===a.charAt(0)},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(g.filter(a,function(a){if(!f.isString(a))throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},c.relative=function(a,b){function d(a){for(var b=0;b=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=c.resolve(a).substr(1),b=c.resolve(b).substr(1);for(var e=d(a.split("/")),f=d(b.split("/")),g=Math.min(e.length,f.length),h=g,i=0;g>i;i++)if(e[i]!==f[i]){h=i;break}for(var j=[],i=h;i0&&k>j&&(k=j);for(var l=0;k>l;++l){var m,n,o,p,q=a[l].replace(i,"%20"),r=q.indexOf(c);r>=0?(m=q.substr(0,r),n=q.substr(r+1)):(m=q,n="");try{o=decodeURIComponent(m),p=decodeURIComponent(n)}catch(s){o=f.unescape(m,!0),p=f.unescape(n,!0)}d(h,o)?g.isArray(h[o])?h[o].push(p):h[o]=[h[o],p]:h[o]=p}return h}},{_shims:39,buffer:47,util:45}],44:[function(a,b,c){function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function e(a,b,c){if(a&&j.isObject(a)&&a instanceof d)return a;var e=new d;return e.parse(a,b,c),e}function f(a){return j.isString(a)&&(a=e(a)),a instanceof d?a.format():d.prototype.format.call(a)}function g(a,b){return e(a,!1,!0).resolve(b)}function h(a,b){return a?e(a,!1,!0).resolveObject(b):b}var i={encode:function(a){return a}},j=a("util"),k=a("_shims");c.parse=e,c.resolve=g,c.resolveObject=h,c.format=f,c.Url=d;var l=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,n=["<",">",'"',"`"," ","\r","\n"," "],o=["{","}","|","\\","^","`"].concat(n),p=["'"].concat(o),q=["%","/","?",";","#"].concat(p),r=["/","?","#"],s=255,t=/^[a-z0-9A-Z_-]{0,63}$/,u=/^([a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=a("querystring");d.prototype.parse=function(a,b,c){if(!j.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=k.trim(d);var e=l.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&w[e]||(d=d.substr(2),this.slashes=!0)}if(!w[e]&&(g||e&&!x[e])){for(var h=-1,m=0;mn)&&(h=n)}var o,z;z=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==z&&(o=d.slice(0,z),d=d.slice(z+1),this.auth=decodeURIComponent(o)),h=-1;for(var m=0;mn)&&(h=n)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var B=this.hostname.split(/\./),m=0,C=B.length;C>m;m++){var D=B[m];if(D&&!D.match(t)){for(var E="",F=0,G=D.length;G>F;F++)E+=D.charCodeAt(F)>127?"x":D[F];if(!E.match(t)){var H=B.slice(0,m),I=B.slice(m+1),J=D.match(u);J&&(H.push(J[1]),I.unshift(J[2])),I.length&&(d="/"+I.join(".")+d),this.hostname=H.join(".");break}}}if(this.hostname=this.hostname.length>s?"":this.hostname.toLowerCase(),!A){for(var K=this.hostname.split("."),L=[],m=0;mm;m++){var P=p[m],Q=encodeURIComponent(P);Q===P&&(Q=escape(P)),d=d.split(P).join(Q)}var R=d.indexOf("#");-1!==R&&(this.hash=d.substr(R),d=d.slice(0,R));var S=d.indexOf("?");if(-1!==S?(this.search=d.substr(S),this.query=d.substr(S+1),b&&(this.query=y.parse(this.query)),d=d.slice(0,S)):b&&(this.search="",this.query={}),d&&(this.pathname=d),x[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var N=this.pathname||"",M=this.search||"";this.path=N+M}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j.isObject(this.query)&&k.keys(this.query).length&&(f=y.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==k.substr(b,-1)&&(b+=":"),this.slashes||(!b||x[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(j.isString(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(k.forEach(k.keys(this),function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return k.forEach(k.keys(a),function(b){"protocol"!==b&&(c[b]=a[b])}),x[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!x[a.protocol])return k.forEach(k.keys(a),function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||w[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),i=a.host||a.pathname&&"/"===a.pathname.charAt(0),l=i||h||c.host&&a.pathname,m=l,n=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],o=c.protocol&&!x[c.protocol];if(o&&(c.hostname="",c.port=null,c.host&&(""===n[0]?n[0]=c.host:n.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),l=l&&(""===e[0]||""===n[0])),i)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,n=e;else if(e.length)n||(n=[]),n.pop(),n=n.concat(e),c.search=a.search,c.query=a.query;else if(!j.isNullOrUndefined(a.search)){if(o){c.hostname=c.host=n.shift();var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return c.search=a.search,c.query=a.query,j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!n.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var q=n.slice(-1)[0],r=(c.host||a.host)&&("."===q||".."===q)||""===q,s=0,t=n.length;t>=0;t--)q=n[t],"."==q?n.splice(t,1):".."===q?(n.splice(t,1),s++):s&&(n.splice(t,1),s--);if(!l&&!m)for(;s--;s)n.unshift("..");!l||""===n[0]||n[0]&&"/"===n[0].charAt(0)||n.unshift(""),r&&"/"!==k.substr(n.join("/"),-1)&&n.push("");var u=""===n[0]||n[0]&&"/"===n[0].charAt(0);if(o){c.hostname=c.host=u?"":n.length?n.shift():"";var p=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;p&&(c.auth=p.shift(),c.host=c.hostname=p.shift())}return l=l||c.host&&n.length,l&&!u&&n.unshift(""),n.length?c.pathname=n.join("/"):(c.pathname=null,c.path=null),j.isNull(c.pathname)&&j.isNull(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=m.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{_shims:39,querystring:43,util:45}],45:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a){return a}function g(a){var b={};return G.forEach(a,function(a){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=G.keys(b),p=g(o);if(a.showHidden&&(o=G.getOwnPropertyNames(b)),0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?l(a,b,c,d,String(g),!0):"");return G.forEach(e,function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=G.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),i||(G.indexOf(a.seen,j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=G.reduce(a,function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return G.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===C(a)}function w(a){return"object"==typeof a&&a}function x(a){return w(a)&&"[object Date]"===C(a)}function y(a){return w(a)&&"[object Error]"===C(a)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.binarySlice}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),I[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=a("_shims"),H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=B;var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=function(a,b){a.super_=b,a.prototype=G.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},c._extend=function(a,b){if(!b||!w(b))return a;for(var c=G.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{_shims:39}],46:[function(a,b,c){c.readIEEE754=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],47:[function(a,b,c){function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(b,c,f){if(E||(E=a("assert")),!(this instanceof e))return new e(b,c,f);if(this.parent=this,this.offset=0,"base64"==c&&"string"==typeof b)for(b=d(b);b.length%4!=0;)b+="=";var h;if("number"==typeof f){this.length=g(c);for(var j=0;j=b?b:a>=0?a:(a+=b,a>=0?a:0))}function g(a){return a=~~Math.ceil(+a),0>a?0:a}function h(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}function i(a){return h(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function j(a){return 16>a?"0"+a.toString(16):a.toString(16)}function k(a){for(var b=[],c=0;ce&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function o(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function p(a,b,c,d){var e=0;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=a.length?0:(c?(e=a[b]<<8,b+1=a.length?0:(c?(b+1>>0):(b+2>>0)),e)}function r(a,b,c,d){var e,f;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=0,"specified a negative value for writing an unsigned value"),E.ok(b>=a,"value is larger than maximum value for type"),E.ok(Math.floor(a)===a,"value has a fractional component")}function w(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1>>8*(d?1-f:f)}function x(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3>>8*(d?3-f:f)&255}function y(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value"),E.ok(Math.floor(a)===a,"value has a fractional component")}function z(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value")}function A(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e)}function B(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e)}function C(b,c,d,e,f){f||(E.ok(void 0!==c&&null!==c,"missing value"),E.ok("boolean"==typeof e,"missing or invalid endian"),E.ok(void 0!==d&&null!==d,"missing offset"),E.ok(d+3a||a>=this.length)throw new Error("oob");return this[a]},e.prototype.set=function(a,b){if(0>a||a>=this.length)throw new Error("oob");return this[a]=b},e.byteLength=function(a,b){switch(b||"utf8"){case"hex":return a.length/2;case"utf8":case"utf-8":return k(a).length;case"ascii":case"binary":return a.length;case"base64":return m(a).length;default:throw new Error("Unknown encoding")}},e.prototype.utf8Write=function(a,b,c){return e._charsWritten=n(k(a),this,b,c)},e.prototype.asciiWrite=function(a,b,c){return e._charsWritten=n(l(a),this,b,c)},e.prototype.binaryWrite=e.prototype.asciiWrite,e.prototype.base64Write=function(a,b,c){return e._charsWritten=n(m(a),this,b,c)},e.prototype.base64Slice=function(){var b=Array.prototype.slice.apply(this,arguments);return a("base64-js").fromByteArray(b)},e.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",d=0;dd;d++)if(a[d]=j(this[d]),d==c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},e.prototype.hexSlice=function(a,b){var c=this.length;(!a||0>a)&&(a=0),(!b||0>b||b>c)&&(b=c);for(var d="",e=a;b>e;e++)d+=j(this[e]);return d},e.prototype.toString=function(a,b,c){if(a=String(a||"utf8").toLowerCase(),b=+b||0,"undefined"==typeof c&&(c=this.length),+c==b)return"";switch(a){case"hex":return this.hexSlice(b,c);case"utf8":case"utf-8":return this.utf8Slice(b,c);case"ascii":return this.asciiSlice(b,c);case"binary":return this.binarySlice(b,c);case"base64":return this.base64Slice(b,c);case"ucs2":case"ucs-2":return this.ucs2Slice(b,c);default:throw new Error("Unknown encoding")}},e.prototype.hexWrite=function(a,b,c){b=+b||0;var d=this.length-b;c?(c=+c,c>d&&(c=d)):c=d;var f=a.length;if(f%2)throw new Error("Invalid hex string");c>f/2&&(c=f/2);for(var g=0;c>g;g++){var h=parseInt(a.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");this[b+g]=h}return e._charsWritten=2*g,g},e.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b,b=c,c=e}b=+b||0;var f=this.length-b;switch(c?(c=+c,c>f&&(c=f)):c=f,d=String(d||"utf8").toLowerCase()){case"hex":return this.hexWrite(a,b,c);case"utf8":case"utf-8":return this.utf8Write(a,b,c);case"ascii":return this.asciiWrite(a,b,c);case"binary":return this.binaryWrite(a,b,c);case"base64":return this.base64Write(a,b,c);case"ucs2":case"ucs-2":return this.ucs2Write(a,b,c);default:throw new Error("Unknown encoding")}},e.prototype.slice=function(a,b){var c=this.length;return a=f(a,c,0),b=f(b,c,c),new e(this,b-a,+a)},e.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),(void 0===d||isNaN(d))&&(d=this.length),b||(b=0),c>d)throw new Error("sourceEnd < sourceStart");if(d===c)return 0;if(0==a.length||0==e.length)return 0;if(0>b||b>=a.length)throw new Error("targetStart out of bounds");if(0>c||c>=e.length)throw new Error("sourceStart out of bounds");if(0>d||d>e.length)throw new Error("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bg;g++)E.ok("undefined"!=typeof this[g],"copying undefined buffer bytes!"),f.push(this[g]);for(var g=b;gc)throw new Error("end < start");if(c===b)return 0;if(0==this.length)return 0;if(0>b||b>=this.length)throw new Error("start out of bounds");if(0>c||c>this.length)throw new Error("end out of bounds");for(var d=b;c>d;d++)this[d]=a},e.isBuffer=function(a){return a instanceof e||a instanceof e},e.concat=function(a,b){if(!h(a))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new e(0);if(1===a.length)return a[0];if("number"!=typeof b){b=0;for(var c=0;c=c.length?void 0:c[a]},e.prototype.readUInt16LE=function(a,b){return p(this,a,!1,b)},e.prototype.readUInt16BE=function(a,b){return p(this,a,!0,b)},e.prototype.readUInt32LE=function(a,b){return q(this,a,!1,b)},e.prototype.readUInt32BE=function(a,b){return q(this,a,!0,b)},e.prototype.readInt8=function(a,b){var c,d=this;return b||(E.ok(void 0!==a&&null!==a,"missing offset"),E.ok(a=d.length?void 0:(c=128&d[a],c?-1*(255-d[a]+1):d[a])},e.prototype.readInt16LE=function(a,b){return r(this,a,!1,b)},e.prototype.readInt16BE=function(a,b){return r(this,a,!0,b)},e.prototype.readInt32LE=function(a,b){return s(this,a,!1,b)},e.prototype.readInt32BE=function(a,b){return s(this,a,!0,b)},e.prototype.readFloatLE=function(a,b){return t(this,a,!1,b)},e.prototype.readFloatBE=function(a,b){return t(this,a,!0,b)},e.prototype.readDoubleLE=function(a,b){return u(this,a,!1,b)},e.prototype.readDoubleBE=function(a,b){return u(this,a,!0,b)},e.prototype.writeUInt8=function(a,b,c){var d=this;c||(E.ok(void 0!==a&&null!==a,"missing value"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b=0?d.writeUInt8(a,b,c):d.writeUInt8(255+a+1,b,c)},e.prototype.writeInt16LE=function(a,b,c){A(this,a,b,!1,c)},e.prototype.writeInt16BE=function(a,b,c){A(this,a,b,!0,c)},e.prototype.writeInt32LE=function(a,b,c){B(this,a,b,!1,c)},e.prototype.writeInt32BE=function(a,b,c){B(this,a,b,!0,c)},e.prototype.writeFloatLE=function(a,b,c){C(this,a,b,!1,c)},e.prototype.writeFloatBE=function(a,b,c){C(this,a,b,!0,c)},e.prototype.writeDoubleLE=function(a,b,c){D(this,a,b,!1,c)},e.prototype.writeDoubleBE=function(a,b,c){D(this,a,b,!0,c)}},{"./buffer_ieee754":46,assert:40,"base64-js":48}],48:[function(a,b){!function(){"use strict";function a(a){var b,c,e,f,g,h;if(a.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(g=a.indexOf("="),g=g>0?a.length-g:0,h=[],e=g>0?a.length-4:a.length,b=0,c=0;e>b;b+=4,c+=3)f=d.indexOf(a[b])<<18|d.indexOf(a[b+1])<<12|d.indexOf(a[b+2])<<6|d.indexOf(a[b+3]),h.push((16711680&f)>>16),h.push((65280&f)>>8),h.push(255&f);return 2===g?(f=d.indexOf(a[b])<<2|d.indexOf(a[b+1])>>4,h.push(255&f)):1===g&&(f=d.indexOf(a[b])<<10|d.indexOf(a[b+1])<<4|d.indexOf(a[b+2])>>2,h.push(f>>8&255),h.push(255&f)),h}function c(a){function b(a){return d[a>>18&63]+d[a>>12&63]+d[a>>6&63]+d[63&a]}var c,e,f,g=a.length%3,h="";for(c=0,f=a.length-g;f>c;c+=3)e=(a[c]<<16)+(a[c+1]<<8)+a[c+2],h+=b(e);switch(g){case 1:e=a[a.length-1],h+=d[e>>2],h+=d[e<<4&63],h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=d[e>>10],h+=d[e>>4&63],h+=d[e<<2&63],h+="="}return h}var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports.toByteArray=a,b.exports.fromByteArray=c}()},{}],49:[function(a,b){a=function c(b,d,e){function f(h,i){if(!d[h]){if(!b[h]){var j="function"==typeof a&&a;if(!i&&j)return j(h,!0);if(g)return g(h,!0);throw new Error("Cannot find module '"+h+"'")}var k=d[h]={exports:{}};b[h][0].call(k.exports,function(a){var c=b[h][1][a];return f(c?c:a)},k,k.exports,c,b,d,e)}return d[h].exports}for(var g="function"==typeof a&&a,h=0;h>1,k=-7,l=c?0:e-1,m=c?1:-1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.writeIEEE754=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?f-1:0,o=d?-1:1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],q9TxCC:[function(a,b,c){function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(b,c,f){if(E||(E=a("assert")),!(this instanceof e))return new e(b,c,f);if(this.parent=this,this.offset=0,"base64"==c&&"string"==typeof b)for(b=d(b);b.length%4!=0;)b+="=";var h;if("number"==typeof f){this.length=g(c);for(var j=0;j=b?b:a>=0?a:(a+=b,a>=0?a:0))}function g(a){return a=~~Math.ceil(+a),0>a?0:a}function h(a){return(Array.isArray||function(a){return"[object Array]"=={}.toString.apply(a)})(a)}function i(a){return h(a)||e.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function j(a){return 16>a?"0"+a.toString(16):a.toString(16)}function k(a){for(var b=[],c=0;ce&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function o(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function p(a,b,c,d){var e=0;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=a.length?0:(c?(e=a[b]<<8,b+1=a.length?0:(c?(b+1>>0):(b+2>>0)),e)}function r(a,b,c,d){var e,f;return d||(E.ok("boolean"==typeof c,"missing or invalid endian"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b+1=0,"specified a negative value for writing an unsigned value"),E.ok(b>=a,"value is larger than maximum value for type"),E.ok(Math.floor(a)===a,"value has a fractional component")}function w(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1>>8*(d?1-f:f)}function x(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3>>8*(d?3-f:f)&255}function y(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value"),E.ok(Math.floor(a)===a,"value has a fractional component")}function z(a,b,c){E.ok("number"==typeof a,"cannot write a non-number as a number"),E.ok(b>=a,"value larger than maximum allowed value"),E.ok(a>=c,"value smaller than minimum allowed value")}function A(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+1=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e)}function B(a,b,c,d,e){e||(E.ok(void 0!==b&&null!==b,"missing value"),E.ok("boolean"==typeof d,"missing or invalid endian"),E.ok(void 0!==c&&null!==c,"missing offset"),E.ok(c+3=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e)}function C(b,c,d,e,f){f||(E.ok(void 0!==c&&null!==c,"missing value"),E.ok("boolean"==typeof e,"missing or invalid endian"),E.ok(void 0!==d&&null!==d,"missing offset"),E.ok(d+3a||a>=this.length)throw new Error("oob");return this[a]},e.prototype.set=function(a,b){if(0>a||a>=this.length)throw new Error("oob");return this[a]=b},e.byteLength=function(a,b){switch(b||"utf8"){case"hex":return a.length/2;case"utf8":case"utf-8":return k(a).length;case"ascii":case"binary":return a.length;case"base64":return m(a).length;default:throw new Error("Unknown encoding")}},e.prototype.utf8Write=function(a,b,c){return e._charsWritten=n(k(a),this,b,c)},e.prototype.asciiWrite=function(a,b,c){return e._charsWritten=n(l(a),this,b,c)},e.prototype.binaryWrite=e.prototype.asciiWrite,e.prototype.base64Write=function(a,b,c){return e._charsWritten=n(m(a),this,b,c)},e.prototype.base64Slice=function(){var b=Array.prototype.slice.apply(this,arguments);return a("base64-js").fromByteArray(b)},e.prototype.utf8Slice=function(){for(var a=Array.prototype.slice.apply(this,arguments),b="",c="",d=0;dd;d++)if(a[d]=j(this[d]),d==c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},e.prototype.hexSlice=function(a,b){var c=this.length;(!a||0>a)&&(a=0),(!b||0>b||b>c)&&(b=c);for(var d="",e=a;b>e;e++)d+=j(this[e]);return d},e.prototype.toString=function(a,b,c){if(a=String(a||"utf8").toLowerCase(),b=+b||0,"undefined"==typeof c&&(c=this.length),+c==b)return"";switch(a){case"hex":return this.hexSlice(b,c);case"utf8":case"utf-8":return this.utf8Slice(b,c);case"ascii":return this.asciiSlice(b,c);case"binary":return this.binarySlice(b,c);case"base64":return this.base64Slice(b,c);case"ucs2":case"ucs-2":return this.ucs2Slice(b,c);default:throw new Error("Unknown encoding")}},e.prototype.hexWrite=function(a,b,c){b=+b||0;var d=this.length-b;c?(c=+c,c>d&&(c=d)):c=d;var f=a.length;if(f%2)throw new Error("Invalid hex string");c>f/2&&(c=f/2);for(var g=0;c>g;g++){var h=parseInt(a.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");this[b+g]=h}return e._charsWritten=2*g,g},e.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b,b=c,c=e}b=+b||0;var f=this.length-b;switch(c?(c=+c,c>f&&(c=f)):c=f,d=String(d||"utf8").toLowerCase()){case"hex":return this.hexWrite(a,b,c);case"utf8":case"utf-8":return this.utf8Write(a,b,c);case"ascii":return this.asciiWrite(a,b,c);case"binary":return this.binaryWrite(a,b,c);case"base64":return this.base64Write(a,b,c);case"ucs2":case"ucs-2":return this.ucs2Write(a,b,c);default:throw new Error("Unknown encoding")}},e.prototype.slice=function(a,b){var c=this.length;return a=f(a,c,0),b=f(b,c,c),new e(this,b-a,+a)},e.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),(void 0===d||isNaN(d))&&(d=this.length),b||(b=0),c>d)throw new Error("sourceEnd < sourceStart");if(d===c)return 0;if(0==a.length||0==e.length)return 0;if(0>b||b>=a.length)throw new Error("targetStart out of bounds");if(0>c||c>=e.length)throw new Error("sourceStart out of bounds");if(0>d||d>e.length)throw new Error("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bg;g++)E.ok("undefined"!=typeof this[g],"copying undefined buffer bytes!"),f.push(this[g]);for(var g=b;gc)throw new Error("end < start");if(c===b)return 0;if(0==this.length)return 0;if(0>b||b>=this.length)throw new Error("start out of bounds");if(0>c||c>this.length)throw new Error("end out of bounds");for(var d=b;c>d;d++)this[d]=a},e.isBuffer=function(a){return a instanceof e||a instanceof e},e.concat=function(a,b){if(!h(a))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===a.length)return new e(0);if(1===a.length)return a[0];if("number"!=typeof b){b=0;for(var c=0;c=c.length?void 0:c[a]},e.prototype.readUInt16LE=function(a,b){return p(this,a,!1,b)},e.prototype.readUInt16BE=function(a,b){return p(this,a,!0,b)},e.prototype.readUInt32LE=function(a,b){return q(this,a,!1,b)},e.prototype.readUInt32BE=function(a,b){return q(this,a,!0,b)},e.prototype.readInt8=function(a,b){var c,d=this;return b||(E.ok(void 0!==a&&null!==a,"missing offset"),E.ok(a=d.length?void 0:(c=128&d[a],c?-1*(255-d[a]+1):d[a])},e.prototype.readInt16LE=function(a,b){return r(this,a,!1,b)},e.prototype.readInt16BE=function(a,b){return r(this,a,!0,b)},e.prototype.readInt32LE=function(a,b){return s(this,a,!1,b)},e.prototype.readInt32BE=function(a,b){return s(this,a,!0,b)},e.prototype.readFloatLE=function(a,b){return t(this,a,!1,b)},e.prototype.readFloatBE=function(a,b){return t(this,a,!0,b)},e.prototype.readDoubleLE=function(a,b){return u(this,a,!1,b)},e.prototype.readDoubleBE=function(a,b){return u(this,a,!0,b)},e.prototype.writeUInt8=function(a,b,c){var d=this;c||(E.ok(void 0!==a&&null!==a,"missing value"),E.ok(void 0!==b&&null!==b,"missing offset"),E.ok(b=0?d.writeUInt8(a,b,c):d.writeUInt8(255+a+1,b,c)},e.prototype.writeInt16LE=function(a,b,c){A(this,a,b,!1,c)},e.prototype.writeInt16BE=function(a,b,c){A(this,a,b,!0,c)},e.prototype.writeInt32LE=function(a,b,c){B(this,a,b,!1,c)},e.prototype.writeInt32BE=function(a,b,c){B(this,a,b,!0,c)},e.prototype.writeFloatLE=function(a,b,c){C(this,a,b,!1,c)},e.prototype.writeFloatBE=function(a,b,c){C(this,a,b,!0,c)},e.prototype.writeDoubleLE=function(a,b,c){D(this,a,b,!1,c)},e.prototype.writeDoubleBE=function(a,b,c){D(this,a,b,!0,c)}},{"./buffer_ieee754":1,assert:6,"base64-js":4}],"buffer-browserify":[function(a,b){b.exports=a("q9TxCC")},{}],4:[function(a,b){!function(){"use strict";function a(a){var b,c,e,f,g,h;if(a.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(g=a.indexOf("="),g=g>0?a.length-g:0,h=[],e=g>0?a.length-4:a.length,b=0,c=0;e>b;b+=4,c+=3)f=d.indexOf(a[b])<<18|d.indexOf(a[b+1])<<12|d.indexOf(a[b+2])<<6|d.indexOf(a[b+3]),h.push((16711680&f)>>16),h.push((65280&f)>>8),h.push(255&f);return 2===g?(f=d.indexOf(a[b])<<2|d.indexOf(a[b+1])>>4,h.push(255&f)):1===g&&(f=d.indexOf(a[b])<<10|d.indexOf(a[b+1])<<4|d.indexOf(a[b+2])>>2,h.push(f>>8&255),h.push(255&f)),h}function c(a){function b(a){return d[a>>18&63]+d[a>>12&63]+d[a>>6&63]+d[63&a]}var c,e,f,g=a.length%3,h="";for(c=0,f=a.length-g;f>c;c+=3)e=(a[c]<<16)+(a[c+1]<<8)+a[c+2],h+=b(e);switch(g){case 1:e=a[a.length-1],h+=d[e>>2],h+=d[e<<4&63],h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=d[e>>10],h+=d[e>>4&63],h+=d[e<<2&63],h+="="}return h}var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports.toByteArray=a,b.exports.fromByteArray=c}()},{}],5:[function(a,b,c){function d(a){return"[object Array]"===j.call(a)}function e(a,b){var c;if(null===a)c={__proto__:null};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return"undefined"!=typeof b&&Object.defineProperties&&Object.defineProperties(c,b),c}function f(a){return"object"!=typeof a&&"function"!=typeof a||null===a}function g(a){if(f(a))throw new TypeError("Object.keys called on a non-object");var b=[];for(var c in a)k.call(a,c)&&b.push(c);return b}function h(a){if(f(a))throw new TypeError("Object.getOwnPropertyNames called on a non-object");var b=g(a);return c.isArray(a)&&-1===c.indexOf(a,"length")&&b.push("length"),b}function i(a,b){return{value:a[b]}}var j=Object.prototype.toString,k=Object.prototype.hasOwnProperty;c.isArray="function"==typeof Array.isArray?Array.isArray:d,c.indexOf=function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;cf;++f)a.hasOwnProperty(f)&&(e?d=b(d,a[f],f,a):(d=a[f],e=!0));return d},c.substr="b"!=="ab".substr(-1)?function(a,b,c){return 0>b&&(b=a.length+b),a.substr(b,c)}:function(a,b,c){return a.substr(b,c)},c.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},c.bind=function(){var a=Array.prototype.slice.call(arguments),b=a.shift();if(b.bind)return b.bind.apply(b,a);var c=a.shift();return function(){b.apply(c,a.concat([Array.prototype.slice.call(arguments)]))}},c.create="function"==typeof Object.create?Object.create:e;var l="function"==typeof Object.keys?Object.keys:g,m="function"==typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:h;if((new Error).hasOwnProperty("description")){var n=function(a,b){return"[object Error]"===j.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a})),b};c.keys=function(a){return n(a,l(a))},c.getOwnPropertyNames=function(a){return n(a,m(a))}}else c.keys=l,c.getOwnPropertyNames=m;if("function"==typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(o){c.getOwnPropertyDescriptor=function(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return i(a,b)}}}else c.getOwnPropertyDescriptor=i},{}],6:[function(a,b){function c(a,b){return m.isUndefined(b)?""+b:!m.isNumber(b)||!isNaN(b)&&isFinite(b)?m.isFunction(b)||m.isRegExp(b)?b.toString():b:b.toString()}function d(a,b){return m.isString(a)?a.length=0;d--)if(e[d]!=f[d])return!1;for(d=e.length-1;d>=0;d--)if(c=e[d],!h(a[c],b[c]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util"),n=a("_shims"),o=Array.prototype.slice,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,this.message=a.message||e(this)},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p.throws=function(){l.apply(this,[!0].concat(o.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(o.call(arguments)))},p.ifError=function(a){if(a)throw a}},{_shims:5,util:7}],7:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a){return a}function g(a){var b={};return G.forEach(a,function(a){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=G.keys(b),p=g(o);if(a.showHidden&&(o=G.getOwnPropertyNames(b)),0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?l(a,b,c,d,String(g),!0):"");return G.forEach(e,function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=G.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),i||(G.indexOf(a.seen,j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=G.reduce(a,function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return G.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===C(a)}function w(a){return"object"==typeof a&&a}function x(a){return w(a)&&"[object Date]"===C(a)}function y(a){return w(a)&&"[object Error]"===C(a)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return a instanceof Buffer}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),I[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=a("_shims"),H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=B;var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=function(a,b){a.super_=b,a.prototype=G.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},c._extend=function(a,b){if(!b||!w(b))return a;for(var c=G.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{_shims:5}]},{},[]),b.exports=a("buffer-browserify")},{}],50:[function(a,b){var c=b.exports={};c.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],51:[function(a,b){b.exports={compact:a("./arrays/compact"),difference:a("./arrays/difference"),drop:a("./arrays/rest"),findIndex:a("./arrays/findIndex"),findLastIndex:a("./arrays/findLastIndex"),first:a("./arrays/first"),flatten:a("./arrays/flatten"),head:a("./arrays/first"),indexOf:a("./arrays/indexOf"),initial:a("./arrays/initial"),intersection:a("./arrays/intersection"),last:a("./arrays/last"),lastIndexOf:a("./arrays/lastIndexOf"),object:a("./arrays/zipObject"),pull:a("./arrays/pull"),range:a("./arrays/range"),remove:a("./arrays/remove"),rest:a("./arrays/rest"),sortedIndex:a("./arrays/sortedIndex"),tail:a("./arrays/rest"),take:a("./arrays/first"),union:a("./arrays/union"),uniq:a("./arrays/uniq"),unique:a("./arrays/uniq"),unzip:a("./arrays/zip"),without:a("./arrays/without"),xor:a("./arrays/xor"),zip:a("./arrays/zip"),zipObject:a("./arrays/zipObject")}},{"./arrays/compact":52,"./arrays/difference":53,"./arrays/findIndex":54,"./arrays/findLastIndex":55,"./arrays/first":56,"./arrays/flatten":57,"./arrays/indexOf":58,"./arrays/initial":59,"./arrays/intersection":60,"./arrays/last":61,"./arrays/lastIndexOf":62,"./arrays/pull":63,"./arrays/range":64,"./arrays/remove":65,"./arrays/rest":66,"./arrays/sortedIndex":67,"./arrays/union":68,"./arrays/uniq":69,"./arrays/without":70,"./arrays/xor":71,"./arrays/zip":72,"./arrays/zipObject":73}],52:[function(a,b){function c(a){for(var b=-1,c=a?a.length:0,d=[];++bc?f(0,g+c):c||0}else if(c){var h=e(a,b);return a[h]===b?h:-1}return d(a,b,c)}var d=a("../internals/baseIndexOf"),e=a("./sortedIndex"),f=Math.max;b.exports=c},{"../internals/baseIndexOf":133,"./sortedIndex":67}],59:[function(a,b){function c(a,b,c){var h=0,i=a?a.length:0;if("number"!=typeof b&&null!=b){var j=i; +for(b=d(b,c,3);j--&&b(a[j],j,a);)h++}else h=null==b||c?1:b||h;return e(a,0,g(f(0,i-h),i))}var d=a("../functions/createCallback"),e=a("../internals/slice"),f=Math.max,g=Math.min;b.exports=c},{"../functions/createCallback":113,"../internals/slice":166}],60:[function(a,b){function c(){for(var a=[],b=-1,c=arguments.length,m=g(),n=d,o=n===d,p=g();++b=j&&f(b?a[b]:p)))}var r=a[0],s=-1,t=r?r.length:0,u=[];a:for(;++sc?d(0,f+c):e(c,f-1))+1);f--;)if(a[f]===b)return f;return-1}var d=Math.max,e=Math.min;b.exports=c},{}],63:[function(a,b){function c(a){for(var b=arguments,c=0,d=b.length,f=a?a.length:0;++cg;){var i=g+h>>>1;c(a[i])1?arguments:arguments[0],b=-1,c=a?d(e(a,"length")):0,f=Array(0>c?0:c);++bc?h(0,k+c):c)||0,f(a)?l=j(a,b,c)>-1:"number"==typeof k?l=(g(a)?a.indexOf(b,c):j(a,b,c))>-1:e(a,function(a){return++i>=c?!(l=a===b):void 0}),l}var d=a("../internals/baseIndexOf"),e=a("../objects/forOwn"),f=a("../objects/isArray"),g=a("../objects/isString"),h=Math.max;b.exports=c},{"../internals/baseIndexOf":133,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isString":198}],83:[function(a,b){var c=a("../internals/createAggregator"),d=Object.prototype,e=d.hasOwnProperty,f=c(function(a,b,c){e.call(a,c)?a[c]++:a[c]=1});b.exports=f},{"../internals/createAggregator":142}],84:[function(a,b){function c(a,b,c){var f=!0;b=d(b,c,3);var g=-1,h=a?a.length:0;if("number"==typeof h)for(;++gj&&(j=m)}else b=null==b&&h(a)?d:e(b,c,3),f(a,function(a,c,d){var e=b(a,c,d);e>i&&(i=e,j=a)});return j}var d=a("../internals/charAtCallback"),e=a("../functions/createCallback"),f=a("./forEach"),g=(a("../objects/forOwn"),a("../objects/isArray")),h=a("../objects/isString");b.exports=c},{"../functions/createCallback":113,"../internals/charAtCallback":140,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isString":198,"./forEach":88}],95:[function(a,b){function c(a,b,c){var i=1/0,j=i;if("function"!=typeof b&&c&&c[b]===a&&(b=null),null==b&&g(a))for(var k=-1,l=a.length;++km&&(j=m)}else b=null==b&&h(a)?d:e(b,c,3),f(a,function(a,c,d){var e=b(a,c,d);i>e&&(i=e,j=a)});return j}var d=a("../internals/charAtCallback"),e=a("../functions/createCallback"),f=a("./forEach"),g=(a("../objects/forOwn"),a("../objects/isArray")),h=a("../objects/isString");b.exports=c},{"../functions/createCallback":113,"../internals/charAtCallback":140,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isString":198,"./forEach":88}],96:[function(a,b){var c=a("./map"),d=c;b.exports=d},{"./map":93}],97:[function(a,b){function c(a,b,c,f){if(!a)return c;var g=arguments.length<3;b=d(b,f,4);var h=-1,i=a.length;if("number"==typeof i)for(g&&(c=a[++h]);++h2?d(a,17,e(arguments,2),null,b):d(a,1,null,null,b)}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":144,"../internals/slice":166}],110:[function(a,b){function c(a){for(var b=arguments.length>1?d(arguments,!0,!1,1):f(a),c=-1,g=b.length;++c2?d(b,19,e(arguments,2),null,a):d(b,3,null,null,a)}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":144,"../internals/slice":166}],112:[function(a,b){function c(){for(var a=arguments,b=a.length;b--;)if(!d(a[b]))throw new TypeError;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}var d=a("../objects/isFunction");b.exports=c},{"../objects/isFunction":191}],113:[function(a,b){function c(a,b,c){var i=typeof a;if(null==a||"function"==i)return d(a,b,c);if("object"!=i)return h(a);var j=g(a),k=j[0],l=a[k];return 1!=j.length||l!==l||f(l)?function(b){for(var c=j.length,d=!1;c--&&(d=e(b[j[c]],a[j[c]],null,!0)););return d}:function(a){var b=a[k];return l===b&&(0!==l||1/l==1/b)}}var d=a("../internals/baseCreateCallback"),e=a("../internals/baseIsEqual"),f=a("../objects/isObject"),g=a("../objects/keys"),h=a("../utilities/property");b.exports=c},{"../internals/baseCreateCallback":129,"../internals/baseIsEqual":134,"../objects/isObject":195,"../objects/keys":200,"../utilities/property":218}],114:[function(a,b){function c(a,b){return b="number"==typeof b?b:+b||a.length,d(a,4,null,null,null,b)}var d=a("../internals/createWrapper");b.exports=c},{"../internals/createWrapper":144}],115:[function(a,b){function c(a,b,c){var h,i,j,k,l,m,n,o=0,p=!1,q=!0;if(!d(a))throw new TypeError;if(b=g(0,b)||0,c===!0){var r=!0;q=!1}else e(c)&&(r=c.leading,p="maxWait"in c&&(g(b,c.maxWait)||0),q="trailing"in c?c.trailing:q);var s=function(){var c=b-(f()-k);if(0>=c){i&&clearTimeout(i);var d=n;i=m=n=void 0,d&&(o=f(),j=a.apply(l,h),m||i||(h=l=null))}else m=setTimeout(s,c)},t=function(){m&&clearTimeout(m),i=m=n=void 0,(q||p!==b)&&(o=f(),j=a.apply(l,h),m||i||(h=l=null))};return function(){if(h=arguments,k=f(),l=this,n=q&&(m||!r),p===!1)var c=r&&!m;else{i||r||(o=k);var d=p-(k-o),e=0>=d;e?(i&&(i=clearTimeout(i)),o=k,j=a.apply(l,h)):i||(i=setTimeout(t,d))}return e&&m?m=clearTimeout(m):m||b===p||(m=setTimeout(s,b)),c&&(e=!0,j=a.apply(l,h)),!e||m||i||(h=l=null),j}}var d=a("../objects/isFunction"),e=a("../objects/isObject"),f=a("../utilities/now"),g=Math.max;b.exports=c},{"../objects/isFunction":191,"../objects/isObject":195,"../utilities/now":216}],116:[function(a,b){function c(a){if(!d(a))throw new TypeError;var b=e(arguments,1);return setTimeout(function(){a.apply(void 0,b)},1)}var d=a("../objects/isFunction"),e=a("../internals/slice");b.exports=c},{"../internals/slice":166,"../objects/isFunction":191}],117:[function(a,b){function c(a,b){if(!d(a))throw new TypeError;var c=e(arguments,2);return setTimeout(function(){a.apply(void 0,c)},b)}var d=a("../objects/isFunction"),e=a("../internals/slice");b.exports=c},{"../internals/slice":166,"../objects/isFunction":191}],118:[function(a,b){function c(a,b){if(!d(a))throw new TypeError;var c=function(){var d=c.cache,f=b?b.apply(this,arguments):e+arguments[0];return g.call(d,f)?d[f]:d[f]=a.apply(this,arguments)};return c.cache={},c}var d=a("../objects/isFunction"),e=a("../internals/keyPrefix"),f=Object.prototype,g=f.hasOwnProperty;b.exports=c},{"../internals/keyPrefix":152,"../objects/isFunction":191}],119:[function(a,b){function c(a){var b,c;if(!d(a))throw new TypeError;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}var d=a("../objects/isFunction");b.exports=c},{"../objects/isFunction":191}],120:[function(a,b){function c(a){return d(a,16,e(arguments,1))}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":144,"../internals/slice":166}],121:[function(a,b){function c(a){return d(a,32,null,e(arguments,1))}var d=a("../internals/createWrapper"),e=a("../internals/slice");b.exports=c},{"../internals/createWrapper":144,"../internals/slice":166}],122:[function(a,b){function c(a,b,c){var h=!0,i=!0;if(!e(a))throw new TypeError;return c===!1?h=!1:f(c)&&(h="leading"in c?c.leading:h,i="trailing"in c?c.trailing:i),g.leading=h,g.maxWait=b,g.trailing=i,d(a,b,g)}var d=a("./debounce"),e=a("../objects/isFunction"),f=a("../objects/isObject"),g={leading:!1,maxWait:0,trailing:!1};b.exports=c},{"../objects/isFunction":191,"../objects/isObject":195,"./debounce":115}],123:[function(a,b){function c(a,b){return d(b,16,[a])}var d=a("../internals/createWrapper");b.exports=c},{"../internals/createWrapper":144}],124:[function(a,b){function c(a){return a&&"object"==typeof a&&!l(a)&&r.call(a,"__wrapped__")?a:new m(a)}var d=a("./arrays"),e=a("./chaining"),f=a("./collections"),g=a("./functions"),h=a("./objects"),i=a("./utilities"),j=a("./collections/forEach"),k=a("./objects/forOwn"),l=a("./objects/isArray"),m=a("./internals/lodashWrapper"),n=a("./utilities/mixin"),o=a("./support"),p=(a("./utilities/templateSettings"),[]),q=Object.prototype,r=q.hasOwnProperty;m.prototype=c.prototype,n=function(a){var b=h.functions;return function(d,e,f){return e&&(f||b(e).length)||(null==f&&(f=e),e=d,d=c),a(d,e,f)}}(n),c.after=g.after,c.assign=h.assign,c.at=f.at,c.bind=g.bind,c.bindAll=g.bindAll,c.bindKey=g.bindKey,c.chain=e.chain,c.compact=d.compact,c.compose=g.compose,c.constant=i.constant,c.countBy=f.countBy,c.create=h.create,c.createCallback=g.createCallback,c.curry=g.curry,c.debounce=g.debounce,c.defaults=h.defaults,c.defer=g.defer,c.delay=g.delay,c.difference=d.difference,c.filter=f.filter,c.flatten=d.flatten,c.forEach=j,c.forEachRight=f.forEachRight,c.forIn=h.forIn,c.forInRight=h.forInRight,c.forOwn=k,c.forOwnRight=h.forOwnRight,c.functions=h.functions,c.groupBy=f.groupBy,c.indexBy=f.indexBy,c.initial=d.initial,c.intersection=d.intersection,c.invert=h.invert,c.invoke=f.invoke,c.keys=h.keys,c.map=f.map,c.mapValues=h.mapValues,c.max=f.max,c.memoize=g.memoize,c.merge=h.merge,c.min=f.min,c.omit=h.omit,c.once=g.once,c.pairs=h.pairs,c.partial=g.partial,c.partialRight=g.partialRight,c.pick=h.pick,c.pluck=f.pluck,c.property=i.property,c.pull=d.pull,c.range=d.range,c.reject=f.reject,c.remove=d.remove,c.rest=d.rest,c.shuffle=f.shuffle,c.sortBy=f.sortBy,c.tap=e.tap,c.throttle=g.throttle,c.times=i.times,c.toArray=f.toArray,c.transform=h.transform,c.union=d.union,c.uniq=d.uniq,c.values=h.values,c.where=f.where,c.without=d.without,c.wrap=g.wrap,c.xor=d.xor,c.zip=d.zip,c.zipObject=d.zipObject,c.collect=f.map,c.drop=d.rest,c.each=j,c.eachRight=f.forEachRight,c.extend=h.assign,c.methods=h.functions,c.object=d.zipObject,c.select=f.filter,c.tail=d.rest,c.unique=d.uniq,c.unzip=d.zip,n(c),c.clone=h.clone,c.cloneDeep=h.cloneDeep,c.contains=f.contains,c.escape=i.escape,c.every=f.every,c.find=f.find,c.findIndex=d.findIndex,c.findKey=h.findKey,c.findLast=f.findLast,c.findLastIndex=d.findLastIndex,c.findLastKey=h.findLastKey,c.has=h.has,c.identity=i.identity,c.indexOf=d.indexOf,c.isArguments=h.isArguments,c.isArray=l,c.isBoolean=h.isBoolean,c.isDate=h.isDate,c.isElement=h.isElement,c.isEmpty=h.isEmpty,c.isEqual=h.isEqual,c.isFinite=h.isFinite,c.isFunction=h.isFunction,c.isNaN=h.isNaN,c.isNull=h.isNull,c.isNumber=h.isNumber,c.isObject=h.isObject,c.isPlainObject=h.isPlainObject,c.isRegExp=h.isRegExp,c.isString=h.isString,c.isUndefined=h.isUndefined,c.lastIndexOf=d.lastIndexOf,c.mixin=n,c.noConflict=i.noConflict,c.noop=i.noop,c.now=i.now,c.parseInt=i.parseInt,c.random=i.random,c.reduce=f.reduce,c.reduceRight=f.reduceRight,c.result=i.result,c.size=f.size,c.some=f.some,c.sortedIndex=d.sortedIndex,c.template=i.template,c.unescape=i.unescape,c.uniqueId=i.uniqueId,c.all=f.every,c.any=f.some,c.detect=f.find,c.findWhere=f.find,c.foldl=f.reduce,c.foldr=f.reduceRight,c.include=f.contains,c.inject=f.reduce,n(function(){var a={};return k(c,function(b,d){c.prototype[d]||(a[d]=b)}),a}(),!1),c.first=d.first,c.last=d.last,c.sample=f.sample,c.take=d.first,c.head=d.first,k(c,function(a,b){var d="sample"!==b;c.prototype[b]||(c.prototype[b]=function(b,c){var e=this.__chain__,f=a(this.__wrapped__,b,c);return e||null!=b&&(!c||d&&"function"==typeof b)?new m(f,e):f})}),c.VERSION="2.4.1",c.prototype.chain=e.wrapperChain,c.prototype.toString=e.wrapperToString,c.prototype.value=e.wrapperValueOf,c.prototype.valueOf=e.wrapperValueOf,j(["join","pop","shift"],function(a){var b=p[a];c.prototype[a]=function(){var a=this.__chain__,c=b.apply(this.__wrapped__,arguments);return a?new m(c,a):c}}),j(["push","reverse","sort","unshift"],function(a){var b=p[a];c.prototype[a]=function(){return b.apply(this.__wrapped__,arguments),this}}),j(["concat","slice","splice"],function(a){var b=p[a];c.prototype[a]=function(){return new m(b.apply(this.__wrapped__,arguments),this.__chain__)}}),c.support=o,(c.templateSettings=i.templateSettings).imports._=c,b.exports=c},{"./arrays":51,"./chaining":74,"./collections":80,"./collections/forEach":88,"./functions":107,"./internals/lodashWrapper":154,"./objects":168,"./objects/forOwn":178,"./objects/isArray":184,"./support":208,"./utilities":209,"./utilities/mixin":213,"./utilities/templateSettings":222}],125:[function(a,b){var c=[];b.exports=c},{}],126:[function(a,b){function c(a){function b(){if(h){var a=g(h);i.apply(a,arguments)}if(this instanceof b){var f=d(c.prototype),k=c.apply(f,a||arguments);return e(k)?k:f}return c.apply(j,a||arguments)}var c=a[0],h=a[2],j=a[4];return f(b,a),b}var d=a("./baseCreate"),e=a("../objects/isObject"),f=a("./setBindData"),g=a("./slice"),h=[],i=h.push;b.exports=c},{"../objects/isObject":195,"./baseCreate":128,"./setBindData":163,"./slice":166}],127:[function(a,b){function c(a,b,m,n,q){if(m){var s=m(a);if("undefined"!=typeof s)return s}var w=i(a);if(!w)return a;var A=x.call(a);if(!v[A])return a;var B=z[A];switch(A){case o:case p:return new B(+a);case r:case u:return new B(a);case t:return s=B(a.source,l.exec(a)),s.lastIndex=a.lastIndex,s}var C=h(a);if(b){var D=!n;n||(n=g()),q||(q=g());for(var E=n.length;E--;)if(n[E]==a)return q[E];s=C?B(a.length):{}}else s=C?k(a):d({},a);return C&&(y.call(a,"index")&&(s.index=a.index),y.call(a,"input")&&(s.input=a.input)),b?(n.push(a),q.push(s),(C?e:f)(a,function(a,d){s[d]=c(a,b,m,n,q)}),D&&(j(n),j(q)),s):s}var d=a("../objects/assign"),e=a("../collections/forEach"),f=a("../objects/forOwn"),g=a("./getArray"),h=a("../objects/isArray"),i=a("../objects/isObject"),j=a("./releaseArray"),k=a("./slice"),l=/\w*$/,m="[object Arguments]",n="[object Array]",o="[object Boolean]",p="[object Date]",q="[object Function]",r="[object Number]",s="[object Object]",t="[object RegExp]",u="[object String]",v={};v[q]=!1,v[m]=v[n]=v[o]=v[p]=v[r]=v[s]=v[t]=v[u]=!0;var w=Object.prototype,x=w.toString,y=w.hasOwnProperty,z={};z[n]=Array,z[o]=Boolean,z[p]=Date,z[q]=Function,z[s]=Object,z[r]=Number,z[t]=RegExp,z[u]=String,b.exports=c},{"../collections/forEach":88,"../objects/assign":169,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isObject":195,"./getArray":147,"./releaseArray":161,"./slice":166}],128:[function(a,b){function c(a){return f(a)?g(a):{}}var d="undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e=a("./isNative"),f=a("../objects/isObject"),g=(a("../utilities/noop"),e(g=Object.create)&&g);g||(c=function(){function a(){}return function(b){if(f(b)){a.prototype=b;var c=new a;a.prototype=null}return c||d.Object()}}()),b.exports=c},{"../objects/isObject":195,"../utilities/noop":215,"./isNative":151}],129:[function(a,b){function c(a,b,c){if("function"!=typeof a)return e;if("undefined"==typeof b||!("prototype"in a))return a;var k=a.__bindData__;if("undefined"==typeof k&&(g.funcNames&&(k=!a.name),k=k||!g.funcDecomp,!k)){var l=j.call(a);g.funcNames||(k=!h.test(l)),k||(k=i.test(l),f(a,k))}if(k===!1||k!==!0&&1&k[1])return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return d(a,b)}var d=a("../functions/bind"),e=a("../utilities/identity"),f=a("./setBindData"),g=a("../support"),h=/^\s*function[ \n\r\t]+\w/,i=/\bthis\b/,j=Function.prototype.toString;b.exports=c},{"../functions/bind":109,"../support":208,"../utilities/identity":212,"./setBindData":163}],130:[function(a,b){function c(a){function b(){var a=o?m:this;if(k){var f=g(k);i.apply(f,arguments)}if((l||q)&&(f||(f=g(arguments)),l&&i.apply(f,l),q&&f.length=g,l=[];if(k){var m=f(b);m?(i=e,b=m):k=!1}for(;++c-1:void 0});return u.pop(),v.pop(),G&&(h(u),h(v)),w}var d=a("../objects/forIn"),e=a("./getArray"),f=a("../objects/isFunction"),g=a("./objectTypes"),h=a("./releaseArray"),i="[object Arguments]",j="[object Array]",k="[object Boolean]",l="[object Date]",m="[object Number]",n="[object Object]",o="[object RegExp]",p="[object String]",q=Object.prototype,r=q.toString,s=q.hasOwnProperty;b.exports=c},{"../objects/forIn":176,"../objects/isFunction":191,"./getArray":147,"./objectTypes":157,"./releaseArray":161}],135:[function(a,b){function c(a,b,h,i,j){(f(b)?d:e)(b,function(b,d){var e,k,l=b,m=a[d];if(b&&((k=f(b))||g(b))){for(var n=i.length;n--;)if(e=i[n]==b){m=j[n];break}if(!e){var o;h&&(l=h(m,b),(o="undefined"!=typeof l)&&(m=l)),o||(m=k?f(m)?m:[]:g(m)?m:{}),i.push(b),j.push(m),o||c(m,b,h,i,j)}}else h&&(l=h(m,b),"undefined"==typeof l&&(l=b)),"undefined"!=typeof l&&(m=l);a[d]=m})}var d=a("../collections/forEach"),e=a("../objects/forOwn"),f=a("../objects/isArray"),g=a("../objects/isPlainObject");b.exports=c},{"../collections/forEach":88,"../objects/forOwn":178,"../objects/isArray":184,"../objects/isPlainObject":196}],136:[function(a,b){function c(a,b){return a+d(e()*(b-a+1))}var d=Math.floor,e=Math.random;b.exports=c},{}],137:[function(a,b){function c(a,b,c){var k=-1,l=d,m=a?a.length:0,n=[],o=!b&&m>=h,p=c||o?g():n;if(o){var q=f(p);l=e,p=q}for(;++k-1?0:-1:a?0:-1}var d=a("./baseIndexOf"),e=a("./keyPrefix");b.exports=c},{"./baseIndexOf":133,"./keyPrefix":152}],139:[function(a,b){function c(a){var b=this.cache,c=typeof a;if("boolean"==c||null==a)b[a]=!0;else{"number"!=c&&"string"!=c&&(c="object");var e="number"==c?a:d+a,f=b[c]||(b[c]={});"object"==c?(f[e]||(f[e]=[])).push(a):f[e]=!0}}var d=a("./keyPrefix");b.exports=c},{"./keyPrefix":152}],140:[function(a,b){function c(a){return a.charCodeAt(0)}b.exports=c},{}],141:[function(a,b){function c(a,b){for(var c=a.criteria,d=b.criteria,e=-1,f=c.length;++eh||"undefined"==typeof g)return 1;if(h>g||"undefined"==typeof h)return-1}}return a.index-b.index}b.exports=c},{}],142:[function(a,b){function c(a){return function(b,c,f){var g={};c=d(c,f,3);var h=-1,i=b?b.length:0;if("number"==typeof i)for(;++h":">",'"':""","'":"'"};b.exports=c},{}],150:[function(a,b){var c=a("./htmlEscapes"),d=a("../objects/invert"),e=d(c);b.exports=e},{"../objects/invert":182,"./htmlEscapes":149}],151:[function(a,b){function c(a){return"function"==typeof a&&f.test(a)}var d=Object.prototype,e=d.toString,f=RegExp("^"+String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$");b.exports=c},{}],152:[function(a,b){var c=+new Date+"";b.exports=c},{}],153:[function(a,b){var c=75;b.exports=c},{}],154:[function(a,b){function c(a,b){this.__chain__=!!b,this.__wrapped__=a}b.exports=c},{}],155:[function(a,b){var c=40;b.exports=c},{}],156:[function(a,b){var c=[];b.exports=c},{}],157:[function(a,b){var c={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};b.exports=c},{}],158:[function(a,b){var c=a("./htmlUnescapes"),d=a("../objects/keys"),e=RegExp("("+d(c).join("|")+")","g");b.exports=e},{"../objects/keys":200,"./htmlUnescapes":150}],159:[function(a,b){var c=/<%=([\s\S]+?)%>/g;b.exports=c},{}],160:[function(a,b){var c=a("./htmlEscapes"),d=a("../objects/keys"),e=RegExp("["+d(c).join("")+"]","g");b.exports=e},{"../objects/keys":200,"./htmlEscapes":149}],161:[function(a,b){function c(a){a.length=0,d.lengthe?0:e);++d3&&"function"==typeof j[l-2])var m=c(j[--l-1],j[l--],2);else l>2&&"function"==typeof j[l-1]&&(m=j[--l]);for(;++k3&&"function"==typeof b[c-2])var j=d(b[--c-1],b[c--],2);else c>2&&"function"==typeof b[c-1]&&(j=b[--c]);for(var k=i(arguments,1,c),l=-1,m=f(),n=f();++l/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:{escape:c}}};b.exports=e},{"../internals/reInterpolate":159,"./escape":211}],223:[function(a,b){function c(a,b,c){a=(a=+a)>-1?a:0;var e=-1,f=Array(a);for(b=d(b,c,1);++e/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.clearScroll=c({url:{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.nodeHotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.cluster.prototype.nodeInfo=c({params:{all:{type:"boolean"},clear:{type:"boolean"},http:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},plugin:{type:"boolean"},process:{type:"boolean"},settings:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},timeout:{type:"time"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes"}]}),d.cluster.prototype.nodeShutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.cluster.prototype.nodeStats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},fields:{type:"list"},fs:{type:"boolean"},http:{type:"boolean"},indices:{type:"boolean"},jvm:{type:"boolean"},network:{type:"boolean"},os:{type:"boolean"},process:{type:"boolean"},threadPool:{type:"boolean",name:"thread_pool"},transport:{type:"boolean"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{filterBlocks:{type:"boolean",name:"filter_blocks"},filterIndexTemplates:{type:"boolean",name:"filter_index_templates"},filterIndices:{type:"list",name:"filter_indices"},filterMetadata:{type:"boolean",name:"filter_metadata"},filterNodes:{type:"boolean",name:"filter_nodes"},filterRoutingTable:{type:"boolean",name:"filter_routing_table"},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/state"}}),d.count=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a +},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>",req:{index:{type:"list"}}},{fmt:"/"}],method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}],method:"DELETE"}),d.indices.prototype.exists=c({url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},refresh:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mapping/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({urls:[{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},refresh:{type:"boolean"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"string"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"string"}}},{fmt:"/_alias"}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{all:{type:"boolean"},clear:{type:"boolean"},completion:{type:"boolean"},completionFields:{type:"list",name:"completion_fields"},docs:{type:"boolean"},fielddata:{type:"boolean"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},filterCache:{type:"boolean",name:"filter_cache"},flush:{type:"boolean"},get:{type:"boolean"},groups:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indexing:{type:"boolean"},merge:{type:"boolean"},refresh:{type:"boolean"},search:{type:"boolean"},store:{type:"boolean"},warmer:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLen:{type:"number",name:"max_word_len"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLen:{type:"number",name:"min_word_len"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.percolate=c({params:{preferLocal:{type:"boolean",name:"prefer_local"}},url:{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}},needBody:!0,method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.suggest=c({params:{ignoreIndices:{type:"enum","default":"none",options:["none","missing"],name:"ignore_indices"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},percolate:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":232}],228:[function(a,b){var c=a("../client_action"),d=b.exports={};d._namespaces=["cat","cluster","indices","nodes","snapshot"],d.bulk=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},type:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.cat=function(a){this.transport=a},d.cat.prototype.aliases=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_cat/aliases"}]}),d.cat.prototype.allocation=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/allocation/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cat/allocation"}]}),d.cat.prototype.count=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/count/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/count"}]}),d.cat.prototype.health=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},ts:{type:"boolean","default":!0},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/health"}}),d.cat.prototype.help=c({params:{help:{type:"boolean","default":!1}},url:{fmt:"/_cat"}}),d.cat.prototype.indices=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},pri:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/indices/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/indices"}]}),d.cat.prototype.master=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/master"}}),d.cat.prototype.nodes=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/nodes"}}),d.cat.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/pending_tasks"}}),d.cat.prototype.recovery=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/recovery/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/recovery"}]}),d.cat.prototype.shards=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/shards/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/shards"}]}),d.cat.prototype.threadPool=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1},fullId:{type:"boolean","default":!1,name:"full_id"}},url:{fmt:"/_cat/thread_pool"}}),d.clearScroll=c({urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},{fmt:"/_search/scroll"}],method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},filterMetadata:{type:"boolean",name:"filter_metadata"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},indexTemplates:{type:"list",name:"index_templates"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/_cluster/state/<%=metric%>/<%=index%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]},index:{type:"list"}}},{fmt:"/_cluster/state/<%=metric%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]}}},{fmt:"/_cluster/state"}]}),d.cluster.prototype.stats=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_cluster/stats/nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cluster/stats"}]}),d.count=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d.countPercolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},name:{type:"list"}},url:{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.exists=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsTemplate=c({params:{local:{type:"boolean"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}},{fmt:"/_alias"}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_aliases/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/<%=type%>/field/<%=field%>",req:{type:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_settings/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_warmer"}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"closed",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},waitForMerge:{type:"boolean",name:"wait_for_merge"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.refresh=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},force:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"indices",options:["cluster","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/<%=index%>/_stats/<%=metric%>",req:{index:{type:"list"},metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_stats/<%=metric%>",req:{metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLength:{type:"number",name:"max_word_length"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLength:{type:"number",name:"min_word_length"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.mpercolate=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mpercolate",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mpercolate",req:{index:{type:"string"}}},{fmt:"/_mpercolate"}],needBody:!0,bulkBody:!0,method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.mtermvectors=c({params:{ids:{type:"list",required:!1},termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},urls:[{fmt:"/<%=index%>/<%=type%>/_mtermvectors",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mtermvectors",req:{index:{type:"string"}}},{fmt:"/_mtermvectors"}],method:"POST"}),d.nodes=function(a){this.transport=a +},d.nodes.prototype.hotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.nodes.prototype.info=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_nodes/<%=nodeId%>/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/<%=metric%>",req:{metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugin"]}}},{fmt:"/_nodes"}]}),d.nodes.prototype.shutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.nodes.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"node",options:["node","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats/<%=metric%>/<%=indexMetric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats/<%=metric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats"}]}),d.percolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.searchShards=c({params:{preference:{type:"string"},routing:{type:"string"},local:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search_shards",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_search_shards",req:{index:{type:"string"}}},{fmt:"/_search_shards"}],method:"POST"}),d.snapshot=function(a){this.transport=a},d.snapshot.prototype.create=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.createRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"string"}}},needBody:!0,method:"POST"}),d.snapshot.prototype["delete"]=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"DELETE"}),d.snapshot.prototype.deleteRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},method:"DELETE"}),d.snapshot.prototype.get=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"list"}}}}),d.snapshot.prototype.getRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},local:{type:"boolean"}},urls:[{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},{fmt:"/_snapshot"}]}),d.snapshot.prototype.restore=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_restore",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.suggest=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],needBody:!0,method:"POST"}),d.termvector=c({params:{termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_termvector",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":232}],229:[function(a,b){var c=a("../client_action"),d=b.exports={};d._namespaces=["cat","cluster","indices","nodes","snapshot"],d.bulk=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},type:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_bulk",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_bulk",req:{index:{type:"string"}}},{fmt:"/_bulk"}],needBody:!0,bulkBody:!0,method:"POST"}),d.cat=function(a){this.transport=a},d.cat.prototype.aliases=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_cat/aliases"}]}),d.cat.prototype.allocation=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/allocation/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cat/allocation"}]}),d.cat.prototype.count=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/count/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/count"}]}),d.cat.prototype.health=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},ts:{type:"boolean","default":!0},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/health"}}),d.cat.prototype.help=c({params:{help:{type:"boolean","default":!1}},url:{fmt:"/_cat"}}),d.cat.prototype.indices=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},pri:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/indices/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/indices"}]}),d.cat.prototype.master=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/master"}}),d.cat.prototype.nodes=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/nodes"}}),d.cat.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/pending_tasks"}}),d.cat.prototype.plugins=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},url:{fmt:"/_cat/plugins"}}),d.cat.prototype.recovery=c({params:{bytes:{type:"enum",options:["b","k","m","g"]},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/recovery/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/recovery"}]}),d.cat.prototype.shards=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1}},urls:[{fmt:"/_cat/shards/<%=index%>",req:{index:{type:"list"}}},{fmt:"/_cat/shards"}]}),d.cat.prototype.threadPool=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},h:{type:"list"},help:{type:"boolean","default":!1},v:{type:"boolean","default":!1},fullId:{type:"boolean","default":!1,name:"full_id"}},url:{fmt:"/_cat/thread_pool"}}),d.clearScroll=c({urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"list"}}},{fmt:"/_search/scroll"}],method:"DELETE"}),d.cluster=function(a){this.transport=a},d.cluster.prototype.getSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/settings"}}),d.cluster.prototype.health=c({params:{level:{type:"enum","default":"cluster",options:["cluster","indices","shards"]},local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"},waitForActiveShards:{type:"number",name:"wait_for_active_shards"},waitForNodes:{type:"string",name:"wait_for_nodes"},waitForRelocatingShards:{type:"number",name:"wait_for_relocating_shards"},waitForStatus:{type:"enum","default":null,options:["green","yellow","red"],name:"wait_for_status"}},urls:[{fmt:"/_cluster/health/<%=index%>",req:{index:{type:"string"}}},{fmt:"/_cluster/health"}]}),d.cluster.prototype.pendingTasks=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_cluster/pending_tasks"}}),d.cluster.prototype.putSettings=c({params:{flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_cluster/settings"},method:"PUT"}),d.cluster.prototype.reroute=c({params:{dryRun:{type:"boolean",name:"dry_run"},explain:{type:"boolean"},filterMetadata:{type:"boolean",name:"filter_metadata"},masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_cluster/reroute"},method:"POST"}),d.cluster.prototype.state=c({params:{local:{type:"boolean"},masterTimeout:{type:"time",name:"master_timeout"},indexTemplates:{type:"list",name:"index_templates"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/_cluster/state/<%=metric%>/<%=index%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]},index:{type:"list"}}},{fmt:"/_cluster/state/<%=metric%>",req:{metric:{type:"list",options:["_all","blocks","metadata","nodes","routing_table","master_node","version"]}}},{fmt:"/_cluster/state"}]}),d.cluster.prototype.stats=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_cluster/stats/nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_cluster/stats"}]}),d.count=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},minScore:{type:"number",name:"min_score"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_count",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_count",req:{index:{type:"list"}}},{fmt:"/_count"}],method:"POST"}),d.countPercolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate/count",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d["delete"]=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"DELETE"}),d.deleteByQuery=c({params:{analyzer:{type:"string"},consistency:{type:"enum",options:["one","quorum","all"]},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},replication:{type:"enum","default":"sync",options:["sync","async"]},q:{type:"string"},routing:{type:"string"},source:{type:"string"},timeout:{type:"time"}},urls:[{fmt:"/<%=index%>/<%=type%>/_query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_query",req:{index:{type:"list"}}}],method:"DELETE"}),d.exists=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"HEAD"}),d.explain=c({params:{analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},analyzer:{type:"string"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},fields:{type:"list"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},parent:{type:"string"},preference:{type:"string"},q:{type:"string"},routing:{type:"string"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_explain",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.get=c({params:{fields:{type:"list"},parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.getSource=c({params:{parent:{type:"string"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},routing:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_source",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}}}),d.index=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},opType:{type:"enum","default":"index",options:["index","create"],name:"op_type"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},routing:{type:"string"},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"string"},type:{type:"string"}}}],needBody:!0,method:"POST"}),d.indices=function(a){this.transport=a},d.indices.prototype.analyze=c({params:{analyzer:{type:"string"},field:{type:"string"},filters:{type:"list"},index:{type:"string"},preferLocal:{type:"boolean",name:"prefer_local"},text:{type:"string"},tokenizer:{type:"string"},format:{type:"enum","default":"detailed",options:["detailed","text"]}},urls:[{fmt:"/<%=index%>/_analyze",req:{index:{type:"string"}}},{fmt:"/_analyze"}],method:"POST"}),d.indices.prototype.clearCache=c({params:{fieldData:{type:"boolean",name:"field_data"},fielddata:{type:"boolean"},fields:{type:"list"},filter:{type:"boolean"},filterCache:{type:"boolean",name:"filter_cache"},filterKeys:{type:"boolean",name:"filter_keys"},id:{type:"boolean"},idCache:{type:"boolean",name:"id_cache"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},index:{type:"list"},recycler:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_cache/clear",req:{index:{type:"list"}}},{fmt:"/_cache/clear"}],method:"POST"}),d.indices.prototype.close=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_close",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.create=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype["delete"]=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteMapping=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/<%=index%>/<%=type%>/_mapping",req:{index:{type:"list"},type:{type:"list"}}},method:"DELETE"}),d.indices.prototype.deleteTemplate=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"DELETE"}),d.indices.prototype.deleteWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},name:{type:"list"}},url:{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},method:"DELETE"}),d.indices.prototype.exists=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>",req:{index:{type:"list"}}},method:"HEAD"}),d.indices.prototype.existsAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}}],method:"HEAD"}),d.indices.prototype.existsTemplate=c({params:{local:{type:"boolean"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},method:"HEAD"}),d.indices.prototype.existsType=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},url:{fmt:"/<%=index%>/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},method:"HEAD"}),d.indices.prototype.flush=c({params:{force:{type:"boolean"},full:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_flush",req:{index:{type:"list"}}},{fmt:"/_flush"}],method:"POST"}),d.indices.prototype.getAlias=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"list"}}},{fmt:"/<%=index%>/_alias",req:{index:{type:"list"}}},{fmt:"/_alias"}]}),d.indices.prototype.getAliases=c({params:{timeout:{type:"time"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_aliases/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_aliases",req:{index:{type:"list"}}},{fmt:"/_aliases/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_aliases"}]}),d.indices.prototype.getFieldMapping=c({params:{includeDefaults:{type:"boolean",name:"include_defaults"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>/field/<%=field%>",req:{index:{type:"list"},type:{type:"list"},field:{type:"list"}}},{fmt:"/<%=index%>/_mapping/field/<%=field%>",req:{index:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/<%=type%>/field/<%=field%>",req:{type:{type:"list"},field:{type:"list"}}},{fmt:"/_mapping/field/<%=field%>",req:{field:{type:"list"}}}]}),d.indices.prototype.getMapping=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_mapping",req:{index:{type:"list"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"list"}}},{fmt:"/_mapping"}]}),d.indices.prototype.getSettings=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":["open","closed"],options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_settings/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_settings"}]}),d.indices.prototype.getTemplate=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},local:{type:"boolean"}},urls:[{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},{fmt:"/_template"}]}),d.indices.prototype.getWarmer=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},local:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"list"}}},{fmt:"/<%=index%>/_warmer",req:{index:{type:"list"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"list"}}},{fmt:"/_warmer"}]}),d.indices.prototype.open=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"closed",options:["open","closed"],name:"expand_wildcards"}},url:{fmt:"/<%=index%>/_open",req:{index:{type:"string"}}},method:"POST"}),d.indices.prototype.optimize=c({params:{flush:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},maxNumSegments:{type:"number",name:"max_num_segments"},onlyExpungeDeletes:{type:"boolean",name:"only_expunge_deletes"},operationThreading:{name:"operation_threading"},waitForMerge:{type:"boolean",name:"wait_for_merge"},force:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_optimize",req:{index:{type:"list"}}},{fmt:"/_optimize"}],method:"POST"}),d.indices.prototype.putAlias=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/<%=index%>/_alias/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_alias/<%=name%>",req:{name:{type:"string"}}}],method:"PUT"}),d.indices.prototype.putMapping=c({params:{ignoreConflicts:{type:"boolean",name:"ignore_conflicts"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_mapping/<%=type%>",req:{index:{type:"list"},type:{type:"string"}}},{fmt:"/_mapping/<%=type%>",req:{type:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.putSettings=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},flatSettings:{type:"boolean",name:"flat_settings"}},urls:[{fmt:"/<%=index%>/_settings",req:{index:{type:"list"}}},{fmt:"/_settings"}],needBody:!0,method:"PUT"}),d.indices.prototype.putTemplate=c({params:{order:{type:"number"},timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"},flatSettings:{type:"boolean",name:"flat_settings"}},url:{fmt:"/_template/<%=name%>",req:{name:{type:"string"}}},needBody:!0,method:"PUT"}),d.indices.prototype.putWarmer=c({params:{masterTimeout:{type:"time",name:"master_timeout"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_warmer/<%=name%>",req:{index:{type:"list"},type:{type:"list"},name:{type:"string"}}},{fmt:"/<%=index%>/_warmer/<%=name%>",req:{index:{type:"list"},name:{type:"string"}}},{fmt:"/_warmer/<%=name%>",req:{name:{type:"string"}}}],needBody:!0,method:"PUT"}),d.indices.prototype.recovery=c({params:{detailed:{type:"boolean","default":!1},activeOnly:{type:"boolean","default":!1,name:"active_only"},human:{type:"boolean","default":!1}},urls:[{fmt:"/<%=index%>/_recovery",req:{index:{type:"list"}}},{fmt:"/_recovery"}]}),d.indices.prototype.refresh=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},force:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_refresh",req:{index:{type:"list"}}},{fmt:"/_refresh"}],method:"POST"}),d.indices.prototype.segments=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"}},urls:[{fmt:"/<%=index%>/_segments",req:{index:{type:"list"}}},{fmt:"/_segments"}]}),d.indices.prototype.snapshotIndex=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/_gateway/snapshot",req:{index:{type:"list"}}},{fmt:"/_gateway/snapshot"}],method:"POST"}),d.indices.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"indices",options:["cluster","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/<%=index%>/_stats/<%=metric%>",req:{index:{type:"list"},metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_stats/<%=metric%>",req:{metric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/<%=index%>/_stats",req:{index:{type:"list"}}},{fmt:"/_stats"}]}),d.indices.prototype.status=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},human:{type:"boolean","default":!1},operationThreading:{name:"operation_threading"},recovery:{type:"boolean"},snapshot:{type:"boolean"}},urls:[{fmt:"/<%=index%>/_status",req:{index:{type:"list"}}},{fmt:"/_status"}]}),d.indices.prototype.updateAliases=c({params:{timeout:{type:"time"},masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_aliases"},needBody:!0,method:"POST"}),d.indices.prototype.validateQuery=c({params:{explain:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},operationThreading:{name:"operation_threading"},source:{type:"string"},q:{type:"string"}},urls:[{fmt:"/<%=index%>/<%=type%>/_validate/query",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_validate/query",req:{index:{type:"list"}}},{fmt:"/_validate/query"}],method:"POST"}),d.info=c({url:{fmt:"/"}}),d.mget=c({params:{fields:{type:"list"},preference:{type:"string"},realtime:{type:"boolean"},refresh:{type:"boolean"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mget",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mget",req:{index:{type:"string"}}},{fmt:"/_mget"}],needBody:!0,method:"POST"}),d.mlt=c({params:{boostTerms:{type:"number",name:"boost_terms"},maxDocFreq:{type:"number",name:"max_doc_freq"},maxQueryTerms:{type:"number",name:"max_query_terms"},maxWordLength:{type:"number",name:"max_word_length"},minDocFreq:{type:"number",name:"min_doc_freq"},minTermFreq:{type:"number",name:"min_term_freq"},minWordLength:{type:"number",name:"min_word_length"},mltFields:{type:"list",name:"mlt_fields"},percentTermsToMatch:{type:"number",name:"percent_terms_to_match"},routing:{type:"string"},searchFrom:{type:"number",name:"search_from"},searchIndices:{type:"list",name:"search_indices"},searchQueryHint:{type:"string",name:"search_query_hint"},searchScroll:{type:"string",name:"search_scroll"},searchSize:{type:"number",name:"search_size"},searchSource:{type:"string",name:"search_source"},searchType:{type:"string",name:"search_type"},searchTypes:{type:"list",name:"search_types"},stopWords:{type:"list",name:"stop_words"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_mlt",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.mpercolate=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_mpercolate",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mpercolate",req:{index:{type:"string"}}},{fmt:"/_mpercolate"}],needBody:!0,bulkBody:!0,method:"POST"}),d.msearch=c({params:{searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/_msearch",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_msearch",req:{index:{type:"list"}}},{fmt:"/_msearch"}],needBody:!0,bulkBody:!0,method:"POST"}),d.mtermvectors=c({params:{ids:{type:"list",required:!1},termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},urls:[{fmt:"/<%=index%>/<%=type%>/_mtermvectors",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_mtermvectors",req:{index:{type:"string"}}},{fmt:"/_mtermvectors"}],method:"POST"}),d.nodes=function(a){this.transport=a +},d.nodes.prototype.hotThreads=c({params:{interval:{type:"time"},snapshots:{type:"number"},threads:{type:"number"},type:{type:"enum",options:["cpu","wait","block"]}},urls:[{fmt:"/_nodes/<%=nodeId%>/hotthreads",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/hotthreads"}]}),d.nodes.prototype.info=c({params:{flatSettings:{type:"boolean",name:"flat_settings"},human:{type:"boolean","default":!1}},urls:[{fmt:"/_nodes/<%=nodeId%>/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugins"]}}},{fmt:"/_nodes/<%=nodeId%>",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/<%=metric%>",req:{metric:{type:"list",options:["settings","os","process","jvm","thread_pool","network","transport","http","plugins"]}}},{fmt:"/_nodes"}]}),d.nodes.prototype.shutdown=c({params:{delay:{type:"time"},exit:{type:"boolean"}},urls:[{fmt:"/_cluster/nodes/<%=nodeId%>/_shutdown",req:{nodeId:{type:"list"}}},{fmt:"/_shutdown"}],method:"POST"}),d.nodes.prototype.stats=c({params:{completionFields:{type:"list",name:"completion_fields"},fielddataFields:{type:"list",name:"fielddata_fields"},fields:{type:"list"},groups:{type:"boolean"},human:{type:"boolean","default":!1},level:{type:"enum","default":"node",options:["node","indices","shards"]},types:{type:"list"}},urls:[{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats/<%=metric%>",req:{nodeId:{type:"list"},metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats/<%=metric%>/<%=indexMetric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]},indexMetric:{type:"list",options:["_all","completion","docs","fielddata","filter_cache","flush","get","id_cache","indexing","merge","percolate","refresh","search","segments","store","warmer"]}}},{fmt:"/_nodes/<%=nodeId%>/stats",req:{nodeId:{type:"list"}}},{fmt:"/_nodes/stats/<%=metric%>",req:{metric:{type:"list",options:["_all","breaker","fs","http","indices","jvm","network","os","process","thread_pool","transport"]}}},{fmt:"/_nodes/stats"}]}),d.percolate=c({params:{routing:{type:"list"},preference:{type:"string"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},percolateIndex:{type:"string",name:"percolate_index"},percolateType:{type:"string",name:"percolate_type"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},urls:[{fmt:"/<%=index%>/<%=type%>/<%=id%>/_percolate",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},{fmt:"/<%=index%>/<%=type%>/_percolate",req:{index:{type:"string"},type:{type:"string"}}}],method:"POST"}),d.ping=c({url:{fmt:"/"},requestTimeout:100,method:"HEAD"}),d.scroll=c({params:{scroll:{type:"duration"},scrollId:{type:"string",name:"scroll_id"}},urls:[{fmt:"/_search/scroll/<%=scrollId%>",req:{scrollId:{type:"string"}}},{fmt:"/_search/scroll"}],method:"POST"}),d.search=c({params:{analyzer:{type:"string"},analyzeWildcard:{type:"boolean",name:"analyze_wildcard"},defaultOperator:{type:"enum","default":"OR",options:["AND","OR"],name:"default_operator"},df:{type:"string"},explain:{type:"boolean"},fields:{type:"list"},from:{type:"number"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},indicesBoost:{type:"list",name:"indices_boost"},lenient:{type:"boolean"},lowercaseExpandedTerms:{type:"boolean",name:"lowercase_expanded_terms"},preference:{type:"string"},q:{type:"string"},routing:{type:"list"},scroll:{type:"duration"},searchType:{type:"enum",options:["query_then_fetch","query_and_fetch","dfs_query_then_fetch","dfs_query_and_fetch","count","scan"],name:"search_type"},size:{type:"number"},sort:{type:"list"},source:{type:"string"},_source:{type:"list"},_sourceExclude:{type:"list",name:"_source_exclude"},_sourceInclude:{type:"list",name:"_source_include"},stats:{type:"list"},suggestField:{type:"string",name:"suggest_field"},suggestMode:{type:"enum","default":"missing",options:["missing","popular","always"],name:"suggest_mode"},suggestSize:{type:"number",name:"suggest_size"},suggestText:{type:"text",name:"suggest_text"},timeout:{type:"time"},version:{type:"boolean"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search",req:{index:{type:"list"}}},{fmt:"/_search"}],method:"POST"}),d.searchTemplate=c({urls:[{fmt:"/<%=index%>/<%=type%>/_search/template",req:{index:{type:"list"},type:{type:"list"}}},{fmt:"/<%=index%>/_search/template",req:{index:{type:"list"}}},{fmt:"/_search/template"}],method:"POST"}),d.searchShards=c({params:{preference:{type:"string"},routing:{type:"string"},local:{type:"boolean"},ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"}},urls:[{fmt:"/<%=index%>/<%=type%>/_search_shards",req:{index:{type:"string"},type:{type:"string"}}},{fmt:"/<%=index%>/_search_shards",req:{index:{type:"string"}}},{fmt:"/_search_shards"}],method:"POST"}),d.snapshot=function(a){this.transport=a},d.snapshot.prototype.create=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.createRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"string"}}},needBody:!0,method:"POST"}),d.snapshot.prototype["delete"]=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"DELETE"}),d.snapshot.prototype.deleteRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},timeout:{type:"time"}},url:{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},method:"DELETE"}),d.snapshot.prototype.get=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>",req:{repository:{type:"string"},snapshot:{type:"list"}}}}),d.snapshot.prototype.getRepository=c({params:{masterTimeout:{type:"time",name:"master_timeout"},local:{type:"boolean"}},urls:[{fmt:"/_snapshot/<%=repository%>",req:{repository:{type:"list"}}},{fmt:"/_snapshot"}]}),d.snapshot.prototype.restore=c({params:{masterTimeout:{type:"time",name:"master_timeout"},waitForCompletion:{type:"boolean","default":!1,name:"wait_for_completion"}},url:{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_restore",req:{repository:{type:"string"},snapshot:{type:"string"}}},method:"POST"}),d.snapshot.prototype.status=c({params:{masterTimeout:{type:"time",name:"master_timeout"}},urls:[{fmt:"/_snapshot/<%=repository%>/<%=snapshot%>/_status",req:{repository:{type:"string"},snapshot:{type:"list"}}},{fmt:"/_snapshot/<%=repository%>/_status",req:{repository:{type:"string"}}},{fmt:"/_snapshot/_status"}]}),d.suggest=c({params:{ignoreUnavailable:{type:"boolean",name:"ignore_unavailable"},allowNoIndices:{type:"boolean",name:"allow_no_indices"},expandWildcards:{type:"enum","default":"open",options:["open","closed"],name:"expand_wildcards"},preference:{type:"string"},routing:{type:"string"},source:{type:"string"}},urls:[{fmt:"/<%=index%>/_suggest",req:{index:{type:"list"}}},{fmt:"/_suggest"}],needBody:!0,method:"POST"}),d.termvector=c({params:{termStatistics:{type:"boolean","default":!1,required:!1,name:"term_statistics"},fieldStatistics:{type:"boolean","default":!0,required:!1,name:"field_statistics"},fields:{type:"list",required:!1},offsets:{type:"boolean","default":!0,required:!1},positions:{type:"boolean","default":!0,required:!1},payloads:{type:"boolean","default":!0,required:!1},preference:{type:"string",required:!1},routing:{type:"string",required:!1},parent:{type:"string",required:!1}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_termvector",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.update=c({params:{consistency:{type:"enum",options:["one","quorum","all"]},fields:{type:"list"},lang:{type:"string"},parent:{type:"string"},refresh:{type:"boolean"},replication:{type:"enum","default":"sync",options:["sync","async"]},retryOnConflict:{type:"number",name:"retry_on_conflict"},routing:{type:"string"},script:{},timeout:{type:"time"},timestamp:{type:"time"},ttl:{type:"duration"},version:{type:"number"},versionType:{type:"enum",options:["internal","external","external_gte","force"],name:"version_type"}},url:{fmt:"/<%=index%>/<%=type%>/<%=id%>/_update",req:{index:{type:"string"},type:{type:"string"},id:{type:"string"}}},method:"POST"}),d.create=c.proxy(d.index,{transform:function(a){a.op_type="create"}})},{"../client_action":232}],230:[function(a,b){b.exports={1.1:a("./1_1"),"1.0":a("./1_0"),"0.90":a("./0_90")}},{"./0_90":227,"./1_0":228,"./1_1":229}],231:[function(a,b){function c(a){function b(){a.hasOwnProperty("log")||(a.log="warning"),a.hosts||a.host||(a.host="http://localhost:9200"),this.close=function(){this.transport.close()},this.transport=new d(a);for(var b=0;b1?"one of "+a.options.join(","):a.options[0]))},duration:function(a,b,c){if(f.isNumeric(b)||f.isInterval(b))return b;throw new TypeError("Invalid "+c+": expected a number or interval (an integer followed by one of Mwdhmsy).")},list:function(a,b,c){switch(typeof b){case"number":case"string":case"boolean":return""+b;case"object":if(f.isArray(b))return b.join(",");default:throw new TypeError("Invalid "+c+": expected be a comma seperated list, array, number or string.")}},"boolean":function(a,b){return b=f.isString(b)?b.toLowerCase():b,"no"===b||"off"===b?!1:!!b},number:function(a,b,c){if(f.isNumeric(b))return 1*b;throw new TypeError("Invalid "+c+": expected a number.")},string:function(a,b,c){switch(typeof b){case"number":case"string":return""+b;default:throw new TypeError("Invalid "+c+": expected a string.")}},time:function(a,b,c){if("string"==typeof b)return b;if(f.isNumeric(b))return""+b;if(b instanceof Date)return""+b.getTime();throw new TypeError("Invalid "+c+": expected some sort of time.")}};c.resolveUrl=d,c.proxy=function(a,b){return function(c,d){return"function"==typeof c?(d=c,c={}):(c=c||{},d="function"==typeof d?d:null),b.transform&&b.transform(c),a.call(this,c,d)}}},{"./utils":250}],233:[function(a,b){function c(a,b){if(b=b||{},e.call(this),this.requestTimeout=b.hasOwnProperty("requestTimeout")?b.requestTimeout:3e4,this.log=b.log||new f,!a)throw new TypeError("Missing host");if(!(a instanceof g))throw new TypeError("Invalid host");this.host=a,d.makeBoundMethods(this)}b.exports=c;var d=a("./utils"),e=a("events").EventEmitter,f=a("./log"),g=a("./host"),h=a("./errors");d.inherits(c,e),c.prototype.request=function(){throw new Error("Connection#request must be overwritten by the Connector")},c.prototype.ping=function(a,b){"function"==typeof a?(b=a,a=null):b="function"==typeof b?b:null;var c,e,f,g=100;a&&a.hasOwnProperty("requestTimeout")&&(g=a.requestTimeout),f=this.request(d.defaults(a||{},{path:"/",method:"HEAD"}),function(a){e||(clearTimeout(c),b&&b(a))}),g&&(c=setTimeout(function(){f&&f(),e=!0,b&&b(new h.RequestTimeout("Ping Timeout after "+g+"ms"))},g))},c.prototype.setStatus=function(a){var b=this.status;this.status=a,this.emit("status set",a,b,this),"closed"===a&&this.removeAllListeners()}},{"./errors":237,"./host":238,"./log":239,"./utils":250,events:41}],234:[function(a,b){function c(a){a=a||{},e.makeBoundMethods(this),a.log?this.log=a.log:(this.log=new f,a.log=this.log),this._config=a,this.selector=e.funcEnum(a,"selector",c.selectors,c.defaultSelector),this.Connection=e.funcEnum(a,"connectionClass",c.connectionClasses,c.defaultConnectionClass),this.deadTimeout=a.hasOwnProperty("deadTimeout")?a.deadTimeout:6e4,this.maxDeadTimeout=a.hasOwnProperty("maxDeadTimeout")?a.maxDeadTimeout:18e5,this.calcDeadTimeout=e.funcEnum(a,"calcDeadTimeout",c.calcDeadTimeoutOptions,"exponential"),this.index={},this._conns={alive:[],dead:[]},this._timeouts=[]}var d=a("__browserify_process");b.exports=c;var e=a("./utils"),f=a("./log");c.selectors=a("./selectors"),c.defaultSelector="roundRobin",c.connectionClasses=a("./connectors"),c.defaultConnectionClass=c.connectionClasses._default,delete c.connectionClasses._default,c.calcDeadTimeoutOptions={flat:function(a,b){return b},exponential:function(a,b){return Math.min(2*b*Math.pow(2,.5*a-1),this.maxDeadTimeout)}},c.prototype.select=function(a){if(this._conns.alive.length)if(this.selector.length>1)this.selector(this._conns.alive,a);else try{e.nextTick(a,void 0,this.selector(this._conns.alive))}catch(b){a(b)}else this._timeouts.length?this._selectDeadConnection(a):e.nextTick(a,void 0)},c.prototype.onStatusSet=e.handler(function(a,b,c){var d,f="dead"===a,g=f&&"dead"===b,h=!f&&"dead"===b,i=b===a,j=this._conns[b],k=this._conns[a];return i&&!f?!0:(j!==k&&(e.isArray(j)&&(d=j.indexOf(c),-1!==d&&j.splice(d,1)),e.isArray(k)&&(d=k.indexOf(c),-1===d&&k.push(c))),f&&this._onConnectionDied(c,g),void(h&&this._onConnectionRevived(c)))}),c.prototype._onConnectionRevived=function(a){for(var b,c=0;c=0)return c.levels.slice(0,b+1);case"object":if(e.isArray(a)){var d=e.intersection(a,c.levels);if(d.length===a.length)return d}default:throw new TypeError("invalid logging level "+a+". Expected zero or more of these options: "+c.levels.join(", "))}},c.join=function(a){return e.map(a,function(a){return e.isPlainObject(a)?e.inspect(a)+"\n":a.toString()}).join(" ")},c.prototype.addOutput=function(a){a=a||{},a.levels=c.parseLevels(a.levels||a.level||"warning"),delete a.level;var b=e.funcEnum(a,"type",c.loggers,d.browser?"console":"stdio");return new b(this,a)},c.prototype.error=function(a){return this.listenerCount("error")?this.emit("error",a instanceof Error?a:new Error(a)):void 0},c.prototype.warning=function(){return this.listenerCount("warning")?this.emit("warning",c.join(arguments)):void 0},c.prototype.info=function(){return this.listenerCount("info")?this.emit("info",c.join(arguments)):void 0},c.prototype.debug=function(){return this.listenerCount("debug")?this.emit("debug",c.join(arguments)):void 0},c.prototype.trace=function(a,b,d,e,f){return this.listenerCount("trace")?this.emit("trace",c.normalizeTraceArgs(a,b,d,e,f)):void 0},c.normalizeTraceArgs=function(a,b,c,d,g){return"string"==typeof b?b=f.parse(b,!0,!0):(b=e.clone(b),b.path&&(b.query=f.parse(b.path,!0,!1).query),!b.pathname&&b.path&&(b.pathname=b.path.split("?").shift())),delete b.auth,{method:a,url:f.format(b),body:c,status:g,response:d}},b.exports=c},{"./loggers":241,"./utils":250,__browserify_process:50,events:41,url:44}],240:[function(a,b){function c(a,b){this.log=a,this.listeningLevels=[],f.makeBoundMethods(this),this.log.once("closing",this.bound.cleanUpListeners),this.setupListeners(b.levels)}function d(a){return 10>a?"0"+a.toString(10):a.toString(10)}function e(a,b){var c=f.repeat(" ",b||2);return(a||"").split(/\r?\n/).map(function(a){return c+a}).join("\n")}var f=a("./utils");c.prototype.timestamp=function(){var a=new Date;return a.getUTCFullYear()+"-"+d(a.getUTCMonth()+1)+"-"+d(a.getUTCDate())+"T"+d(a.getUTCHours())+":"+d(a.getUTCMinutes())+":"+d(a.getUTCSeconds())+"Z"},c.prototype.format=function(a,b){return a+": "+this.timestamp()+"\n"+e(b)+"\n\n"},c.prototype.write=function(){throw new Error("This should be overwritten by the logger")},c.prototype.setupListeners=function(a){this.cleanUpListeners(),this.listeningLevels=[],f.each(a,function(a){var b="on"+f.ucfirst(a);if(!this.bound[b])throw new Error('Unable to listen for level "'+a+'"');this.listeningLevels.push(a),this.log.on(a,this.bound[b])},this)},c.prototype.cleanUpListeners=f.handler(function(){f.each(this.listeningLevels,function(a){this.log.removeListener(a,this.bound["on"+f.ucfirst(a)])},this)}),c.prototype.onError=f.handler(function(a){this.write("Error"===a.name?"ERROR":a.name,a.stack)}),c.prototype.onWarning=f.handler(function(a){this.write("WARNING",a)}),c.prototype.onInfo=f.handler(function(a){this.write("INFO",a)}),c.prototype.onDebug=f.handler(function(a){this.write("DEBUG",a)}),c.prototype.onTrace=f.handler(function(a){this.write("TRACE",this._formatTraceMessage(a))}),c.prototype._formatTraceMessage=function(a){return"-> "+a.method+" "+a.url+"\n"+this._prettyJson(a.body)+"\n<- "+a.status+"\n"+this._prettyJson(a.response)},c.prototype._prettyJson=function(a){try{return"string"==typeof a&&(a=JSON.parse(a)),JSON.stringify(a,null," ").replace(/'/g,"\\u0027")}catch(b){return"string"==typeof a?a:""}},b.exports=c},{"./utils":250}],241:[function(a,b){b.exports={console:a("./console")}},{"./console":242}],242:[function(a,b){function c(a,b){d.call(this,a,b),this.color=e.has(b,"color")?!!b.color:!0}b.exports=c;var d=a("../logger"),e=a("../utils");e.inherits(c,d),c.prototype.setupListeners=function(a){d.prototype.setupListeners.call(this,a)},c.prototype.write=function(a,b,c){console[c]&&console[c](this.format(a,b))},c.prototype.onError=e.handler(function(a){var b=console.error?"error":"log";this.write("Error"===a.name?"ERROR":a.name,a.stack||a.message,b)}),c.prototype.onWarning=e.handler(function(a){this.write("WARNING",a,console.warn?"warn":"log")}),c.prototype.onInfo=e.handler(function(a){this.write("INFO",a,console.info?"info":"log")}),c.prototype.onDebug=e.handler(function(a){this.write("DEBUG",a,console.debug?"debug":"log")}),c.prototype.onTrace=e.handler(function(a){this.write("TRACE",this._formatTraceMessage(a),"log")})},{"../logger":240,"../utils":250}],243:[function(a,b){function c(a){return function(b){return d.transform(b,function(b,c,d){if(c[a]){var f=e.exec(c[a]);if(!f)throw new Error("node's "+a+" property ("+JSON.stringify(c[a])+") does not match the expected pattern "+e+".");b.push({host:f[1],port:parseInt(f[2],10),_meta:{id:d,name:c.name,hostname:c.hostname,version:c.version}})}},[])}}var d=a("./utils"),e=/\[\/*([^:]+):(\d+)\]/;b.exports=c("http_address"),b.exports.thrift=c("transport_address")},{"./utils":250}],244:[function(a,b){b.exports={random:a("./random"),roundRobin:a("./round_robin")}},{"./random":245,"./round_robin":246}],245:[function(a,b){b.exports=function(a){return a[Math.floor(Math.random()*a.length)]}},{}],246:[function(a,b){b.exports=function(a){var b=a[0];return a.push(a.shift()),b}},{}],247:[function(a,b){function c(){}b.exports=c;var d=a("../utils");c.prototype.serialize=function(a,b,c){switch(typeof a){case"string":return a;case"object":if(a)return JSON.stringify(a,b,c);default:return}},c.prototype.deserialize=function(a){if("string"==typeof a)try{return JSON.parse(a)}catch(b){}},c.prototype.bulkBody=function(a){var b,c="";if(d.isArray(a))for(b=0;bg||g>=300)||a.ignore&&d.contains(a.ignore,g)||(c=e[g]?new e[g](i&&i.error):new e.Generic("unknown error")),a.castExists&&(c&&c instanceof e.NotFound?(i=!1,c=void 0):i=!c),"function"==typeof b?c?b(c,i,g):b(void 0,i,g):c?(c.body=i,c.status=g,m.reject(c)):m.resolve(i)}}function h(){q||(q=!0,o=0,n._timeout(k),"function"==typeof j&&j())}var i,j,k,l,m,n=this,o=this.maxRetries,p=this.requestTimeout,q=!1;return n.log.debug("starting request",a),a.body&&"GET"===a.method?void d.nextTick(g,new TypeError('Body can not be sent with method "GET"')):(a.body&&(a.body=n.serializer[a.bulkBody?"bulkBody":"serialize"](a.body)),a.hasOwnProperty("maxRetries")&&(o=a.maxRetries),a.hasOwnProperty("requestTimeout")&&(p=a.requestTimeout),a.req={method:a.method,path:a.path||"/",query:a.query,body:a.body},p&&1/0!==p&&(k=this._timeout(function(){g(new e.RequestTimeout("Request Timeout after "+p+"ms")),h()},p)),"function"==typeof b?l={abort:h}:(m=this.defer(),l=m.promise,l.abort=h),i?c(void 0,i):n.connectionPool.select(c),l)},c.prototype._timeout=function(a,b){this._timers=this._timers||[];var c;if("function"!=typeof a&&(c=a,a=void 0),a)return c=setTimeout(a,b),this._timers.push(c),c;if(c){clearTimeout(c);var d=this._timers.indexOf(c);-1!==d&&this._timers.splice(d,1)}},c.prototype.sniff=function(a){var b=this.connectionPool,c=this.nodesToHostCallback,e=this.log;a="function"==typeof a?a:d.noop,this.request({path:this.sniffEndpoint,method:"GET"},function(g,h,i){if(!g&&h&&h.nodes){var j;try{j=c(h.nodes)}catch(k){return void e.error(new Error("Unable to convert node list from "+this.sniffEndpoint+" to hosts durring sniff. Encountered error:\n"+(k.stack||k.message)))}b.setHosts(d.map(j,function(a){return new f(a)}))}a(g,h,i)})},c.prototype.close=function(){this.log.close(),d.each(this._timers,clearTimeout),this.connectionPool.close()}},{"./connection_pool":234,"./errors":237,"./host":238,"./log":239,"./nodes_to_host":243,"./serializers/json":247,"./transport/sniff_on_connection_fault":249,"./utils":250,bluebird:3}],249:[function(a,b){var c=a("../utils");b.exports=function(a){var b=0,d=a.connectionPool,e=d._onConnectionDied,f=function(){f.timerId=a._timeout(f.timerId),a.sniff()},g=function(a){var b=c.now();return function(){return b-a}};d._onConnectionDied=function(c,h){var i=e.call(d,c,h);b=f.timerId?b+1:0;var j=d.calcDeadTimeout(b,1e3);return f.timerId&&j=97&&122>=e||e>=48&&57>=e,g=e>=65&&90>=e,(g||!h)&&(k.length&&j.push(k),k=""),(g||h)&&(h&&k.length?k+=f:k=!j.length&&a||j.length&&b?f.toUpperCase():f.toLowerCase());return k.length&&j.push(k),j.length&&"_"===d.charAt(0)&&(j[0]="_"+j[0]),j.join(c)}}var d=a("__browserify_process"),e=a("__browserify_Buffer").Buffer,f=a("path"),g=a("lodash-node/modern"),h=a("util"),i=g.extend({},g,h);g=i,i.joinPath=f.join,i.deepMerge=function(a,b){return g.each(b,function(c,d){switch(typeof a[d]){case"undefined":a[d]=b[d];break;case"object":g.isArray(a[d])&&g.isArray(b[d])?a[d]=a[d].concat(b[d]):g.isPlainObject(a[d])&&g.isPlainObject(b[d])&&i.deepMerge(a[d],b[d])}}),a},g.each(["String","Object","PlainObject","Array","Finite","Function","RegExp"],function(a){var b=g["is"+a];i["isArrayOf"+a+"s"]=function(a){return g.isArray(a)&&g.every(a.slice(0,10),b)}}),i.ucfirst=function(a){return a[0].toUpperCase()+a.substring(1).toLowerCase()},i.studlyCase=c(!0,!0,""),i.camelCase=c(!1,!0,""),i.snakeCase=c(!1,!1,"_"),i.toLowerString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toLowerCase()},i.toUpperString=function(a){return a?"string"!=typeof a&&(a=a.toString()):a="",a.toUpperCase()},i.isNumeric=function(a){return"object"!=typeof a&&a-parseFloat(a)>=0};var j=/^(\d+(?:\.\d+)?)([Mwdhmsy])$/;i.isInterval=function(a){return!(!a.match||!a.match(j))},i.repeat=function(a,b){return new Array(b+1).join(a)},i.applyArgs=function(a,b,c,d){switch(d=d||0,c.length-d){case 0:return a.call(b);case 1:return a.call(b,c[0+d]);case 2:return a.call(b,c[0+d],c[1+d]);case 3:return a.call(b,c[0+d],c[1+d],c[2+d]);case 4:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d]);case 5:return a.call(b,c[0+d],c[1+d],c[2+d],c[3+d],c[4+d]);default:return a.apply(b,Array.prototype.slice.call(c,d))}},g.nextTick=function(a){d.nextTick(g.bindKey(g,"applyArgs",a,null,arguments,1))},g.handler=function(a){return a._provideBound=!0,a},g.scheduled=g.handler,g.makeBoundMethods=function(a){a.bound={};for(var b in a)"function"==typeof a[b]&&a[b]._provideBound===!0&&(a.bound[b]=g.bind(a[b],a))},g.noop=function(){},g.funcEnum=function(a,b,c,d){var e=a[b];switch(typeof e){case"undefined":return c[d];case"function":return e;case"string":if(c.hasOwnProperty(e))return c[e];default:var f="Invalid "+b+' "'+e+'", expected a function';switch(g.size(c)){case 0:break;case 1:f+=" or "+g.keys(c)[0];break;default:f+=" or one of "+g.keys(c).join(", ")}throw new TypeError(f)}},g.createArray=function(a,b){b="function"==typeof b?b:g.identity;var c,d,e=[];for(g.isArray(a)||(a=[a]),d=0;d