/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/boom@7.3.0/lib/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";const Hoek=require("hoek"),internals={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Unordered Collection"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};module.exports=internals.Boom=class extends Error{static[Symbol.hasInstance](t){return internals.Boom.isBoom(t)}constructor(t,e={}){if(t instanceof Error)return internals.Boom.boomify(Hoek.clone(t),e);const{statusCode:o=500,data:a=null,ctor:r=internals.Boom}=e,n=new Error(t||void 0);return Error.captureStackTrace(n,r),n.data=a,internals.initialize(n,o),n.typeof=r,e.decorate&&Object.assign(n,e.decorate),n}static isBoom(t){return t instanceof Error&&!!t.isBoom}static boomify(t,e){return Hoek.assert(t instanceof Error,"Cannot wrap non-Error object"),void 0!==(e=e||{}).data&&(t.data=e.data),e.decorate&&Object.assign(t,e.decorate),t.isBoom?!1===e.override||!e.statusCode&&!e.message?t:internals.initialize(t,e.statusCode||t.output.statusCode,e.message):internals.initialize(t,e.statusCode||500,e.message)}static badRequest(t,e){return new internals.Boom(t,{statusCode:400,data:e,ctor:internals.Boom.badRequest})}static unauthorized(t,e,o){const a=new internals.Boom(t,{statusCode:401,ctor:internals.Boom.unauthorized});if(!e)return a;let r="";if("string"==typeof e){if(r=e,(o||t)&&(a.output.payload.attributes={}),o)if("string"==typeof o)r=r+" "+Hoek.escapeHeaderAttribute(o),a.output.payload.attributes=o;else{const t=Object.keys(o);for(let e=0;e<t.length;++e){const n=t[e];e&&(r+=",");let s=o[n];null==s&&(s=""),r=r+" "+n+'="'+Hoek.escapeHeaderAttribute(s.toString())+'"',a.output.payload.attributes[n]=s}}t?(o&&(r+=","),r=r+' error="'+Hoek.escapeHeaderAttribute(t)+'"',a.output.payload.attributes.error=t):a.isMissing=!0}else{const t=e;for(let e=0;e<t.length;++e)e&&(r+=", "),r+=t[e]}return a.output.headers["WWW-Authenticate"]=r,a}static paymentRequired(t,e){return new internals.Boom(t,{statusCode:402,data:e,ctor:internals.Boom.paymentRequired})}static forbidden(t,e){return new internals.Boom(t,{statusCode:403,data:e,ctor:internals.Boom.forbidden})}static notFound(t,e){return new internals.Boom(t,{statusCode:404,data:e,ctor:internals.Boom.notFound})}static methodNotAllowed(t,e,o){const a=new internals.Boom(t,{statusCode:405,data:e,ctor:internals.Boom.methodNotAllowed});return"string"==typeof o&&(o=[o]),Array.isArray(o)&&(a.output.headers.Allow=o.join(", ")),a}static notAcceptable(t,e){return new internals.Boom(t,{statusCode:406,data:e,ctor:internals.Boom.notAcceptable})}static proxyAuthRequired(t,e){return new internals.Boom(t,{statusCode:407,data:e,ctor:internals.Boom.proxyAuthRequired})}static clientTimeout(t,e){return new internals.Boom(t,{statusCode:408,data:e,ctor:internals.Boom.clientTimeout})}static conflict(t,e){return new internals.Boom(t,{statusCode:409,data:e,ctor:internals.Boom.conflict})}static resourceGone(t,e){return new internals.Boom(t,{statusCode:410,data:e,ctor:internals.Boom.resourceGone})}static lengthRequired(t,e){return new internals.Boom(t,{statusCode:411,data:e,ctor:internals.Boom.lengthRequired})}static preconditionFailed(t,e){return new internals.Boom(t,{statusCode:412,data:e,ctor:internals.Boom.preconditionFailed})}static entityTooLarge(t,e){return new internals.Boom(t,{statusCode:413,data:e,ctor:internals.Boom.entityTooLarge})}static uriTooLong(t,e){return new internals.Boom(t,{statusCode:414,data:e,ctor:internals.Boom.uriTooLong})}static unsupportedMediaType(t,e){return new internals.Boom(t,{statusCode:415,data:e,ctor:internals.Boom.unsupportedMediaType})}static rangeNotSatisfiable(t,e){return new internals.Boom(t,{statusCode:416,data:e,ctor:internals.Boom.rangeNotSatisfiable})}static expectationFailed(t,e){return new internals.Boom(t,{statusCode:417,data:e,ctor:internals.Boom.expectationFailed})}static teapot(t,e){return new internals.Boom(t,{statusCode:418,data:e,ctor:internals.Boom.teapot})}static badData(t,e){return new internals.Boom(t,{statusCode:422,data:e,ctor:internals.Boom.badData})}static locked(t,e){return new internals.Boom(t,{statusCode:423,data:e,ctor:internals.Boom.locked})}static failedDependency(t,e){return new internals.Boom(t,{statusCode:424,data:e,ctor:internals.Boom.failedDependency})}static preconditionRequired(t,e){return new internals.Boom(t,{statusCode:428,data:e,ctor:internals.Boom.preconditionRequired})}static tooManyRequests(t,e){return new internals.Boom(t,{statusCode:429,data:e,ctor:internals.Boom.tooManyRequests})}static illegal(t,e){return new internals.Boom(t,{statusCode:451,data:e,ctor:internals.Boom.illegal})}static internal(t,e,o=500){return internals.serverError(t,e,o,internals.Boom.internal)}static notImplemented(t,e){return internals.serverError(t,e,501,internals.Boom.notImplemented)}static badGateway(t,e){return internals.serverError(t,e,502,internals.Boom.badGateway)}static serverUnavailable(t,e){return internals.serverError(t,e,503,internals.Boom.serverUnavailable)}static gatewayTimeout(t,e){return internals.serverError(t,e,504,internals.Boom.gatewayTimeout)}static badImplementation(t,e){const o=internals.serverError(t,e,500,internals.Boom.badImplementation);return o.isDeveloperError=!0,o}},internals.initialize=function(t,e,o){const a=parseInt(e,10);return Hoek.assert(!isNaN(a)&&a>=400,"First argument must be a number (400+):",e),t.isBoom=!0,t.isServer=a>=500,t.hasOwnProperty("data")||(t.data=null),t.output={statusCode:a,payload:{},headers:{}},t.reformat=internals.reformat,o||t.message||(t.reformat(),o=t.output.payload.error),o&&(t.message=o+(t.message?": "+t.message:""),t.output.payload.message=t.message),t.reformat(),t},internals.reformat=function(t=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=internals.codes.get(this.output.statusCode)||"Unknown",500===this.output.statusCode&&!0!==t?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)},internals.serverError=function(t,e,o,a){return e instanceof Error&&!e.isBoom?internals.Boom.boomify(e,{statusCode:o,message:t}):new internals.Boom(t,{statusCode:o,data:e,ctor:a})};
//# sourceMappingURL=/sm/812742566f14887ded1f64506b6cb77e90fb44e474f98792dc5999dde24a4007.map