text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See http://js.arcgis.com/3.34/esri/copyright.txt for details.
  //>>built
  define("esri/dijit/geoenrichment/utils/requests/FileContent",["dojo/_base/declare","esri/dijit/geoenrichment/utils/DataUtil"],function(h,e){function f(b){return b?/^image\//.test(b)?"base64":/^text\//.test(b)?"text":/application\/json/.test(b)?"json":"bin":"bin"}var d=h(null,{data:null,filename:null,contentType:"application/octet-stream",contentTransferEncoding:"binary",constructor:function(b,a,c){this.data=b;a&&(this.contentType=a);c&&(this.contentTransferEncoding=c)},getBase64Data:function(){return this.data?
  "base64"==this.contentTransferEncoding?this.data:e.base64FromByteSource(this.data):null},toString:function(){return this.filename||"\x3cunknown\x3e"}});d.fromArrayBuffer=function(b,a){return new d(e.binaryStringFromByteSource(b),a)};d.fromBlob=function(b,a){return e.arrayBufferFromBlob(b).then(function(c){return new d(e.binaryStringFromByteSource(c),a||b.type)})};d.fromFileData=function(b,a,c){c=c||e.getContentType(b);if("object"==typeof a&&window.ArrayBuffer&&(a instanceof ArrayBuffer||a.buffer instanceof
  ArrayBuffer))a=e.binaryStringFromByteSource(a.buffer||a);else{var g=f(c);"json"==g&&"object"==typeof a&&(a=JSON.stringify(a));if("string"!=typeof a)throw Error("Wrong file data.");switch(g){case "base64":a=atob(a);break;case "text":case "json":a=unescape(encodeURIComponent(a))}}a=new d(a,c);a.filename=b;return a};d.getContentConversionType=f;return d});