module.exports=function(e){functionn(r){if(t[r])returnt[r].exports;vara=t[r]={i:r,l:!1,exports:{}};returne[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}vart={};returnn.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,"a",t),t},n.o=function(e,n){returnObject.prototype.hasOwnProperty.call(e,n)},n.p="/",n(n.s=26)}([function(e,n){e.exports=require("winston")},function(e,n,t){"use strict";varr=function(){functione(e,n){vart=[],r=!0,a=!1,i=void0;try{for(varo,l=e[Symbol.iterator]();!(r=(o=l.next()).done)&&(t.push(o.value),!n||t.length!==n);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(a)throwi}}returnt}returnfunction(n,t){if(Array.isArray(n))returnn;if(Symbol.iteratorinObject(n))returne(n,t);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),a=t(0);e.exports={handleErrorResponse:function(n,t,i,o){a.error("Error on "+n,e.exports.useObjectPropertiesIfNoKeys(i));varl=e.exports.returnErrorMessageAndStatus(i),s=r(l,2),u=s[0],c=s[1];o.status(u).json(e.exports.createErrorResponsePayload(u,c))},returnErrorMessageAndStatus:function(e){varn=void0,t=void0;return"ECONNREFUSED"===e.code?(n=503,t="Connection refused. The daemon may not be running."):(n=400,t=e.message?e.message:e),[n,t]},useObjectPropertiesIfNoKeys:function(e){if(0===Object.keys(e).length){varn={};returnObject.getOwnPropertyNames(e).forEach(function(t){n[t]=e[t]}),n}returne},createErrorResponsePayload:function(e,n){return{status:e,success:!1,message:n}}}},function(e,n,t){"use strict";varr=t(44),a=t(45),i=t(46),o=t(47),l=t(48),s=t(49),u=t(13),c=t(0),d=t(10),f=d.database,h=d.username,m=d.password,p=newu(f,h,m,{host:"localhost",dialect:"mysql",dialectOptions:{decimalNumbers:!0},logging:!1,pool:{max:5,min:0,idle:1e4,acquire:1e4}});p.authenticate().then(function(){c.info("Sequelize has established mysql connection successfully.")}).catch(function(e){c.error("Sequelize was unable to connect to the database:",e)});varg={};g.Certificate=p.import("Certificate",r),g.Channel=p.import("Channel",a),g.Claim=p.import("Claim",i),g.File=p.import("File",o),g.Request=p.import("Request",l),g.User=p.import("User",s),c.info("associating db models..."),Object.keys(g).forEach(function(e){g[e].associate&&(c.info("Associating model:",e),g[e].associate(g))}),g.sequelize=p,g.Sequelize=u,g.upsert=function(e,n,t,r){returne.findOne({where:t}).then(function(t){returnt?(c.debug("updating record in db."+r),t.update(n)):(c.debug("creating record in db."+r),e.create(n))}).catch(function(e){throwc.error(r+".upsert error",e),e})},e.exports=g},function(e,n,t){"use strict";functionr(){vare=this;this.analytics={googleId:"default"},this.assetDefaults={description:"An asset published on Spee.ch",thumbnail:"https://spee.ch/assets/img/video_thumb_default.png",title:"A Spee.ch Implementation"},this.auth={sessionKey:"default"},this.customComponents={},this.customContainers={},this.customPages={},this.details={description:"Welcome to my decentralized image and video sharing site.",host:"http://localhost:3000",port:3e3,title:"My Spee.ch Site",twitter:"@exampleTwitterHandle"},this.publishing={additionalClaimAddresses:[],disabled:!1,disabledMessage:"Please check back soon.",primaryClaimAddress:"default",thumbnailChannel:"default",thumbnailChannelId:"default",uploadDirectory:"/home/lbry/Uploads"},this.routes={},this.update=function(n){if(!n)returnconsole.log("No site config received.");vart=n.analytics,r=n.assetDefaults,a=n.auth,i=n.customComponents,o=n.customContainers,l=n.customPages,s=n.details,u=n.publishing,c=n.routes;console.log("Configuring site details..."),e.analytics=t,e.assetDefaults=r,e.auth=a,e.details=s,e.publishing=u,e.customComponents=i,e.customContainers=o,e.customPages=l,e.routes=c}}e.exports=newr},function(e,n,t){"use strict";functionr(e,n,t){return{eventCategory:"client requests",eventAction:"serve request",eventLabel:t,ipOverride:n,userAgentOverride:e