{"version":3,"sources":["jsdelivr-header.js","/npm/@botocrat/telegram@0.2.6/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,MAAM,cAAgB,QAAQ,YACxB,gBAAkB,QAAQ,aAC1B,WAAa,QAAQ,cAE3B,OAAO,QAAU,EAAE,QAAO,QAAO,UAAU,2BAA4B,gBAAgB,IAAU,kBAC/F,GAAmB,iBAAT,EACR,MAAM,MAAM,kCAEd,MAAM,EAAU,gBAAgB,EAAU,OAAS,EAAO,IAAK,EAAO,GAChE,EAAW,WAAW,CAAE,QAAO,gBAAe,YACpD,OAAO,IAAI,MAAM,CAAC,EAAG,CACnB,IAAK,CAAC,EAAG,IACM,aAAb,EACI,EACC,GACD,EAAQ,EAAU,EAAQ,cAAc,IAAa,cAAc,GAAU,KACpF","file":"/npm/@botocrat/telegram@0.2.6/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@botocrat/telegram@0.2.6/src/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict'\nconst streamMethods = require('./stream')\nconst createRequester = require('./request')\nconst downloader = require('./download')\n\nmodule.exports = ({token, debug, baseUri = 'https://api.telegram.org', fileSizeLimit = Infinity, interceptor}) => {\n  if(typeof token != 'string'){\n    throw Error('you should provide valid token')\n  }\n  const request = createRequester(baseUri + '/bot' + token+ '/', debug, interceptor)\n  const download = downloader({ token, fileSizeLimit, baseUri })\n  return new Proxy({}, {\n    get: (o, endpoint) =>\n      endpoint === 'download'\n        ? download\n        : (params) =>\n          request(endpoint, params, streamMethods[endpoint] && streamMethods[endpoint](params)),\n  })\n}"]}