text: !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("rxjs")):"function"==typeof define&&define.amd?define("apollo-angular-link-http-common",["exports","rxjs"],r):r((e=e||self).ngApolloLinkHttpCommon={},e.rxjs)}(this,(function(e,r){"use strict";
  /*! *****************************************************************************
      Copyright (c) Microsoft Corporation. All rights reserved.
      Licensed under the Apache License, Version 2.0 (the "License"); you may not use
      this file except in compliance with the License. You may obtain a copy of the
      License at http://www.apache.org/licenses/LICENSE-2.0
  
      THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
      KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
      WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
      MERCHANTABLITY OR NON-INFRINGEMENT.
  
      See the Apache Version 2.0 License for specific language governing permissions
      and limitations under the License.
      ***************************************************************************** */var n=function(){return(n=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++)for(var t in r=arguments[n])Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e}).apply(this,arguments)};e.fetch=function(e,o,t){var i,s=-1!==["POST","PUT","PATCH"].indexOf(e.method.toUpperCase()),a=e.body.length,u=e.options&&e.options.useMultipart;if(u){if(a)return new r.Observable((function(e){return e.error(new Error("File upload is not available when combined with Batching"))}));if(!s)return new r.Observable((function(e){return e.error(new Error("File upload is not available when GET is used"))}));u=!!(i=t(e.body)).files.size}var f={};if(a){if(!s)return new r.Observable((function(e){return e.error(new Error("Batching is not available for GET requests"))}));f={body:e.body}}else{var l=u?i.clone:e.body;if(s)f={body:l};else f={params:Object.keys(e.body).reduce((function(r,n){var o=e.body[n];return r[n]=function(e){return-1!==["variables","extensions"].indexOf(e.toLowerCase())}(n)?JSON.stringify(o):o,r}),{})}}if(u&&s){var p=new FormData;p.append("operations",JSON.stringify(f.body));var d={},c=i.files,b=0;c.forEach((function(e){d[++b]=e})),p.append("map",JSON.stringify(d)),b=0,c.forEach((function(e,r){p.append(++b+"",r,r.name)})),f.body=p}return o.request(e.method,e.url,n(n({observe:"response",responseType:"json",reportProgress:!1},f),e.options))},e.mergeHeaders=function(e,r){return e&&r?r.keys().reduce((function(e,n){return e.set(n,r.getAll(n))}),e):r||e},e.prioritize=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=e.find((function(e){return void 0!==e}));return void 0===n?e[e.length-1]:n},Object.defineProperty(e,"__esModule",{value:!0})}));
  //# sourceMappingURL=ngApolloLinkHttpCommon.umd.min.js.map