Socket
Socket
Sign inDemoInstall

mapbox

Package Overview
Dependencies
Maintainers
44
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapbox - npm Package Compare versions

Comparing version 1.0.0-beta4 to 1.0.0-beta5

dist/.gitkeep

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.0.0-beta5
- Add `limit` option to geocoder API
- Add `poi.landmark` type to geocoder API
- Fixes a bug where the global `Promise` object was overwritten by a polyfill
## 1.0.0-beta4

@@ -2,0 +8,0 @@

4

dist/mapbox-sdk.min.js

@@ -1,2 +0,2 @@

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.MapboxClient=t()}}(function(){var t;return function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var p=n[s]={exports:{}};t[s][0].call(p.exports,function(e){var n=t[s][1][e];return o(n?n:e)},p,p.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e){"use strict";t("../vendor/promise");var n=t("rest/interceptor"),r=n({success:function(t){var e=t&&t.callback;return"function"==typeof e&&e(null,t.entity,t),t},error:function(t){var e=t&&t.callback;if("function"==typeof e){var n=t.error||t.entity;"object"!=typeof n&&(n=new Error(n)),e(n)}return t}});e.exports=r},{"../vendor/promise":49,"rest/interceptor":24}],2:[function(t,e){"use strict";t("../vendor/promise");var n=t("rest"),r=t("./standard_response"),o=t("./callbackify");e.exports=function(e){return n.wrap(t("rest/interceptor/errorCode")).wrap(t("rest/interceptor/pathPrefix"),{prefix:e.endpoint}).wrap(t("rest/interceptor/mime"),{mime:"application/json"}).wrap(t("rest/interceptor/params")).wrap(t("rest/interceptor/defaultRequest"),{params:{access_token:e.accessToken}}).wrap(t("rest/interceptor/template")).wrap(r).wrap(o)}},{"../vendor/promise":49,"./callbackify":1,"./standard_response":17,rest:20,"rest/interceptor/defaultRequest":25,"rest/interceptor/errorCode":26,"rest/interceptor/mime":27,"rest/interceptor/params":28,"rest/interceptor/pathPrefix":29,"rest/interceptor/template":30}],3:[function(t,e){e.exports.DEFAULT_ENDPOINT="https://api.mapbox.com",e.exports.API_GEOCODING_FORWARD="/geocoding/v5/{dataset}/{query}.json{?proximity,country,types,bbox}",e.exports.API_GEOCODING_REVERSE="/geocoding/v5/{dataset}/{longitude},{latitude}.json{?types}",e.exports.API_DIRECTIONS="/v4/directions/{profile}/{encodedWaypoints}.json{?alternatives,instructions,geometry,steps}",e.exports.API_DISTANCE="/distances/v1/mapbox/{profile}",e.exports.API_SURFACE="/v4/surface/{mapid}.json{?layer,fields,points,geojson,interpolate,encoded_polyline}",e.exports.API_UPLOADS="/uploads/v1/{owner}",e.exports.API_UPLOAD="/uploads/v1/{owner}/{upload}",e.exports.API_UPLOAD_CREDENTIALS="/uploads/v1/{owner}/credentials",e.exports.API_MATCHING="/matching/v4/{profile}.json",e.exports.API_DATASET_DATASETS="/datasets/v1/{owner}{?limit,start,fresh}",e.exports.API_DATASET_DATASET="/datasets/v1/{owner}/{dataset}",e.exports.API_DATASET_FEATURES="/datasets/v1/{owner}/{dataset}/features{?reverse,limit,start}",e.exports.API_DATASET_FEATURE="/datasets/v1/{owner}/{dataset}/features/{id}",e.exports.API_TILESTATS_STATISTICS="/tilestats/v1/{owner}/{tileset}",e.exports.API_TILESTATS_LAYER="/tilestats/v1/{owner}/{tileset}/{layer}",e.exports.API_TILESTATS_ATTRIBUTE="/tilestats/v1/{owner}/{tileset}/{layer}/{attribute}",e.exports.API_STATIC="/v4/{mapid}{+overlay}/{+xyz}/{width}x{height}{+retina}{.format}{?access_token}",e.exports.API_STYLES_LIST="/styles/v1/{owner}",e.exports.API_STYLES_CREATE="/styles/v1/{owner}",e.exports.API_STYLES_READ="/styles/v1/{owner}/{styleid}",e.exports.API_STYLES_UPDATE="/styles/v1/{owner}/{styleid}",e.exports.API_STYLES_DELETE="/styles/v1/{owner}/{styleid}",e.exports.API_STYLES_EMBED="/styles/v1/{owner}/{styleid}.html{?zoomwheel,title,access_token}",e.exports.API_STYLES_SPRITE="/styles/v1/{owner}/{styleid}/sprite{+retina}{.format}",e.exports.API_STYLES_SPRITE_ADD_ICON="/styles/v1/{owner}/{styleid}/sprite/{iconName}",e.exports.API_STYLES_SPRITE_DELETE_ICON="/styles/v1/{owner}/{styleid}/sprite/{iconName}",e.exports.API_STYLES_FONT_GLYPH_RANGES="/fonts/v1/{owner}/{font}/{start}-{end}.pbf"},{}],4:[function(t,e){"use strict";function n(t){return t.map(function(t){return r(t),t.longitude+","+t.latitude}).join(";")}var r=t("./invariant_location");e.exports=n},{"./invariant_location":6}],5:[function(t,e){"use strict";function n(t){var e=t.split(".")[1];if(!e)return null;e=e.replace(/-/g,"+").replace(/_/g,"/");var n=e.length%4;if(2===n&&(e+="=="),3===n&&(e+="="),1===n||n>3)return null;try{return JSON.parse(r.decode(e)).u}catch(o){return null}}var r=t("rest/util/base64");e.exports=n},{"rest/util/base64":39}],6:[function(t,e){"use strict";function n(t){r("number"==typeof t.latitude&&"number"==typeof t.longitude,"location must be an object with numeric latitude & longitude properties"),void 0!==t.zoom&&r("number"==typeof t.zoom,"zoom must be numeric")}var r=t("../vendor/invariant");e.exports=n},{"../vendor/invariant":48}],7:[function(t,e){"use strict";function n(t){function e(e,n){this.name=t,r("string"==typeof e,"accessToken required to instantiate Mapbox client");var a=o.DEFAULT_ENDPOINT;void 0!==n&&(r("object"==typeof n,"options must be an object"),n.endpoint&&(r("string"==typeof n.endpoint,"endpoint must be a string"),a=n.endpoint),n.account&&(r("string"==typeof n.account,"account must be a string"),this.owner=n.account)),this.client=i({endpoint:a,accessToken:e}),this.accessToken=e,this.endpoint=a,this.owner=this.owner||s(e),r(!!this.owner,"could not determine account from provided accessToken")}return e}var r=t("../vendor/invariant"),o=t("./constants"),i=t("./client"),s=t("./get_user");e.exports=n},{"../vendor/invariant":48,"./client":2,"./constants":3,"./get_user":5}],8:[function(t,e){"use strict";var n=t("./make_service"),r=t("../vendor/xtend").extendMutable,o=t("./get_user"),i=t("./services/geocoding"),s=t("./services/surface"),a=t("./services/directions"),u=t("./services/uploads"),c=t("./services/matching"),p=t("./services/datasets"),f=t("./services/distance"),l=t("./services/tilestats"),d=n("MapboxClient");r(d.prototype,i.prototype,s.prototype,a.prototype,f.prototype,c.prototype,p.prototype,u.prototype,l.prototype),d.getUser=o,e.exports=d},{"../vendor/xtend":50,"./get_user":5,"./make_service":7,"./services/datasets":9,"./services/directions":10,"./services/distance":11,"./services/geocoding":12,"./services/matching":13,"./services/surface":14,"./services/tilestats":15,"./services/uploads":16}],9:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../../vendor/hat"),o=t("../make_service"),i=t("../constants"),s=e.exports=o("MapboxDatasets");s.prototype.listDatasets=function(t,e){return"function"==typeof t&&(e=t,t={}),this.client({path:i.API_DATASET_DATASETS,params:{limit:t.limit,start:t.start,fresh:t.fresh,owner:this.owner},callback:e})},s.prototype.createDataset=function(t,e){return void 0===e&&"function"==typeof t&&(e=t,t={}),n("object"==typeof t,"options must be an object"),this.client({path:i.API_DATASET_DATASETS,params:{owner:this.owner},entity:t,callback:e})},s.prototype.readDataset=function(t,e){return n("string"==typeof t,"dataset must be a string"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},callback:e})},s.prototype.updateDataset=function(t,e,r){return n("string"==typeof t,"dataset must be a string"),n("object"==typeof e,"options must be an object"),n(!!e.name||!!e.description,"options must include a name or a description"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},method:"patch",entity:e,callback:r})},s.prototype.deleteDataset=function(t,e){return n("string"==typeof t,"dataset must be a string"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},method:"delete",callback:e})},s.prototype.listFeatures=function(t,e,r){void 0===r&&"function"==typeof e&&(r=e,e={}),n("string"==typeof t,"dataset must be a string"),n("object"==typeof e,"options must be a object");var o={owner:this.owner,dataset:t};return e.reverse&&(n("boolean"==typeof e.reverse,"reverse option must be a boolean"),o.reverse=e.reverse),e.limit&&(n("number"==typeof e.limit,"limit option must be a number"),o.limit=e.limit),e.start&&(n("string"==typeof e.start,"start option must be a string"),o.start=e.start),this.client({path:i.API_DATASET_FEATURES,params:o,callback:r})},s.prototype.insertFeature=function(t,e,o){n("string"==typeof e,"dataset must be a string");var s=t.id||r();return n("string"==typeof s,"The GeoJSON feature's id must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:s},method:"put",entity:t,callback:o})},s.prototype.readFeature=function(t,e,r){return n("string"==typeof t,"id must be a string"),n("string"==typeof e,"dataset must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:t},callback:r})},s.prototype.deleteFeature=function(t,e,r){return n("string"==typeof t,"id must be a string"),n("string"==typeof e,"dataset must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:t},method:"delete",callback:r})}},{"../../vendor/hat":47,"../../vendor/invariant":48,"../constants":3,"../make_service":7}],10:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../format_points"),o=t("../make_service"),i=t("../constants"),s=o("MapboxDirections");s.prototype.getDirections=function(t,e,o){void 0===o&&"function"==typeof e?(o=e,e={}):void 0===e&&(e={}),n(Array.isArray(t),"waypoints must be an array"),n("object"==typeof e,"options must be an object");var s=r(t),a="mapbox.driving",u=!0,c=!0,p="geojson",f="text";return e.profile&&(n("string"==typeof e.profile,"profile option must be string"),a=e.profile),"undefined"!=typeof e.alternatives&&(n("boolean"==typeof e.alternatives,"alternatives option must be boolean"),u=e.alternatives),"undefined"!=typeof e.steps&&(n("boolean"==typeof e.steps,"steps option must be boolean"),c=e.steps),e.geometry&&(n("string"==typeof e.geometry,"geometry option must be string"),p=e.geometry),e.instructions&&(n("string"==typeof e.instructions,"instructions option must be string"),f=e.instructions),this.client({path:i.API_DIRECTIONS,params:{encodedWaypoints:s,profile:a,instructions:f,geometry:p,alternatives:u,steps:c},callback:o})},e.exports=s},{"../../vendor/invariant":48,"../constants":3,"../format_points":4,"../make_service":7}],11:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=r("MapboxDistance");i.prototype.getDistances=function(t,e,r){void 0===r&&"function"==typeof e&&(r=e,e={}),n(Array.isArray(t),"waypoints must be an array");var i="driving";return e.profile&&(n("string"==typeof e.profile,"profile option must be string"),i=e.profile),this.client({path:o.API_DISTANCE,params:{profile:i},entity:{coordinates:t},method:"post",callback:r})},e.exports=i},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],12:[function(t,e){"use strict";function n(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}var r=t("../../vendor/invariant"),o=t("../make_service"),i=t("../constants"),s=o("MapboxGeocoding"),a=5,u=3;s.prototype.geocodeForward=function(t,e,o){if(void 0===o&&"function"==typeof e&&(o=e,e={}),Array.isArray(t)){if("mapbox.places-permanent"!==e.dataset)throw new Error("Batch geocoding is only available with the mapbox.places-permanent endpoint. See https://mapbox.com/api-documentation/#batch-requests for details");t=t.join(";")}r("string"==typeof t,"query must be a string"),r("object"==typeof e,"options must be an object");var s={query:t,dataset:"mapbox.places"},a=u;return e.precision&&(r("number"==typeof e.precision,"precision option must be number"),a=e.precision),e.proximity&&(r("number"==typeof e.proximity.latitude&&"number"==typeof e.proximity.longitude,"proximity must be an object with numeric latitude & longitude properties"),s.proximity=n(e.proximity.longitude,a)+","+n(e.proximity.latitude,a)),e.bbox&&(r("number"==typeof e.bbox[0]&&"number"==typeof e.bbox[1]&&"number"==typeof e.bbox[2]&&"number"==typeof e.bbox[3]&&4===e.bbox.length,"bbox must be an array with numeric values in the form [minX, minY, maxX, maxY]"),s.bbox=e.bbox[0]+","+e.bbox[1]+","+e.bbox[2]+","+e.bbox[3]),e.dataset&&(r("string"==typeof e.dataset,"dataset option must be string"),s.dataset=e.dataset),e.country&&(r("string"==typeof e.country,"country option must be string"),s.country=e.country),e.types&&(r("string"==typeof e.types,"types option must be string"),s.types=e.types),"boolean"==typeof e.autocomplete&&(r("boolean"==typeof e.autocomplete,"autocomplete must be a boolean"),s.autocomplete=e.autocomplete),this.client({path:i.API_GEOCODING_FORWARD,params:s,callback:o})},s.prototype.geocodeReverse=function(t,e,o){void 0===o&&"function"==typeof e&&(o=e,e={}),r("object"==typeof t,"location must be an object"),r("object"==typeof e,"options must be an object"),r("number"==typeof t.latitude&&"number"==typeof t.longitude,"location must be an object with numeric latitude & longitude properties");var s={dataset:"mapbox.places"};e.dataset&&(r("string"==typeof e.dataset,"dataset option must be string"),s.dataset=e.dataset);var u=a;return e.precision&&(r("number"==typeof e.precision,"precision option must be number"),u=e.precision),e.types&&(r("string"==typeof e.types,"types option must be string"),s.types=e.types),s.longitude=n(t.longitude,u),s.latitude=n(t.latitude,u),this.client({path:i.API_GEOCODING_REVERSE,params:s,callback:o})},e.exports=s},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],13:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=r("MapboxMatching");i.prototype.matching=function(t,e,r){void 0===r&&"function"==typeof e&&(r=e,e={}),n("object"==typeof t,"trace must be an object"),n("object"==typeof e,"options must be an object");var i="mapbox.driving",s=4,a="geojson";return void 0!==e.gps_precision&&(n("number"==typeof e.gps_precision,"gps_precision must be a number"),s=e.gps_precision),e.profile&&(n("string"==typeof e.profile,"profile option must be string"),i=e.profile),e.geometry&&(n("string"==typeof e.geometry,"geometry option must be string"),a=e.geometry),this.client({path:o.API_MATCHING,params:{profile:i,geometry:a,gps_precision:s},method:"post",entity:t,callback:r})},e.exports=i},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],14:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../format_points"),o=t("../make_service"),i=t("../constants"),s=o("MapboxSurface");s.prototype.surface=function(t,e,o,s,a,u){void 0===u&&"function"==typeof a&&(u=a,a={}),n("string"==typeof t,"mapid must be a string"),n("string"==typeof e,"layer must be a string"),n(Array.isArray(o),"fields must be an array of strings"),n(Array.isArray(s)||"string"==typeof s,"path must be an array of objects or a string"),n("object"==typeof a,"options must be an object");var c=!0,p=!1;void 0!==a.interpolate&&(n("boolean"==typeof a.interpolate,"interpolate must be a boolean"),c=a.interpolate),void 0!==a.geojson&&(n("boolean"==typeof a.geojson,"geojson option must be boolean"),p=a.geojson);var f={geojson:p,layer:e,mapid:t,fields:o.join(","),interpolate:c};return Array.isArray(s)?f.points=r(s):f.encoded_polyline=s,void 0!==a.zoom&&(n("number"==typeof a.zoom,"zoom must be a number"),f.z=a.zoom),this.client({path:i.API_SURFACE,params:f,callback:u})},e.exports=s},{"../../vendor/invariant":48,"../constants":3,"../format_points":4,"../make_service":7}],15:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=e.exports=r("MapboxTilestats");i.prototype.getTilestats=function(t,e){n("string"==typeof t,"tileset must be a string");var r=t.split(".")[0];return r===t&&(r=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:r,tileset:t},callback:e})},i.prototype.putTilestats=function(t,e,r){n("string"==typeof t,"tileset must be a string");var i=t.split(".")[0];return i===t&&(i=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:i,tileset:t},entity:e,method:"put",callback:r})}},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],16:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=e.exports=r("MapboxUploads");i.prototype.listUploads=function(t){return this.client({path:o.API_UPLOADS,params:{owner:this.owner},callback:t})},i.prototype.createUploadCredentials=function(t){return this.client({path:o.API_UPLOAD_CREDENTIALS,params:{owner:this.owner},callback:t})},i.prototype.createUpload=function(t,e){return n("object"==typeof t,"options must be an object"),this.client({path:o.API_UPLOADS,params:{owner:this.owner},entity:t,callback:e})},i.prototype.readUpload=function(t,e){return n("string"==typeof t,"upload must be a string"),this.client({path:o.API_UPLOAD,params:{owner:this.owner,upload:t},callback:e})},i.prototype.deleteUpload=function(t,e){return n("string"==typeof t,"upload must be a string"),this.client({method:"delete",path:o.API_UPLOAD,params:{owner:this.owner,upload:t},callback:e})}},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],17:[function(t,e){function n(t){return{url:t.url,status:t.status?t.status.code:void 0,headers:t.headers,entity:t.entity,error:t.error,callback:t.request.callback}}var r=t("rest/interceptor"),o=r({response:n});e.exports=o},{"rest/interceptor":24}],18:[function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(p===setTimeout)return setTimeout(t,0);if((p===n||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function i(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function s(){m&&d&&(m=!1,d.length?h=d.concat(h):y=-1,h.length&&a())}function a(){if(!m){var t=o(s);m=!0;for(var e=h.length;e;){for(d=h,h=[];++y<e;)d&&d[y].run();y=-1,e=h.length}d=null,m=!1,i(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,f,l=e.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:n}catch(t){p=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(t){f=r}}();var d,h=[],m=!1,y=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.push(new u(t,e)),1!==h.length||m||o(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=c,l.addListener=c,l.once=c,l.off=c,l.removeListener=c,l.removeAllListeners=c,l.emit=c,l.binding=function(){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],19:[function(t,e){"use strict";function n(t,e){var n,r,o,i,a;if(n=t,o={},e){for(r in e)a=new RegExp("\\{"+r+"\\}"),a.test(n)?n=n.replace(a,encodeURIComponent(e[r]),"g"):o[r]=e[r];i=s.write(o),i&&(n+=-1===n.indexOf("?")?"?":"&",n+=i)}return n}function r(t,e){return 0===t.indexOf(e)}function o(t,e){return this instanceof o?void(t instanceof o?(this._template=t.template,this._params=i({},this._params,e)):(this._template=(t||"").toString(),this._params=e||{})):new o(t,e)}var i,s,a,u,c,p;i=t("./util/mixin"),s=t("./mime/type/application/x-www-form-urlencoded"),u=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?(\/[^?#]*)?(\?[^#]*)?(#\S*)?/i,c=/^([a-z][a-z0-9\-\+\.]*:\/\/|\/)/i,p=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?\//i,o.prototype={append:function(t,e){return new o(this._template+t,i({},this._params,e))},fullyQualify:function(){if("undefined"==typeof location)return this;if(this.isFullyQualified())return this;var t=this._template;return r(t,"//")?t=a.protocol+t:r(t,"/")?t=a.origin+t:this.isAbsolute()||(t=a.origin+a.pathname.substring(0,a.pathname.lastIndexOf("/")+1)),-1===t.indexOf("/",8)&&(t+="/"),new o(t,this._params)},isAbsolute:function(){return c.test(this.build())},isFullyQualified:function(){return p.test(this.build())},isCrossOrigin:function(){if(!a)return!0;var t=this.parts();return t.protocol!==a.protocol||t.hostname!==a.hostname||t.port!==a.port},parts:function(){var t,e;return t=this.fullyQualify().build().match(u),e={href:t[0],protocol:t[1],host:t[3]||"",hostname:t[4]||"",port:t[6],pathname:t[7]||"",search:t[8]||"",hash:t[9]||""},e.origin=e.protocol+"//"+e.host,e.port=e.port||("https:"===e.protocol?"443":"http:"===e.protocol?"80":""),e},build:function(t){return n(this._template,i({},this._params,t))},toString:function(){return this.build()}},a="undefined"!=typeof location?new o(location.href).parts():void 0,e.exports=o},{"./mime/type/application/x-www-form-urlencoded":35,"./util/mixin":42}],20:[function(t,e){"use strict";var n=t("./client/default"),r=t("./client/xhr");n.setPlatformDefaultClient(r),e.exports=n},{"./client/default":22,"./client/xhr":23}],21:[function(t,e){"use strict";e.exports=function(t,e){return e&&(t.skip=function(){return e}),t.wrap=function(e,n){return e(t,n)},t.chain=function(){return"undefined"!=typeof console&&console.log("rest.js: client.chain() is deprecated, use client.wrap() instead"),t.wrap.apply(this,arguments)},t}},{}],22:[function(t,e){"use strict";function n(){return o.apply(void 0,arguments)}var r,o,i;r=t("../client"),"function"!=typeof Promise&&console&&console.log&&console.log("An ES6 Promise implementation is required to use rest.js. See https://github.com/cujojs/when/blob/master/docs/es6-promise-shim.md for using when.js as a Promise polyfill."),n.setDefaultClient=function(t){o=t},n.getDefaultClient=function(){return o},n.resetDefaultClient=function(){o=i},n.setPlatformDefaultClient=function(t){if(i)throw new Error("Unable to redefine platformDefaultClient");o=i=t},e.exports=r(n)},{"../client":21}],23:[function(t,e){"use strict";function n(t){var e={};return t?(t.trim().split(a).forEach(function(t){var n,r,i;n=t.indexOf(":"),r=o(t.substring(0,n).trim()),i=t.substring(n+1).trim(),e[r]?Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]:e[r]=i}),e):e}function r(t,e){return Object.keys(e||{}).forEach(function(n){if(e.hasOwnProperty(n)&&n in t)try{t[n]=e[n]}catch(r){}}),t}var o,i,s,a;o=t("../util/normalizeHeaderName"),i=t("../util/responsePromise"),s=t("../client"),a=/[\r|\n]+/,e.exports=s(function(t){return i.promise(function(e,o){var i,s,a,u,c,p,f,l;if(t="string"==typeof t?{path:t}:t||{},f={request:t},t.canceled)return f.error="precanceled",void o(f);if(l=t.engine||XMLHttpRequest,!l)return void o({request:t,error:"xhr-not-available"});c=t.entity,t.method=t.method||(c?"POST":"GET"),s=t.method,a=f.url=t.path||"";try{i=f.raw=new l,r(i,t.mixin),i.open(s,a,!0),r(i,t.mixin),u=t.headers;for(p in u)("Content-Type"!==p||"multipart/form-data"!==u[p])&&i.setRequestHeader(p,u[p]);t.canceled=!1,t.cancel=function(){t.canceled=!0,i.abort(),o(f)},i.onreadystatechange=function(){t.canceled||i.readyState===(l.DONE||4)&&(f.status={code:i.status,text:i.statusText},f.headers=n(i.getAllResponseHeaders()),f.entity=i.responseText,1223===f.status.code&&(f.status.code=204),f.status.code>0?e(f):setTimeout(function(){e(f)},0))};try{i.onerror=function(){f.error="loaderror",o(f)}}catch(d){}i.send(c)}catch(d){f.error="loaderror",o(f)}})})},{"../client":21,"../util/normalizeHeaderName":43,"../util/responsePromise":44}],24:[function(t,e){"use strict";function n(t){return t}function r(t){return t}function o(t){return t}function i(t){return this instanceof i?void u(this,t):new i(t)}function s(t){var e,s,u,f;return t=t||{},e=t.init||n,s=t.request||r,u=t.success||t.response||o,f=t.error||function(){return Promise.resolve((t.response||o).apply(this,arguments)).then(Promise.reject.bind(Promise))},function(n,r){function o(t){var e,a;return e={},a={arguments:Array.prototype.slice.call(arguments),client:o},t="string"==typeof t?{path:t}:t||{},t.originator=t.originator||o,c(s.call(e,t,r,a),function(t){var o,s,c;return c=n,t instanceof i&&(s=t.abort,c=t.client||c,o=t.response,t=t.request),o=o||Promise.resolve(t).then(function(t){return Promise.resolve(c(t)).then(function(t){return u.call(e,t,r,a)},function(t){return f.call(e,t,r,a)})}),s?Promise.race([o,s]):o},function(e){return Promise.reject({request:t,error:e})})}return"object"==typeof n&&(r=n),"function"!=typeof n&&(n=t.client||a),r=e(r||{}),p(o,n)}}var a,u,c,p;a=t("./client/default"),u=t("./util/mixin"),c=t("./util/responsePromise"),p=t("./client"),s.ComplexRequest=i,e.exports=s},{"./client":21,"./client/default":22,"./util/mixin":42,"./util/responsePromise":44}],25:[function(t,e){"use strict";var n,r,o;n=t("../interceptor"),r=t("../util/mixin"),o=function(){function t(t,e,n){(t in e||t in n)&&(e[t]=r({},n[t],e[t]))}function e(t,e,n){t in n&&!(t in e)&&(e[t]=n[t])}var n={method:e,path:e,params:t,headers:t,entity:e,mixin:t};return function(t,e){for(var r in n)n[r](r,t,e);return t}}(),e.exports=n({request:function(t,e){return o(t,e)}})},{"../interceptor":24,"../util/mixin":42}],26:[function(t,e){"use strict";var n;n=t("../interceptor"),e.exports=n({init:function(t){return t.code=t.code||400,t},response:function(t,e){return t.status&&t.status.code>=e.code?Promise.reject(t):t}})},{"../interceptor":24}],27:[function(t,e){"use strict";var n,r,o,i,s,a;n=t("../interceptor"),r=t("../mime"),o=t("../mime/registry"),a=t("../util/attempt"),i={read:function(t){return t},write:function(t){return t}},s={read:function(){throw"No read method found on converter"},write:function(){throw"No write method found on converter"}},e.exports=n({init:function(t){return t.registry=t.registry||o,t},request:function(t,e){var n,o;return o=t.headers||(t.headers={}),n=r.parse(o["Content-Type"]||e.mime||"text/plain"),o.Accept=o.Accept||e.accept||n.raw+", application/json;q=0.8, text/plain;q=0.5, */*;q=0.2","entity"in t?(o["Content-Type"]=n.raw,e.registry.lookup(n)["catch"](function(){if(e.permissive)return i;throw"mime-unknown"}).then(function(r){var o=e.client||t.originator,i=r.write||s.write;return a(i.bind(void 0,t.entity,{client:o,request:t,mime:n,registry:e.registry}))["catch"](function(){throw"mime-serialization"}).then(function(e){return t.entity=e,t})})):t},response:function(t,e){if(!(t.headers&&t.headers["Content-Type"]&&t.entity))return t;var n=r.parse(t.headers["Content-Type"]);return e.registry.lookup(n)["catch"](function(){return i}).then(function(r){var o=e.client||t.request&&t.request.originator,i=r.read||s.read;return a(i.bind(void 0,t.entity,{client:o,response:t,mime:n,registry:e.registry}))["catch"](function(e){throw t.error="mime-deserialization",t.cause=e,t}).then(function(e){return t.entity=e,t})})}})},{"../interceptor":24,"../mime":31,"../mime/registry":32,"../util/attempt":38}],28:[function(t,e){"use strict";var n,r;n=t("../interceptor"),r=t("../UrlBuilder"),e.exports=n({init:function(t){return t.params=t.params||{},t},request:function(t,e){var n,o;return n=t.path||"",o=t.params||{},t.path=new r(n,e.params).append("",o).build(),delete t.params,t}})},{"../UrlBuilder":19,"../interceptor":24}],29:[function(t,e){"use strict";function n(t,e){return 0===t.indexOf(e)}function r(t,e){return t.lastIndexOf(e)+e.length===t.length}var o,i;o=t("../interceptor"),i=t("../UrlBuilder"),e.exports=o({request:function(t,e){var o;return e.prefix&&!new i(t.path).isFullyQualified()&&(o=e.prefix,t.path&&(r(o,"/")||n(t.path,"/")||(o+="/"),o+=t.path),t.path=o),t}})},{"../UrlBuilder":19,"../interceptor":24}],30:[function(t,e){"use strict";var n,r,o;n=t("../interceptor"),r=t("../util/uriTemplate"),o=t("../util/mixin"),e.exports=n({init:function(t){return t.params=t.params||{},t.template=t.template||"",t},request:function(t,e){var n,i;return n=t.path||e.template,i=o({},t.params,e.params),t.path=r.expand(n,i),delete t.params,t}})},{"../interceptor":24,"../util/mixin":42,"../util/uriTemplate":46}],31:[function(t,e){"use strict";function n(t){var e,n;return e=t.split(";"),n=e[0].trim().split("+"),{raw:t,type:n[0],suffix:n[1]?"+"+n[1]:"",params:e.slice(1).reduce(function(t,e){return e=e.split("="),t[e[0].trim()]=e[1]?e[1].trim():void 0,t},{})}}e.exports={parse:n}},{}],32:[function(t,e){"use strict";function n(t){this.lookup=function(e){var n;return n="string"==typeof e?r.parse(e):e,t[n.raw]?t[n.raw]:t[n.type+n.suffix]?t[n.type+n.suffix]:t[n.type]?t[n.type]:t[n.suffix]?t[n.suffix]:Promise.reject(new Error('Unable to locate converter for mime "'+n.raw+'"'))},this.delegate=function(t){return{read:function(){var e=arguments;return this.lookup(t).then(function(t){return t.read.apply(this,e)}.bind(this))}.bind(this),write:function(){var e=arguments;return this.lookup(t).then(function(t){return t.write.apply(this,e)}.bind(this))}.bind(this)}},this.register=function(e,n){return t[e]=Promise.resolve(n),t[e]},this.child=function(){return new n(Object.create(t))}}var r,o;r=t("../mime"),o=new n({}),o.register("application/hal",t("./type/application/hal")),o.register("application/json",t("./type/application/json")),o.register("application/x-www-form-urlencoded",t("./type/application/x-www-form-urlencoded")),o.register("multipart/form-data",t("./type/multipart/form-data")),o.register("text/plain",t("./type/text/plain")),o.register("+json",o.delegate("application/json")),e.exports=o},{"../mime":31,"./type/application/hal":33,"./type/application/json":34,"./type/application/x-www-form-urlencoded":35,"./type/multipart/form-data":36,"./type/text/plain":37}],33:[function(t,e){"use strict";function n(t,e,n){Object.defineProperty(t,e,{value:n,configurable:!0,enumerable:!1,writeable:!0})}var r,o,i,s,a;r=t("../../../interceptor/pathPrefix"),o=t("../../../interceptor/template"),i=t("../../../util/find"),s=t("../../../util/lazyPromise"),a=t("../../../util/responsePromise"),e.exports={read:function(t,e){function u(t,e){(e&&p&&p.warn||p.log)&&(p.warn||p.log).call(p,"Relationship '"+t+"' is deprecated, see "+e)}var c,p;return e=e||{},c=e.client,p=e.console||p,e.registry.lookup(e.mime.suffix).then(function(n){return n.read(t,e)}).then(function(t){return i.findProperties(t,"_embedded",function(t,e,r){Object.keys(t).forEach(function(r){if(!(r in e)){var o=a({entity:t[r]});n(e,r,o)}}),n(e,r,t)}),i.findProperties(t,"_links",function(t,e,i){Object.keys(t).forEach(function(r){var i=t[r];r in e||n(e,r,a.make(s(function(){return i.deprecation&&u(r,i.deprecation),i.templated===!0?o(c)({path:i.href}):c({path:i.href})})))}),n(e,i,t),n(e,"clientFor",function(e,n){var i=t[e];if(!i)throw new Error("Unknown relationship: "+e);return i.deprecation&&u(e,i.deprecation),i.templated===!0?o(n||c,{template:i.href}):r(n||c,{prefix:i.href})}),n(e,"requestFor",function(t,e,n){var r=this.clientFor(t,n);return r(e)})}),t})},write:function(t,e){return e.registry.lookup(e.mime.suffix).then(function(n){return n.write(t,e)})}}},{"../../../interceptor/pathPrefix":29,"../../../interceptor/template":30,"../../../util/find":40,"../../../util/lazyPromise":41,"../../../util/responsePromise":44}],34:[function(t,e){"use strict";function n(t,e){return{read:function(e){return JSON.parse(e,t)},write:function(t){return JSON.stringify(t,e)},extend:n}}e.exports=n()},{}],35:[function(t,e){"use strict";function n(t){return t=encodeURIComponent(t),t.replace(i,"+")}function r(t){return t=t.replace(s," "),decodeURIComponent(t)}function o(t,e,r){return Array.isArray(r)?r.forEach(function(n){t=o(t,e,n)}):(t.length>0&&(t+="&"),t+=n(e),void 0!==r&&null!==r&&(t+="="+n(r))),t}var i,s;i=/%20/g,s=/\+/g,e.exports={read:function(t){var e={};return t.split("&").forEach(function(t){var n,o,i;n=t.split("="),o=r(n[0]),i=2===n.length?r(n[1]):null,o in e?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(i)):e[o]=i}),e},write:function(t){var e="";return Object.keys(t).forEach(function(n){e=o(e,n,t[n])}),e}}},{}],36:[function(t,e){"use strict";function n(t){return t&&1===t.nodeType&&"FORM"===t.tagName}function r(t){var e,n=new FormData;for(var r in t)t.hasOwnProperty(r)&&(e=t[r],
e instanceof File?n.append(r,e,e.name):e instanceof Blob?n.append(r,e):n.append(r,String(e)));return n}e.exports={write:function(t){if("undefined"==typeof FormData)throw new Error("The multipart/form-data mime serializer requires FormData support");if(t instanceof FormData)return t;if(n(t))return new FormData(t);if("object"==typeof t&&null!==t)return r(t);throw new Error("Unable to create FormData from object "+t)}}},{}],37:[function(t,e){"use strict";e.exports={read:function(t){return t},write:function(t){return t.toString()}}},{}],38:[function(t,e){"use strict";function n(t){try{return Promise.resolve(t())}catch(e){return Promise.reject(e)}}e.exports=n},{}],39:[function(t,e){"use strict";function n(t){if(/([^\u0000-\u00ff])/.test(t))throw new Error("Can't base64 encode non-ASCII characters.");for(var e,n,r,i=0,s=[];i<t.length;){switch(e=t.charCodeAt(i),r=i%3){case 0:s.push(o.charAt(e>>2));break;case 1:s.push(o.charAt((3&n)<<4|e>>4));break;case 2:s.push(o.charAt((15&n)<<2|e>>6)),s.push(o.charAt(63&e))}n=e,i+=1}return 0===r?(s.push(o.charAt((3&n)<<4)),s.push("==")):1===r&&(s.push(o.charAt((15&n)<<2)),s.push("=")),s.join("")}function r(t){if(t=t.replace(/\s/g,""),!/^[a-z0-9\+\/\s]+\={0,2}$/i.test(t)||t.length%4>0)throw new Error("Not a base64-encoded string.");var e,n,r,i=0,s=[];for(t=t.replace(/\=/g,"");i<t.length;){switch(e=o.indexOf(t.charAt(i)),r=i%4){case 1:s.push(String.fromCharCode(n<<2|e>>4));break;case 2:s.push(String.fromCharCode((15&n)<<4|e>>2));break;case 3:s.push(String.fromCharCode((3&n)<<6|e))}n=e,i+=1}return s.join("")}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports={encode:n,decode:r}},{}],40:[function(t,e){"use strict";e.exports={findProperties:function n(t,e,r){"object"==typeof t&&null!==t&&(e in t&&r(t[e],t,e),Object.keys(t).forEach(function(o){n(t[o],e,r)}))}}},{}],41:[function(t,e){"use strict";function n(t){var e,n,o,i;return e=!1,o=new Promise(function(t,e){n={resolve:t,reject:e}}),i=o.then,o.then=function(){return e||(e=!0,r(t).then(n.resolve,n.reject)),i.apply(o,arguments)},o}var r=t("./attempt");e.exports=n},{"./attempt":38}],42:[function(t,e){"use strict";function n(t){var e,n,o,i;for(t||(t={}),e=1,n=arguments.length;n>e;e+=1){o=arguments[e];for(i in o)i in t&&(t[i]===o[i]||i in r&&r[i]===o[i])||(t[i]=o[i])}return t}var r={};e.exports=n},{}],43:[function(t,e){"use strict";function n(t){return t.toLowerCase().split("-").map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}).join("-")}e.exports=n},{}],44:[function(t,e){"use strict";function n(t,e){return t.then(function(t){return t&&t[e]},function(t){return Promise.reject(t&&t[e])})}function r(){return n(this,"entity")}function o(){return n(n(this,"status"),"code")}function i(){return n(this,"headers")}function s(t){return t=p(t),n(this.headers(),t)}function a(t){return t=[].concat(t),u(t.reduce(function(t,e){return t.then(function(t){if("string"==typeof e&&(e={rel:e}),"function"!=typeof t.entity.clientFor)throw new Error("Hypermedia response expected");var n=t.entity.clientFor(e.rel);return n({params:e.params})})},this))}function u(t){return t.status=o,t.headers=i,t.header=s,t.entity=r,t.follow=a,t}function c(t,e,n){return u(Promise.resolve(t).then(e,n))}var p=t("./normalizeHeaderName");c.make=u,c.reject=function(t){return u(Promise.reject(t))},c.promise=function(t){return u(new Promise(t))},e.exports=c},{"./normalizeHeaderName":43}],45:[function(t,e){"use strict";function n(t,e){if("string"!=typeof t)throw new Error("String required for URL encoding");return t.split("").map(function(t){if(e.hasOwnProperty(t))return t;var n=t.charCodeAt(0);if(127>=n){var r=n.toString(16).toUpperCase();return"%"+(r.length%2===1?"0":"")+r}return encodeURIComponent(t).toUpperCase()}).join("")}function r(t){return t=t||i.unreserved,function(e){return n(e,t)}}function o(t){return decodeURIComponent(t)}var i;i=function(){var t={alpha:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",digit:"0123456789"};return t.genDelims=":/?#[]@",t.subDelims="!$&'()*+,;=",t.reserved=t.genDelims+t.subDelims,t.unreserved=t.alpha+t.digit+"-._~",t.url=t.reserved+t.unreserved,t.scheme=t.alpha+t.digit+"+-.",t.userinfo=t.unreserved+t.subDelims+":",t.host=t.unreserved+t.subDelims,t.port=t.digit,t.pchar=t.unreserved+t.subDelims+":@",t.segment=t.pchar,t.path=t.segment+"/",t.query=t.pchar+"/?",t.fragment=t.pchar+"/?",Object.keys(t).reduce(function(e,n){return e[n]=t[n].split("").reduce(function(t,e){return t[e]=!0,t},{}),e},{})}(),e.exports={decode:o,encode:r(),encodeURL:r(i.url),encodeScheme:r(i.scheme),encodeUserInfo:r(i.userinfo),encodeHost:r(i.host),encodePort:r(i.port),encodePathSegment:r(i.segment),encodePath:r(i.path),encodeQuery:r(i.query),encodeFragment:r(i.fragment)}},{}],46:[function(t,e){"use strict";function n(t,e,n){return e.split(",").reduce(function(e,r){var o,s;if(o={},"*"===r.slice(-1)&&(r=r.slice(0,-1),o.explode=!0),a.test(r)){var u=a.exec(r);r=u[1],o.maxLength=parseInt(u[2])}return r=i.decode(r),s=n[r],void 0===s||null===s?e:(Array.isArray(s)?e=s.reduce(function(e,n){return e.length?(e+=o.explode?t.separator:",",t.named&&o.explode&&(e+=t.encoder(r),e+=n.length?"=":t.empty)):(e+=t.first,t.named&&(e+=t.encoder(r),e+=n.length?"=":t.empty)),e+=t.encoder(n)},e):"object"==typeof s?e=Object.keys(s).reduce(function(e,n){return e.length?e+=o.explode?t.separator:",":(e+=t.first,t.named&&!o.explode&&(e+=t.encoder(r),e+=s[n].length?"=":t.empty)),e+=t.encoder(n),e+=o.explode?"=":",",e+=t.encoder(s[n])},e):(s=String(s),o.maxLength&&(s=s.slice(0,o.maxLength)),e+=e.length?t.separator:t.first,t.named&&(e+=t.encoder(r),e+=s.length?"=":t.empty),e+=t.encoder(s)),e)},"")}function r(t,e){var r;if(r=s[t.slice(0,1)],r?t=t.slice(1):r=s[""],r.reserved)throw new Error("Reserved expression operations are not supported");return n(r,t,e)}function o(t,e){var n,o,i;for(i="",o=0;;){if(n=t.indexOf("{",o),-1===n){i+=t.slice(o);break}i+=t.slice(o,n),o=t.indexOf("}",n)+1,i+=r(t.slice(n+1,o-1),e)}return i}var i,s,a;i=t("./uriEncoder"),a=/^([^:]*):([0-9]+)$/,s={"":{first:"",separator:",",named:!1,empty:"",encoder:i.encode},"+":{first:"",separator:",",named:!1,empty:"",encoder:i.encodeURL},"#":{first:"#",separator:",",named:!1,empty:"",encoder:i.encodeURL},".":{first:".",separator:".",named:!1,empty:"",encoder:i.encode},"/":{first:"/",separator:"/",named:!1,empty:"",encoder:i.encode},";":{first:";",separator:";",named:!0,empty:"",encoder:i.encode},"?":{first:"?",separator:"&",named:!0,empty:"=",encoder:i.encode},"&":{first:"&",separator:"&",named:!0,empty:"=",encoder:i.encode},"=":{reserved:!0},",":{reserved:!0},"!":{reserved:!0},"@":{reserved:!0},"|":{reserved:!0}},e.exports={expand:o}},{"./uriEncoder":45}],47:[function(t,e){var n=e.exports=function(t,e){if(e||(e=16),void 0===t&&(t=128),0>=t)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(e),o=2;r===1/0;o*=2)r=Math.log(Math.pow(2,t/o))/Math.log(e)*o;for(var i=r-Math.floor(r),s="",o=0;o<Math.floor(r);o++){var a=Math.floor(Math.random()*e).toString(e);s=a+s}if(i){var u=Math.pow(e,i),a=Math.floor(Math.random()*u).toString(e);s=a+s}var c=parseInt(s,e);return c!==1/0&&c>=Math.pow(2,t)?n(t,e):s}},{}],48:[function(t,e){(function(t){"use strict";var n=t.env.NODE_ENV,r=function(t,e,r,o,i,s,a,u){if("production"!==n&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,o,i,s,a,u],f=0;c=new Error(e.replace(/%s/g,function(){return p[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};e.exports=r}).call(this,t("_process"))},{_process:18}],49:[function(e,n,r){(function(o,i){!function(e){"object"==typeof r?n.exports=e():"function"==typeof t&&t.amd?t(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof i?i.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){var t;return function n(t,r,o){function i(a,u){if(!r[a]){if(!t[a]){var c="function"==typeof e&&e;if(!u&&c)return c(a,!0);if(s)return s(a,!0);throw new Error("Cannot find module '"+a+"'")}var p=r[a]={exports:{}};t[a][0].call(p.exports,function(e){var n=t[a][1][e];return i(n?n:e)},p,p.exports,n,t,r,o)}return r[a].exports}for(var s="function"==typeof e&&e,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(t,e){var n=t("../lib/decorators/unhandledRejection"),r=n(t("../lib/Promise"));e.exports="undefined"!=typeof i?i.Promise=r:"undefined"!=typeof self?self.Promise=r:r},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":4}],2:[function(e,n){!function(t){"use strict";t(function(t){var e=t("./makePromise"),n=t("./Scheduler"),r=t("./env").asap;return e({scheduler:new n(r)})})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"./Scheduler":3,"./env":5,"./makePromise":7}],3:[function(e,n){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var e=this;this.drain=function(){e._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t<this._queueLen;++t)this._queue[t].run(),this._queue[t]=void 0;for(this._queueLen=0,this._running=!1,t=0;t<this._afterQueueLen;++t)this._afterQueue[t].run(),this._afterQueue[t]=void 0;this._afterQueueLen=0},t})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],4:[function(e,n){!function(t){"use strict";t(function(t){function e(t){throw t}function n(){}var r=t("../env").setTimer,o=t("../format");return function(t){function i(t){t.handled||(d.push(t),p("Potentially unhandled rejection ["+t.id+"] "+o.formatError(t.value)))}function s(t){var e=d.indexOf(t);e>=0&&(d.splice(e,1),f("Handled previous rejection ["+t.id+"] "+o.formatObject(t.value)))}function a(t,e){l.push(t,e),null===h&&(h=r(u,0))}function u(){for(h=null;l.length>0;)l.shift()(l.shift())}var c,p=n,f=n;"undefined"!=typeof console&&(c=console,p="undefined"!=typeof c.error?function(t){c.error(t)}:function(t){c.log(t)},f="undefined"!=typeof c.info?function(t){c.info(t)}:function(t){c.log(t)}),t.onPotentiallyUnhandledRejection=function(t){a(i,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){a(s,t)},t.onFatalRejection=function(t){a(e,t.value)};var l=[],d=[],h=null;return t}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"../env":5,"../format":6}],5:[function(e,n){!function(t){"use strict";t(function(t){function e(){return"undefined"!=typeof o&&"[object process]"===Object.prototype.toString.call(o)}function n(){return"function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver}function r(t){function e(){var t=n;n=void 0,t()}var n,r=document.createTextNode(""),o=new t(e);o.observe(r,{characterData:!0});var i=0;return function(t){n=t,r.data=i^=1}}var i,s="undefined"!=typeof setTimeout&&setTimeout,a=function(t,e){return setTimeout(t,e)},u=function(t){return clearTimeout(t)},c=function(t){return s(t,0)};if(e())c=function(t){return o.nextTick(t)};else if(i=n())c=r(i);else if(!s){var p=t,f=p("vertx");a=function(t,e){return f.setTimer(e,t)},u=f.cancelTimer,c=f.runOnLoop||f.runOnContext}return{setTimer:a,clearTimer:u,asap:c}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{}],6:[function(e,n){!function(t){"use strict";t(function(){function t(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"}function e(t){var e=String(t);return"[object Object]"===e&&"undefined"!=typeof JSON&&(e=n(t,e)),e}function n(t,e){try{return JSON.stringify(t)}catch(n){return e}}return{formatError:t,formatObject:e,tryStringify:n}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],7:[function(e,n){!function(t){"use strict";t(function(){return function(t){function e(t,e){this._handler=t===w?e:n(t)}function n(t){function e(t){o.resolve(t)}function n(t){o.reject(t)}function r(t){o.notify(t)}var o=new _;try{t(e,n,r)}catch(i){n(i)}return o}function r(t){return U(t)?t:new e(w,new A(v(t)))}function i(t){return new e(w,new A(new E(t)))}function s(){return tt}function a(){return new e(w,new _)}function u(t,e){var n=new _(t.receiver,t.join().context);return new e(w,n)}function c(t){return f(Y,null,t)}function p(t,e){return f(F,t,e)}function f(t,n,r){function o(e,o,s){s.resolved||l(r,i,e,t(n,o,e),s)}function i(t,e,n){p[t]=e,0===--c&&n.become(new j(p))}for(var s,a="function"==typeof n?o:i,u=new _,c=r.length>>>0,p=new Array(c),f=0;f<r.length&&!u.resolved;++f)s=r[f],void 0!==s||f in r?l(r,a,f,s,u):--c;return 0===c&&u.become(new j(p)),new e(w,u)}function l(t,e,n,r,o){if(L(r)){var i=b(r),s=i.state();0===s?i.fold(e,n,void 0,o):s>0?e(n,i.value,o):(o.become(i),d(t,n+1,i))}else e(n,r,o)}function d(t,e,n){for(var r=e;r<t.length;++r)h(v(t[r]),n)}function h(t,e){if(t!==e){var n=t.state();0===n?t.visit(t,void 0,t._unreport):0>n&&t._unreport()}}function m(t){return"object"!=typeof t||null===t?i(new TypeError("non-iterable passed to race()")):0===t.length?s():1===t.length?r(t[0]):y(t)}function y(t){var n,r,o,i=new _;for(n=0;n<t.length;++n)if(r=t[n],void 0!==r||n in t){if(o=v(r),0!==o.state()){i.become(o),d(t,n+1,o);break}o.visit(i,i.resolve,i.reject)}return new e(w,i)}function v(t){return U(t)?t._handler.join():L(t)?g(t):new j(t)}function b(t){return U(t)?t._handler.join():g(t)}function g(t){try{var e=t.then;return"function"==typeof e?new T(e,t):new j(t)}catch(n){return new E(n)}}function w(){}function x(){}function _(t,n){e.createContext(this,n),this.consumers=void 0,this.receiver=t,this.handler=void 0,this.resolved=!1}function A(t){this.handler=t}function T(t,e){_.call(this),J.enqueue(new C(t,e,this))}function j(t){e.createContext(this),this.value=t}function E(t){e.createContext(this),this.id=++$,this.value=t,this.handled=!1,this.reported=!1,this._report()}function P(t,e){this.rejection=t,this.context=e}function S(t){this.rejection=t}function I(){return new E(new TypeError("Promise cycle"))}function k(t,e){this.continuation=t,this.handler=e}function D(t,e){this.handler=e,this.value=t}function C(t,e,n){this._then=t,this.thenable=e,this.resolver=n}function O(t,e,n,r,o){try{t.call(e,n,r,o)}catch(i){r(i)}}function R(t,e,n,r){this.f=t,this.z=e,this.c=n,this.to=r,this.resolver=K,this.receiver=this}function U(t){return t instanceof e}function L(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function q(t,n,r,o){return"function"!=typeof t?o.become(n):(e.enterContext(n),z(t,n.value,r,o),void e.exitContext())}function N(t,n,r,o,i){return"function"!=typeof t?i.become(r):(e.enterContext(r),H(t,n,r.value,o,i),void e.exitContext())}function M(t,n,r,o,i){return"function"!=typeof t?i.notify(n):(e.enterContext(r),Q(t,n,o,i),void e.exitContext())}function F(t,e,n){try{return t(e,n)}catch(r){return i(r)}}function z(t,e,n,r){try{r.become(v(t.call(n,e)))}catch(o){r.become(new E(o))}}function H(t,e,n,r,o){try{t.call(r,e,n,o)}catch(i){o.become(new E(i))}}function Q(t,e,n,r){try{r.notify(t.call(n,e))}catch(o){r.notify(o)}}function G(t,e){e.prototype=X(t.prototype),e.prototype.constructor=e}function Y(t,e){return e}function B(){}function W(){return"undefined"!=typeof o&&null!==o&&"function"==typeof o.emit?function(t,e){return"unhandledRejection"===t?o.emit(t,e.value,e):o.emit(t,e)}:"undefined"!=typeof self&&"function"==typeof CustomEvent?function(t,e,n){var r=!1;try{var o=new n("unhandledRejection");r=o instanceof n}catch(i){}return r?function(t,r){var o=new n(t,{detail:{reason:r.value,key:r},bubbles:!1,cancelable:!0});return!e.dispatchEvent(o)}:t}(B,self,CustomEvent):B}var J=t.scheduler,V=W(),X=Object.create||function(t){function e(){}return e.prototype=t,new e};e.resolve=r,e.reject=i,e.never=s,e._defer=a,e._handler=v,e.prototype.then=function(t,e,n){var r=this._handler,o=r.join().state();if("function"!=typeof t&&o>0||"function"!=typeof e&&0>o)return new this.constructor(w,r);var i=this._beget(),s=i._handler;return r.chain(s,r.receiver,t,e,n),i},e.prototype["catch"]=function(t){return this.then(void 0,t)},e.prototype._beget=function(){return u(this._handler,this.constructor)},e.all=c,e.race=m,e._traverse=p,e._visitRemaining=d,w.prototype.when=w.prototype.become=w.prototype.notify=w.prototype.fail=w.prototype._unreport=w.prototype._report=B,w.prototype._state=0,w.prototype.state=function(){return this._state},w.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},w.prototype.chain=function(t,e,n,r,o){this.when({resolver:t,receiver:e,fulfilled:n,rejected:r,progress:o})},w.prototype.visit=function(t,e,n,r){this.chain(K,t,e,n,r)},w.prototype.fold=function(t,e,n,r){this.when(new R(t,e,n,r))},G(w,x),x.prototype.become=function(t){t.fail()};var K=new x;G(w,_),_.prototype._state=0,_.prototype.resolve=function(t){this.become(v(t))},_.prototype.reject=function(t){this.resolved||this.become(new E(t))},_.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if(t=t.handler,t===this)return this.handler=I();return t},_.prototype.run=function(){var t=this.consumers,e=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n<t.length;++n)e.when(t[n])},_.prototype.become=function(t){this.resolved||(this.resolved=!0,this.handler=t,void 0!==this.consumers&&J.enqueue(this),void 0!==this.context&&t._report(this.context))},_.prototype.when=function(t){this.resolved?J.enqueue(new k(t,this.handler)):void 0===this.consumers?this.consumers=[t]:this.consumers.push(t)},_.prototype.notify=function(t){this.resolved||J.enqueue(new D(t,this))},_.prototype.fail=function(t){var e="undefined"==typeof t?this.context:t;this.resolved&&this.handler.join().fail(e)},_.prototype._report=function(t){this.resolved&&this.handler.join()._report(t)},_.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},G(w,A),A.prototype.when=function(t){J.enqueue(new k(t,this))},A.prototype._report=function(t){this.join()._report(t)},A.prototype._unreport=function(){this.join()._unreport()},G(_,T),G(w,j),j.prototype._state=1,j.prototype.fold=function(t,e,n,r){N(t,e,this,n,r)},j.prototype.when=function(t){q(t.fulfilled,this,t.receiver,t.resolver)};var $=0;G(w,E),E.prototype._state=-1,E.prototype.fold=function(t,e,n,r){r.become(this)},E.prototype.when=function(t){"function"==typeof t.rejected&&this._unreport(),q(t.rejected,this,t.receiver,t.resolver)},E.prototype._report=function(t){J.afterQueue(new P(this,t))},E.prototype._unreport=function(){this.handled||(this.handled=!0,J.afterQueue(new S(this)))},E.prototype.fail=function(t){this.reported=!0,V("unhandledRejection",this),e.onFatalRejection(this,void 0===t?this.context:t)},P.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,V("unhandledRejection",this.rejection)||e.onPotentiallyUnhandledRejection(this.rejection,this.context))},S.prototype.run=function(){this.rejection.reported&&(V("rejectionHandled",this.rejection)||e.onPotentiallyUnhandledRejectionHandled(this.rejection))},e.createContext=e.enterContext=e.exitContext=e.onPotentiallyUnhandledRejection=e.onPotentiallyUnhandledRejectionHandled=e.onFatalRejection=B;var Z=new w,tt=new e(w,Z);return k.prototype.run=function(){this.handler.join().when(this.continuation)},D.prototype.run=function(){var t=this.handler.consumers;if(void 0!==t)for(var e,n=0;n<t.length;++n)e=t[n],M(e.progress,this.value,this.handler,e.receiver,e.resolver)},C.prototype.run=function(){function t(t){r.resolve(t)}function e(t){r.reject(t)}function n(t){r.notify(t)}var r=this.resolver;O(this._then,this.thenable,t,e,n)},R.prototype.fulfilled=function(t){this.f.call(this.c,this.z,t,this.to)},R.prototype.rejected=function(t){this.to.reject(t)},R.prototype.progress=function(t){this.to.notify(t)},e}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}]},{},[1])(1)})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:18}],50:[function(t,e){function n(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)o.call(n,r)&&(t[r]=n[r])}return t}function r(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)o.call(n,r)&&(t[r]=n[r])}return t}e.exports.extendMutable=n,e.exports.extend=r;var o=Object.prototype.hasOwnProperty},{}]},{},[8])(8)});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.MapboxClient=t()}}(function(){var t;return function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var p=n[s]={exports:{}};t[s][0].call(p.exports,function(e){var n=t[s][1][e];return o(n?n:e)},p,p.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e){"use strict";"undefined"==typeof Promise&&t("../vendor/promise");var n=t("rest/interceptor"),r=n({success:function(t){var e=t&&t.callback;return"function"==typeof e&&e(null,t.entity,t),t},error:function(t){var e=t&&t.callback;if("function"==typeof e){var n=t.error||t.entity;"object"!=typeof n&&(n=new Error(n)),e(n)}return t}});e.exports=r},{"../vendor/promise":49,"rest/interceptor":24}],2:[function(t,e){"use strict";"undefined"==typeof Promise&&t("../vendor/promise");var n=t("rest"),r=t("./standard_response"),o=t("./callbackify");e.exports=function(e){return n.wrap(t("rest/interceptor/errorCode")).wrap(t("rest/interceptor/pathPrefix"),{prefix:e.endpoint}).wrap(t("rest/interceptor/mime"),{mime:"application/json"}).wrap(t("rest/interceptor/params")).wrap(t("rest/interceptor/defaultRequest"),{params:{access_token:e.accessToken}}).wrap(t("rest/interceptor/template")).wrap(r).wrap(o)}},{"../vendor/promise":49,"./callbackify":1,"./standard_response":17,rest:20,"rest/interceptor/defaultRequest":25,"rest/interceptor/errorCode":26,"rest/interceptor/mime":27,"rest/interceptor/params":28,"rest/interceptor/pathPrefix":29,"rest/interceptor/template":30}],3:[function(t,e){e.exports.DEFAULT_ENDPOINT="https://api.mapbox.com",e.exports.API_GEOCODING_FORWARD="/geocoding/v5/{dataset}/{query}.json{?proximity,country,types,bbox,limit}",e.exports.API_GEOCODING_REVERSE="/geocoding/v5/{dataset}/{longitude},{latitude}.json{?types,limit}",e.exports.API_DIRECTIONS="/v4/directions/{profile}/{encodedWaypoints}.json{?alternatives,instructions,geometry,steps}",e.exports.API_DISTANCE="/distances/v1/mapbox/{profile}",e.exports.API_SURFACE="/v4/surface/{mapid}.json{?layer,fields,points,geojson,interpolate,encoded_polyline}",e.exports.API_UPLOADS="/uploads/v1/{owner}",e.exports.API_UPLOAD="/uploads/v1/{owner}/{upload}",e.exports.API_UPLOAD_CREDENTIALS="/uploads/v1/{owner}/credentials",e.exports.API_MATCHING="/matching/v4/{profile}.json",e.exports.API_DATASET_DATASETS="/datasets/v1/{owner}{?limit,start,fresh}",e.exports.API_DATASET_DATASET="/datasets/v1/{owner}/{dataset}",e.exports.API_DATASET_FEATURES="/datasets/v1/{owner}/{dataset}/features{?reverse,limit,start}",e.exports.API_DATASET_FEATURE="/datasets/v1/{owner}/{dataset}/features/{id}",e.exports.API_TILESTATS_STATISTICS="/tilestats/v1/{owner}/{tileset}",e.exports.API_TILESTATS_LAYER="/tilestats/v1/{owner}/{tileset}/{layer}",e.exports.API_TILESTATS_ATTRIBUTE="/tilestats/v1/{owner}/{tileset}/{layer}/{attribute}",e.exports.API_STATIC="/v4/{mapid}{+overlay}/{+xyz}/{width}x{height}{+retina}{.format}{?access_token}",e.exports.API_STYLES_LIST="/styles/v1/{owner}",e.exports.API_STYLES_CREATE="/styles/v1/{owner}",e.exports.API_STYLES_READ="/styles/v1/{owner}/{styleid}",e.exports.API_STYLES_UPDATE="/styles/v1/{owner}/{styleid}",e.exports.API_STYLES_DELETE="/styles/v1/{owner}/{styleid}",e.exports.API_STYLES_EMBED="/styles/v1/{owner}/{styleid}.html{?zoomwheel,title,access_token}",e.exports.API_STYLES_SPRITE="/styles/v1/{owner}/{styleid}/sprite{+retina}{.format}",e.exports.API_STYLES_SPRITE_ADD_ICON="/styles/v1/{owner}/{styleid}/sprite/{iconName}",e.exports.API_STYLES_SPRITE_DELETE_ICON="/styles/v1/{owner}/{styleid}/sprite/{iconName}",e.exports.API_STYLES_FONT_GLYPH_RANGES="/fonts/v1/{owner}/{font}/{start}-{end}.pbf"},{}],4:[function(t,e){"use strict";function n(t){return t.map(function(t){return r(t),t.longitude+","+t.latitude}).join(";")}var r=t("./invariant_location");e.exports=n},{"./invariant_location":6}],5:[function(t,e){"use strict";function n(t){var e=t.split(".")[1];if(!e)return null;e=e.replace(/-/g,"+").replace(/_/g,"/");var n=e.length%4;if(2===n&&(e+="=="),3===n&&(e+="="),1===n||n>3)return null;try{return JSON.parse(r.decode(e)).u}catch(o){return null}}var r=t("rest/util/base64");e.exports=n},{"rest/util/base64":39}],6:[function(t,e){"use strict";function n(t){r("number"==typeof t.latitude&&"number"==typeof t.longitude,"location must be an object with numeric latitude & longitude properties"),void 0!==t.zoom&&r("number"==typeof t.zoom,"zoom must be numeric")}var r=t("../vendor/invariant");e.exports=n},{"../vendor/invariant":48}],7:[function(t,e){"use strict";function n(t){function e(e,n){this.name=t,r("string"==typeof e,"accessToken required to instantiate Mapbox client");var a=o.DEFAULT_ENDPOINT;void 0!==n&&(r("object"==typeof n,"options must be an object"),n.endpoint&&(r("string"==typeof n.endpoint,"endpoint must be a string"),a=n.endpoint),n.account&&(r("string"==typeof n.account,"account must be a string"),this.owner=n.account)),this.client=i({endpoint:a,accessToken:e}),this.accessToken=e,this.endpoint=a,this.owner=this.owner||s(e),r(!!this.owner,"could not determine account from provided accessToken")}return e}var r=t("../vendor/invariant"),o=t("./constants"),i=t("./client"),s=t("./get_user");e.exports=n},{"../vendor/invariant":48,"./client":2,"./constants":3,"./get_user":5}],8:[function(t,e){"use strict";var n=t("./make_service"),r=t("../vendor/xtend").extendMutable,o=t("./get_user"),i=t("./services/geocoding"),s=t("./services/surface"),a=t("./services/directions"),u=t("./services/uploads"),c=t("./services/matching"),p=t("./services/datasets"),f=t("./services/distance"),l=t("./services/tilestats"),d=n("MapboxClient");r(d.prototype,i.prototype,s.prototype,a.prototype,f.prototype,c.prototype,p.prototype,u.prototype,l.prototype),d.getUser=o,e.exports=d},{"../vendor/xtend":50,"./get_user":5,"./make_service":7,"./services/datasets":9,"./services/directions":10,"./services/distance":11,"./services/geocoding":12,"./services/matching":13,"./services/surface":14,"./services/tilestats":15,"./services/uploads":16}],9:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../../vendor/hat"),o=t("../make_service"),i=t("../constants"),s=e.exports=o("MapboxDatasets");s.prototype.listDatasets=function(t,e){return"function"==typeof t&&(e=t,t={}),this.client({path:i.API_DATASET_DATASETS,params:{limit:t.limit,start:t.start,fresh:t.fresh,owner:this.owner},callback:e})},s.prototype.createDataset=function(t,e){return void 0===e&&"function"==typeof t&&(e=t,t={}),n("object"==typeof t,"options must be an object"),this.client({path:i.API_DATASET_DATASETS,params:{owner:this.owner},entity:t,callback:e})},s.prototype.readDataset=function(t,e){return n("string"==typeof t,"dataset must be a string"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},callback:e})},s.prototype.updateDataset=function(t,e,r){return n("string"==typeof t,"dataset must be a string"),n("object"==typeof e,"options must be an object"),n(!!e.name||!!e.description,"options must include a name or a description"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},method:"patch",entity:e,callback:r})},s.prototype.deleteDataset=function(t,e){return n("string"==typeof t,"dataset must be a string"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},method:"delete",callback:e})},s.prototype.listFeatures=function(t,e,r){void 0===r&&"function"==typeof e&&(r=e,e={}),n("string"==typeof t,"dataset must be a string"),n("object"==typeof e,"options must be a object");var o={owner:this.owner,dataset:t};return e.reverse&&(n("boolean"==typeof e.reverse,"reverse option must be a boolean"),o.reverse=e.reverse),e.limit&&(n("number"==typeof e.limit,"limit option must be a number"),o.limit=e.limit),e.start&&(n("string"==typeof e.start,"start option must be a string"),o.start=e.start),this.client({path:i.API_DATASET_FEATURES,params:o,callback:r})},s.prototype.insertFeature=function(t,e,o){n("string"==typeof e,"dataset must be a string");var s=t.id||r();return n("string"==typeof s,"The GeoJSON feature's id must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:s},method:"put",entity:t,callback:o})},s.prototype.readFeature=function(t,e,r){return n("string"==typeof t,"id must be a string"),n("string"==typeof e,"dataset must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:t},callback:r})},s.prototype.deleteFeature=function(t,e,r){return n("string"==typeof t,"id must be a string"),n("string"==typeof e,"dataset must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:t},method:"delete",callback:r})}},{"../../vendor/hat":47,"../../vendor/invariant":48,"../constants":3,"../make_service":7}],10:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../format_points"),o=t("../make_service"),i=t("../constants"),s=o("MapboxDirections");s.prototype.getDirections=function(t,e,o){void 0===o&&"function"==typeof e?(o=e,e={}):void 0===e&&(e={}),n(Array.isArray(t),"waypoints must be an array"),n("object"==typeof e,"options must be an object");var s=r(t),a="mapbox.driving",u=!0,c=!0,p="geojson",f="text";return e.profile&&(n("string"==typeof e.profile,"profile option must be string"),a=e.profile),"undefined"!=typeof e.alternatives&&(n("boolean"==typeof e.alternatives,"alternatives option must be boolean"),u=e.alternatives),"undefined"!=typeof e.steps&&(n("boolean"==typeof e.steps,"steps option must be boolean"),c=e.steps),e.geometry&&(n("string"==typeof e.geometry,"geometry option must be string"),p=e.geometry),e.instructions&&(n("string"==typeof e.instructions,"instructions option must be string"),f=e.instructions),this.client({path:i.API_DIRECTIONS,params:{encodedWaypoints:s,profile:a,instructions:f,geometry:p,alternatives:u,steps:c},callback:o})},e.exports=s},{"../../vendor/invariant":48,"../constants":3,"../format_points":4,"../make_service":7}],11:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=r("MapboxDistance");i.prototype.getDistances=function(t,e,r){void 0===r&&"function"==typeof e&&(r=e,e={}),n(Array.isArray(t),"waypoints must be an array");var i="driving";return e.profile&&(n("string"==typeof e.profile,"profile option must be string"),i=e.profile),this.client({path:o.API_DISTANCE,params:{profile:i},entity:{coordinates:t},method:"post",callback:r})},e.exports=i},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],12:[function(t,e){"use strict";function n(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}var r=t("../../vendor/invariant"),o=t("../make_service"),i=t("../constants"),s=o("MapboxGeocoding"),a=5,u=3;s.prototype.geocodeForward=function(t,e,o){if(void 0===o&&"function"==typeof e&&(o=e,e={}),Array.isArray(t)){if("mapbox.places-permanent"!==e.dataset)throw new Error("Batch geocoding is only available with the mapbox.places-permanent endpoint. See https://mapbox.com/api-documentation/#batch-requests for details");t=t.join(";")}r("string"==typeof t,"query must be a string"),r("object"==typeof e,"options must be an object");var s={query:t,dataset:"mapbox.places"},a=u;return e.precision&&(r("number"==typeof e.precision,"precision option must be number"),a=e.precision),e.proximity&&(r("number"==typeof e.proximity.latitude&&"number"==typeof e.proximity.longitude,"proximity must be an object with numeric latitude & longitude properties"),s.proximity=n(e.proximity.longitude,a)+","+n(e.proximity.latitude,a)),e.bbox&&(r("number"==typeof e.bbox[0]&&"number"==typeof e.bbox[1]&&"number"==typeof e.bbox[2]&&"number"==typeof e.bbox[3]&&4===e.bbox.length,"bbox must be an array with numeric values in the form [minX, minY, maxX, maxY]"),s.bbox=e.bbox[0]+","+e.bbox[1]+","+e.bbox[2]+","+e.bbox[3]),e.limit&&(r("number"==typeof e.limit,"limit must be a number"),s.limit=e.limit),e.dataset&&(r("string"==typeof e.dataset,"dataset option must be string"),s.dataset=e.dataset),e.country&&(r("string"==typeof e.country,"country option must be string"),s.country=e.country),e.types&&(r("string"==typeof e.types,"types option must be string"),s.types=e.types),"boolean"==typeof e.autocomplete&&(r("boolean"==typeof e.autocomplete,"autocomplete must be a boolean"),s.autocomplete=e.autocomplete),this.client({path:i.API_GEOCODING_FORWARD,params:s,callback:o})},s.prototype.geocodeReverse=function(t,e,o){void 0===o&&"function"==typeof e&&(o=e,e={}),r("object"==typeof t,"location must be an object"),r("object"==typeof e,"options must be an object"),r("number"==typeof t.latitude&&"number"==typeof t.longitude,"location must be an object with numeric latitude & longitude properties");var s={dataset:"mapbox.places"};e.dataset&&(r("string"==typeof e.dataset,"dataset option must be string"),s.dataset=e.dataset);var u=a;return e.precision&&(r("number"==typeof e.precision,"precision option must be number"),u=e.precision),e.types&&(r("string"==typeof e.types,"types option must be string"),s.types=e.types),e.limit&&(r("number"==typeof e.limit,"limit option must be a number"),r(1===e.types.split(",").length,"a single type must be specified to use the limit option"),s.limit=e.limit),s.longitude=n(t.longitude,u),s.latitude=n(t.latitude,u),this.client({path:i.API_GEOCODING_REVERSE,params:s,callback:o})},e.exports=s},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],13:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=r("MapboxMatching");i.prototype.matching=function(t,e,r){void 0===r&&"function"==typeof e&&(r=e,e={}),n("object"==typeof t,"trace must be an object"),n("object"==typeof e,"options must be an object");var i="mapbox.driving",s=4,a="geojson";return void 0!==e.gps_precision&&(n("number"==typeof e.gps_precision,"gps_precision must be a number"),s=e.gps_precision),e.profile&&(n("string"==typeof e.profile,"profile option must be string"),i=e.profile),e.geometry&&(n("string"==typeof e.geometry,"geometry option must be string"),a=e.geometry),this.client({path:o.API_MATCHING,params:{profile:i,geometry:a,gps_precision:s},method:"post",entity:t,callback:r})},e.exports=i},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],14:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../format_points"),o=t("../make_service"),i=t("../constants"),s=o("MapboxSurface");s.prototype.surface=function(t,e,o,s,a,u){void 0===u&&"function"==typeof a&&(u=a,a={}),n("string"==typeof t,"mapid must be a string"),n("string"==typeof e,"layer must be a string"),n(Array.isArray(o),"fields must be an array of strings"),n(Array.isArray(s)||"string"==typeof s,"path must be an array of objects or a string"),n("object"==typeof a,"options must be an object");var c=!0,p=!1;void 0!==a.interpolate&&(n("boolean"==typeof a.interpolate,"interpolate must be a boolean"),c=a.interpolate),void 0!==a.geojson&&(n("boolean"==typeof a.geojson,"geojson option must be boolean"),p=a.geojson);var f={geojson:p,layer:e,mapid:t,fields:o.join(","),interpolate:c};return Array.isArray(s)?f.points=r(s):f.encoded_polyline=s,void 0!==a.zoom&&(n("number"==typeof a.zoom,"zoom must be a number"),f.z=a.zoom),this.client({path:i.API_SURFACE,params:f,callback:u})},e.exports=s},{"../../vendor/invariant":48,"../constants":3,"../format_points":4,"../make_service":7}],15:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=e.exports=r("MapboxTilestats");i.prototype.getTilestats=function(t,e){n("string"==typeof t,"tileset must be a string");var r=t.split(".")[0];return r===t&&(r=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:r,tileset:t},callback:e})},i.prototype.putTilestats=function(t,e,r){n("string"==typeof t,"tileset must be a string");var i=t.split(".")[0];return i===t&&(i=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:i,tileset:t},entity:e,method:"put",callback:r})}},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],16:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=e.exports=r("MapboxUploads");i.prototype.listUploads=function(t){return this.client({path:o.API_UPLOADS,params:{owner:this.owner},callback:t})},i.prototype.createUploadCredentials=function(t){return this.client({path:o.API_UPLOAD_CREDENTIALS,params:{owner:this.owner},callback:t})},i.prototype.createUpload=function(t,e){return n("object"==typeof t,"options must be an object"),this.client({path:o.API_UPLOADS,params:{owner:this.owner},entity:t,callback:e})},i.prototype.readUpload=function(t,e){return n("string"==typeof t,"upload must be a string"),this.client({path:o.API_UPLOAD,params:{owner:this.owner,upload:t},callback:e})},i.prototype.deleteUpload=function(t,e){return n("string"==typeof t,"upload must be a string"),this.client({method:"delete",path:o.API_UPLOAD,params:{owner:this.owner,upload:t},callback:e})}},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],17:[function(t,e){function n(t){return{url:t.url,status:t.status?t.status.code:void 0,headers:t.headers,entity:t.entity,error:t.error,callback:t.request.callback}}var r=t("rest/interceptor"),o=r({response:n});e.exports=o},{"rest/interceptor":24}],18:[function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(p===setTimeout)return setTimeout(t,0);if((p===n||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function i(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function s(){m&&d&&(m=!1,d.length?h=d.concat(h):y=-1,h.length&&a())}function a(){if(!m){var t=o(s);m=!0;for(var e=h.length;e;){for(d=h,h=[];++y<e;)d&&d[y].run();y=-1,e=h.length}d=null,m=!1,i(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,f,l=e.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:n}catch(t){p=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(t){f=r}}();var d,h=[],m=!1,y=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.push(new u(t,e)),1!==h.length||m||o(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=c,l.addListener=c,l.once=c,l.off=c,l.removeListener=c,l.removeAllListeners=c,l.emit=c,l.binding=function(){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],19:[function(t,e){"use strict";function n(t,e){var n,r,o,i,a;if(n=t,o={},e){for(r in e)a=new RegExp("\\{"+r+"\\}"),a.test(n)?n=n.replace(a,encodeURIComponent(e[r]),"g"):o[r]=e[r];i=s.write(o),i&&(n+=-1===n.indexOf("?")?"?":"&",n+=i)}return n}function r(t,e){return 0===t.indexOf(e)}function o(t,e){return this instanceof o?void(t instanceof o?(this._template=t.template,this._params=i({},this._params,e)):(this._template=(t||"").toString(),this._params=e||{})):new o(t,e)}var i,s,a,u,c,p;i=t("./util/mixin"),s=t("./mime/type/application/x-www-form-urlencoded"),u=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?(\/[^?#]*)?(\?[^#]*)?(#\S*)?/i,c=/^([a-z][a-z0-9\-\+\.]*:\/\/|\/)/i,p=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?\//i,o.prototype={append:function(t,e){return new o(this._template+t,i({},this._params,e))},fullyQualify:function(){if("undefined"==typeof location)return this;if(this.isFullyQualified())return this;var t=this._template;return r(t,"//")?t=a.protocol+t:r(t,"/")?t=a.origin+t:this.isAbsolute()||(t=a.origin+a.pathname.substring(0,a.pathname.lastIndexOf("/")+1)),-1===t.indexOf("/",8)&&(t+="/"),new o(t,this._params)},isAbsolute:function(){return c.test(this.build())},isFullyQualified:function(){return p.test(this.build())},isCrossOrigin:function(){if(!a)return!0;var t=this.parts();return t.protocol!==a.protocol||t.hostname!==a.hostname||t.port!==a.port},parts:function(){var t,e;return t=this.fullyQualify().build().match(u),e={href:t[0],protocol:t[1],host:t[3]||"",hostname:t[4]||"",port:t[6],pathname:t[7]||"",search:t[8]||"",hash:t[9]||""},e.origin=e.protocol+"//"+e.host,e.port=e.port||("https:"===e.protocol?"443":"http:"===e.protocol?"80":""),e},build:function(t){return n(this._template,i({},this._params,t))},toString:function(){return this.build()}},a="undefined"!=typeof location?new o(location.href).parts():void 0,e.exports=o},{"./mime/type/application/x-www-form-urlencoded":35,"./util/mixin":42}],20:[function(t,e){"use strict";var n=t("./client/default"),r=t("./client/xhr");n.setPlatformDefaultClient(r),e.exports=n},{"./client/default":22,"./client/xhr":23}],21:[function(t,e){"use strict";e.exports=function(t,e){return e&&(t.skip=function(){return e}),t.wrap=function(e,n){return e(t,n)},t.chain=function(){return"undefined"!=typeof console&&console.log("rest.js: client.chain() is deprecated, use client.wrap() instead"),t.wrap.apply(this,arguments)},t}},{}],22:[function(t,e){"use strict";function n(){return o.apply(void 0,arguments)}var r,o,i;r=t("../client"),"function"!=typeof Promise&&console&&console.log&&console.log("An ES6 Promise implementation is required to use rest.js. See https://github.com/cujojs/when/blob/master/docs/es6-promise-shim.md for using when.js as a Promise polyfill."),n.setDefaultClient=function(t){o=t},n.getDefaultClient=function(){return o},n.resetDefaultClient=function(){o=i},n.setPlatformDefaultClient=function(t){if(i)throw new Error("Unable to redefine platformDefaultClient");o=i=t},e.exports=r(n)},{"../client":21}],23:[function(t,e){"use strict";function n(t){var e={};return t?(t.trim().split(a).forEach(function(t){var n,r,i;n=t.indexOf(":"),r=o(t.substring(0,n).trim()),i=t.substring(n+1).trim(),e[r]?Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]:e[r]=i}),e):e}function r(t,e){return Object.keys(e||{}).forEach(function(n){if(e.hasOwnProperty(n)&&n in t)try{t[n]=e[n]}catch(r){}}),t}var o,i,s,a;o=t("../util/normalizeHeaderName"),i=t("../util/responsePromise"),s=t("../client"),a=/[\r|\n]+/,e.exports=s(function(t){return i.promise(function(e,o){var i,s,a,u,c,p,f,l;if(t="string"==typeof t?{path:t}:t||{},f={request:t},t.canceled)return f.error="precanceled",void o(f);if(l=t.engine||XMLHttpRequest,!l)return void o({request:t,error:"xhr-not-available"});c=t.entity,t.method=t.method||(c?"POST":"GET"),s=t.method,a=f.url=t.path||"";try{i=f.raw=new l,r(i,t.mixin),i.open(s,a,!0),r(i,t.mixin),u=t.headers;for(p in u)("Content-Type"!==p||"multipart/form-data"!==u[p])&&i.setRequestHeader(p,u[p]);t.canceled=!1,t.cancel=function(){t.canceled=!0,i.abort(),o(f)},i.onreadystatechange=function(){t.canceled||i.readyState===(l.DONE||4)&&(f.status={code:i.status,text:i.statusText},f.headers=n(i.getAllResponseHeaders()),f.entity=i.responseText,1223===f.status.code&&(f.status.code=204),f.status.code>0?e(f):setTimeout(function(){e(f)},0))};try{i.onerror=function(){f.error="loaderror",o(f)}}catch(d){}i.send(c)}catch(d){f.error="loaderror",o(f)}})})},{"../client":21,"../util/normalizeHeaderName":43,"../util/responsePromise":44}],24:[function(t,e){"use strict";function n(t){return t}function r(t){return t}function o(t){return t}function i(t){return this instanceof i?void u(this,t):new i(t)}function s(t){var e,s,u,f;return t=t||{},e=t.init||n,s=t.request||r,u=t.success||t.response||o,f=t.error||function(){return Promise.resolve((t.response||o).apply(this,arguments)).then(Promise.reject.bind(Promise))},function(n,r){function o(t){var e,a;return e={},a={arguments:Array.prototype.slice.call(arguments),client:o},t="string"==typeof t?{path:t}:t||{},t.originator=t.originator||o,c(s.call(e,t,r,a),function(t){var o,s,c;return c=n,t instanceof i&&(s=t.abort,c=t.client||c,o=t.response,t=t.request),o=o||Promise.resolve(t).then(function(t){return Promise.resolve(c(t)).then(function(t){return u.call(e,t,r,a)},function(t){return f.call(e,t,r,a)})}),s?Promise.race([o,s]):o},function(e){return Promise.reject({request:t,error:e})})}return"object"==typeof n&&(r=n),"function"!=typeof n&&(n=t.client||a),r=e(r||{}),p(o,n)}}var a,u,c,p;a=t("./client/default"),u=t("./util/mixin"),c=t("./util/responsePromise"),p=t("./client"),s.ComplexRequest=i,e.exports=s},{"./client":21,"./client/default":22,"./util/mixin":42,"./util/responsePromise":44}],25:[function(t,e){"use strict";var n,r,o;n=t("../interceptor"),r=t("../util/mixin"),o=function(){function t(t,e,n){(t in e||t in n)&&(e[t]=r({},n[t],e[t]))}function e(t,e,n){t in n&&!(t in e)&&(e[t]=n[t])}var n={method:e,path:e,params:t,headers:t,entity:e,mixin:t};return function(t,e){for(var r in n)n[r](r,t,e);return t}}(),e.exports=n({request:function(t,e){return o(t,e)}})},{"../interceptor":24,"../util/mixin":42}],26:[function(t,e){"use strict";var n;n=t("../interceptor"),e.exports=n({init:function(t){return t.code=t.code||400,t},response:function(t,e){return t.status&&t.status.code>=e.code?Promise.reject(t):t}})},{"../interceptor":24}],27:[function(t,e){"use strict";var n,r,o,i,s,a;n=t("../interceptor"),r=t("../mime"),o=t("../mime/registry"),a=t("../util/attempt"),i={read:function(t){return t},write:function(t){return t}},s={read:function(){throw"No read method found on converter"},write:function(){throw"No write method found on converter"}},e.exports=n({init:function(t){return t.registry=t.registry||o,t},request:function(t,e){var n,o;return o=t.headers||(t.headers={}),n=r.parse(o["Content-Type"]||e.mime||"text/plain"),o.Accept=o.Accept||e.accept||n.raw+", application/json;q=0.8, text/plain;q=0.5, */*;q=0.2","entity"in t?(o["Content-Type"]=n.raw,e.registry.lookup(n)["catch"](function(){if(e.permissive)return i;throw"mime-unknown"}).then(function(r){var o=e.client||t.originator,i=r.write||s.write;return a(i.bind(void 0,t.entity,{client:o,request:t,mime:n,registry:e.registry}))["catch"](function(){throw"mime-serialization"}).then(function(e){return t.entity=e,t})})):t},response:function(t,e){if(!(t.headers&&t.headers["Content-Type"]&&t.entity))return t;var n=r.parse(t.headers["Content-Type"]);return e.registry.lookup(n)["catch"](function(){return i}).then(function(r){var o=e.client||t.request&&t.request.originator,i=r.read||s.read;return a(i.bind(void 0,t.entity,{client:o,response:t,mime:n,registry:e.registry}))["catch"](function(e){throw t.error="mime-deserialization",t.cause=e,t}).then(function(e){return t.entity=e,t})})}})},{"../interceptor":24,"../mime":31,"../mime/registry":32,"../util/attempt":38}],28:[function(t,e){"use strict";var n,r;n=t("../interceptor"),r=t("../UrlBuilder"),e.exports=n({init:function(t){return t.params=t.params||{},t},request:function(t,e){var n,o;return n=t.path||"",o=t.params||{},t.path=new r(n,e.params).append("",o).build(),delete t.params,t}})},{"../UrlBuilder":19,"../interceptor":24}],29:[function(t,e){"use strict";function n(t,e){return 0===t.indexOf(e)}function r(t,e){return t.lastIndexOf(e)+e.length===t.length}var o,i;o=t("../interceptor"),i=t("../UrlBuilder"),e.exports=o({request:function(t,e){var o;return e.prefix&&!new i(t.path).isFullyQualified()&&(o=e.prefix,t.path&&(r(o,"/")||n(t.path,"/")||(o+="/"),o+=t.path),t.path=o),t}})},{"../UrlBuilder":19,"../interceptor":24}],30:[function(t,e){"use strict";var n,r,o;n=t("../interceptor"),r=t("../util/uriTemplate"),o=t("../util/mixin"),e.exports=n({init:function(t){return t.params=t.params||{},t.template=t.template||"",t},request:function(t,e){var n,i;return n=t.path||e.template,i=o({},t.params,e.params),t.path=r.expand(n,i),delete t.params,t}})},{"../interceptor":24,"../util/mixin":42,"../util/uriTemplate":46}],31:[function(t,e){"use strict";function n(t){var e,n;return e=t.split(";"),n=e[0].trim().split("+"),{raw:t,type:n[0],suffix:n[1]?"+"+n[1]:"",params:e.slice(1).reduce(function(t,e){return e=e.split("="),t[e[0].trim()]=e[1]?e[1].trim():void 0,t},{})}}e.exports={parse:n}},{}],32:[function(t,e){"use strict";function n(t){this.lookup=function(e){var n;return n="string"==typeof e?r.parse(e):e,t[n.raw]?t[n.raw]:t[n.type+n.suffix]?t[n.type+n.suffix]:t[n.type]?t[n.type]:t[n.suffix]?t[n.suffix]:Promise.reject(new Error('Unable to locate converter for mime "'+n.raw+'"'))},this.delegate=function(t){return{read:function(){var e=arguments;return this.lookup(t).then(function(t){return t.read.apply(this,e)}.bind(this))}.bind(this),write:function(){var e=arguments;return this.lookup(t).then(function(t){return t.write.apply(this,e)}.bind(this))}.bind(this)}},this.register=function(e,n){return t[e]=Promise.resolve(n),t[e]},this.child=function(){return new n(Object.create(t))}}var r,o;r=t("../mime"),o=new n({}),o.register("application/hal",t("./type/application/hal")),o.register("application/json",t("./type/application/json")),o.register("application/x-www-form-urlencoded",t("./type/application/x-www-form-urlencoded")),o.register("multipart/form-data",t("./type/multipart/form-data")),o.register("text/plain",t("./type/text/plain")),o.register("+json",o.delegate("application/json")),e.exports=o},{"../mime":31,"./type/application/hal":33,"./type/application/json":34,"./type/application/x-www-form-urlencoded":35,"./type/multipart/form-data":36,"./type/text/plain":37}],33:[function(t,e){"use strict";function n(t,e,n){Object.defineProperty(t,e,{value:n,configurable:!0,enumerable:!1,writeable:!0})}var r,o,i,s,a;r=t("../../../interceptor/pathPrefix"),o=t("../../../interceptor/template"),i=t("../../../util/find"),s=t("../../../util/lazyPromise"),a=t("../../../util/responsePromise"),e.exports={read:function(t,e){function u(t,e){(e&&p&&p.warn||p.log)&&(p.warn||p.log).call(p,"Relationship '"+t+"' is deprecated, see "+e)}var c,p;return e=e||{},c=e.client,p=e.console||p,e.registry.lookup(e.mime.suffix).then(function(n){return n.read(t,e)}).then(function(t){return i.findProperties(t,"_embedded",function(t,e,r){Object.keys(t).forEach(function(r){if(!(r in e)){var o=a({entity:t[r]});n(e,r,o)}}),n(e,r,t)}),i.findProperties(t,"_links",function(t,e,i){Object.keys(t).forEach(function(r){var i=t[r];r in e||n(e,r,a.make(s(function(){return i.deprecation&&u(r,i.deprecation),i.templated===!0?o(c)({path:i.href}):c({path:i.href})})))}),n(e,i,t),n(e,"clientFor",function(e,n){var i=t[e];if(!i)throw new Error("Unknown relationship: "+e);return i.deprecation&&u(e,i.deprecation),i.templated===!0?o(n||c,{template:i.href}):r(n||c,{prefix:i.href})}),n(e,"requestFor",function(t,e,n){var r=this.clientFor(t,n);return r(e)})}),t})},write:function(t,e){return e.registry.lookup(e.mime.suffix).then(function(n){return n.write(t,e)})}}},{"../../../interceptor/pathPrefix":29,"../../../interceptor/template":30,"../../../util/find":40,"../../../util/lazyPromise":41,"../../../util/responsePromise":44}],34:[function(t,e){"use strict";function n(t,e){return{read:function(e){return JSON.parse(e,t)},write:function(t){return JSON.stringify(t,e)},extend:n}}e.exports=n()},{}],35:[function(t,e){"use strict";function n(t){return t=encodeURIComponent(t),t.replace(i,"+")}function r(t){return t=t.replace(s," "),decodeURIComponent(t)}function o(t,e,r){return Array.isArray(r)?r.forEach(function(n){t=o(t,e,n)}):(t.length>0&&(t+="&"),t+=n(e),void 0!==r&&null!==r&&(t+="="+n(r))),t}var i,s;i=/%20/g,s=/\+/g,e.exports={read:function(t){var e={};return t.split("&").forEach(function(t){var n,o,i;n=t.split("="),o=r(n[0]),i=2===n.length?r(n[1]):null,
o in e?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(i)):e[o]=i}),e},write:function(t){var e="";return Object.keys(t).forEach(function(n){e=o(e,n,t[n])}),e}}},{}],36:[function(t,e){"use strict";function n(t){return t&&1===t.nodeType&&"FORM"===t.tagName}function r(t){var e,n=new FormData;for(var r in t)t.hasOwnProperty(r)&&(e=t[r],e instanceof File?n.append(r,e,e.name):e instanceof Blob?n.append(r,e):n.append(r,String(e)));return n}e.exports={write:function(t){if("undefined"==typeof FormData)throw new Error("The multipart/form-data mime serializer requires FormData support");if(t instanceof FormData)return t;if(n(t))return new FormData(t);if("object"==typeof t&&null!==t)return r(t);throw new Error("Unable to create FormData from object "+t)}}},{}],37:[function(t,e){"use strict";e.exports={read:function(t){return t},write:function(t){return t.toString()}}},{}],38:[function(t,e){"use strict";function n(t){try{return Promise.resolve(t())}catch(e){return Promise.reject(e)}}e.exports=n},{}],39:[function(t,e){"use strict";function n(t){if(/([^\u0000-\u00ff])/.test(t))throw new Error("Can't base64 encode non-ASCII characters.");for(var e,n,r,i=0,s=[];i<t.length;){switch(e=t.charCodeAt(i),r=i%3){case 0:s.push(o.charAt(e>>2));break;case 1:s.push(o.charAt((3&n)<<4|e>>4));break;case 2:s.push(o.charAt((15&n)<<2|e>>6)),s.push(o.charAt(63&e))}n=e,i+=1}return 0===r?(s.push(o.charAt((3&n)<<4)),s.push("==")):1===r&&(s.push(o.charAt((15&n)<<2)),s.push("=")),s.join("")}function r(t){if(t=t.replace(/\s/g,""),!/^[a-z0-9\+\/\s]+\={0,2}$/i.test(t)||t.length%4>0)throw new Error("Not a base64-encoded string.");var e,n,r,i=0,s=[];for(t=t.replace(/\=/g,"");i<t.length;){switch(e=o.indexOf(t.charAt(i)),r=i%4){case 1:s.push(String.fromCharCode(n<<2|e>>4));break;case 2:s.push(String.fromCharCode((15&n)<<4|e>>2));break;case 3:s.push(String.fromCharCode((3&n)<<6|e))}n=e,i+=1}return s.join("")}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports={encode:n,decode:r}},{}],40:[function(t,e){"use strict";e.exports={findProperties:function n(t,e,r){"object"==typeof t&&null!==t&&(e in t&&r(t[e],t,e),Object.keys(t).forEach(function(o){n(t[o],e,r)}))}}},{}],41:[function(t,e){"use strict";function n(t){var e,n,o,i;return e=!1,o=new Promise(function(t,e){n={resolve:t,reject:e}}),i=o.then,o.then=function(){return e||(e=!0,r(t).then(n.resolve,n.reject)),i.apply(o,arguments)},o}var r=t("./attempt");e.exports=n},{"./attempt":38}],42:[function(t,e){"use strict";function n(t){var e,n,o,i;for(t||(t={}),e=1,n=arguments.length;n>e;e+=1){o=arguments[e];for(i in o)i in t&&(t[i]===o[i]||i in r&&r[i]===o[i])||(t[i]=o[i])}return t}var r={};e.exports=n},{}],43:[function(t,e){"use strict";function n(t){return t.toLowerCase().split("-").map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}).join("-")}e.exports=n},{}],44:[function(t,e){"use strict";function n(t,e){return t.then(function(t){return t&&t[e]},function(t){return Promise.reject(t&&t[e])})}function r(){return n(this,"entity")}function o(){return n(n(this,"status"),"code")}function i(){return n(this,"headers")}function s(t){return t=p(t),n(this.headers(),t)}function a(t){return t=[].concat(t),u(t.reduce(function(t,e){return t.then(function(t){if("string"==typeof e&&(e={rel:e}),"function"!=typeof t.entity.clientFor)throw new Error("Hypermedia response expected");var n=t.entity.clientFor(e.rel);return n({params:e.params})})},this))}function u(t){return t.status=o,t.headers=i,t.header=s,t.entity=r,t.follow=a,t}function c(t,e,n){return u(Promise.resolve(t).then(e,n))}var p=t("./normalizeHeaderName");c.make=u,c.reject=function(t){return u(Promise.reject(t))},c.promise=function(t){return u(new Promise(t))},e.exports=c},{"./normalizeHeaderName":43}],45:[function(t,e){"use strict";function n(t,e){if("string"!=typeof t)throw new Error("String required for URL encoding");return t.split("").map(function(t){if(e.hasOwnProperty(t))return t;var n=t.charCodeAt(0);if(127>=n){var r=n.toString(16).toUpperCase();return"%"+(r.length%2===1?"0":"")+r}return encodeURIComponent(t).toUpperCase()}).join("")}function r(t){return t=t||i.unreserved,function(e){return n(e,t)}}function o(t){return decodeURIComponent(t)}var i;i=function(){var t={alpha:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",digit:"0123456789"};return t.genDelims=":/?#[]@",t.subDelims="!$&'()*+,;=",t.reserved=t.genDelims+t.subDelims,t.unreserved=t.alpha+t.digit+"-._~",t.url=t.reserved+t.unreserved,t.scheme=t.alpha+t.digit+"+-.",t.userinfo=t.unreserved+t.subDelims+":",t.host=t.unreserved+t.subDelims,t.port=t.digit,t.pchar=t.unreserved+t.subDelims+":@",t.segment=t.pchar,t.path=t.segment+"/",t.query=t.pchar+"/?",t.fragment=t.pchar+"/?",Object.keys(t).reduce(function(e,n){return e[n]=t[n].split("").reduce(function(t,e){return t[e]=!0,t},{}),e},{})}(),e.exports={decode:o,encode:r(),encodeURL:r(i.url),encodeScheme:r(i.scheme),encodeUserInfo:r(i.userinfo),encodeHost:r(i.host),encodePort:r(i.port),encodePathSegment:r(i.segment),encodePath:r(i.path),encodeQuery:r(i.query),encodeFragment:r(i.fragment)}},{}],46:[function(t,e){"use strict";function n(t,e,n){return e.split(",").reduce(function(e,r){var o,s;if(o={},"*"===r.slice(-1)&&(r=r.slice(0,-1),o.explode=!0),a.test(r)){var u=a.exec(r);r=u[1],o.maxLength=parseInt(u[2])}return r=i.decode(r),s=n[r],void 0===s||null===s?e:(Array.isArray(s)?e=s.reduce(function(e,n){return e.length?(e+=o.explode?t.separator:",",t.named&&o.explode&&(e+=t.encoder(r),e+=n.length?"=":t.empty)):(e+=t.first,t.named&&(e+=t.encoder(r),e+=n.length?"=":t.empty)),e+=t.encoder(n)},e):"object"==typeof s?e=Object.keys(s).reduce(function(e,n){return e.length?e+=o.explode?t.separator:",":(e+=t.first,t.named&&!o.explode&&(e+=t.encoder(r),e+=s[n].length?"=":t.empty)),e+=t.encoder(n),e+=o.explode?"=":",",e+=t.encoder(s[n])},e):(s=String(s),o.maxLength&&(s=s.slice(0,o.maxLength)),e+=e.length?t.separator:t.first,t.named&&(e+=t.encoder(r),e+=s.length?"=":t.empty),e+=t.encoder(s)),e)},"")}function r(t,e){var r;if(r=s[t.slice(0,1)],r?t=t.slice(1):r=s[""],r.reserved)throw new Error("Reserved expression operations are not supported");return n(r,t,e)}function o(t,e){var n,o,i;for(i="",o=0;;){if(n=t.indexOf("{",o),-1===n){i+=t.slice(o);break}i+=t.slice(o,n),o=t.indexOf("}",n)+1,i+=r(t.slice(n+1,o-1),e)}return i}var i,s,a;i=t("./uriEncoder"),a=/^([^:]*):([0-9]+)$/,s={"":{first:"",separator:",",named:!1,empty:"",encoder:i.encode},"+":{first:"",separator:",",named:!1,empty:"",encoder:i.encodeURL},"#":{first:"#",separator:",",named:!1,empty:"",encoder:i.encodeURL},".":{first:".",separator:".",named:!1,empty:"",encoder:i.encode},"/":{first:"/",separator:"/",named:!1,empty:"",encoder:i.encode},";":{first:";",separator:";",named:!0,empty:"",encoder:i.encode},"?":{first:"?",separator:"&",named:!0,empty:"=",encoder:i.encode},"&":{first:"&",separator:"&",named:!0,empty:"=",encoder:i.encode},"=":{reserved:!0},",":{reserved:!0},"!":{reserved:!0},"@":{reserved:!0},"|":{reserved:!0}},e.exports={expand:o}},{"./uriEncoder":45}],47:[function(t,e){var n=e.exports=function(t,e){if(e||(e=16),void 0===t&&(t=128),0>=t)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(e),o=2;r===1/0;o*=2)r=Math.log(Math.pow(2,t/o))/Math.log(e)*o;for(var i=r-Math.floor(r),s="",o=0;o<Math.floor(r);o++){var a=Math.floor(Math.random()*e).toString(e);s=a+s}if(i){var u=Math.pow(e,i),a=Math.floor(Math.random()*u).toString(e);s=a+s}var c=parseInt(s,e);return c!==1/0&&c>=Math.pow(2,t)?n(t,e):s}},{}],48:[function(t,e){(function(t){"use strict";var n=t.env.NODE_ENV,r=function(t,e,r,o,i,s,a,u){if("production"!==n&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,o,i,s,a,u],f=0;c=new Error(e.replace(/%s/g,function(){return p[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};e.exports=r}).call(this,t("_process"))},{_process:18}],49:[function(e,n,r){(function(o,i){!function(e){"object"==typeof r?n.exports=e():"function"==typeof t&&t.amd?t(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof i?i.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){var t;return function n(t,r,o){function i(a,u){if(!r[a]){if(!t[a]){var c="function"==typeof e&&e;if(!u&&c)return c(a,!0);if(s)return s(a,!0);throw new Error("Cannot find module '"+a+"'")}var p=r[a]={exports:{}};t[a][0].call(p.exports,function(e){var n=t[a][1][e];return i(n?n:e)},p,p.exports,n,t,r,o)}return r[a].exports}for(var s="function"==typeof e&&e,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(t,e){var n=t("../lib/decorators/unhandledRejection"),r=n(t("../lib/Promise"));e.exports="undefined"!=typeof i?i.Promise=r:"undefined"!=typeof self?self.Promise=r:r},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":4}],2:[function(e,n){!function(t){"use strict";t(function(t){var e=t("./makePromise"),n=t("./Scheduler"),r=t("./env").asap;return e({scheduler:new n(r)})})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"./Scheduler":3,"./env":5,"./makePromise":7}],3:[function(e,n){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var e=this;this.drain=function(){e._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t<this._queueLen;++t)this._queue[t].run(),this._queue[t]=void 0;for(this._queueLen=0,this._running=!1,t=0;t<this._afterQueueLen;++t)this._afterQueue[t].run(),this._afterQueue[t]=void 0;this._afterQueueLen=0},t})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],4:[function(e,n){!function(t){"use strict";t(function(t){function e(t){throw t}function n(){}var r=t("../env").setTimer,o=t("../format");return function(t){function i(t){t.handled||(d.push(t),p("Potentially unhandled rejection ["+t.id+"] "+o.formatError(t.value)))}function s(t){var e=d.indexOf(t);e>=0&&(d.splice(e,1),f("Handled previous rejection ["+t.id+"] "+o.formatObject(t.value)))}function a(t,e){l.push(t,e),null===h&&(h=r(u,0))}function u(){for(h=null;l.length>0;)l.shift()(l.shift())}var c,p=n,f=n;"undefined"!=typeof console&&(c=console,p="undefined"!=typeof c.error?function(t){c.error(t)}:function(t){c.log(t)},f="undefined"!=typeof c.info?function(t){c.info(t)}:function(t){c.log(t)}),t.onPotentiallyUnhandledRejection=function(t){a(i,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){a(s,t)},t.onFatalRejection=function(t){a(e,t.value)};var l=[],d=[],h=null;return t}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"../env":5,"../format":6}],5:[function(e,n){!function(t){"use strict";t(function(t){function e(){return"undefined"!=typeof o&&"[object process]"===Object.prototype.toString.call(o)}function n(){return"function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver}function r(t){function e(){var t=n;n=void 0,t()}var n,r=document.createTextNode(""),o=new t(e);o.observe(r,{characterData:!0});var i=0;return function(t){n=t,r.data=i^=1}}var i,s="undefined"!=typeof setTimeout&&setTimeout,a=function(t,e){return setTimeout(t,e)},u=function(t){return clearTimeout(t)},c=function(t){return s(t,0)};if(e())c=function(t){return o.nextTick(t)};else if(i=n())c=r(i);else if(!s){var p=t,f=p("vertx");a=function(t,e){return f.setTimer(e,t)},u=f.cancelTimer,c=f.runOnLoop||f.runOnContext}return{setTimer:a,clearTimer:u,asap:c}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{}],6:[function(e,n){!function(t){"use strict";t(function(){function t(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"}function e(t){var e=String(t);return"[object Object]"===e&&"undefined"!=typeof JSON&&(e=n(t,e)),e}function n(t,e){try{return JSON.stringify(t)}catch(n){return e}}return{formatError:t,formatObject:e,tryStringify:n}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],7:[function(e,n){!function(t){"use strict";t(function(){return function(t){function e(t,e){this._handler=t===w?e:n(t)}function n(t){function e(t){o.resolve(t)}function n(t){o.reject(t)}function r(t){o.notify(t)}var o=new _;try{t(e,n,r)}catch(i){n(i)}return o}function r(t){return U(t)?t:new e(w,new A(v(t)))}function i(t){return new e(w,new A(new E(t)))}function s(){return tt}function a(){return new e(w,new _)}function u(t,e){var n=new _(t.receiver,t.join().context);return new e(w,n)}function c(t){return f(Y,null,t)}function p(t,e){return f(F,t,e)}function f(t,n,r){function o(e,o,s){s.resolved||l(r,i,e,t(n,o,e),s)}function i(t,e,n){p[t]=e,0===--c&&n.become(new j(p))}for(var s,a="function"==typeof n?o:i,u=new _,c=r.length>>>0,p=new Array(c),f=0;f<r.length&&!u.resolved;++f)s=r[f],void 0!==s||f in r?l(r,a,f,s,u):--c;return 0===c&&u.become(new j(p)),new e(w,u)}function l(t,e,n,r,o){if(L(r)){var i=b(r),s=i.state();0===s?i.fold(e,n,void 0,o):s>0?e(n,i.value,o):(o.become(i),d(t,n+1,i))}else e(n,r,o)}function d(t,e,n){for(var r=e;r<t.length;++r)h(v(t[r]),n)}function h(t,e){if(t!==e){var n=t.state();0===n?t.visit(t,void 0,t._unreport):0>n&&t._unreport()}}function m(t){return"object"!=typeof t||null===t?i(new TypeError("non-iterable passed to race()")):0===t.length?s():1===t.length?r(t[0]):y(t)}function y(t){var n,r,o,i=new _;for(n=0;n<t.length;++n)if(r=t[n],void 0!==r||n in t){if(o=v(r),0!==o.state()){i.become(o),d(t,n+1,o);break}o.visit(i,i.resolve,i.reject)}return new e(w,i)}function v(t){return U(t)?t._handler.join():L(t)?g(t):new j(t)}function b(t){return U(t)?t._handler.join():g(t)}function g(t){try{var e=t.then;return"function"==typeof e?new T(e,t):new j(t)}catch(n){return new E(n)}}function w(){}function x(){}function _(t,n){e.createContext(this,n),this.consumers=void 0,this.receiver=t,this.handler=void 0,this.resolved=!1}function A(t){this.handler=t}function T(t,e){_.call(this),J.enqueue(new C(t,e,this))}function j(t){e.createContext(this),this.value=t}function E(t){e.createContext(this),this.id=++$,this.value=t,this.handled=!1,this.reported=!1,this._report()}function P(t,e){this.rejection=t,this.context=e}function S(t){this.rejection=t}function I(){return new E(new TypeError("Promise cycle"))}function k(t,e){this.continuation=t,this.handler=e}function D(t,e){this.handler=e,this.value=t}function C(t,e,n){this._then=t,this.thenable=e,this.resolver=n}function O(t,e,n,r,o){try{t.call(e,n,r,o)}catch(i){r(i)}}function R(t,e,n,r){this.f=t,this.z=e,this.c=n,this.to=r,this.resolver=K,this.receiver=this}function U(t){return t instanceof e}function L(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function q(t,n,r,o){return"function"!=typeof t?o.become(n):(e.enterContext(n),z(t,n.value,r,o),void e.exitContext())}function N(t,n,r,o,i){return"function"!=typeof t?i.become(r):(e.enterContext(r),H(t,n,r.value,o,i),void e.exitContext())}function M(t,n,r,o,i){return"function"!=typeof t?i.notify(n):(e.enterContext(r),Q(t,n,o,i),void e.exitContext())}function F(t,e,n){try{return t(e,n)}catch(r){return i(r)}}function z(t,e,n,r){try{r.become(v(t.call(n,e)))}catch(o){r.become(new E(o))}}function H(t,e,n,r,o){try{t.call(r,e,n,o)}catch(i){o.become(new E(i))}}function Q(t,e,n,r){try{r.notify(t.call(n,e))}catch(o){r.notify(o)}}function G(t,e){e.prototype=X(t.prototype),e.prototype.constructor=e}function Y(t,e){return e}function B(){}function W(){return"undefined"!=typeof o&&null!==o&&"function"==typeof o.emit?function(t,e){return"unhandledRejection"===t?o.emit(t,e.value,e):o.emit(t,e)}:"undefined"!=typeof self&&"function"==typeof CustomEvent?function(t,e,n){var r=!1;try{var o=new n("unhandledRejection");r=o instanceof n}catch(i){}return r?function(t,r){var o=new n(t,{detail:{reason:r.value,key:r},bubbles:!1,cancelable:!0});return!e.dispatchEvent(o)}:t}(B,self,CustomEvent):B}var J=t.scheduler,V=W(),X=Object.create||function(t){function e(){}return e.prototype=t,new e};e.resolve=r,e.reject=i,e.never=s,e._defer=a,e._handler=v,e.prototype.then=function(t,e,n){var r=this._handler,o=r.join().state();if("function"!=typeof t&&o>0||"function"!=typeof e&&0>o)return new this.constructor(w,r);var i=this._beget(),s=i._handler;return r.chain(s,r.receiver,t,e,n),i},e.prototype["catch"]=function(t){return this.then(void 0,t)},e.prototype._beget=function(){return u(this._handler,this.constructor)},e.all=c,e.race=m,e._traverse=p,e._visitRemaining=d,w.prototype.when=w.prototype.become=w.prototype.notify=w.prototype.fail=w.prototype._unreport=w.prototype._report=B,w.prototype._state=0,w.prototype.state=function(){return this._state},w.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},w.prototype.chain=function(t,e,n,r,o){this.when({resolver:t,receiver:e,fulfilled:n,rejected:r,progress:o})},w.prototype.visit=function(t,e,n,r){this.chain(K,t,e,n,r)},w.prototype.fold=function(t,e,n,r){this.when(new R(t,e,n,r))},G(w,x),x.prototype.become=function(t){t.fail()};var K=new x;G(w,_),_.prototype._state=0,_.prototype.resolve=function(t){this.become(v(t))},_.prototype.reject=function(t){this.resolved||this.become(new E(t))},_.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if(t=t.handler,t===this)return this.handler=I();return t},_.prototype.run=function(){var t=this.consumers,e=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n<t.length;++n)e.when(t[n])},_.prototype.become=function(t){this.resolved||(this.resolved=!0,this.handler=t,void 0!==this.consumers&&J.enqueue(this),void 0!==this.context&&t._report(this.context))},_.prototype.when=function(t){this.resolved?J.enqueue(new k(t,this.handler)):void 0===this.consumers?this.consumers=[t]:this.consumers.push(t)},_.prototype.notify=function(t){this.resolved||J.enqueue(new D(t,this))},_.prototype.fail=function(t){var e="undefined"==typeof t?this.context:t;this.resolved&&this.handler.join().fail(e)},_.prototype._report=function(t){this.resolved&&this.handler.join()._report(t)},_.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},G(w,A),A.prototype.when=function(t){J.enqueue(new k(t,this))},A.prototype._report=function(t){this.join()._report(t)},A.prototype._unreport=function(){this.join()._unreport()},G(_,T),G(w,j),j.prototype._state=1,j.prototype.fold=function(t,e,n,r){N(t,e,this,n,r)},j.prototype.when=function(t){q(t.fulfilled,this,t.receiver,t.resolver)};var $=0;G(w,E),E.prototype._state=-1,E.prototype.fold=function(t,e,n,r){r.become(this)},E.prototype.when=function(t){"function"==typeof t.rejected&&this._unreport(),q(t.rejected,this,t.receiver,t.resolver)},E.prototype._report=function(t){J.afterQueue(new P(this,t))},E.prototype._unreport=function(){this.handled||(this.handled=!0,J.afterQueue(new S(this)))},E.prototype.fail=function(t){this.reported=!0,V("unhandledRejection",this),e.onFatalRejection(this,void 0===t?this.context:t)},P.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,V("unhandledRejection",this.rejection)||e.onPotentiallyUnhandledRejection(this.rejection,this.context))},S.prototype.run=function(){this.rejection.reported&&(V("rejectionHandled",this.rejection)||e.onPotentiallyUnhandledRejectionHandled(this.rejection))},e.createContext=e.enterContext=e.exitContext=e.onPotentiallyUnhandledRejection=e.onPotentiallyUnhandledRejectionHandled=e.onFatalRejection=B;var Z=new w,tt=new e(w,Z);return k.prototype.run=function(){this.handler.join().when(this.continuation)},D.prototype.run=function(){var t=this.handler.consumers;if(void 0!==t)for(var e,n=0;n<t.length;++n)e=t[n],M(e.progress,this.value,this.handler,e.receiver,e.resolver)},C.prototype.run=function(){function t(t){r.resolve(t)}function e(t){r.reject(t)}function n(t){r.notify(t)}var r=this.resolver;O(this._then,this.thenable,t,e,n)},R.prototype.fulfilled=function(t){this.f.call(this.c,this.z,t,this.to)},R.prototype.rejected=function(t){this.to.reject(t)},R.prototype.progress=function(t){this.to.notify(t)},e}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}]},{},[1])(1)})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:18}],50:[function(t,e){function n(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)o.call(n,r)&&(t[r]=n[r])}return t}function r(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)o.call(n,r)&&(t[r]=n[r])}return t}e.exports.extendMutable=n,e.exports.extend=r;var o=Object.prototype.hasOwnProperty},{}]},{},[8])(8)});
'use strict';
// install ES6 Promise polyfill
require('../vendor/promise');
if (typeof Promise === 'undefined') {
// install ES6 Promise polyfill
require('../vendor/promise');
}

@@ -6,0 +8,0 @@ var interceptor = require('rest/interceptor');

'use strict';
// install ES6 Promise polyfill
require('../vendor/promise');
if (typeof Promise === 'undefined') {
// install ES6 Promise polyfill
require('../vendor/promise');
}

@@ -6,0 +8,0 @@ var rest = require('rest');

// We keep all of the constants that declare endpoints in one
// place, so that we could concievably update this for API layout
// place, so that we could conceivably update this for API layout
// revisions.
module.exports.DEFAULT_ENDPOINT = 'https://api.mapbox.com';
module.exports.API_GEOCODING_FORWARD = '/geocoding/v5/{dataset}/{query}.json{?proximity,country,types,bbox}';
module.exports.API_GEOCODING_REVERSE = '/geocoding/v5/{dataset}/{longitude},{latitude}.json{?types}';
module.exports.API_GEOCODING_FORWARD = '/geocoding/v5/{dataset}/{query}.json{?proximity,country,types,bbox,limit}';
module.exports.API_GEOCODING_REVERSE = '/geocoding/v5/{dataset}/{longitude},{latitude}.json{?types,limit}';

@@ -9,0 +9,0 @@ module.exports.API_DIRECTIONS = '/v4/directions/{profile}/{encodedWaypoints}.json{?alternatives,instructions,geometry,steps}';

@@ -37,2 +37,4 @@ 'use strict';

* for available types.
* @param {number=5} options.limit is the maximum number of results to return, between 1 and 10 inclusive.
* Some very specific queries may return fewer results than the limit.
* @param {string} options.country a comma separated list of country codes to

@@ -116,2 +118,8 @@ * limit results to specified country or countries.

if (options.limit) {
invariant(typeof options.limit === 'number',
'limit must be a number');
queryOptions.limit = options.limit;
}
if (options.dataset) {

@@ -146,3 +154,3 @@ invariant(typeof options.dataset === 'string', 'dataset option must be string');

* Given a location, determine what geographical features are located
* there. This uses the [Mapbox Geocoding API](https://www.mapbox.com/developers/api/geocoding/).
* there. This uses the [Mapbox Geocoding API](https://www.mapbox.com/api-documentation/#geocoding).
*

@@ -155,4 +163,7 @@ * @param {Object} location the geographical point to search

* @param {string} options.types a comma seperated list of types that filter
* results to match those specified. See https://www.mapbox.com/developers/api/geocoding/#filter-type
* results to match those specified. See
* https://www.mapbox.com/api-documentation/#retrieve-places-near-a-location
* for available types.
* @param {number=1} options.limit is the maximum number of results to return, between 1 and 5
* inclusive. Requires a single options.types to be specified (see example).
* @param {string} [options.dataset=mapbox.places] the desired data to be

@@ -171,2 +182,9 @@ * geocoded against. The default, mapbox.places, does not permit unlimited

* });
* @example
* var mapboxClient = new MapboxGeocoding('ACCESSTOKEN');
* mapboxClient.geocodeReverse(
* { latitude: 33.6875431, longitude: -95.4431142, options: { types: address, limit: 3 } },
* function(err, res) {
* // res is a GeoJSON document with up to 3 geocoding matches
* });
*/

@@ -209,2 +227,8 @@ MapboxGeocoding.prototype.geocodeReverse = function(location, options, callback) {

if (options.limit) {
invariant(typeof options.limit === 'number', 'limit option must be a number');
invariant(options.types.split(',').length === 1, 'a single type must be specified to use the limit option');
queryOptions.limit = options.limit;
}
queryOptions.longitude = roundTo(location.longitude, precision);

@@ -211,0 +235,0 @@ queryOptions.latitude = roundTo(location.latitude, precision);

{
"name": "mapbox",
"version": "1.0.0-beta4",
"version": "1.0.0-beta5",
"description": "interface to mapbox services",

@@ -5,0 +5,0 @@ "main": "lib/mapbox.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc