"use strict";var stringUtil=require("./stringUtil-1ce2e674.js"),uuid=(require("url-join"),require("uuid")),lodash=require("lodash"),defaultImg="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",getOssUrl=function(t){return t?null!=t&&t.includes("http")?t:(console._warn("%c Failed to load img: "+t,"color:#f00;"),defaultImg):defaultImg},getSignatureUrl=function(r,i,l,n){return stringUtil.__awaiter(void 0,void 0,void 0,function(){var e;return stringUtil.__generator(this,function(t){switch(t.label){case 0:return r?n||uuid.validate(r)?[4,stringUtil.apiFilesFunc().getfileContent({fileId:r,redirect:!1}).catch(function(t){console.log(t)})]:[3,2]:[2,""];case 1:return e=t.sent(),[2,lodash.get(e,"data.result.sign_url.url")||""];case 2:return[4,stringUtil.stsClient.getSignatureUrl(r,i,l)];case 3:return[2,t.sent()]}})})};exports.getOssUrl=getOssUrl,exports.getSignatureUrl=getSignatureUrl;
