PageSourceSearch

https://24coin.pro/_next/static/chunks/0i.znxfw_ics1.js?dpl=1782476403

js 24coin.pro collected 2026-10-08 08:26:34 UTC 485,923 bytes, 39 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="8eb1ae47-bf43-472d-91aa-c5dc72ee9602")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,445959,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},508222,(e,t,r)=>{"use strict";var n=e.i(247167);Object.defineProperty(r,"__esModule",{value:!0}),r.detectOrigin=function(e,t){var r;return(null!=(r=n.default.env.VERCEL)?r:n.default.env.AUTH_TRUST_HOST)?`${"http"===t?"http":"https"}://${e}`:n.default.env.NEXTAUTH_URL}},343954,(e,t,r)=>{!function(){"use strict";var e={815:function(e){e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var u=0;u<c;++u){var l,d,p,f,h=e[u].replace(a,"%20"),y=h.indexOf(n);(y>=0?(l=h.substr(0,y),d=h.substr(y+1)):(l=h,d=""),p=decodeURIComponent(l),f=decodeURIComponent(d),Object.prototype.hasOwnProperty.call(o,p))?t(o[p])?o[p].push(f):o[p]=[o[p],f]:o[p]=f}return o};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,o,a,s){return(o=o||"&",a=a||"=",null===e&&(e=void 0),"object"==typeof e)?n(i(e),function(i){var s=encodeURIComponent(t(i))+a;return r(e[i])?n(e[i],function(e){return s+encodeURIComponent(t(e))}).join(o):s+encodeURIComponent(t(e[i]))}).join(o):s?encodeURIComponent(t(s))+a+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}},a=!0;try{e[t](o,o.exports,n),a=!1}finally{a&&delete r[t]}return o.exports}n.ab="/ROOT/node_modules/next/dist/compiled/querystring-es3/";var i={};i.decode=i.parse=n(815),i.encode=i.stringify=n(577),t.exports=i}()},421342,(e,t,r)=>{var n={452:function(t){"use strict";t.exports=e.r(343954)}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}},a=!0;try{n[e](r,r.exports,o),a=!1}finally{a&&delete i[e]}return r.exports}o.ab="/ROOT/node_modules/next/dist/compiled/native-url/";var a={};!function(){var e,t=(e=o(452))&&"object"==typeof e&&"default"in e?e.default:e,r=/https?|ftp|gopher|file/;function n(e){"string"==typeof e&&(e=m(e));var n,i,o,a,s,c,u,l,d,p=(i=(n=e).auth,o=n.hostname,a=n.protocol||"",s=n.pathname||"",c=n.hash||"",u=n.query||"",l=!1,i=i?encodeURIComponent(i).replace(/%3A/i,":")+"@":"",n.host?l=i+n.host:o&&(l=i+(~o.indexOf(":")?"["+o+"]":o),n.port&&(l+=":"+n.port)),u&&"object"==typeof u&&(u=t.encode(u)),d=n.search||u&&"?"+u||"",a&&":"!==a.substr(-1)&&(a+=":"),n.slashes||(!a||r.test(a))&&!1!==l?(l="//"+(l||""),s&&"/"!==s[0]&&(s="/"+s)):l||(l=""),c&&"#"!==c[0]&&(c="#"+c),d&&"?"!==d[0]&&(d="?"+d),{protocol:a,host:l,pathname:s=s.replace(/[?#]/g,encodeURIComponent),search:d=d.replace("#","%23"),hash:c});return""+p.protocol+p.host+p.pathname+p.search+p.hash}var i="http://",s=i+"w.w",c=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,u=/https?|ftp|gopher|file/;function l(e,t){var r="string"==typeof e?m(e):e;e="object"==typeof e?n(e):e;var o=m(t),a="";r.protocol&&!r.slashes&&(a=r.protocol,e=e.replace(r.protocol,""),a+="/"===t[0]||"/"===e[0]?"/":""),a&&o.protocol&&(a="",o.slashes||(a=o.protocol,t=t.replace(o.protocol,"")));var l=e.match(c);l&&!o.protocol&&(e=e.substr((a=l[1]+(l[2]||"")).length),/^\/\/[^/]/.test(t)&&(a=a.slice(0,-1)));var d=new URL(e,s+"/"),p=new URL(t,d).toString().replace(s,""),f=o.protocol||r.protocol;return f+=r.slashes||o.slashes?"//":"",!a&&f?p=p.replace(i,f):a&&(p=p.replace(i,"")),u.test(p)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==p.slice(-1)||(p=p.slice(0,-1)),a&&(p=a+("/"===p[0]?p.substr(1):p)),p}function d(){}d.prototype.parse=m,d.prototype.format=n,d.prototype.resolve=l,d.prototype.resolveObject=l;var p=/^https?|ftp|gopher|file/,f=/^(.*?)([#?].*)/,h=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,y=/^([a-z0-9.+-]*:)?\/\/\/*/i,g=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function m(e,r,i){if(void 0===r&&(r=!1),void 0===i&&(i=!1),e&&"object"==typeof e&&e instanceof d)return e;var o=(e=e.trim()).match(f);e=o?o[1].replace(/\\/g,"/")+o[2]:e.replace(/\\/g,"/"),g.test(e)&&"/"!==e.slice(-1)&&(e+="/");var a=!/(^javascript)/.test(e)&&e.match(h),c=y.test(e),u="";a&&(p.test(a[1])||(u=a[1].toLowerCase(),e=""+a[2]+a[3]),a[2]||(c=!1,p.test(a[1])?(u=a[1],e=""+a[3]):e="//"+a[3]),3!==a[2].length&&1!==a[2].length||(u=a[1],e="/"+a[3]));var l,m=(o?o[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),_=m&&m[1],b=new d,v="",w="";try{l=new URL(e)}catch(t){v=t,u||i||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(w="/",e=e.substr(1));try{l=new URL(e,s)}catch(e){return b.protocol=u,b.href=u,b}}b.slashes=c&&!w,b.host="w.w"===l.host?"":l.host,b.hostname="w.w"===l.hostname?"":l.hostname.replace(/(\[|\])/g,""),b.protocol=v?u||null:l.protocol,b.search=l.search.replace(/\\/g,"%5C"),b.hash=l.hash.replace(/\\/g,"%5C");var E=e.split("#");!b.search&&~E[0].indexOf("?")&&(b.search="?"),b.hash||""!==E[1]||(b.hash="#"),b.query=r?t.decode(l.search.substr(1)):b.search.substr(1),b.pathname=w+(a?l.pathname.replace(/['^|`]/g,function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,t){try{return decodeURIComponent(t).split("").map(function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()}).join("")}catch(e){return t}}):l.pathname),"about:"===b.protocol&&"blank"===b.pathname&&(b.protocol="",b.pathname=""),v&&"/"!==e[0]&&(b.pathname=b.pathname.substr(1)),u&&!p.test(u)&&"/"!==e.slice(-1)&&"/"===b.pathname&&(b.pathname=""),b.path=b.pathname+b.search,b.auth=[l.username,l.password].map(decodeURIComponent).filter(
2Boolean).join(":"),b.port=l.port,_&&!b.host.endsWith(_)&&(b.host+=_,b.port=_.slice(1)),b.href=w?""+b.pathname+b.search+b.hash:n(b);var S=/^(file)/.test(b.href)?["host","hostname"]:[];return Object.keys(b).forEach(function(e){~S.indexOf(e)||(b[e]=b[e]||null)}),b}a.parse=m,a.format=n,a.resolve=l,a.resolveObject=function(e,t){return m(l(e,t))},a.Url=d}(),t.exports=a},696055,(e,t,r)=>{let{format:n}=e.r(477398);t.exports={OPError:class extends Error{constructor({error_description:e,error:t,error_uri:r,session_state:n,state:i,scope:o},a){super(e?`${t} (${e})`:t),Object.assign(this,{error:t},e&&{error_description:e},r&&{error_uri:r},i&&{state:i},o&&{scope:o},n&&{session_state:n}),a&&Object.defineProperty(this,"response",{value:a}),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor)}},RPError:class extends Error{constructor(...e){if("string"==typeof e[0])super(n(...e));else{const{message:t,printf:r,response:i,...o}=e[0];r?super(n(...r)):super(t),Object.assign(this,o),i&&Object.defineProperty(this,"response",{value:i})}this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor)}}}},622184,(e,t,r)=>{var n=e.i(247167),i=e.i(467034),o={523:function(e){e.exports={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",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent 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 Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",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 Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},646:function(e){"use strict";let t={};function r(e,r,n){n||(n=Error);class i extends n{constructor(e,t,n){super(function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(e,t,n))}}i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(!Array.isArray(e))return`of ${t} ${String(e)}`;{let r=e.length;return(e=e.map(e=>String(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,o,a,s;let c,u;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(c="must not be",t=t.replace(/^not /,"")):c="must be",o=" argument",(void 0===a||a>e.length)&&(a=e.length),e.substring(a-o.length,a)===o)u=`The ${e} ${c} ${n(t,"type")}`;else{let r=("number"!=typeof s&&(s=0),s+1>e.length||-1===e.indexOf(".",s))?"argument":"property";u=`The "${e}" ${r} ${c} ${n(t,"type")}`}return u+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},403:function(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(709),a=r(337);r(782)(l,o);for(var s=i(a.prototype),c=0;c<s.length;c++){var u=s[c];l.prototype[u]||(l.prototype[u]=a.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||n.default.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},889:function(e,t,r){"use strict";e.exports=i;var n=r(170);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(782)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},709:function(t,r,i){"use strict";
2t.exports=x,x.ReadableState=A,i(361).EventEmitter;var o,a,s,c,u,l=function(e,t){return e.listeners(t).length},d=i(678),p=i(300).Buffer,f=e.g.Uint8Array||function(){},h=i(837);a=h&&h.debuglog?h.debuglog("stream"):function(){};var y=i(379),g=i(25),m=i(776).getHighWaterMark,_=i(646).q,b=_.ERR_INVALID_ARG_TYPE,v=_.ERR_STREAM_PUSH_AFTER_EOF,w=_.ERR_METHOD_NOT_IMPLEMENTED,E=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;i(782)(x,d);var S=g.errorOrDestroy,k=["error","close","destroy","pause","resume"];function A(e,t,r){o=o||i(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",r),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(s||(s=i(704).s),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function x(e){if(o=o||i(403),!(this instanceof x))return new x(e);var t=this instanceof o;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),d.call(this)}function T(e,t,r,n,i){a("readableAddChunk",t);var o,s,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(a("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?P(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,C(e)))}}(e,c);else if(i||(s=function(e,t){var r;return p.isBuffer(t)||t instanceof f||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t)),r}(c,t)),s)S(e,s);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===p.prototype||(o=t,t=p.from(o)),n)c.endEmitted?S(e,new E):O(e,c,t,!0);else if(c.ended)S(e,new v);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?O(e,c,t,!1):j(e,c)):O(e,c,t,!1)}else n||(c.reading=!1,j(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function O(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&P(e)),j(e,t)}function R(e,t){var r;if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;return(e>t.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function P(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,n.default.nextTick(C,e))}function C(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function j(e,t){t.readingMore||(t.readingMore=!0,n.default.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(a("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function U(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function z(e){a("readable nexttick read 0"),e.read(0)}function N(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function H(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.default.nextTick(W,t,e))}function W(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),x.prototype.destroy=g.destroy,x.prototype._undestroy=g.undestroy,x.prototype._destroy=function(e,t){t(e)},x.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=p.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},x.prototype.unshift=function(e){return T(this,e,null,!0,!1)},x.prototype.isPaused=function(){return!1===this._readableState.flowing},x.prototype.setEncoding=function(e){s||(s=i(704).s);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;
2for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this},x.prototype.read=function(e){a("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return a("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?H(this):P(this),null;if(0===(e=R(e,r))&&r.ended)return 0===r.length&&H(this),null;var i=r.needReadable;return a("need readable",i),(0===r.length||r.length-e<r.highWaterMark)&&a("length less than watermark",i=!0),r.ended||r.reading?a("reading or ended",i=!1):i&&(a("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=R(n,r))),null===(t=e>0?M(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&H(this)),null!==t&&this.emit("data",t),t},x.prototype._read=function(e){S(this,new w("_read()"))},x.prototype.pipe=function(e,t){var r,i=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,a("pipe count=%d opts=%j",o.pipesCount,t);var s=t&&!1===t.end||e===n.default.stdout||e===n.default.stderr?g:c;function c(){a("onend"),e.end()}o.endEmitted?n.default.nextTick(s):i.once("end",s),e.on("unpipe",function t(r,n){a("onunpipe"),r===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,a("cleanup"),e.removeListener("close",h),e.removeListener("finish",y),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",t),i.removeListener("end",c),i.removeListener("end",g),i.removeListener("data",p),d=!0,o.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u())});var u=(r=i,function(){var e=r._readableState;a("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&l(r,"data")&&(e.flowing=!0,D(r))});e.on("drain",u);var d=!1;function p(t){a("ondata");var r=e.write(t);a("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!d&&(a("false write response, pause",o.awaitDrain),o.awaitDrain++),i.pause())}function f(t){a("onerror",t),g(),e.removeListener("error",f),0===l(e,"error")&&S(e,t)}function h(){e.removeListener("finish",y),g()}function y(){a("onfinish"),e.removeListener("close",h),g()}function g(){a("unpipe"),i.unpipe(e)}return i.on("data",p),!function(e,t,r){if("function"==typeof e.prependListener)return e.prepe
2ndListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",h),e.once("finish",y),e.emit("pipe",i),o.flowing||(a("pipe resume"),i.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=$(t.pipes,e);return -1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},x.prototype.on=function(e,t){var r=d.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"!==e||i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,a("on readable",i.length,i.reading),i.length?P(this):i.reading||n.default.nextTick(z,this)),r},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var r=d.prototype.removeListener.call(this,e,t);return"readable"===e&&n.default.nextTick(U,this),r},x.prototype.removeAllListeners=function(e){var t=d.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&n.default.nextTick(U,this),t},x.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(a("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,n.default.nextTick(N,e,t))),r.paused=!1,this},x.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<k.length;o++)e.on(k[o],this.emit.bind(this,k[o]));return this._read=function(t){a("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(x.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=i(871)),c(this)}),Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(x.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(x.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),x._fromList=M,Object.defineProperty(x.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(x.from=function(e,t){return void 0===u&&(u=i(727)),u(x,e,t)})},170:function(e,t,r){"use strict";e.exports=l;var n=r(646).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(403);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);c.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush(function(t,r){p(e,t,r)})}function p(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(782)(l,c),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,function(e){t(e)})}},337:function(t,r,i){"use strict";function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var r=t,n=e,i=r.entry;for(r.entry=null;i;){var o=i.callback;n.pendingcb--,o(void 0),i=i.next}n.corkedRequestsFree.next=r}}t.exports=x,x.WritableState=A;var a,s,c={deprecate:i(769)},u=i(678),l=i(300).Buffer,d=e.g.Uint8Array||function(){},p=i(25),f=i(776).getHighWaterMark,h=i(646).q,y=h.ERR_INVALID_ARG_TYPE,g=h.ERR_METHOD_NOT_IMPLEMENT
2ED,m=h.ERR_MULTIPLE_CALLBACK,_=h.ERR_STREAM_CANNOT_PIPE,b=h.ERR_STREAM_DESTROYED,v=h.ERR_STREAM_NULL_VALUES,w=h.ERR_STREAM_WRITE_AFTER_END,E=h.ERR_UNKNOWN_ENCODING,S=p.errorOrDestroy;function k(){}function A(e,t,r){a=a||i(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof a),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,i?(n.default.nextTick(o,t),n.default.nextTick(j,e,r),e._writableState.errorEmitted=!0,S(e,t)):(o(t),e._writableState.errorEmitted=!0,S(e,t),j(e,r));else{var a=P(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||R(e,r),i?n.default.nextTick(O,e,r,a,o):O(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}i(782)(x,u),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(A.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}function x(e){var t=this instanceof(a=a||i(403));if(!t&&!s.call(x,this))return new x(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function T(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function O(e,t,r,n){var i,o;r||(i=e,0===(o=t).length&&o.needDrain&&(o.needDrain=!1,i.emit("drain"))),t.pendingcb--,n(),j(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),i=t.corkedRequestsFree;i.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,T(e,t,!0,t.length,n,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,l=r.callback,d=t.objectMode?1:c.length;if(T(e,t,!1,d,c,u,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(r){t.pendingcb--,r&&S(e,r),t.prefinished=!0,e.emit("prefinish"),j(e,t)})}function j(e,t){var r=P(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.default.nextTick(C,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===x&&e&&e._writableState instanceof A}})):s=function(e){return e instanceof this},x.prototype.pipe=function(){S(this,new _)},x.prototype.write=function(e,t,r){var i,o,a,s,c,u,p,f=this._writableState,h=!1,g=!f.objectMode&&(i=e,l.isBuffer(i)||i instanceof d);return(g&&!l.isBuffer(e)&&(o=e,e=l.from(o)),"function"==typeof t&&(r=t,t=null),g?t="buffer":t||(t=f.defaultEncoding),"function"!=typeof r&&(r=k),f.ending)?(a=r,S(this,s=new w),n.default.nextTick(a,s)):(g||(c=e,u=r,null===c?p=new v:"string"==typeof c||f.objectMode||(p=new y("chunk",["string","Buffer"],c)),!p||(S(this,p),n.default.nextTick(u,p),0)))&&(f.pendingcb++,h=function(e,t,r,n,i,o){if(!r){var a,s,c=(a=n,s=i,t.objectMode||!1===t.decodeStrings||"string"!=typeof a||(a=l.from(a,s)),a);n!==c&&(r=!0,i="buffer",n=c)}var u=t.objectMode?1:n.length;t.length+=u;var d=t.length<t.highWaterMark;if(d||(t.needDrain=!0),t.writing||t.corked){var p=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},p?p.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,u,n,i,o);return d}(this,f,g,e,t,r)),h},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},x.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new E(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,r){r(new g("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,r){var i,o,a,s=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||(i=this,o=s,a=r,o.ending=!0,j(i,o),a&&(o.finished?n.default.nextTick(a):i.once("finish",a)),o.ended=!0,i.writable=!1),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=p.destroy,x.prototype._undestroy=p.undestroy,x.prototype._destroy=function(e,t){t(e)}},871:function(e,t,r){"use strict";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,a=r(698),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),d=Symbol("lastPromise"),p=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function y(e){var t=e[s];if(null!==t){var r=e[f].read();null!==r&&(e[d]=null,e[s]=null,e[c]=null,t(h(r,!1)))}}function g(e){n.default.nextTick(y,e)}var m=Object.getPrototypeOf(function(){}),_=Object.setPrototypeOf((i(o={get stream(){return this[f]},next:function(){var e,t,r=this,i=this[u];if(null!==i)return Promise.reject(i);if(this[l])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(e,t){n.default.nextTick(function(){r[u]?t(r[u]):e(h(void 0,!0))})});var o=this[d];if(o)t=new Promise((e=this,function(t,r){o.then(function(){e[l]?t(h(void 0,!0)):e[p](t,r)},r)}));else{var a=this[f].read();if(null!==a)return Promise.resolve(h(a,!1));t=new Promise(this[p])}return this[d]=t,t}},Symbol.asyncIterator,function(){return this}),i(o,"return",function(){var e=this;return new Promise(function(t,r){e[f].destroy(null,function(e){e?r(e):t(h(void 0,!0))})})}),o),m);e.exports=function(e){var t,r=Object.create(_,(i(t={},f,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,p,{value:function(e,t){var n=r[f].read();n?(r[d]=null,r[s]=null,r[c]=null,e(h(n,!1))):(r[s]=e,r[c]=t)},writable:!0}),t));return r[d]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];null!==t&&(r[d]=null,r[s]=null,r[c]=null,t(e)),r[u]=e;return}var n=r[s];null!==n&&(r[d]=null,r[s]=null,r[c]=null,n(h(void 0,!0))),r[l]=!0}
2),e.on("readable",g.bind(null,r)),r}},379:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var i=r(300).Buffer,o=r(837).inspect,a=o&&o.custom||"inspect";e.exports=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var t,r,n=i.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=a,i.prototype.copy.call(t,n,r),a+=o.data.length,o=o.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=i.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(a));break}++n}return this.length-=n,t}},{key:a,value:function(e,t){return o(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t,{depth:0,customInspect:!1}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),t}()},25:function(e){"use strict";function t(e,t){i(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var a=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.default.nextTick(i,this,e)):n.default.nextTick(i,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!o&&e?a._writableState?a._writableState.errorEmitted?n.default.nextTick(r,a):(a._writableState.errorEmitted=!0,n.default.nextTick(t,a,e)):n.default.nextTick(t,a,e):o?(n.default.nextTick(r,a),o(e)):n.default.nextTick(r,a)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},698:function(e,t,r){"use strict";
2var n=r(646).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),a=o||i,s=!1,o=function(){if(!s){s=!0;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t)}};var a,s,c=r.readable||!1!==r.readable&&t.readable,u=r.writable||!1!==r.writable&&t.writable,l=function(){t.writable||p()},d=t._writableState&&t._writableState.finished,p=function(){u=!1,d=!0,c||o.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){c=!1,f=!0,u||o.call(t)},y=function(e){o.call(t,e)},g=function(){var e;return c&&!f?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):u&&!d?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},m=function(){t.req.on("finish",p)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",p),t.on("abort",g),t.req?m():t.on("request",m)):u&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",h),t.on("finish",p),!1!==r.error&&t.on("error",y),t.on("close",g),function(){t.removeListener("complete",p),t.removeListener("abort",g),t.removeListener("request",m),t.req&&t.req.removeListener("finish",p),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",p),t.removeListener("end",h),t.removeListener("error",y),t.removeListener("close",g)}}},727:function(e,t,r){"use strict";function n(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,i)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var o=r(646).q.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,r){if(t&&"function"==typeof t.next)a=t;else if(t&&t[Symbol.asyncIterator])a=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])a=t[Symbol.iterator]();else throw new o("iterable",["Iterable"],t);var a,s=new e(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({objectMode:!0},r)),c=!1;function u(){return l.apply(this,arguments)}function l(){var e;return e=function*(){try{var e=yield a.next(),t=e.value;e.done?s.push(null):s.push((yield t))?u():c=!1}catch(e){s.destroy(e)}},(l=function(){var t=this,r=arguments;return new Promise(function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)})}).apply(this,arguments)}return s._read=function(){c||(c=!0,u())},s}},442:function(e,t,r){"use strict";var n,i=r(646).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e,t,i=arguments.length,l=Array(i),d=0;d<i;d++)l[d]=arguments[d];var p=(e=l).length&&"function"==typeof e[e.length-1]?e.pop():s;if(Array.isArray(l[0])&&(l=l[0]),l.length<2)throw new o("streams");var f=l.map(function(e,i){var o,s,u,d,h,y,g=i<l.length-1;return o=i>0,u=s=function(e){t||(t=e),e&&f.forEach(c),g||(f.forEach(c),p(t))},d=!1,s=function(){d||(d=!0,u.apply(void 0,arguments))},h=!1,e.on("close",function(){h=!0}),void 0===n&&(n=r(698)),n(e,{readable:g,writable:o},function(e){if(e)return s(e);h=!0,s()}),y=!1,function(t){if(!h&&!y){if(y=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();s(t||new a("pipe"))}}});return l.reduce(u)}},776:function(e,t,r){"use strict";var n=r(646).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=null!=t.highWaterMark?t.highWaterMark:i?t[r]:null;if(null!=o){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},678:function(e,t,r){e.exports=r(781)},726:function(e,t,r){var i=r(781);"disable"===n.default.env.READABLE_STREAM&&i?(e.exports=i.Readable,Object.assign(e.exports,i),e.exports.Stream=i):((t=e.exp
2orts=r(709)).Stream=i||t,t.Readable=t,t.Writable=r(337),t.Duplex=r(403),t.Transform=r(170),t.PassThrough=r(889),t.finished=r(698),t.pipeline=r(442))},55:function(e,t,r){var n=r(300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},813:function(t,r,n){var i=n(450),o=n(254),a=n(911),s=n(523),c=n(310);r.request=function(t,r){t="string"==typeof t?c.parse(t):a(t);var n=-1===e.g.location.protocol.search(/^https?:$/)?"http:":"",o=t.protocol||n,s=t.hostname||t.host,u=t.port,l=t.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),t.url=(s?o+"//"+s:"")+(u?":"+u:"")+l,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var d=new i(t);return r&&d.on("response",r),d},r.get=function(e,t){var n=r.request(e,t);return n.end(),n},r.ClientRequest=i,r.IncomingMessage=o.IncomingMessage,r.Agent=function(){},r.Agent.defaultMaxSockets=4,r.globalAgent=new r.Agent,r.STATUS_CODES=s,r.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},301:function(t,r){var n;function i(){if(void 0!==n)return n;if(e.g.XMLHttpRequest){n=new e.g.XMLHttpRequest;try{n.open("GET",e.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}r.fetch=a(e.g.fetch)&&a(e.g.ReadableStream),r.writableStream=a(e.g.WritableStream),r.abortController=a(e.g.AbortController),r.arraybuffer=r.fetch||o("arraybuffer"),r.msstream=!r.fetch&&o("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&o("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!i()&&a(i().overrideMimeType),n=null},450:function(t,r,o){var a=o(301),s=o(782),c=o(254),u=o(726),l=c.IncomingMessage,d=c.readyStates,p=t.exports=function(e){var t,r,n,o=this;u.Writable.call(o),o._opts=e,o._body=[],o._headers={},e.auth&&o.setHeader("Authorization","Basic "+i.Buffer.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){o.setHeader(t,e.headers[t])});var s=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!a.abortController)s=!1,n=!0;else if("prefer-streaming"===e.mode)n=!1;else if("allow-wrong-content-type"===e.mode)n=!a.overrideMimeType;else if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw Error("Invalid value for opts.mode");else n=!0;t=n,r=s,o._mode=a.fetch&&r?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&t?"arraybuffer":"text",o._fetchTimer=null,o.on("finish",function(){o._onFinish()})};s(p,u.Writable),p.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===f.indexOf(r)&&(this._headers[r]={name:e,value:t})},p.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},p.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},p.prototype._onFinish=function(){var t=this;if(!t._destroyed){var r=t._opts,i=t._headers,o=null;"GET"!==r.method&&"HEAD"!==r.method&&(o=new Blob(t._body,{type:(i["content-type"]||{}).value||""}));var s=[];
2if(Object.keys(i).forEach(function(e){var t=i[e].name,r=i[e].value;Array.isArray(r)?r.forEach(function(e){s.push([t,e])}):s.push([t,r])}),"fetch"===t._mode){var c=null;if(a.abortController){var u=new AbortController;c=u.signal,t._fetchAbortController=u,"requestTimeout"in r&&0!==r.requestTimeout&&(t._fetchTimer=e.g.setTimeout(function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()},r.requestTimeout))}e.g.fetch(t._opts.url,{method:t._opts.method,headers:s,body:o||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:c}).then(function(e){t._fetchResponse=e,t._connect()},function(r){e.g.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",r)})}else{var l=t._xhr=new e.g.XMLHttpRequest;try{l.open(t._opts.method,t._opts.url,!0)}catch(e){n.default.nextTick(function(){t.emit("error",e)});return}"responseType"in l&&(l.responseType=t._mode),"withCredentials"in l&&(l.withCredentials=!!r.withCredentials),"text"===t._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(l.timeout=r.requestTimeout,l.ontimeout=function(){t.emit("requestTimeout")}),s.forEach(function(e){l.setRequestHeader(e[0],e[1])}),t._response=null,l.onreadystatechange=function(){switch(l.readyState){case d.LOADING:case d.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(l.onprogress=function(){t._onXHRProgress()}),l.onerror=function(){t._destroyed||t.emit("error",Error("XHR error"))};try{l.send(o)}catch(e){n.default.nextTick(function(){t.emit("error",e)});return}}}},p.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},p.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},p.prototype._write=function(e,t,r){this._body.push(e),r()},p.prototype.abort=p.prototype.destroy=function(){this._destroyed=!0,e.g.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},p.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},p.prototype.flushHeaders=function(){},p.prototype.setTimeout=function(){},p.prototype.setNoDelay=function(){},p.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},254:function(t,r,o){var a=o(301),s=o(782),c=o(726),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=r.IncomingMessage=function(t,r,o,s){var u=this;if(c.Readable.call(u),u._mode=o,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",function(){n.default.nextTick(function(){u.emit("close")})}),"fetch"===o){if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach(function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)}),a.writableStream){var l=new WritableStream({write:function(e){return new Promise(function(t,r){u._destroyed?r():u.push(i.Buffer.from(e))?t():u._resumeFetch=t})},close:function(){e.g.clearTimeout(s),u._destroyed||u.push(null)},abort:function(e){u._destroyed||u.emit("error",e)}});try{r.body.pipeTo(l).catch(function(t){e.g.clearTimeout(s),u._destroyed||u.emit("error",t)});return}catch(e){}}var d=r.body.getReader();!function t(){d.read().then(function(r){if(!u._destroyed){if(r.done){e.g.clearTimeout(s),u.push(null);return}u.push(i.Buffer.from(r.value)),t()}}).catch(function(t){e.g.clearTimeout(s),u._destroyed||u.emit("error",t)})}()}else if(u._xhr=t,u._pos=0,u.url=t.responseURL,u.statusCode=t.status,u.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEac
2h(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}}),u._charset="x-user-defined",!a.overrideMimeType){var p=u.rawHeaders["mime-type"];if(p){var f=p.match(/;\s*charset=([^;])(;|$)/);f&&(u._charset=f[1].toLowerCase())}u._charset||(u._charset="utf-8")}};s(l,c.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(){var t=this,r=t._xhr,n=null;switch(t._mode){case"text":if((n=r.responseText).length>t._pos){var o=n.substr(t._pos);if("x-user-defined"===t._charset){for(var a=i.Buffer.alloc(o.length),s=0;s<o.length;s++)a[s]=255&o.charCodeAt(s);t.push(a)}else t.push(o,t._charset);t._pos=n.length}break;case"arraybuffer":if(r.readyState!==u.DONE||!r.response)break;n=r.response,t.push(i.Buffer.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=r.response,r.readyState!==u.LOADING||!n)break;t.push(i.Buffer.from(new Uint8Array(n)));break;case"ms-stream":if(n=r.response,r.readyState!==u.LOADING)break;var c=new e.g.MSStreamReader;c.onprogress=function(){c.result.byteLength>t._pos&&(t.push(i.Buffer.from(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(n)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}},704:function(e,t,r){"use strict";var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:this.write=p,this.end=f;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},769:function(t){t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;
2return function(){if(!n){if(r("throwDeprecation"))throw Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}};function r(t){try{if(!e.g.localStorage)return!1}catch(e){return!1}var r=e.g.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}},911:function(e){e.exports=function(){for(var e={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)t.call(n,i)&&(e[i]=n[i])}return e};var t=Object.prototype.hasOwnProperty},300:function(t){"use strict";t.exports=e.r(843943)},361:function(t){"use strict";t.exports=e.r(430662)},781:function(t){"use strict";t.exports=e.r(612569)},310:function(t){"use strict";t.exports=e.r(421342)},837:function(t){"use strict";t.exports=e.r(477398)}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}},n=!0;try{o[e](r,r.exports,s),n=!1}finally{n&&delete a[e]}return r.exports}s.ab="/ROOT/node_modules/next/dist/compiled/stream-http/",t.exports=s(813)},440224,(e,t,r)=>{var n=e.i(247167),i=e.i(467034),o={8992:function(e){e.exports=function(e,r,n){if(e.filter)return e.filter(r,n);if(null==e||"function"!=typeof r)throw TypeError();for(var i=[],o=0;o<e.length;o++)if(t.call(e,o)){var a=e[o];r.call(n,a,o,e)&&i.push(a)}return i};var t=Object.prototype.hasOwnProperty},2167:function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o,a,s=r(2023).codes,c=s.ERR_AMBIGUOUS_ARGUMENT,u=s.ERR_INVALID_ARG_TYPE,l=s.ERR_INVALID_ARG_VALUE,d=s.ERR_INVALID_RETURN_VALUE,p=s.ERR_MISSING_ARGS,f=r(942),h=r(8177).inspect,y=r(8177).types,g=y.isPromise,m=y.isRegExp,_=Object.assign,b=Object.is?Object.is:r(3256);function v(){var e=r(176);o=e.isDeepEqual,a=e.isDeepStrictEqual}var w=!1,E=e.exports=x,S={};function k(e){if(e.message instanceof Error)throw e.message;throw new f(e)}function A(e,t,r,n){if(!r){var i=!1;if(0===t)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new f({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function x(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];A.apply(void 0,[x,t.length].concat(t))}E.fail=function e(t,r,i,o,a){var s,c=arguments.length;if(0===c?s="Failed":1===c?(i=t,t=void 0):(!1===w&&(w=!0,(n.default.emitWarning?n.default.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===c&&(o="!=")),i instanceof Error)throw i;var u={actual:t,expected:r,operator:void 0===o?"fail":o,stackStartFn:a||e};void 0!==i&&(u.message=i);var l=new f(u);throw s&&(l.message=s,l.generatedMessage=!0),l},E.AssertionError=f,E.ok=x,E.equal=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");t!=r&&k({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},E.notEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");t==r&&k({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},E.deepEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");void 0===o&&v(),o(t,r)||k({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},E.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");void 0===o&&v(),o(t,r)&&k({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},E.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");void 0===o&&v(),a(t,r)||k({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},E.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");void 0===o&&v(),a(t,r)&&k({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},E.strictEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");b(t,r)||k({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},E.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new p("actual","expected");
2b(t,r)&&k({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var T=function e(t,r,n){var i=this;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");r.forEach(function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&m(t[e])&&t[e].test(n[e])?i[e]=n[e]:i[e]=t[e])})};function O(e,t,r,n){if("function"!=typeof t){if(m(t))return t.test(e);if(2==arguments.length)throw new u("expected",["Function","RegExp"],t);if("object"!==i(e)||null===e){var s=new f({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw s.operator=n.name,s}var c=Object.keys(t);if(t instanceof Error)c.push("name","message");else if(0===c.length)throw new l("error",t,"may not be an empty object");return void 0===o&&v(),c.forEach(function(i){if(!("string"==typeof e[i]&&m(t[i])&&t[i].test(e[i]))&&(!(i in e)||!a(e[i],t[i]))){if(!r){var o=new f({actual:new T(e,c),expected:new T(t,c,e),operator:"deepStrictEqual",stackStartFn:n});throw o.actual=e,o.expected=t,o.operator=n.name,o}k({actual:e,expected:t,message:r,operator:n.name,stackStartFn:n})}}),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function R(e){if("function"!=typeof e)throw new u("fn","Function",e);try{e()}catch(e){return e}return S}function P(e){return g(e)||null!==e&&"object"===i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function C(e){return Promise.resolve().then(function(){var t;if("function"==typeof e){if(!P(t=e()))throw new d("instance of Promise","promiseFn",t)}else if(P(e))t=e;else throw new u("promiseFn",["Function","Promise"],e);return Promise.resolve().then(function(){return t}).then(function(){return S}).catch(function(e){return e})})}function j(e,t,r,n){if("string"==typeof r){if(4==arguments.length)throw new u("error",["Object","Error","Function","RegExp"],r);if("object"===i(t)&&null!==t){if(t.message===r)throw new c("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new c("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new u("error",["Object","Error","Function","RegExp"],r);if(t===S){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var a="rejects"===e.name?"rejection":"exception";k({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:e})}if(r&&!O(t,r,n,e))throw t}function I(e,t,r,n){if(t!==S){if("string"==typeof r&&(n=r,r=void 0),!r||O(t,r)){var i=n?": ".concat(n):".",o="doesNotReject"===e.name?"rejection":"exception";k({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function U(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];A.apply(void 0,[U,t.length].concat(t))}E.throws=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];j.apply(void 0,[e,R(t)].concat(n))},E.rejects=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return C(t).then(function(t){return j.apply(void 0,[e,t].concat(n))})},E.doesNotThrow=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];I.apply(void 0,[e,R(t)].concat(n))},E.doesNotReject=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return C(t).then(function(t){return I.apply(void 0,[e,t].concat(n))})},E.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===i(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=h(t);var n=new f({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=n.stack.split("\n"),c=0;c<a.length;c++){var u=s.indexOf(a[c]);if(-1!==u){s=s.slice(0,u);break}}n.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw n}},E.strict=_(U,E,{equal:E.strictEqual,deepEqual:E.deepStrictEqual,notEqual:E.notStr
2ictEqual,notDeepEqual:E.notDeepStrictEqual}),E.strict.strict=E.strict},942:function(e,t,r){"use strict";function i(e,t){return t&&("object"===l(t)||"function"==typeof t)?t:o(e)}function o(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){var r;if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return s(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)})(e)}function s(e,t,r){return(s=!function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&c(i,r.prototype),i}:Reflect.construct).apply(null,arguments)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var d=r(8177).inspect,p=r(2023).codes.ERR_INVALID_ARG_TYPE;function f(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var h="",y="",g="",m="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function b(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(t){r[t]=e[t]}),Object.defineProperty(r,"message",{value:e.message}),r}function v(e){return d(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}e.exports=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(e){if(!(this instanceof r))throw TypeError("Cannot call a class as a function");if("object"!==l(e)||null===e)throw new p("options","Object",e);var t,a=e.message,s=e.operator,c=e.stackStartFn,d=e.actual,w=e.expected,E=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=a)t=i(this,u(r).call(this,String(a)));else if(n.default.stderr&&n.default.stderr.isTTY&&(n.default.stderr&&n.default.stderr.getColorDepth&&1!==n.default.stderr.getColorDepth()?(h="\x1b[34m",y="\x1b[32m",m="\x1b[39m",g="\x1b[31m"):(h="",y="",m="",g="")),"object"===l(d)&&null!==d&&"object"===l(w)&&null!==w&&"stack"in d&&d instanceof Error&&"stack"in w&&w instanceof Error&&(d=b(d),w=b(w)),"deepStrictEqual"===s||"strictEqual"===s)t=i(this,u(r).call(this,function(e,t,r){var i="",o="",a=0,s="",c=!1,u=v(e),d=u.split("\n"),p=v(t).split("\n"),b=0,w="";if("strictEqual"===r&&"object"===l(e)&&"object"===l(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===d.length&&1===p.length&&d[0]!==p[0]){var E=d[0].length+p[0].length;if(E<=10){if(("object"!==l(e)||null===e)&&("object"!==l(t)||null===t)&&(0!==e||0!==t))return"".concat(_[r],"\n\n")+"".concat(d[0]," !== ").concat(p[0],"\n")}else if("strictEqualObject"!==r&&E<(n.default.stderr&&n.default.stderr.isTTY?n.default.stderr.columns:80)){for(;d[0][b]===p[0][b];
vendor: 1,117 bytes, line 2
2)b++;b>2&&(w="\n  ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",b),"^"),b=0)}}for(var S=d[d.length-1],k=p[p.length-1];S===k&&(b++<2?s="\n  ".concat(S).concat(s):i=S,d.pop(),p.pop(),0!==d.length&&0!==p.length);)S=d[d.length-1],k=p[p.length-1];var A=Math.max(d.length,p.length);if(0===A){var x=u.split("\n");if(x.length>30)for(x[26]="".concat(h,"...").concat(m);x.length>27;)x.pop();return"".concat(_.notIdentical,"\n\n").concat(x.join("\n"),"\n")}b>3&&(s="\n".concat(h,"...").concat(m).concat(s),c=!0),""!==i&&(s="\n  ".concat(i).concat(s),i="");var T=0,O=_[r]+"\n".concat(y,"+ actual").concat(m," ").concat(g,"- expected").concat(m),R=" ".concat(h,"...").concat(m," Lines skipped");for(b=0;b<A;b++){var P=b-a;if(d.length<b+1)P>1&&b>2&&(P>4?(o+="\n".concat(h,"...").concat(m),c=!0):P>3&&(o+="\n  ".concat(p[b-2]),T++),o+="\n  ".concat(p[b-1]),T++),a=b,i+="\n".concat(g,"-").concat(m," ").concat(p[b]),T++;else if(p.length<b+1)P>1&&b>2&&(P>4?(o+="\n".concat(h,"...").concat(m),c=!0):P>
23&&(o+="\n  ".concat(d[b-2]),T++),o+="\n  ".concat(d[b-1]),T++),a=b,o+="\n".concat(y,"+").concat(m," ").concat(d[b]),T++;else{var C=p[b],j=d[b],I=j!==C&&(!f(j,",")||j.slice(0,-1)!==C);I&&f(C,",")&&C.slice(0,-1)===j&&(I=!1,j+=","),I?(P>1&&b>2&&(P>4?(o+="\n".concat(h,"...").concat(m),c=!0):P>3&&(o+="\n  ".concat(d[b-2]),T++),o+="\n  ".concat(d[b-1]),T++),a=b,o+="\n".concat(y,"+").concat(m," ").concat(j),i+="\n".concat(g,"-").concat(m," ").concat(C),T+=2):(o+=i,i="",(1===P||0===b)&&(o+="\n  ".concat(j),T++))}if(T>20&&b<A-2)return"".concat(O).concat(R,"\n").concat(o,"\n").concat(h,"...").concat(m).concat(i,"\n")+"".concat(h,"...").concat(m)}return"".concat(O).concat(c?R:"","\n").concat(o).concat(i).concat(s).concat(w)}(d,w,s)));else if("notDeepStrictEqual"===s||"notStrictEqual"===s){var S=_[s],k=v(d).split("\n");if("notStrictEqual"===s&&"object"===l(d)&&null!==d&&(S=_.notStrictEqualObject),k.length>30)for(k[26]="".concat(h,"...").concat(m);k.length>27;)k.pop();t=1===k.length?i(this,u(r).call(this,"".concat(S," ").concat(k[0]))):i(this,u(r).call(this,"".concat(S,"\n\n").concat(k.join("\n"),"\n")))}else{var A=v(d),x="",T=_[s];"notDeepEqual"===s||"notEqual"===s?(A="".concat(_[s],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(x="".concat(v(w)),A.length>512&&(A="".concat(A.slice(0,509),"...")),x.length>512&&(x="".concat(x.slice(0,509),"...")),"deepEqual"===s||"equal"===s?A="".concat(T,"\n\n").concat(A,"\n\nshould equal\n\n"):x=" ".concat(s," ").concat(x)),t=i(this,u(r).call(this,"".concat(A).concat(x)))}return Error.stackTraceLimit=E,t.generatedMessage=!a,Object.defineProperty(o(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=d,t.expected=w,t.operator=s,Error.captureStackTrace&&Error.captureStackTrace(o(t),c),t.stack,t.name="AssertionError",i(t)}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&c(r,e),t=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:d.custom,value:function(e,t){return d(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,i,o;n=e,i=t,o=r[t],i in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})}return e}({},t,{customInspect:!1,depth:0}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(a(Error))},2023:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a,s,c={};function u(e,t,r){r||(r=Error);var a=function(r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");function a(r,o,s){var c,u;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");return(c=(u=i(a).call(this,"string"==typeof t?t:t(r,o,s)))&&("object"===n(u)||"function"==typeof u)?u:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)).code=e,c}return a.prototype=Object.create(r&&r.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),r&&o(a,r),a}(r);c[e]=a}function l(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return(e=e.map(function(e){return String(e)}),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",function(e,t,i){if((void 0===a&&(a=r(2167)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(o="not ",t.substr(0,o.length)===o))?(d="must not be",t=t.replace(/^not /,"")):d="must be",s=" argument",(void 0===c||c>e.length)&&(c=e.length),e.substring(c-s.length,c)===s)p="The ".concat(e," ").concat(d," ").concat(l(t,"type"));else{var o,s,c,u,d,p,f=("number"!=typeof u&&(u=0),u+1>e.length||-1===e.indexOf(".",u))?"argument":"property";p='The "'.concat(e,'" ').concat(f," ").concat(d," ").concat(l(t,"type"))}return p+". Received type ".concat(n(i))},TypeError),u("ERR_INVALID_ARG_VALUE",function(e,t){var n=arguments.length>
22&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(8177));var i=s.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)},TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError),u("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===a&&(a=r(2167)),a(t.length>0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map(function(e){return'"'.concat(e,'"')}),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")},TypeError),e.exports.codes=c},176:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=void 0!==/a/g.flags,a=function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t},s=function(e){var t=[];return e.forEach(function(e,r){return t.push([r,e])}),t},c=Object.is?Object.is:r(3256),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:r(1992);function d(e){return e.call.bind(e)}var p=d(Object.prototype.hasOwnProperty),f=d(Object.prototype.propertyIsEnumerable),h=d(Object.prototype.toString),y=r(8177).types,g=y.isAnyArrayBuffer,m=y.isArrayBufferView,_=y.isDate,b=y.isMap,v=y.isRegExp,w=y.isSet,E=y.isNativeError,S=y.isBoxedPrimitive,k=y.isNumberObject,A=y.isStringObject,x=y.isBooleanObject,T=y.isBigIntObject,O=y.isSymbolObject,R=y.isFloat32Array,P=y.isFloat64Array;function C(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=0x100000000}function j(e){return Object.keys(e).filter(C).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function I(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)}var U=void 0;function z(e,t,r,n){if(e===t)return 0!==e||!r||c(e,t);if(r){if("object"!==i(e))return"number"==typeof e&&l(e)&&l(t);if("object"!==i(t)||null===e||null===t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var a=h(e);if(a!==h(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var s=j(e,U),u=j(t,U);return s.length===u.length&&D(e,t,r,n,1,s)}if("[object Object]"===a&&(!b(e)&&b(t)||!w(e)&&w(t)))return!1;if(_(e)){if(!_(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(v(e)){if(!v(t)||(o?e.source!==t.source||e.flags!==t.flags:RegExp.prototype.toString.call(e)!==RegExp.prototype.toString.call(t)))return!1}else if(E(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else if(m(e)){if(!r&&(R(e)||P(e))){if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1}else if(e.byteLength!==t.byteLength||0!==I(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))return!1;var d=j(e,U),p=j(t,U);return d.length===p.length&&D(e,t,r,n,0,d)}else if(w(e))return!!w(t)&&e.size===t.size&&D(e,t,r,n,2);else if(b(e))return!!b(t)&&e.size===t.size&&D(e,t,r,n,3);else if(g(e)){if(e.byteLength!==t.byteLength||0!==I(new Uint8Array(e),new Uint8Array(t)))return!1}else if(S(e)&&(k(e)?!(k(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t))):A(e)?!A(t)||String.prototype.valueOf.call(e)!==String.prototype.valueOf.call(t):x(e)?!x(t)||Boolean.prototype.valueOf.call(e)!==Boolean.prototype.valueOf.call(t):T(e)?!T(t)||BigInt.prototype.valueOf.call(e)!==BigInt.prototype.valueOf.call(t):!O(t)||Symbol.prototype.valueOf.call(e)!==Symbol.prototype.valueOf.call(t)))return!1;return D(e,t,r,n,0)}function N(e,t){return t.filter(function(t){return f(e,t)})}function D(e,t,r,o,c,l){if(5==arguments.length){l=Object.keys(e);var d=Object.keys(t);if(l.length!==d.length)return!1}for(var h=0;h<l.length;h++)if(!p(t,l[h]))return!1;if(r&&5==arguments.length){var y=u(e);if(0!==y.length){var g=0;for(h=0;h<y.length;h++){var m=y[h];if(f(e,m)){if(!f(t,m))return!1;l.push(m),g++}else if(f(t,m))return!1}var _=u(t);if(y.length!==_.length&&N(t,_).length!==g)return!1}else{var b=u(t);if(0!==b.length&&0!==N(t,b).length)return!1}}
2if(0===l.length&&(0===c||1===c&&0===e.length||0===e.size))return!0;if(void 0===o)o={val1:new Map,val2:new Map,position:0};else{var v=o.val1.get(e);if(void 0!==v){var w=o.val2.get(t);if(void 0!==w)return v===w}o.position++}o.val1.set(e,o.position),o.val2.set(t,o.position);var E=function(e,t,r,o,c,u){var l=0;if(2===u){if(!function(e,t,r,n){for(var o=null,s=a(e),c=0;c<s.length;c++){var u=s[c];if("object"===i(u)&&null!==u)null===o&&(o=new Set),o.add(u);else if(!t.has(u)){if(r||!function(e,t,r){var n=H(r);return null!=n?n:t.has(n)&&!e.has(n)}(e,t,u))return!1;null===o&&(o=new Set),o.add(u)}}if(null!==o){for(var l=a(t),d=0;d<l.length;d++){var p=l[d];if("object"===i(p)&&null!==p){if(!M(o,p,r,n))return!1}else if(!r&&!e.has(p)&&!M(o,p,r,n))return!1}return 0===o.size}return!0}(e,t,r,c))return!1}else if(3===u){if(!function(e,t,r,o){for(var a=null,c=s(e),u=0;u<c.length;u++){var l=n(c[u],2),d=l[0],p=l[1];if("object"===i(d)&&null!==d)null===a&&(a=new Set),a.add(d);else{var f=t.get(d);if(void 0===f&&!t.has(d)||!z(p,f,r,o)){if(r||!function(e,t,r,n,i){var o=H(r);if(null!=o)return o;var a=t.get(o);return(void 0!==a||!!t.has(o))&&!!z(n,a,!1,i)&&!e.has(o)&&z(n,a,!1,i)}(e,t,d,p,o))return!1;null===a&&(a=new Set),a.add(d)}}}if(null!==a){for(var h=s(t),y=0;y<h.length;y++){var g=n(h[y],2),d=g[0],m=g[1];if("object"===i(d)&&null!==d){if(!W(a,e,d,m,r,o))return!1}else if(!r&&(!e.has(d)||!z(e.get(d),m,!1,o))&&!W(a,e,d,m,!1,o))return!1}return 0===a.size}return!0}(e,t,r,c))return!1}else if(1===u)for(;l<e.length;l++)if(p(e,l)){if(!p(t,l)||!z(e[l],t[l],r,c))return!1}else{if(p(t,l))return!1;for(var d=Object.keys(e);l<d.length;l++){var f=d[l];if(!p(t,f)||!z(e[f],t[f],r,c))return!1}if(d.length!==Object.keys(t).length)return!1;return!0}for(l=0;l<o.length;l++){var h=o[l];if(!z(e[h],t[h],r,c))return!1}return!0}(e,t,r,l,o,c);return o.val1.delete(e),o.val2.delete(t),E}function M(e,t,r,n){for(var i=a(e),o=0;o<i.length;o++){var s=i[o];if(z(t,s,r,n))return e.delete(s),!0}return!1}function H(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e*=1;case"number":if(l(e))return!1}return!0}function W(e,t,r,n,i,o){for(var s=a(e),c=0;c<s.length;c++){var u=s[c];if(z(r,u,i,o)&&z(n,t.get(u),i,o))return e.delete(u),!0}return!1}e.exports={isDeepEqual:function(e,t){return z(e,t,!1)},isDeepStrictEqual:function(e,t){return z(e,t,!0)}}},5555:function(e,t,r){"use strict";var n=r(1212),i=r(1909),o=r(8737);e.exports=r(8772)||n.call(o,i)},9905:function(e,t,r){"use strict";var n=r(1212),i=r(1909),o=r(5555);e.exports=function(){return o(n,i,arguments)}},1909:function(e){"use strict";e.exports=Function.prototype.apply},8737:function(e){"use strict";e.exports=Function.prototype.call},7152:function(e,t,r){"use strict";var n=r(1212),i=r(8202),o=r(8737),a=r(5555);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return a(n,o,e)}},8772:function(e){"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},7139:function(e,t,r){"use strict";var n=r(1212),i=r(3197),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),c=i("%Object.getOwnPropertyDescriptor%",!0),u=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=s(n,a,arguments);return c&&u&&c(t,"length").configurable&&u(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var d=function(){return s(n,o,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},516:function(e,t,r){"use strict";var n=r(3197),i=r(9042),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},9042:function(e,t,r){"use strict";var n=r(3143),i=r(446),o=r(7152),a=r(9905);e.exports=function(e){var t=o(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},i?i(e.exports,"apply",{value:a}):e.exports.apply=a},819:function(e,t,r){"use strict";var n=r(446),i=r(5182),o=r(8202),a=r(3990);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new o("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new o("`property` must be a string or a symbol`");
2if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(n)n(e,t,{configurable:null===u&&d?d.configurable:!u,enumerable:null===s&&d?d.enumerable:!s,value:r,writable:null===c&&d?d.writable:!c});else if(!l&&(s||c||u))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},3069:function(e,t,r){"use strict";var n=r(4935),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,c=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),u=function(e,t,r,n){(!(t in e)||"function"==typeof n&&"[object Function]"===o.call(n)&&n())&&(c?s(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},l=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s<o.length;s+=1)u(e,o[s],t[o[s]],r[o[s]])};l.supportsDescriptors=!!c,e.exports=l},6211:function(e,t,r){"use strict";var n,i=r(7152),o=r(3990);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!n&&o&&o(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?i([a.get]):"function"==typeof c&&function(e){return c(null==e?e:s(e))}},446:function(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},7181:function(e){"use strict";e.exports=EvalError},1545:function(e){"use strict";e.exports=Error},22:function(e){"use strict";e.exports=RangeError},2803:function(e){"use strict";e.exports=ReferenceError},5182:function(e){"use strict";e.exports=SyntaxError},8202:function(e){"use strict";e.exports=TypeError},3284:function(e){"use strict";e.exports=URIError},2811:function(e){"use strict";e.exports=Object},7604:function(e){"use strict";e.exports={assign:function(e,t){if(null==e)throw TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o=Object.keys(Object(i)),a=0,s=o.length;a<s;a++){var c=o[a],u=Object.getOwnPropertyDescriptor(i,c);void 0!==u&&u.enumerable&&(r[c]=i[c])}}return r},polyfill:function(){}}},6144:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a<o;a++)n.call(i,e[a],a,e);else for(var s in e)t.call(e,s)&&n.call(i,e[s],s,e)}},3136:function(e){"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},i=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r},o=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var a,s=this;if("function"!=typeof s||"[object Function]"!==t.apply(s))throw TypeError("Function.prototype.bind called on incompatible "+s);for(var c=i(arguments,1),u=r(0,s.length-c.length),l=[],d=0;d<u;d++)l[d]="$"+d;if(a=Function("binder","return function ("+o(l,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var t=s.apply(this,n(c,arguments));return Object(t)===t?t:this}return s.apply(e,n(c,arguments))}),s.prototype){var p=function(){};p.prototype=s.prototype,a.prototype=new p,p.prototype=null}return a}},1212:function(e,t,r){"use strict";var n=r(3136);e.exports=Function.prototype.bind||n},3197:function(e,t,r){"use strict";var n,i=r(2811),o=r(1545),a=r(7181),s=r(22),c=r(2803),u=r(5182),l=r(8202),d=r(3284),p=r(7173),f=r(847),h=r(2916),y=r(9882),g=r(3291),m=r(553),_=r(8629),b=Function,v=function(e){try{return b('"use strict"; return ('+e+").constructor;")()}catch(e){}},w=r(3990),E=r(446),S=function(){throw new l},k=w?function(){try{return arguments.callee,S}catch(e){try{return w(arguments,"callee").get}catch(e){return S}}}():S,A=r(4871)(),x=r(699),T=r(7823),O=r(7904),R=r(1909),P=r(8737),C={},j="u">typeof Uint8Array&&x?x(Uint8Array):n,I={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":A&&x?x([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":"u"<typeof Atomics?n:Atomics,"%BigInt%":"u"<typeof BigInt?n:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"u"<typeof Float16Array?n:Float16Array,"%Float32Array%":"u"<typeof Float32Array?n:Float32Array,"%Float64Array%":"u"<typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":C,"%Int8Array%":"u"<typeof Int8Array?n:Int8Array,"%Int16Array%":"u"<typeof Int16Array?n:Int16Array,"%Int32Array%":"u"<typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
2IteratorPrototype%":A&&x?x(x([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"u"<typeof Map?n:Map,"%MapIteratorPrototype%":"u">typeof Map&&A&&x?x((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?n:Promise,"%Proxy%":"u"<typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":c,"%Reflect%":"u"<typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?n:Set,"%SetIteratorPrototype%":"u">typeof Set&&A&&x?x((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&x?x(""[Symbol.iterator]()):n,"%Symbol%":A?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":k,"%TypedArray%":j,"%TypeError%":l,"%Uint8Array%":"u"<typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?n:Uint32Array,"%URIError%":d,"%WeakMap%":"u"<typeof WeakMap?n:WeakMap,"%WeakRef%":"u"<typeof WeakRef?n:WeakRef,"%WeakSet%":"u"<typeof WeakSet?n:WeakSet,"%Function.prototype.call%":P,"%Function.prototype.apply%":R,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":T,"%Math.abs%":p,"%Math.floor%":f,"%Math.max%":h,"%Math.min%":y,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":_,"%Reflect.getPrototypeOf%":O};if(x)try{null.error}catch(e){var U=x(x(e));I["%Error.prototype%"]=U}var z=function e(t){var r;if("%AsyncFunction%"===t)r=v("async function () {}");else if("%GeneratorFunction%"===t)r=v("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=v("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&x&&(r=x(i.prototype))}return I[t]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},D=r(1212),M=r(3270),H=D.call(P,Array.prototype.concat),W=D.call(R,Array.prototype.splice),$=D.call(P,String.prototype.replace),L=D.call(P,String.prototype.slice),K=D.call(P,RegExp.prototype.exec),B=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Z=/\\(\\)?/g,q=function(e){var t=L(e,0,1),r=L(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return $(e,B,function(e,t,r,i){n[n.length]=r?$(i,Z,"$1"):t||e}),n},F=function(e,t){var r,n=e;if(M(N,n)&&(n="%"+(r=N[n])[0]+"%"),M(I,n)){var i=I[n];if(i===C&&(i=z(n)),void 0===i&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===K(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=q(e),n=r.length>0?r[0]:"",i=F("%"+n+"%",t),o=i.name,a=i.value,s=!1,c=i.alias;c&&(n=c[0],W(r,H([0,1],c)));for(var d=1,p=!0;d<r.length;d+=1){var f=r[d],h=L(f,0,1),y=L(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===y||"'"===y||"`"===y)&&h!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==f&&p||(s=!0),n+="."+f,M(I,o="%"+n+"%"))a=I[o];
2else if(null!=a){if(!(f in a)){if(!t)throw new l("base intrinsic for "+e+" exists, but the property is not available.");return}if(w&&d+1>=r.length){var g=w(a,f);a=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[f]}else p=M(a,f),a=a[f];p&&!s&&(I[o]=a)}}return a}},7823:function(e,t,r){"use strict";e.exports=r(2811).getPrototypeOf||null},7904:function(e){"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},699:function(e,t,r){"use strict";var n=r(7904),i=r(7823),o=r(6211);e.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return i(e)}:o?function(e){return o(e)}:null},4596:function(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},3990:function(e,t,r){"use strict";var n=r(4596);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},7122:function(e,t,r){"use strict";var n=r(446),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},9942:function(e,t,r){"use strict";var n="u">typeof Symbol&&Symbol,i=r(3773);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},3773:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},4871:function(e,t,r){"use strict";var n="u">typeof Symbol&&Symbol,i=r(5960);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5960:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3270:function(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty;e.exports=r(1212).call(n,i)},3782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},5157:function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(e){return(!t||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===r.call(e)},i=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=i,e.exports=o?n:i},3391:function(e){"use strict";var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,o=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?o(a):{};e.exports=function(e){return"function"==typeof e&&(!!n.test(r.call(e))||(i?o(e)===s:"[object GeneratorFunction]"===t.call(e)))}},460:function(e){"use strict";e.exports=function(e){return e!=e}},1992:function(e,t,r){"use strict";var n=r(7139),i=r(3069),o=r(460),a=r(773),s=r(4171),c=n(a(),Number);i(c,{getPolyfill:a,implementation:o,shim:s}),e.exports=c},773:function(e,t,r){"use strict";var n=r(460);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},4171:function(e,t,r){"use strict";var n=r(3069),i=r(773);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},994:function(t,r,n){"use strict";var i=n(6144),o=n(1349),a=n(516),s=a("Object.prototype.toString"),c=n(9942)()&&"symbol"==typeof Symbol.toStringTag,u=o(),l=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return -1},d=a("String.prototype.slice"),p={},f=n(2154),h=Object.getPrototypeOf;c&&f&&h&&i(u,function(t){var r=new e.g[t];if(!(Symbol.toStringTag in r))throw EvalError("this engine has support for Symbol.toStringTag, but "+t+" does not have the property! Please report this.");var n=h(r),i=f(n,Symbol.toStringTag);i||(i=f(h(n),Symbol.toStringTag)),p[t]=i.get});var y=function(e){var t=!1;return i(p,function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}}),t};t.exports=function(e){return!!e&&"object"==typeof e&&(c?!!f&&y(e):l(u,d(s(e),8,-1))>-1)}},7173:function(e){"use strict";e.exports=Math.abs},847:function(e){"use strict";e.exports=Math.floor},219:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},2916:function(e){"use strict";e.exports=Math.max},9882:function(e){"use strict";e.exports=Math.min},3291:function(e){"use strict";e.exports=Math.pow},553:function(e){"use strict";e.exports=Math.round},8629:function(e,t,r){"use strict";var n=r(219);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},3256:function(e){"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:!!(e===r||t(e)&&t(r))}},8579:function(e,t,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(8412),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),u=s.call(function(){}
2,"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("u"<typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),h=function(e){if("u"<typeof window||!f)return d(e);try{return d(e)}catch(e){return!1}};n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),d=[];if(!t&&!r&&!n)throw TypeError("Object.keys called on a non-object");var p=u&&r;if(s&&e.length>0&&!i.call(e,0))for(var f=0;f<e.length;++f)d.push(String(f));if(n&&e.length>0)for(var y=0;y<e.length;++y)d.push(String(y));else for(var g in e)!(p&&"prototype"===g)&&i.call(e,g)&&d.push(String(g));if(c)for(var m=h(e),_=0;_<l.length;++_)!(m&&"constructor"===l[_])&&i.call(e,l[_])&&d.push(l[_]);return d}}e.exports=n},4935:function(e,t,r){"use strict";var n=Array.prototype.slice,i=r(8412),o=Object.keys,a=o?function(e){return o(e)}:r(8579),s=Object.keys;a.shim=function(){return Object.keys?!function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)&&(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)}):Object.keys=a,Object.keys||a},e.exports=a},8412:function(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},3143:function(e,t,r){"use strict";var n=r(3197),i=r(819),o=r(7122)(),a=r(3990),s=r(8202),c=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||c(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(u=!1)}return(n||u||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},2369:function(e){e.exports=function(e){return e instanceof i.Buffer}},5584:function(e,t,r){"use strict";var n=r(5157),i=r(3391),o=r(1490),a=r(994);function s(e){return e.call.bind(e)}var c="u">typeof BigInt,u="u">typeof Symbol,l=s(Object.prototype.toString),d=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);if(c)var h=s(BigInt.prototype.valueOf);if(u)var y=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===l(e)}function _(e){return"[object Set]"===l(e)}function b(e){return"[object WeakMap]"===l(e)}function v(e){return"[object WeakSet]"===l(e)}function w(e){return"[object ArrayBuffer]"===l(e)}function E(e){return!("u"<typeof ArrayBuffer)&&(w.working?w(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===l(e)}function k(e){return!("u"<typeof DataView)&&(S.working?S(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=function(e){return"u">typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||k(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},m.working="u">typeof Map&&m(new Map),t.isMap=function(e){return!("u"<typeof Map)&&(m.working?m(e):e instanceof Map)},_.working="u">typeof Set&&_(new Set),t.isSet=function(e){return!("u"<typeof Set)&&(_.working?_(e):e instanceof Set)},b.working="u">typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return!("u"<typeof WeakMap)&&(b.working?b(e):e instanceof WeakMap)},v.working="u">typeof WeakSet&&v(new WeakSet),t.isWeakSet=function(e){return v(e)},w.working="u">typeof ArrayBuffer&&w(new ArrayBuffer),t.isArrayBuffer=E,S.working="u">typeof ArrayBuffer&&"u">typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=k;var A="u">typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function x(e){return"[object SharedArrayBuffer]"===l(e)}function T(e){return void 0!==A&&(void 0===x.working&&(x.working=x(new A)),x.working?x(e):e instanceof A)}function O(e){return g(e,d)}function R(e){return g(e,p)}function P(e){return g(e,f)}function C(e){return c&&g(e,h)}function j(e){return u&&g(e,y)}t.isSharedArrayBuffer=T,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=O,t.isStringObject=R,t.isBooleanObject=P,t.isBigIntObject=C,t.isSymbolObject=j,t.isBoxedPrimitive=function(e){return O(e)||R(e)||P(e)||C(e)||j(e)},t.isAnyArrayBuffer=function(e){return"u">typeof Uint8Array&&(E(e)||T(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},8177:function(e,t,r){var i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(o,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<i;s=n[++r])m(s)||!E(s)?a+=" "+s:a+=" "+u(s);return a},t.deprecate=function(e,r){if(void 0!==n.default&&!0===n.default.noDeprecation)return e;if(void 0===n.default)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.default.throwDeprecation)throw Error(r);n.default.traceDeprecation?console.trace(r):console.error(r),i=!0}return e.apply(this,arguments)}};var a={},s=/^$/;if(n.default.env.NODE_DEBUG){var c=n.default.env.NODE_DEBUG;s=RegExp("^"+(c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase())+"$","i")}function u(e,r){var n={seen:[],stylize:d};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),p(n,e,n.depth)}function l(e,t){var r=u.styles[t];return r?"\x1b["+u.colors[r][0]+"m"+e+"\x1b["+u.colors[r][1]+"m":e}function d(e,t){return e}function p(e,r,n){if(e.customInspect&&r&&A(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,o,a,s,c,u,l=r.inspect(n,e);return b(l)||(l=p(e,l,n)),l}var d=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";
2return e.stylize(r,"string")}return _(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(d)return d;var E=Object.keys(r),x=(c={},E.forEach(function(e,t){c[e]=!0}),c);if(e.showHidden&&(E=Object.getOwnPropertyNames(r)),k(r)&&(E.indexOf("message")>=0||E.indexOf("description")>=0))return f(r);if(0===E.length){if(A(r)){var T=r.name?": "+r.name:"";return e.stylize("[Function"+T+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(k(r))return f(r)}var O="",P=!1,C=["{","}"];if(y(r)&&(P=!0,C=["[","]"]),A(r)&&(O=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(O=" "+RegExp.prototype.toString.call(r)),S(r)&&(O=" "+Date.prototype.toUTCString.call(r)),k(r)&&(O=" "+f(r)),0===E.length&&(!P||0==r.length))return C[0]+O+C[1];if(n<0)if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");else return e.stylize("[Object]","special");return e.seen.push(r),u=P?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)R(t,String(a))?o.push(h(e,t,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))}),o}(e,r,n,x,E):E.map(function(t){return h(e,r,n,x,t,P)}),e.seen.pop(),i=u,o=O,a=C,s=0,i.reduce(function(e,t){return s++,t.indexOf("\n")>=0&&s++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?a[0]+(""===o?"":o+"\n ")+" "+i.join(",\n  ")+" "+a[1]:a[0]+o+" "+i.join(", ")+" "+a[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),R(n,i)||(a="["+i+"]"),!s&&(0>e.seen.indexOf(c.value)?(s=m(r)?p(e,c.value,null):p(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return"   "+e}).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function y(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function _(e){return"number"==typeof e}function b(e){return"string"==typeof e}function v(e){return void 0===e}function w(e){return E(e)&&"[object RegExp]"===x(e)}function E(e){return"object"==typeof e&&null!==e}function S(e){return E(e)&&"[object Date]"===x(e)}function k(e){return E(e)&&("[object Error]"===x(e)||e instanceof Error)}function A(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!a[e=e.toUpperCase()])if(s.test(e)){var r=n.default.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){};return a[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(5584),t.isArray=y,t.isBoolean=g,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=_,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=w,t.types.isRegExp=w,t.isObject=E,t.isDate=S,t.types.isDate=S,t.isError=k,t.types.isNativeError=k,t.isFunction=A,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(2369);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[T((e=new Date).getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":"),[e.getDate(),O[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(3782),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t=e[P];if("function"!=typeof t)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,
2configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(e,n){e?r(e):t(n)});try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=P,t.callbackify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,t).then(function(e){n.default.nextTick(a.bind(null,null,e))},function(e){n.default.nextTick(C.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},1490:function(t,r,n){"use strict";var i=n(6144),o=n(1349),a=n(516),s=a("Object.prototype.toString"),c=n(9942)()&&"symbol"==typeof Symbol.toStringTag,u=o(),l=a("String.prototype.slice"),d={},p=n(2154),f=Object.getPrototypeOf;c&&p&&f&&i(u,function(t){if("function"==typeof e.g[t]){var r=new e.g[t];if(!(Symbol.toStringTag in r))throw EvalError("this engine has support for Symbol.toStringTag, but "+t+" does not have the property! Please report this.");var n=f(r),i=p(n,Symbol.toStringTag);i||(i=p(f(n),Symbol.toStringTag)),d[t]=i.get}});var h=function(e){var t=!1;return i(d,function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}}),t},y=n(994);t.exports=function(e){return!!y(e)&&(c?h(e):l(s(e),8,-1))}},1349:function(t,r,n){"use strict";var i=n(8992);t.exports=function(){return i(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],function(t){return"function"==typeof e.g[t]})}},2154:function(e,t,r){"use strict";e.exports=r(3990)}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}},n=!0;try{o[e](r,r.exports,s),n=!1}finally{n&&delete a[e]}return r.exports}s.ab="/ROOT/node_modules/next/dist/compiled/assert/",t.exports=s(2167)},563703,e=>{"use strict";class t extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,null==(t=Error.captureStackTrace)||t.call(Error,this,this.constructor)}}class r extends t{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=t,this.reason=r}}class n extends t{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=t,this.reason=r}}class i extends t{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class o extends t{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class a extends t{constructor(){super(...arguments),this.code="ERR_JWE_DECRYPTION_FAILED",this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}class s extends t{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}class c extends t{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class u extends t{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}class l extends t{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}class d extends t{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}class p extends t{constructor(){super(...arguments),this.code="ERR_JWKS_NO_MATCHING_KEY",this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}class f extends t{constructor(){super(...arguments),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS",this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}class h extends t{constructor(){super(...arguments),this.code="ERR_JWKS_TIMEOUT",this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}class y extends t{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}e.s(["JOSEAlgNotAllowed",0,i,"JOSEError",0,t,"JOSENotSupported",0,o,"JWEDecompressionFailed",0,class extends t{constructor(){super(...arguments),this.code="ERR_JWE_DECOMPRESSION_FAILED",this.message="decompression o
2peration failed"}static get code(){return"ERR_JWE_DECOMPRESSION_FAILED"}},"JWEDecryptionFailed",0,a,"JWEInvalid",0,s,"JWKInvalid",0,l,"JWKSInvalid",0,d,"JWKSMultipleMatchingKeys",0,f,"JWKSNoMatchingKey",0,p,"JWKSTimeout",0,h,"JWSInvalid",0,c,"JWSSignatureVerificationFailed",0,y,"JWTClaimValidationFailed",0,r,"JWTExpired",0,n,"JWTInvalid",0,u],33867);var g=e.i(33867);let m=crypto,_=async(e,t)=>{let r=`SHA-${e.slice(-3)}`;return new Uint8Array(await m.subtle.digest(r,t))},b=new TextEncoder,v=new TextDecoder;function w(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;return e.forEach(e=>{t.set(e,r),r+=e.length}),t}function E(e,t,r){if(t<0||t>=0x100000000)throw RangeError(`value must be >= 0 and <= ${0x100000000-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function S(e){let t=Math.floor(e/0x100000000),r=new Uint8Array(8);return E(r,t,0),E(r,e%0x100000000,4),r}function k(e){let t=new Uint8Array(4);return E(t,e),t}function A(e){return w(k(e.length),e)}async function x(e,t,r){let n=Math.ceil((t>>3)/32),i=new Uint8Array(32*n);for(let t=0;t<n;t++){let n=new Uint8Array(4+e.length+r.length);n.set(k(t+1)),n.set(e,4),n.set(r,4+e.length),i.set(await _("sha256",n),32*t)}return i.slice(0,t>>3)}let T=e=>{let t=e;"string"==typeof t&&(t=b.encode(t));let r=[];for(let e=0;e<t.length;e+=32768)r.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(r.join(""))},O=e=>T(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),R=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r},P=e=>{let t=e;t instanceof Uint8Array&&(t=v.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return R(t)}catch(e){throw TypeError("The input to be decoded is not correctly encoded.")}};e.s(["decode",0,P,"encode",0,O],840796);var C=e.i(840796);e.s([],964092),e.i(964092);let j=m.getRandomValues.bind(m);function I(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new o(`Unsupported JWE Algorithm: ${e}`)}}let U=e=>j(new Uint8Array(I(e)>>3)),z=(e,t)=>{if(t.length<<3!==I(e))throw new s("Invalid Initialization Vector length")},N=(e,t)=>{let r=e.byteLength<<3;if(r!==t)throw new s(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)};function D(e,t="algorithm.name"){return TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function M(e,t){return e.name===t}function H(e){return parseInt(e.name.slice(4),10)}function W(e,t){if(t.length&&!t.some(t=>e.usages.includes(t))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){let r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw TypeError(e)}}function $(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!M(e.algorithm,"AES-GCM"))throw D("AES-GCM");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw D(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!M(e.algorithm,"AES-KW"))throw D("AES-KW");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw D(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw D("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!M(e.algorithm,"PBKDF2"))throw D("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!M(e.algorithm,"RSA-OAEP"))throw D("RSA-OAEP");let r=parseInt(t.slice(9),10)||1;if(H(e.algorithm.hash)!==r)throw D(`SHA-${r}`,"algorithm.hash");break}default:throw TypeError("CryptoKey does not support this operation")}W(e,r)}function L(e,t,...r){if(r.length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}let K=(e,...t)=>L("Key must be ",e,...t);function B(e,t,...r){return L(`Key for the ${e} algorithm must be `,t,...r)}let Z=["CryptoKey"];async function q(e,t,r,n,i,o){let s,c;if(!(t instanceof Uint8Array))throw TypeError(K(t,"Uint8Array"));let u=parseInt(e.slice(1,4),10),l=await m.subtle.importKey("raw",t.subarray(u>>3),"AES-CBC",!1,["decrypt"]),d=await m.subtle.importKey("raw",t.subarray(0,u>>3),{hash:`SHA-${u<<1}`,name:"HMAC"},!1,["sign"]),p=w(o,n,r,S(o.length<<3)),f=new Uint8Array((await m.subtle.sign("HMAC",d,p)).slice(0,u>>3));try{s=((e,t)=>{if(!(e instanceof Uint8Array))throw TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw TypeError("Second argument must be a buffer");if(e.length!==t.length)throw TypeError("Input buffers must have the same length");let r=e.length,n=0,i=-1;for(;++i<r;)n|=e[i]^t[i];return 0===n})(i,f)}catch(e){}if(!s)throw new a;try{c=new Uint8Array(await m.subtle.decrypt({iv:n,name:"AES-CBC"},l,r))}catch(e){}if(!c)throw new a;return c}async function F(e,t,r,n,i,o){let s;t instanceof Uint8Array?s=await m.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):($(t,e,"decrypt"),s=t);try{return new Uint8Array(await m.subtle.decrypt({additionalData:o,iv:n,name:"AES-GCM",tagLength:128},s,w(r,i)))}catch(e){throw new a}}let J=async(e,t,r,n,i,a)=>
2{if(!(t instanceof CryptoKey)&&!(t instanceof Uint8Array))throw TypeError(K(t,...Z,"Uint8Array"));switch(z(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&N(t,parseInt(e.slice(-3),10)),q(e,t,r,n,i,a);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&N(t,parseInt(e.slice(1,4),10)),F(e,t,r,n,i,a);default:throw new o("Unsupported JWE Content Encryption Algorithm")}},G=async()=>{throw new o('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `inflateRaw` decrypt option to provide Inflate Raw implementation.')},V=async()=>{throw new o('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `deflateRaw` encrypt option to provide Deflate Raw implementation.')},Y=(...e)=>{let t,r=e.filter(Boolean);if(0===r.length||1===r.length)return!0;for(let e of r){let r=Object.keys(e);if(!t||0===t.size){t=new Set(r);continue}for(let e of r){if(t.has(e))return!1;t.add(e)}}return!0};function X(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}let Q=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function ee(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw TypeError(`Invalid key size for alg: ${t}`)}function et(e,t,r){if(e instanceof CryptoKey)return $(e,t,r),e;if(e instanceof Uint8Array)return m.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw TypeError(K(e,...Z,"Uint8Array"))}let er=async(e,t,r)=>{let n=await et(t,e,"wrapKey");ee(n,e);let i=await m.subtle.importKey("raw",r,...Q);return new Uint8Array(await m.subtle.wrapKey("raw",i,n,"AES-KW"))},en=async(e,t,r)=>{let n=await et(t,e,"unwrapKey");ee(n,e);let i=await m.subtle.unwrapKey("raw",r,n,"AES-KW",...Q);return new Uint8Array(await m.subtle.exportKey("raw",i))};async function ei(e,t,r,n,i=new Uint8Array(0),o=new Uint8Array(0)){let a;if(!(e instanceof CryptoKey))throw TypeError(K(e,...Z));if($(e,"ECDH"),!(t instanceof CryptoKey))throw TypeError(K(t,...Z));$(t,"ECDH","deriveBits");let s=w(A(b.encode(r)),A(i),A(o),k(n));return a="X25519"===e.algorithm.name?256:"X448"===e.algorithm.name?448:Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3,x(new Uint8Array(await m.subtle.deriveBits({name:e.algorithm.name,public:e},t,a)),n,s)}async function eo(e){if(!(e instanceof CryptoKey))throw TypeError(K(e,...Z));return m.subtle.generateKey(e.algorithm,!0,["deriveBits"])}function ea(e){if(!(e instanceof CryptoKey))throw TypeError(K(e,...Z));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}async function es(e,t,r,n){if(!(e instanceof Uint8Array)||e.length<8)throw new s("PBES2 Salt Input must be 8 or more octets");let i=w(b.encode(t),new Uint8Array([0]),e),o=parseInt(t.slice(13,16),10),a={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:i},c=await function(e,t){if(e instanceof Uint8Array)return m.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(e instanceof CryptoKey)return $(e,t,"deriveBits","deriveKey"),e;throw TypeError(K(e,...Z,"Uint8Array"))}(n,t);if(c.usages.includes("deriveBits"))return new Uint8Array(await m.subtle.deriveBits(a,c,o));if(c.usages.includes("deriveKey"))return m.subtle.deriveKey(a,c,{length:o,name:"AES-KW"},!1,["wrapKey","unwrapKey"]);throw TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}let ec=async(e,t,r,n=2048,i=j(new Uint8Array(16)))=>{let o=await es(i,e,n,t);return{encryptedKey:await er(e.slice(-6),o,r),p2c:n,p2s:O(i)}},eu=async(e,t,r,n,i)=>{let o=await es(i,e,n,t);return en(e.slice(-6),o,r)};function el(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new o(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}let ed=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e}
2 requires key modulusLength to be 2048 bits or larger`)}},ep=async(e,t,r)=>{if(!(t instanceof CryptoKey))throw TypeError(K(t,...Z));if($(t,e,"encrypt","wrapKey"),ed(e,t),t.usages.includes("encrypt"))return new Uint8Array(await m.subtle.encrypt(el(e),t,r));if(t.usages.includes("wrapKey")){let n=await m.subtle.importKey("raw",r,...Q);return new Uint8Array(await m.subtle.wrapKey("raw",n,t,el(e)))}throw TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')},ef=async(e,t,r)=>{if(!(t instanceof CryptoKey))throw TypeError(K(t,...Z));if($(t,e,"decrypt","unwrapKey"),ed(e,t),t.usages.includes("decrypt"))return new Uint8Array(await m.subtle.decrypt(el(e),t,r));if(t.usages.includes("unwrapKey")){let n=await m.subtle.unwrapKey("raw",r,t,el(e),...Q);return new Uint8Array(await m.subtle.exportKey("raw",n))}throw TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')};function eh(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new o(`Unsupported JWE Algorithm: ${e}`)}}let ey=e=>j(new Uint8Array(eh(e)>>3)),eg=(e,t)=>{let r=(e.match(/.{1,64}/g)||[]).join("\n");return`-----BEGIN ${t}-----
3${r}
4-----END ${t}-----`},em=async(e,t,r)=>{if(!(r instanceof CryptoKey))throw TypeError(K(r,...Z));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return eg(T(new Uint8Array(await m.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},e_=(e,t,r=0)=>{0===r&&(t.unshift(t.length),t.unshift(6));let n=e.indexOf(t[0],r);if(-1===n)return!1;let i=e.subarray(n,n+t.length);return i.length===t.length&&(i.every((e,r)=>e===t[r])||e_(e,t,n+1))},eb=e=>{switch(!0){case e_(e,[42,134,72,206,61,3,1,7]):return"P-256";case e_(e,[43,129,4,0,34]):return"P-384";case e_(e,[43,129,4,0,35]):return"P-521";case e_(e,[43,101,110]):return"X25519";case e_(e,[43,101,111]):return"X448";case e_(e,[43,101,112]):return"Ed25519";case e_(e,[43,101,113]):return"Ed448";default:throw new o("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},ev=async(e,t,r,n,i)=>{var a;let s,c,u=new Uint8Array(atob(r.replace(e,"")).split("").map(e=>e.charCodeAt(0))),l="spki"===t;switch(n){case"PS256":case"PS384":case"PS512":s={name:"RSA-PSS",hash:`SHA-${n.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":s={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${n.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s={name:"RSA-OAEP",hash:`SHA-${parseInt(n.slice(-3),10)||1}`},c=l?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":s={name:"ECDSA",namedCurve:"P-256"},c=l?["verify"]:["sign"];break;case"ES384":s={name:"ECDSA",namedCurve:"P-384"},c=l?["verify"]:["sign"];break;case"ES512":s={name:"ECDSA",namedCurve:"P-521"},c=l?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let e=eb(u);s=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},c=l?[]:["deriveBits"];break}
4case"EdDSA":s={name:eb(u)},c=l?["verify"]:["sign"];break;default:throw new o('Invalid or unsupported "alg" (Algorithm) value')}return m.subtle.importKey(t,u,s,null!=(a=null==i?void 0:i.extractable)&&a,c)};function ew(e){let t=[],r=0;for(;r<e.length;){let n=eE(e.subarray(r));t.push(n),r+=n.byteLength}return t}function eE(e){let t=0,r=31&e[0];if(t++,31===r){for(r=0;e[t]>=128;)r=128*r+e[t]-128,t++;r=128*r+e[t]-128,t++}let n=0;if(e[t]<128)n=e[t],t++;else if(128===n){for(n=0;0!==e[t+n]||0!==e[t+n+1];){if(n>e.byteLength)throw TypeError("invalid indefinite form length");n++}let r=t+n+2;return{byteLength:r,contents:e.subarray(t,t+n),raw:e.subarray(0,r)}}else{let r=127&e[t];t++,n=0;for(let i=0;i<r;i++)n=256*n+e[t],t++}let i=t+n;return{byteLength:i,contents:e.subarray(t,i),raw:e.subarray(0,i)}}let eS=async e=>{var t,r;if(!e.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:n,keyUsages:i}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new o(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new o('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new o('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new o('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new o('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new o('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),a=[n,null!=(t=e.ext)&&t,null!=(r=e.key_ops)?r:i];if("PBKDF2"===n.name)return m.subtle.importKey("raw",P(e.k),...a);let s={...e};return delete s.alg,delete s.use,m.subtle.importKey("jwk",s,...a)};async function ek(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return ev(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,r)}async function eA(e,t,r){let n;if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');try{var i;let t;i=e,n=eg((t=ew(ew(eE(R(i.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""))).contents)[0].contents),T(t[160===t[0].raw[0]?6:5].raw)),"PUBLIC KEY")}catch(e){throw TypeError("Failed to parse the X.509 certificate",{cause:e})}return ev(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",n,t,r)}async function ex(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');
4return ev(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t,r)}async function eT(e,t,r){var n;if(!X(e))throw TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw TypeError('missing "k" (Key Value) Parameter value');if(null!=r||(r=!0!==e.ext),r)return eS({...e,alg:t,ext:null!=(n=e.ext)&&n});return P(e.k);case"RSA":if(void 0!==e.oth)throw new o('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return eS({...e,alg:t});default:throw new o('Unsupported "kty" (Key Type) Parameter value')}}let eO=(e,t,r)=>{if(e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)){if(!(t instanceof Uint8Array)){if(!(t instanceof CryptoKey))throw TypeError(B(e,t,...Z,"Uint8Array"));if("secret"!==t.type)throw TypeError(`${Z.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}}else{if(!(t instanceof CryptoKey))throw TypeError(B(e,t,...Z));if("secret"===t.type)throw TypeError(`${Z.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw TypeError(`${Z.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw TypeError(`${Z.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw TypeError(`${Z.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw TypeError(`${Z.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)}};async function eR(e,t,r,n,i){if(!(r instanceof Uint8Array))throw TypeError(K(r,"Uint8Array"));let o=parseInt(e.slice(1,4),10),a=await m.subtle.importKey("raw",r.subarray(o>>3),"AES-CBC",!1,["encrypt"]),s=await m.subtle.importKey("raw",r.subarray(0,o>>3),{hash:`SHA-${o<<1}`,name:"HMAC"},!1,["sign"]),c=new Uint8Array(await m.subtle.encrypt({iv:n,name:"AES-CBC"},a,t)),u=w(i,n,c,S(i.length<<3));return{ciphertext:c,tag:new Uint8Array((await m.subtle.sign("HMAC",s,u)).slice(0,o>>3))}}async function eP(e,t,r,n,i){let o;r instanceof Uint8Array?o=await m.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):($(r,e,"encrypt"),o=r);let a=new Uint8Array(await m.subtle.encrypt({additionalData:i,iv:n,name:"AES-GCM",tagLength:128},o,t)),s=a.slice(-16);return{ciphertext:a.slice(0,-16),tag:s}}let eC=async(e,t,r,n,i)=>{if(!(r instanceof CryptoKey)&&!(r instanceof Uint8Array))throw TypeError(K(r,...Z,"Uint8Array"));switch(z(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&N(r,parseInt(e.slice(-3),10)),eR(e,t,r,n,i);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&N(r,parseInt(e.slice(1,4),10)),eP(e,t,r,n,i);default:throw new o("Unsupported JWE Content Encryption Algorithm")}};async function ej(e,t,r,n){let i=e.slice(0,7);n||(n=U(i));let{ciphertext:o,tag:a}=await eC(i,r,t,n,new Uint8Array(0));return{encryptedKey:o,iv:O(n),tag:O(a)}}async function eI(e,t,r,n,i){return J(e.slice(0,7),t,r,n,i,new Uint8Array(0))}async function eU(e,t,r,n,i){switch(eO(e,t,"decrypt"),e){case"dir":if(void 0!==r)throw new s("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new s("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let i,a;if(!X(n.epk))throw new s('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!ea(t))throw new o("ECDH with the provided key is not allowed or not supported by your javascript runtime");let c=await eT(n.epk,e);if(void 0!==n.apu){if("string"!=typeof n.apu)throw new s('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{i=P(n.apu)}catch(e){throw new s("Failed to base64url decode the apu")}}if(void 0!==n.apv){if("string"!=typeof n.apv)throw new s('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{a=P(n.apv)}catch(e){throw new s("Failed to base64url decode the apv")}}let u=await ei(c,t,"ECDH-ES"===e?n.enc:e,"ECDH-ES"===e?eh(n.enc):parseInt(e.slice(-5,-2),10),i,a);if("ECDH-ES"===e)return u;if(void 0===r)throw new s("JWE Encrypted Key missing");return en(e.slice(-6),u,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new s("JWE Encrypted Key missing");return ef(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{let o;if(void 0===r)throw new s("JWE Encrypted Key missing");if("number"!=typeof n.p2c)throw new s('JOSE Header "p2c" (PBES2 Count) missing or invalid');let a=(null==i?void 0:i.maxPBES2Count)||1e4;if(n.p2c>a)throw new s('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof n.p2s)throw new s('JOSE Header "p2s" (PBES2 Salt) missing or invalid');try{o=P(n.p2s)}catch(e){throw new s("Failed to base64url decode the p2s")}return eu(e,t,r,n.p2c,o)}
4case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new s("JWE Encrypted Key missing");return en(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{let i,o;if(void 0===r)throw new s("JWE Encrypted Key missing");if("string"!=typeof n.iv)throw new s('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof n.tag)throw new s('JOSE Header "tag" (Authentication Tag) missing or invalid');try{i=P(n.iv)}catch(e){throw new s("Failed to base64url decode the iv")}try{o=P(n.tag)}catch(e){throw new s("Failed to base64url decode the tag")}return eI(e,t,r,i,o)}default:throw new o('Invalid or unsupported "alg" (JWE Algorithm) header value')}}let ez=function(e,t,r,n,i){let a;if(void 0!==i.crit&&void 0===n.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');for(let s of(a=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t,n.crit)){if(!a.has(s))throw new o(`Extension Header Parameter "${s}" is not recognized`);if(void 0===i[s])throw new e(`Extension Header Parameter "${s}" is missing`);if(a.get(s)&&void 0===n[s])throw new e(`Extension Header Parameter "${s}" MUST be integrity protected`)}return new Set(n.crit)},eN=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function eD(e,t,r){var n;let a,c,u,l,d,p,f;if(!X(e))throw new s("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new s("JOSE Header missing");if("string"!=typeof e.iv)throw new s("JWE Initialization Vector missing or incorrect type");if("string"!=typeof e.ciphertext)throw new s("JWE Ciphertext missing or incorrect type");if("string"!=typeof e.tag)throw new s("JWE Authentication Tag missing or incorrect type");if(void 0!==e.protected&&"string"!=typeof e.protected)throw new s("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!=typeof e.encrypted_key)throw new s("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!=typeof e.aad)throw new s("JWE AAD incorrect type");if(void 0!==e.header&&!X(e.header))throw new s("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!X(e.unprotected))throw new s("JWE Per-Recipient Unprotected Header incorrect type");if(e.protected)try{let t=P(e.protected);a=JSON.parse(v.decode(t))}catch(e){throw new s("JWE Protected Header is invalid")}if(!Y(a,e.header,e.unprotected))throw new s("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");let h={...a,...e.header,...e.unprotected};if(ez(s,new Map,null==r?void 0:r.crit,a,h),void 0!==h.zip){if(!a||!a.zip)throw new s('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==h.zip)throw new o('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:y,enc:g}=h;if("string"!=typeof y||!y)throw new s("missing JWE Algorithm (alg) in JWE Header");if("string"!=typeof g||!g)throw new s("missing JWE Encryption Algorithm (enc) in JWE Header");let m=r&&eN("keyManagementAlgorithms",r.keyManagementAlgorithms),_=r&&eN("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(m&&!m.has(y))throw new i('"alg" (Algorithm) Header Parameter not allowed');if(_&&!_.has(g))throw new i('"enc" (Encryption Algorithm) Header Parameter not allowed');if(void 0!==e.encrypted_key)try{c=P(e.encrypted_key)}catch(e){throw new s("Failed to base64url decode the encrypted_key")}let E=!1;"function"==typeof t&&(t=await t(a,e),E=!0);try{u=await eU(y,t,c,h,r)}catch(e){if(e instanceof TypeError||e instanceof s||e instanceof o)throw e;u=ey(g)}try{l=P(e.iv)}catch(e){throw new s("Failed to base64url decode the iv")}try{d=P(e.tag)}catch(e){throw new s("Failed to base64url decode the tag")}let S=b.encode(null!=(n=e.protected)?n:"");p=void 0!==e.aad?w(S,b.encode("."),b.encode(e.aad)):S;try{f=P(e.ciphertext)}catch(e){throw new s("Failed to base64url decode the ciphertext")}let k=await J(g,u,f,l,d,p);"DEF"===h.zip&&(k=await ((null==r?void 0:r.inflateRaw)||G)(k));let A={plaintext:k};if(void 0!==e.protected&&(A.protectedHeader=a),void 0!==e.aad)try{A.additionalAuthenticatedData=P(e.aad)}catch(e){throw new s("Failed to base64url decode the aad")}return(void 0!==e.unprotected&&(A.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(A.unprotectedHeader=e.header),E)?{...A,key:t}:A}async function eM(e,t,r){if(e instanceof Uint8Array&&(e=v.decode(e)),"string"!=typeof e)throw new s("Compact JWE must be a string or Uint8Array");let{0:n,1:i,2:o,3:a,4:c,length:u}=e.split(".");if(5!==u)throw new s("Invalid Compact JWE");
4let l=await eD({ciphertext:a,iv:o||void 0,protected:n||void 0,tag:c||void 0,encrypted_key:i||void 0},t,r),d={plaintext:l.plaintext,protectedHeader:l.protectedHeader};return"function"==typeof t?{...d,key:l.key}:d}async function eH(e,t,r){if(!X(e))throw new s("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(X))throw new s("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new s("JWE Recipients has no members");for(let n of e.recipients)try{return await eD({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:n.encrypted_key,header:n.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,r)}catch(e){}throw new a}let eW=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:O(e)};if(!(e instanceof CryptoKey))throw TypeError(K(e,...Z,"Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:n,use:i,...o}=await m.subtle.exportKey("jwk",e);return o};async function e$(e){return em("public","spki",e)}async function eL(e){return em("private","pkcs8",e)}async function eK(e){return eW(e)}async function eB(e,t,r,n,i={}){let a,s,c;switch(eO(e,r,"encrypt"),e){case"dir":c=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!ea(r))throw new o("ECDH with the provided key is not allowed or not supported by your javascript runtime");let{apu:u,apv:l}=i,{epk:d}=i;d||(d=(await eo(r)).privateKey);let{x:p,y:f,crv:h,kty:y}=await eK(d),g=await ei(r,d,"ECDH-ES"===e?t:e,"ECDH-ES"===e?eh(t):parseInt(e.slice(-5,-2),10),u,l);if(s={epk:{x:p,crv:h,kty:y}},"EC"===y&&(s.epk.y=f),u&&(s.apu=O(u)),l&&(s.apv=O(l)),"ECDH-ES"===e){c=g;break}c=n||ey(t);let m=e.slice(-6);a=await er(m,g,c);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":c=n||ey(t),a=await ep(e,r,c);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{c=n||ey(t);let{p2c:o,p2s:u}=i;({encryptedKey:a,...s}=await ec(e,r,c,o,u));break}case"A128KW":case"A192KW":case"A256KW":c=n||ey(t),a=await er(e,r,c);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{c=n||ey(t);let{iv:o}=i;({encryptedKey:a,...s}=await ej(e,r,c,o));break}default:throw new o('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:c,encryptedKey:a,parameters:s}}let eZ=Symbol();class eq{constructor(e){if(!(e instanceof Uint8Array))throw TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,t){let r,n,i,a,c,u,l;if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new s("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!Y(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new s("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let d={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(ez(s,new Map,null==t?void 0:t.crit,this._protectedHeader,d),void 0!==d.zip){if(!this._protectedHeader||!this._protectedHeader.zip)throw new s('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==d.zip)throw new o('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:p,enc:f}=d;if("string"!=typeof p||!p)throw new s('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof f||!f)throw new s('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if("dir"===p){if(this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}else if("ECDH-ES"===p&&this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement");{let i;({cek:n,encryptedKey:r,parameters:i}=await eB(p,f,e,this._cek,this._keyManagementParameters)),i&&(t&&eZ in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...i}:this.setUnprotectedHeader(i):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...i}:this.setProtectedHeader(i))}if(this._iv||(this._iv=U(f)),a=this._protectedHeader?b.encode(O(JSON.stringify(this._protectedHeader))):b.encode(""),this._aad?(c=O(this._aad),i=w(a,b.encode("."),b.encode(c))):i=a,"DEF"===d.zip){let e=await ((null==t?void 0:t.deflateRaw)||V)(this._plaintext);({ciphertext:u,tag:l}
4=await eC(f,e,n,this._iv,i))}else({ciphertext:u,tag:l}=await eC(f,this._plaintext,n,this._iv,i));let h={ciphertext:O(u),iv:O(this._iv),tag:O(l)};return r&&(h.encrypted_key=O(r)),c&&(h.aad=c),this._protectedHeader&&(h.protected=v.decode(a)),this._sharedUnprotectedHeader&&(h.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(h.header=this._unprotectedHeader),h}}class eF{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}function eJ(e,t){let r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new o(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function eG(e,t,r){if(t instanceof CryptoKey)return!function(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!M(e.algorithm,"HMAC"))throw D("HMAC");let r=parseInt(t.slice(2),10);if(H(e.algorithm.hash)!==r)throw D(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!M(e.algorithm,"RSASSA-PKCS1-v1_5"))throw D("RSASSA-PKCS1-v1_5");let r=parseInt(t.slice(2),10);if(H(e.algorithm.hash)!==r)throw D(`SHA-${r}`,"algorithm.hash");break}
4case"PS256":case"PS384":case"PS512":{if(!M(e.algorithm,"RSA-PSS"))throw D("RSA-PSS");let r=parseInt(t.slice(2),10);if(H(e.algorithm.hash)!==r)throw D(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw D("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!M(e.algorithm,"ECDSA"))throw D("ECDSA");let r=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}(t);if(e.algorithm.namedCurve!==r)throw D(r,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}W(e,r)}(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw TypeError(K(t,...Z));return m.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw TypeError(K(t,...Z,"Uint8Array"))}let eV=async(e,t,r,n)=>{let i=await eG(e,t,"verify");ed(e,i);let o=eJ(e,i.algorithm);try{return await m.subtle.verify(o,i,r,n)}catch(e){return!1}};async function eY(e,t,r){var n;let o,a;if(!X(e))throw new c("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new c('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new c("JWS Protected Header incorrect type");if(void 0===e.payload)throw new c("JWS Payload missing");if("string"!=typeof e.signature)throw new c("JWS Signature missing or incorrect type");if(void 0!==e.header&&!X(e.header))throw new c("JWS Unprotected Header incorrect type");let s={};if(e.protected)try{let t=P(e.protected);s=JSON.parse(v.decode(t))}catch(e){throw new c("JWS Protected Header is invalid")}if(!Y(s,e.header))throw new c("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let u={...s,...e.header},l=ez(c,new Map([["b64",!0]]),null==r?void 0:r.crit,s,u),d=!0;if(l.has("b64")&&"boolean"!=typeof(d=s.b64))throw new c('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:p}=u;if("string"!=typeof p||!p)throw new c('JWS "alg" (Algorithm) Header Parameter missing or invalid');let f=r&&eN("algorithms",r.algorithms);if(f&&!f.has(p))throw new i('"alg" (Algorithm) Header Parameter not allowed');if(d){if("string"!=typeof e.payload)throw new c("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new c("JWS Payload must be a string or an Uint8Array instance");let h=!1;"function"==typeof t&&(t=await t(s,e),h=!0),eO(p,t,"verify");let g=w(b.encode(null!=(n=e.protected)?n:""),b.encode("."),"string"==typeof e.payload?b.encode(e.payload):e.payload);try{o=P(e.signature)}catch(e){throw new c("Failed to base64url decode the signature")}if(!await eV(p,t,o,g))throw new y;if(d)try{a=P(e.payload)}catch(e){throw new c("Failed to base64url decode the payload")}else a="string"==typeof e.payload?b.encode(e.payload):e.payload;let m={payload:a};return(void 0!==e.protected&&(m.protectedHeader=s),void 0!==e.header&&(m.unprotectedHeader=e.header),h)?{...m,key:t}:m}async function eX(e,t,r){if(e instanceof Uint8Array&&(e=v.decode(e)),"string"!=typeof e)throw new c("Compact JWS must be a string or Uint8Array");let{0:n,1:i,2:o,length:a}=e.split(".");if(3!==a)throw new c("Invalid Compact JWS");let s=await eY({payload:i,protected:n,signature:o},t,r),u={payload:s.payload,protectedHeader:s.protectedHeader};return"function"==typeof t?{...u,key:s.key}:u}async function eQ(e,t,r){if(!X(e))throw new c("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(X))throw new c("JWS Signatures missing or incorrect type");for(let n of e.signatures)try{return await eY({header:n.header,payload:e.payload,protected:n.protected,signature:n.signature},t,r)}catch(e){}throw new y}let e0=e=>Math.floor(e.getTime()/1e3),e1=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i,e2=e=>{let t=e1.exec(e);if(!t)throw TypeError("Invalid time period format");let r=parseFloat(t[1]);switch(t[2].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(r);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(60*r);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(3600*r);case"day":case"days":case"d":return Math.round(86400*r);case"week":case"weeks":case"w":return Math.round(604800*r);default:return Math.round(0x1e187e0*r)}},e5=e=>e.toLowerCase().replace(/^application\//,""),e4=(e,t,i={})=>{var o,a;let s,c,{typ:l}=i;if(l&&("string"!=typeof e.typ||e5(e.typ)!==e5(l)))throw new r('unexpected "typ" JWT header value',"typ","check_failed");try{s=JSON.parse(v.decode(t))}catch(e){}if(!X(s))throw new u("JWT Claims Set must be a top-level JSON object");let{requiredClaims:d=[],issuer:p,subject:f,audience:h,maxTokenAge:y}=i;for(let e of(void 0!==y&&d.push("iat"),void 0!==h&&d.push("aud"),void 0!==f&&d.push("sub"),void 0!==p&&d.push("iss"),new Set(d.reverse())))if(!(e in s))throw new r(`missing required "${e}" claim`,e,"missing");if(p&&!(Array.isArray(p)?p:[p]).includes(s.iss))throw new r('unexpected "iss" claim value',"iss","check_failed");if(f&&s.sub!==f)throw new r('unexpected "sub" claim value',"sub","check_failed");if(h&&(o=s.aud,a="string"==typeof h?[h]:h,"string"==typeof o?!a.includes(o):!(Array.isArray(o)&&a.some(Set.prototype.has.bind(new Set(o))))))throw new r('unexpected "aud" claim value',"aud","check_failed");switch(typeof i.clockTolerance){case"string":c=e2(i.clockTolerance);break;case"number":c=i.clockTolerance;break;case"undefined":c=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:g}=i,m=e0(g||new Date);if((void 0!==s.iat||y)&&"number"!=typeof s.iat)throw new r('"iat" claim must be a number',"iat","invali
4d");if(void 0!==s.nbf){if("number"!=typeof s.nbf)throw new r('"nbf" claim must be a number',"nbf","invalid");if(s.nbf>m+c)throw new r('"nbf" claim timestamp check failed',"nbf","check_failed")}if(void 0!==s.exp){if("number"!=typeof s.exp)throw new r('"exp" claim must be a number',"exp","invalid");if(s.exp<=m-c)throw new n('"exp" claim timestamp check failed',"exp","check_failed")}if(y){let e=m-s.iat;if(e-c>("number"==typeof y?y:e2(y)))throw new n('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed");if(e<0-c)throw new r('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}return s};async function e6(e,t,r){var n;let i=await eX(e,t,r);if((null==(n=i.protectedHeader.crit)?void 0:n.includes("b64"))&&!1===i.protectedHeader.b64)throw new u("JWTs MUST NOT use unencoded payload");let o={payload:e4(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return"function"==typeof t?{...o,key:i.key}:o}async function e3(e,t,n){let i=await eM(e,t,n),o=e4(i.protectedHeader,i.plaintext,n),{protectedHeader:a}=i;if(void 0!==a.iss&&a.iss!==o.iss)throw new r('replicated "iss" claim header parameter mismatch',"iss","mismatch");if(void 0!==a.sub&&a.sub!==o.sub)throw new r('replicated "sub" claim header parameter mismatch',"sub","mismatch");if(void 0!==a.aud&&JSON.stringify(a.aud)!==JSON.stringify(o.aud))throw new r('replicated "aud" claim header parameter mismatch',"aud","mismatch");let s={payload:o,protectedHeader:a};return"function"==typeof t?{...s,key:i.key}:s}class e8{constructor(e){this._flattened=new eq(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,t){let r=await this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}let e9=async(e,t,r)=>{let n=await eG(e,t,"sign");return ed(e,n),new Uint8Array(await m.subtle.sign(eJ(e,n.algorithm),n,r))};class e7{constructor(e){if(!(e instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){let r;if(!this._protectedHeader&&!this._unprotectedHeader)throw new c("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!Y(this._protectedHeader,this._unprotectedHeader))throw new c("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...this._protectedHeader,...this._unprotectedHeader},i=ez(c,new Map([["b64",!0]]),null==t?void 0:t.crit,this._protectedHeader,n),o=!0;if(i.has("b64")&&"boolean"!=typeof(o=this._protectedHeader.b64))throw new c('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:a}=n;
4if("string"!=typeof a||!a)throw new c('JWS "alg" (Algorithm) Header Parameter missing or invalid');eO(a,e,"sign");let s=this._payload;o&&(s=b.encode(O(s)));let u=w(r=this._protectedHeader?b.encode(O(JSON.stringify(this._protectedHeader))):b.encode(""),b.encode("."),s),l={signature:O(await e9(a,e,u)),payload:""};return o&&(l.payload=v.decode(s)),this._unprotectedHeader&&(l.header=this._unprotectedHeader),this._protectedHeader&&(l.protected=v.decode(r)),l}}class te{constructor(e){this._flattened=new e7(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){let r=await this._flattened.sign(e,t);if(void 0===r.payload)throw TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}class tt{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class tr{constructor(e){if(!X(e))throw TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"==typeof e?this._payload={...this._payload,nbf:e}:this._payload={...this._payload,nbf:e0(new Date)+e2(e)},this}setExpirationTime(e){return"number"==typeof e?this._payload={...this._payload,exp:e}:this._payload={...this._payload,exp:e0(new Date)+e2(e)},this}setIssuedAt(e){return void 0===e?this._payload={...this._payload,iat:e0(new Date)}:this._payload={...this._payload,iat:e},this}}let tn=(e,t)=>{if("string"!=typeof e||!e)throw new l(`${t} missing or invalid`)};async function ti(e,t){let r;if(!X(e))throw TypeError("JWK must be an object");if(null!=t||(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(e.kty){case"EC":tn(e.crv,'"crv" (Curve) Parameter'),tn(e.x,'"x" (X Coordinate) Parameter'),tn(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":tn(e.crv,'"crv" (Subtype of Key Pair) Parameter'),tn(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":tn(e.e,'"e" (Exponent) Parameter'),tn(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":tn(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new o('"kty" (Key Type) Parameter missing or unsupported')}let n=b.encode(JSON.stringify(r));return O(await _(t,n))}async function to(e,t){null!=t||(t="sha256");let r=await ti(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function ta(e,t){let r={...e,...null==t?void 0:t.header};if(!X(r.jwk))throw new c('"jwk" (JSON Web Key) Header Parameter must be a JSON object');let n=await eT({...r.jwk,ext:!0},r.alg,!0);if(n instanceof Uint8Array||"public"!==n.type)throw new c('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}function ts(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(tc)}function tc(e){return X(e)}class tu{constructor(e){if(this._cached=new WeakMap,!ts(e))throw new d("JSON Web Key Set malformed");this._jwks=function(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}(e)}async getKey(e,t){let{alg:r,kid:n}={...e,...null==t?void 0:t.header},i=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new o('Unsupported "alg" value for a JSON Web Key Set')}}(r),a=this._jwks.keys.filter(e=>{let t=i===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),t&&"string"==typeof e.alg&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t&&"EdDSA"===r&&(t="Ed25519"===e.crv||"Ed448"===e.crv),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv}return t}),{0:s,length:c}=a;if(0===c)throw new p;if(1!==c){let e=new f,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(let e of a)try{yield await tl(t,e,r)}catch(e){continue}},e}return tl(this._cached,s,r)}}async function tl(e,t,r){let n=e.get(t)||e.set(t,{}).get(t);if(void 0===n[r]){let e=await eT({...t,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new d("JSON Web Key Set members must be public keys");n[r]=e}return n[r]}let td=async(e,r,n)=>{let i,o,a=!1;"function"==typeof AbortController&&(i=new AbortController,o=setTimeout(()=>{a=!0,i.abort()},r));let s=await fetch(e.href,{signal:i?i.signal:void 0,redirect:"manual",headers:n.headers}).catch(e=>{if(a)throw new h;throw e});if(void 0!==o&&clearTimeout(o),200!==s.status)throw new t("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await s.json()}catch(e){throw new t("Failed to parse the JSON Web Key Set HTTP response as JSON")}};class tp extends tu{constructor(e,t){if(super({keys:[]}),this._jwks=void 0,!(e instanceof URL))throw TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:null==t?void 0:t.agent,headers:null==t?void 0:t.headers}
4,this._timeoutDuration="number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3,this._cooldownDuration="number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._jwks&&this.fresh()||await this.reload();try{return await super.getKey(e,t)}catch(r){if(r instanceof p&&!1===this.coolingDown())return await this.reload(),super.getKey(e,t);throw r}}async reload(){this._pendingFetch&&("u">typeof WebSocketPair||"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"u">typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this._pendingFetch=void 0),this._pendingFetch||(this._pendingFetch=td(this._url,this._timeoutDuration,this._options).then(e=>{if(!ts(e))throw new d("JSON Web Key Set malformed");this._jwks={keys:e.keys},this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(e=>{throw this._pendingFetch=void 0,e})),await this._pendingFetch}}async function tf(e,t){var r;let n,i,a;switch(e){case"HS256":case"HS384":case"HS512":n=parseInt(e.slice(-3),10),i={name:"HMAC",hash:`SHA-${n}`,length:n},a=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return j(new Uint8Array((n=parseInt(e.slice(-3),10))>>3));case"A128KW":case"A192KW":case"A256KW":i={name:"AES-KW",length:n=parseInt(e.slice(1,4),10)},a=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":i={name:"AES-GCM",length:n=parseInt(e.slice(1,4),10)},a=["encrypt","decrypt"];break;default:throw new o('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return m.subtle.generateKey(i,null!=(r=null==t?void 0:t.extractable)&&r,a)}function th(e){var t;let r=null!=(t=null==e?void 0:e.modulusLength)?t:2048;if("number"!=typeof r||r<2048)throw new o("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return r}async function ty(e,t){var r,n,i;let a,s;switch(e){case"PS256":case"PS384":case"PS512":a={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:th(t)},s=["sign","verify"];break;case"RS256":case"RS384":case"RS512":a={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:th(t)},s=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":a={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:th(t)},s=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":a={name:"ECDSA",namedCurve:"P-256"},s=["sign","verify"];break;case"ES384":a={name:"ECDSA",namedCurve:"P-384"},s=["sign","verify"];break;case"ES512":a={name:"ECDSA",namedCurve:"P-521"},s=["sign","verify"];break;case"EdDSA":s=["sign","verify"];let c=null!=(r=null==t?void 0:t.crv)?r:"Ed25519";
4switch(c){case"Ed25519":case"Ed448":a={name:c};break;default:throw new o("Invalid or unsupported crv option provided")}break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{s=["deriveKey","deriveBits"];let e=null!=(n=null==t?void 0:t.crv)?n:"P-256";switch(e){case"P-256":case"P-384":case"P-521":a={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":a={name:e};break;default:throw new o("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new o('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return m.subtle.generateKey(a,null!=(i=null==t?void 0:t.extractable)&&i,s)}async function tg(e,t){return ty(e,t)}async function tm(e,t){return tf(e,t)}e.s(["CompactEncrypt",0,e8,"CompactSign",0,te,"EmbeddedJWK",0,ta,"EncryptJWT",0,class extends tr{setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setKeyManagementParameters(e){if(this._keyManagementParameters)throw TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setContentEncryptionKey(e){if(this._cek)throw TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw TypeError("setInitializationVector can only be called once");return this._iv=e,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(e,t){let r=new e8(b.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),r.setProtectedHeader(this._protectedHeader),this._iv&&r.setInitializationVector(this._iv),this._cek&&r.setContentEncryptionKey(this._cek),this._keyManagementParameters&&r.setKeyManagementParameters(this._keyManagementParameters),r.encrypt(e,t)}},"FlattenedEncrypt",0,eq,"FlattenedSign",0,e7,"GeneralEncrypt",0,class{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,t){let r=new eF(this,e,{crit:null==t?void 0:t.crit});return this._recipients.push(r),r}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(e){var t,r,n;let i;if(!this._recipients.length)throw new s("at least one recipient must be added");if(e={deflateRaw:null==e?void 0:e.deflateRaw},1===this._recipients.length){let[t]=this._recipients,r=await new eq(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e}),n={ciphertext:r.ciphertext,iv:r.iv,recipients:[{}],tag:r.tag};return r.aad&&(n.aad=r.aad),r.protected&&(n.protected=r.protected),r.unprotected&&(n.unprotected=r.unprotected),r.encrypted_key&&(n.recipients[0].encrypted_key=r.encrypted_key),r.header&&(n.recipients[0].header=r.header),n}for(let e=0;e<this._recipients.length;e++){let t=this._recipients[e];if(!Y(this._protectedHeader,this._unprotectedHeader,t.unprotectedHeader))throw new s("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let r={...this._protectedHeader,...this._unprotectedHeader,...t.unprotectedHeader},{alg:n}=r;if("string"!=typeof n||!n)throw new s('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("dir"===n||"ECDH-ES"===n)throw new s('"dir" and "ECDH-ES" alg may only be used with a single recipient');if("string"!=typeof r.enc||!r.enc)throw new s('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(i){if(i!==r.enc)throw new s('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else i=r.enc;
4if(ez(s,new Map,t.options.crit,this._protectedHeader,r),void 0!==r.zip&&(!this._protectedHeader||!this._protectedHeader.zip))throw new s('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}let o=ey(i),a={ciphertext:"",iv:"",recipients:[],tag:""};for(let s=0;s<this._recipients.length;s++){let c=this._recipients[s],u={};a.recipients.push(u);let l=({...this._protectedHeader,...this._unprotectedHeader,...c.unprotectedHeader}).alg.startsWith("PBES2")?2048+s:void 0;if(0===s){let t=await new eq(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(o).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(c.unprotectedHeader).setKeyManagementParameters({p2c:l}).encrypt(c.key,{...c.options,...e,[eZ]:!0});a.ciphertext=t.ciphertext,a.iv=t.iv,a.tag=t.tag,t.aad&&(a.aad=t.aad),t.protected&&(a.protected=t.protected),t.unprotected&&(a.unprotected=t.unprotected),u.encrypted_key=t.encrypted_key,t.header&&(u.header=t.header);continue}let{encryptedKey:d,parameters:p}=await eB((null==(t=c.unprotectedHeader)?void 0:t.alg)||(null==(r=this._protectedHeader)?void 0:r.alg)||(null==(n=this._unprotectedHeader)?void 0:n.alg),i,c.key,o,{p2c:l});u.encrypted_key=O(d),(c.unprotectedHeader||p)&&(u.header={...c.unprotectedHeader,...p})}return a}},"GeneralSign",0,class{constructor(e){this._signatures=[],this._payload=e}addSignature(e,t){let r=new tt(this,e,t);return this._signatures.push(r),r}async sign(){if(!this._signatures.length)throw new c("at least one signature must be added");let e={signatures:[],payload:""};for(let t=0;t<this._signatures.length;t++){let r=this._signatures[t],n=new e7(this._payload);n.setProtectedHeader(r.protectedHeader),n.setUnprotectedHeader(r.unprotectedHeader);let{payload:i,...o}=await n.sign(r.key,r.options);if(0===t)e.payload=i;else if(e.payload!==i)throw new c("inconsistent use of JWS Unencoded Payload (RFC7797)");e.signatures.push(o)}return e}},"SignJWT",0,class extends tr{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){var r;let n=new te(b.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray(null==(r=this._protectedHeader)?void 0:r.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new u("JWTs MUST NOT use unencoded payload");return n.sign(e,t)}},"UnsecuredJWT",0,class extends tr{encode(){let e=O(JSON.stringify({alg:"none"})),t=O(JSON.stringify(this._payload));return`${e}.${t}.`}static decode(e,t){let r;if("string"!=typeof e)throw new u("Unsecured JWT must be a string");let{0:n,1:i,2:o,length:a}=e.split(".");if(3!==a||""!==o)throw new u("Invalid Unsecured JWT");try{if(r=JSON.parse(v.decode(P(n))),"none"!==r.alg)throw Error()}catch(e){throw new u("Invalid Unsecured JWT")}return{payload:e4(r,P(i),t),header:r}}},"base64url",0,C,"calculateJwkThumbprint",0,ti,"calculateJwkThumbprintUri",0,to,"compactDecrypt",0,eM,"compactVerify",0,eX,"createLocalJWKSet",0,function(e){let t=new tu(e);return async function(e,r){return t.getKey(e,r)}},"createRemoteJWKSet",0,function(e,t){let r=new tp(e,t);return async function(e,t){return r.getKey(e,t)}},"cryptoRuntime",0,"WebCryptoAPI","decodeJwt",0,function(e){let t,r;if("string"!=typeof e)throw new u("JWTs must use Compact JWS serialization, JWT must be a string");let{1:n,length:i}=e.split(".");if(5===i)throw new u("Only JWTs using Compact JWS serialization can be decoded");if(3!==i)throw new u("Invalid JWT");if(!n)throw new u("JWTs must contain a payload");try{t=P(n)}catch(e){throw new u("Failed to base64url decode the payload")}try{r=JSON.parse(v.decode(t))}catch(e){throw new u("Failed to parse the decoded payload as JSON")}if(!X(r))throw new u("Invalid JWT Claims Set");return r},"decodeProtectedHeader",0,function(e){let t;if("string"==typeof e){let r=e.split(".");(3===r.length||5===r.length)&&([t]=r)}else if("object"==typeof e&&e)if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header");try{if("string"!=typeof t||!t)throw Error();let e=JSON.parse(v.decode(P(t)));if(!X(e))throw Error();return e}catch(e){throw TypeError("Invalid Token or Protected Header formatting")}},"errors",0,g,"exportJWK",0,eK,"exportPKCS8",0,eL,"exportSPKI",0,e$,"flattenedDecrypt",0,eD,"flattenedVerify",0,eY,"generalDecrypt",0,eH,"generalVerify",0,eQ,"generateKeyPair",0,tg,"generateSecret",0,tm,"importJWK",0,eT,"importPKCS8",0,ex,"importSPKI",0,ek,"importX509",0,eA,"jwtDecrypt",0,e3,"
4jwtVerify",0,e6],563703)},453978,(e,t,r)=>{let n;var i=e.i(467034);let{strict:o}=e.r(440224),{createHash:a}=e.r(586914),{format:s}=e.r(477398);function c(e,t,r){let i=(function(e,t){switch(e){case"HS256":case"RS256":case"PS256":case"ES256":case"ES256K":return a("sha256");case"HS384":case"RS384":case"PS384":case"ES384":return a("sha384");case"HS512":case"RS512":case"PS512":case"ES512":case"Ed25519":return a("sha512");case"Ed448":return a("shake256",{outputLength:114});case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return a("shake256",{outputLength:64});case"EdDSA":switch(t){case"Ed25519":return a("sha512");case"Ed448":return a("shake256",{outputLength:114});default:throw TypeError("unrecognized or invalid EdDSA curve provided")}default:throw TypeError("unrecognized or invalid JWS algorithm provided")}})(t,r).update(e).digest();return n(i.slice(0,i.length/2))}n=i.Buffer.isEncoding("base64url")?e=>e.toString("base64url"):e=>e.toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),t.exports={validate:function(e,t,r,n,i){let a,u;if("string"!=typeof e.claim||!e.claim)throw TypeError("names.claim must be a non-empty string");if("string"!=typeof e.source||!e.source)throw TypeError("names.source must be a non-empty string");o("string"==typeof t&&t,`${e.claim} must be a non-empty string`),o("string"==typeof r&&r,`${e.source} must be a non-empty string`);try{a=c(r,n,i)}catch(t){u=s("%s could not be validated (%s)",e.claim,t.message)}u=u||s("%s mismatch, expected %s, got: %s",e.claim,a,t),o.equal(a,t,u)},generate:c}},394543,(e,t,r)=>{let n=e.r(477398),i=e.r(586914);t.exports=n.types.isKeyObject||(e=>e&&e instanceof i.KeyObject)},575492,(e,t,r)=>{let n;var i=e.i(467034);n=i.Buffer.isEncoding("base64url")?(e,t="utf8")=>i.Buffer.from(e,t).toString("base64url"):(e,t="utf8")=>i.Buffer.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),t.exports.decode=e=>i.Buffer.from(e,"base64"),t.exports.encode=n},330967,(e,t,r)=>{let n=e.r(575492);t.exports=e=>{if("string"!=typeof e||!e)throw TypeError("JWT must be a string");let{0:t,1:r,2:i,length:o}=e.split(".");if(5===o)throw TypeError("encrypted JWTs cannot be decoded");if(3!==o)throw Error("JWTs must have three components");try{return{header:JSON.parse(n.decode(t)),payload:JSON.parse(n.decode(r)),signature:i}}catch(e){throw Error("JWT is malformed")}}},666285,(e,t,r)=>{t.exports=e=>!!e&&e.constructor===Object},577208,(e,t,r)=>{let n=e.r(666285);function i(e,t,...r){for(let o of r)if(n(o))for(let[r,a]of Object.entries(o))"__proto__"!==r&&"constructor"!==r&&(void 0===t[r]&&void 0!==a&&(t[r]=a),e&&n(t[r])&&n(a)&&i(!0,t[r],a));return t}t.exports=i.bind(void 0,!1),t.exports.deep=i.bind(void 0,!0)},345255,(e,t,r)=>{let n=/(\w+)=("[^"]*")/g;t.exports=e=>{let t={};try{for(;null!==n.exec(e);)RegExp.$1&&RegExp.$2&&(t[RegExp.$1]=RegExp.$2.slice(1,-1))}catch(e){}return t}},918710,(e,t,r)=>{t.exports={assertSigningAlgValuesSupport:function(e,t,r){if(!t[`${e}_endpoint`])return;let n=`${e}_endpoint_auth_method`,i=`${e}_endpoint_auth_signing_alg`,o=`${e}_endpoint_auth_signing_alg_values_supported`;if(r[n]&&r[n].endsWith("_jwt")&&!r[i]&&!t[o])throw TypeError(`${o} must be configured on the issuer if ${i} is not defined on a client`)},assertIssuerConfiguration:function(e,t){if(!e[t])throw TypeError(`${t} must be configured on the issuer`)}}},80042,(e,t,r)=>{t.exports=function(e,...t){let r={};for(let n of t)void 0!==e[n]&&(r[n]=e[n]);return r}},738767,(e,t,r)=>{var n=e.i(467034);let{STATUS_CODES:i}=e.r(622184),{format:o}=e.r(477398),{OPError:a}=e.r(696055),s=e.r(345255);t.exports=function(e,{statusCode:t=200,body:r=!0,bearer:c=!1}={}){if(e.statusCode!==t){if(c&&(e=>{let t=s(e.headers["www-authenticate"]);if(t.error)throw new a(t,e)})(e),(e=>{let t=!1;try{let r;r="object"!=typeof e.body||n.Buffer.isBuffer(e.body)?JSON.parse(e.body):e.body,(t="string"==typeof r.error&&r.error.length)&&Object.defineProperty(e,"body",{value:r,configurable:!0})}catch(e){}return t})(e))throw new a(e.body,e);throw new a({error:o("expected %i %s, got: %i %s",t,i[t],e.statusCode,i[e.statusCode])},e)}if(r&&!e.body)throw new a({error:o("expected %i %s with body but no body was returned",t,i[t])},e);return e.body}},550766,(e,t,r)=>{t.exports=()=>Math.floor(Date.now()/1e3)},407066,(e,t,r)=>{let n=e.r(575492),i=e.r(550766);t.exports=class{constructor(e){Object.assign(this,e);const{constructor:t,...r}=Object.getOwnPropertyDescriptors(this.constructor.prototype);Object.defineProperties(this,r)}set expires_in(e){this.expires_at=i()+Number(e)}get expires_in(){return Math.max.apply(null,[this.expires_at-i(),0])}expired(){return 0===this.expires_in}claims(){if(!this.id_token)throw TypeError("id_token not present in TokenSet");return JSON.parse(n.decode(this.id_token.split(".")[1]))}}},852849,(e,t,r)=>{let{createHash:n,randomBytes:i}=e.r(586914),o=e.r(575492),a=(e=32)=>o.encode(i(e));t.exports={random:a,state:a,nonce:a,codeVerifier:a,codeChallenge:e=>o.encode(n("sha256").update(e).digest())}},892542,(e,t,r)=>{var n={528:function(e,t,r){var n=r(685),i=r(310),o=e.exports;for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a]);function s(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),n.request.call(this,e,t)},o.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},685:function(t){"use strict";
4t.exports=e.r(622184)},310:function(t){"use strict";t.exports=e.r(421342)}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}},a=!0;try{n[e](r,r.exports,o),a=!1}finally{a&&delete i[e]}return r.exports}o.ab="/ROOT/node_modules/next/dist/compiled/https-browserify/",t.exports=o(528)},437383,(e,t,r)=>{"use strict";t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},282751,(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach(function(e){t.push(e)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r,n){if(!(this instanceof i))return new i(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}t.exports=n,n.Node=i,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e,t,r=0,n=arguments.length;r<n;r++){e=this,t=arguments[r],e.tail=new i(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}return this.length},n.prototype.unshift=function(){for(var e,t,r=0,n=arguments.length;r<n;r++){e=this,t=arguments[r],e.head=new i(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw TypeError("Reduce of empty list with no initial value");for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;
4for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n<e;n++)o=o.next;for(var a=[],n=0;o&&n<t;n++)a.push(o.value),o=this.removeNode(o);null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var n=0;n<r.length;n++)o=function(e,t,r){var n=t===e.head?new i(r,null,t,e):new i(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}(this,o,r[n]);return a},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{e.r(437383)(n)}catch(e){}},357873,(e,t,r)=>{"use strict";let n=e.r(282751),i=Symbol("max"),o=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),f=Symbol("updateAgeOnGet"),h=()=>1,y=(e,t,r)=>{let n=e[p].get(t);if(n){let t=n.value;if(g(e,t)){if(_(e,n),!e[s])return}else r&&(e[f]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;let r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},m=e=>{if(e[o]>e[i])for(let t=e[d].tail;e[o]>e[i]&&null!==t;){let r=t.prev;_(e,t),t=r}},_=(e,t)=>
4{if(t){let r=t.value;e[u]&&e[u](r.key,r.value),e[o]-=r.length,e[p].delete(r.key),e[d].removeNode(t)}};class b{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}let v=(e,t,r,n)=>{let i=r.value;g(e,i)&&(_(e,r),e[s]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};t.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw TypeError("max must be a non-negative number");this[i]=e||1/0,m(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw TypeError("maxAge must be a non-negative number");this[c]=e,m(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[o]=0,this[d].forEach(e=>{e.length=this[a](e.value,e.key),this[o]+=e.length})),m(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){let n=r.prev;v(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){let n=r.next;v(this,e,r,t),r=n}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach(e=>this[u](e.key,e.value)),this[p]=new Map,this[d]=new n,this[o]=0}dump(){return this[d].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw TypeError("maxAge must be a number");let n=r?Date.now():0,s=this[a](t,e);if(this[p].has(e)){if(s>this[i])return _(this,this[p].get(e)),!1;let a=this[p].get(e).value;return this[u]&&!this[l]&&this[u](e,a.value),a.now=n,a.maxAge=r,a.value=t,this[o]+=s-a.length,a.length=s,this.get(e),m(this),!0}let f=new b(e,t,s,n,r);return f.length>this[i]?(this[u]&&this[u](e,t),!1):(this[o]+=f.length,this[d].unshift(f),this[p].set(e,this[d].head),m(this),!0)}has(e){return!!this[p].has(e)&&!g(this,this[p].get(e).value)}get(e){return y(this,e,!0)}peek(e){return y(this,e,!1)}pop(){let e=this[d].tail;return e?(_(this,e),e.value):null}del(e){_(this,this[p].get(e))}load(e){this.reset();let t=Date.now();for(let r=e.length-1;r>=0;r--){let n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{let e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[p].forEach((e,t)=>y(this,t,!1))}}},931825,(e,t,r)=>{t.exports={name:"openid-client",version:"5.7.1",description:"OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs",keywords:["auth","authentication","basic","certified","client","connect","dynamic","electron","hybrid","identity","implicit","oauth","oauth2","oidc","openid","passport","relying party","strategy"],homepage:"https://github.com/panva/openid-client",repository:"panva/openid-client",funding:{url:"https://github.com/sponsors/panva"},license:"MIT",author:"Filip Skokan <[email protected]>",exports:{types:"./types/index.d.ts",import:"./lib/index.mjs",require:"./lib/index.js"},main:"./lib/index.js",types:"./types/index.d.ts",files:["lib","types/index.d.ts"],scripts:{format:"npx prettier --loglevel silent --write ./lib ./test ./certification ./types",test:"mocha test/**/*.test.js"},dependencies:{jose:"^4.15.9","lru-cache":"^6.0.0","object-hash":"^2.2.0","oidc-token-hash":"^5.0.3"},devDependencies:{"@types/node":"^16.18.106","@types/passport":"^1.0.16",base64url:"^3.0.1",chai:"^4.5.0",mocha:"^10.7.3",nock:"^13.5.5",prettier:"^2.8.8","readable-mock-req":"^0.2.2",sinon:"^9.2.4",timekeeper:"^2.3.1"},"standard-version":{scripts:{postchangelog:"sed -i '' -e 's/### \\[/## [/g' CHANGELOG.md"},types:[{type:"feat",section:"Features"},{type:"fix",section:"Fixes"},{type:"chore",hidden:!0},{type:"docs",hidden:!0},{type:"style",hidden:!0},{type:"refactor",section:"Refactor",hidden:!1},{type:"perf",section:"Performance",hidden:!1},{type:"test",hidden:!0}]}}},596276,(e,t,r)=>{let n=Symbol();t.exports={CLOCK_TOLERANCE:Symbol(),HTTP_OPTIONS:n}},508284,(e,t,r)=>{let n;var i=e.i(467034);let o=e.r(440224),a=e.r(343954),s=e.r(622184),c=e.r(892542),{once:u}=e.r(430662),{URL:l}=e.r(421342),d=e.r(357873),p=e.r(931825),{RPError:f}=e.r(696055),h=e.r(80042),{deep:y}=e.r(577208),{HTTP_OPTIONS:g}=e.r(596276),m=/^[\x21\x23-\x5B\x5D-\x7E]+$/,_=["agent","ca","cert","crl","headers","key","lookup","passphrase","pfx","timeout"],b=(e,t)=>{n=y({},e.length?h(t,...e):t,n)};function v(e,t,r){r&&(e.removeHeader("content-type"),e.setHeader("content-type",r)),t&&(e.removeHeader("content-length"),e.setHeader("content-length",i.Buffer.byteLength(t)),e.write(t)),e.end()}b([],{headers:{"User-Agent":`${p.name}/${p.version} (${p.homepage})`,"Accept-Encoding":"identity"},timeout:3500});let w=new d({max:100});t.exports=async function(e,{accessToken:t,mTLS:r=!1,DPoP:d}={}){let p,b,E,S,k,A,x;try{p=new l(e.url),delete e.url,o(/^(https?:)$/.test(p.protocol))}catch(e){throw TypeError("only valid absolute URLs can be requested")}let T=this[g],O=e,R=`${p.origin}${p.pathname}`;if(d&&"dpopProof"in this&&(O.headers=O.headers||{},O.headers.DPoP=await this.dpopProof({htu:`${p.origin}${p.pathname}`,htm:e.method||"GET",nonce:w.get(R)},d,t)),T&&(b=h(T.call(this,p,y({},O,n)),..._)),O=y({},b,O,n),r&&!O.pfx&&!(O.key&&O.cert))throw TypeError("mutual-TLS certificate and key not set");if(O.searchParams)for(let[e,t]of Object.entries(O.searchParams))p.searchParams.delete(e),p.searchParams.set(e,t);for(let[e,t]of({form:S,responseType:E,json:k,body:A,...O}=O,Object.entries(O.headers||{})))void 0===t&&delete O.headers[e];let P=("https:"===p.protocol?c.request:s.request)(p.href,O);return(async()=>
4{if(k?v(P,JSON.stringify(k),"application/json"):S?v(P,a.stringify(S),"application/x-www-form-urlencoded"):A?v(P,A):v(P),[x]=await Promise.race([u(P,"response"),u(P,"timeout")]),!x)throw P.destroy(),new f(`outgoing request timed out after ${O.timeout}ms`);let e=[];for await(let t of x)e.push(t);if(e.length)switch(E){case"json":Object.defineProperty(x,"body",{get(){let t=i.Buffer.concat(e);try{t=JSON.parse(t)}catch(e){throw Object.defineProperty(e,"response",{value:x}),e}finally{Object.defineProperty(x,"body",{value:t,configurable:!0})}return t},configurable:!0});break;case void 0:case"buffer":Object.defineProperty(x,"body",{get(){let t=i.Buffer.concat(e);return Object.defineProperty(x,"body",{value:t,configurable:!0}),t},configurable:!0});break;default:throw TypeError("unsupported responseType request option")}return x})().catch(e=>{throw x&&Object.defineProperty(e,"response",{value:x}),e}).finally(()=>{let e=x&&x.headers["dpop-nonce"];e&&m.test(e)&&w.set(R,e)})},t.exports.setDefaults=b.bind(void 0,_)},366951,(e,t,r)=>{t.exports.keystores=new WeakMap},922087,(e,t,r)=>{t.exports=globalThis.structuredClone||(e=>JSON.parse(JSON.stringify(e)))},198155,(e,t,r)=>{let n=e.r(563703),i=e.r(922087),o=e.r(666285),a=Symbol(),s=(e,{alg:t,use:r})=>{let n=0;return t&&e.alg&&n++,r&&e.use&&n++,n};t.exports=class{#e;constructor(e,t){if(e!==a)throw Error("invalid constructor call");this.#e=t}toJWKS(){return{keys:this.map(({jwk:{d:e,p:t,q:r,dp:n,dq:i,qi:o,...a}})=>a)}}all({alg:e,kid:t,use:r}={}){if(!r||!e)throw Error();let n=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:return}}(e),i={alg:e,use:r};return this.filter(i=>{let o=!0;return void 0!==n&&i.jwk.kty!==n&&(o=!1),o&&void 0!==t&&i.jwk.kid!==t&&(o=!1),o&&void 0!==r&&void 0!==i.jwk.use&&i.jwk.use!==r&&(o=!1),o&&i.jwk.alg&&i.jwk.alg!==e?o=!1:i.algorithms.has(e)||(o=!1),o}).sort((e,t)=>s(t,i)-s(e,i))}get(...e){return this.all(...e)[0]}static async fromJWKS(e,{onlyPublic:t=!1,onlyPrivate:r=!1}={}){if(!o(e)||!Array.isArray(e.keys)||e.keys.some(e=>!o(e)||!("kty"in e)))throw TypeError("jwks must be a JSON Web Key Set formatted object");let s=[];for(let o of e.keys){let{kty:e,kid:a,crv:c}=o=i(o),{alg:u,use:l}=o;if("string"==typeof e&&e&&(void 0===l||"sig"===l||"enc"===l)&&("string"==typeof u||void 0===u)&&("string"==typeof a||void 0===a)){if("EC"===e&&"sig"===l)switch(c){case"P-256":u="ES256";break;case"P-384":u="ES384";break;case"P-521":u="ES512"}if("secp256k1"===c&&(l="sig",u="ES256K"),"OKP"===e)switch(c){case"Ed25519":case"E
4d448":l="sig",u="EdDSA";break;case"X25519":case"X448":l="enc"}if(u&&!l)switch(!0){case u.startsWith("ECDH"):case u.startsWith("RSA"):l="enc"}if(r&&("oct"===o.kty||!o.d))throw Error("jwks must only contain private keys");t&&(o.d||o.k)||s.push({jwk:{...o,alg:u,use:l},async keyObject(e){if(this[e])return this[e];let t=await n.importJWK(this.jwk,e);return this[e]=t,t},get algorithms(){return Object.defineProperty(this,"algorithms",{value:function(e,t,r,i){if(t)return new Set([t]);switch(r){case"EC":{let t=[];if(("enc"===e||void 0===e)&&(t=t.concat(["ECDH-ES","ECDH-ES+A128KW","ECDH-ES+A192KW","ECDH-ES+A256KW"])),"sig"===e||void 0===e)switch(i){case"P-256":case"P-384":t=t.concat([`ES${i.slice(-3)}`]);break;case"P-521":t=t.concat(["ES512"]);break;case"secp256k1":"node:crypto"===n.cryptoRuntime&&(t=t.concat(["ES256K"]))}return new Set(t)}case"OKP":return new Set(["ECDH-ES","ECDH-ES+A128KW","ECDH-ES+A192KW","ECDH-ES+A256KW"]);case"RSA":{let t=[];return("enc"===e||void 0===e)&&(t=t.concat(["RSA-OAEP","RSA-OAEP-256","RSA-OAEP-384","RSA-OAEP-512"]),"node:crypto"===n.cryptoRuntime&&(t=t.concat(["RSA1_5"]))),("sig"===e||void 0===e)&&(t=t.concat(["PS256","PS384","PS512","RS256","RS384","RS512"])),new Set(t)}default:throw Error("unreachable")}}(this.jwk.use,this.jwk.alg,this.jwk.kty,this.jwk.crv),enumerable:!0,configurable:!1}),this.algorithms}})}}return new this(a,s)}filter(...e){return this.#e.filter(...e)}find(...e){return this.#e.find(...e)}every(...e){return this.#e.every(...e)}some(...e){return this.#e.some(...e)}map(...e){return this.#e.map(...e)}forEach(...e){return this.#e.forEach(...e)}reduce(...e){return this.#e.reduce(...e)}sort(...e){return this.#e.sort(...e)}*[Symbol.iterator](){for(let e of this.#e)yield e}}},23499,(e,t,r)=>{let n=e.r(666285);t.exports=function e(t,...r){for(let i of r)if(n(i))for(let[r,o]of Object.entries(i))"__proto__"!==r&&"constructor"!==r&&(n(t[r])&&n(o)?t[r]=e(t[r],o):void 0!==o&&(t[r]=o));return t}},121628,(e,t,r)=>{var n=e.i(467034);let i=e.r(563703),{RPError:o}=e.r(696055),{assertIssuerConfiguration:a}=e.r(918710),{random:s}=e.r(852849),c=e.r(550766),u=e.r(508284),{keystores:l}=e.r(366951),d=e.r(23499),p=e=>encodeURIComponent(e).replace(/%20/g,"+");async function f(e,t){let r=this[`${e}_endpoint_auth_signing_alg`];if(r||a(this.issuer,`${e}_endpoint_auth_signing_alg_values_supported`),"client_secret_jwt"===this[`${e}_endpoint_auth_method`]){if(!r){let t=this.issuer[`${e}_endpoint_auth_signing_alg_values_supported`];r=Array.isArray(t)&&t.find(e=>/^HS(?:256|384|512)/.test(e))}if(!r)throw new o(`failed to determine a JWS Algorithm to use for ${this[`${e}_endpoint_auth_method`]} Client Assertion`);return new i.CompactSign(n.Buffer.from(JSON.stringify(t))).setProtectedHeader({alg:r}).sign(this.secretForAlg(r))}let s=await l.get(this);if(!s)throw TypeError("no client jwks provided for signing a client assertion with");if(!r){let t=this.issuer[`${e}_endpoint_auth_signing_alg_values_supported`];r=Array.isArray(t)&&t.find(e=>s.get({alg:e,use:"sig"}))}if(!r)throw new o(`failed to determine a JWS Algorithm to use for ${this[`${e}_endpoint_auth_method`]} Client Assertion`);let c=s.get({alg:r,use:"sig"});if(!c)throw new o(`no key found in client jwks to sign a client assertion with using alg ${r}`);return new i.CompactSign(n.Buffer.from(JSON.stringify(t))).setProtectedHeader({alg:r,kid:c.jwk&&c.jwk.kid}).sign(await c.keyObject(r))}async function h(e,{clientAssertionPayload:t}={}){switch(this[`${e}_endpoint_auth_method`]){case"self_signed_tls_client_auth":case"tls_client_auth":case"none":return{form:{client_id:this.client_id}};case"client_secret_post":if("string"!=typeof this.client_secret)throw TypeError("client_secret_post client authentication method requires a client_secret");return{form:{client_id:this.client_id,client_secret:this.client_secret}};case"private_key_jwt":case"client_secret_jwt":{let r=c(),n=await f.call(this,e,{iat:r,exp:r+60,jti:s(),iss:this.client_id,sub:this.client_id,aud:this.issuer.issuer,...t});return{form:{client_id:this.client_id,client_assertion:n,client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}}}case"client_secret_basic":{if("string"!=typeof this.client_secret)throw TypeError("client_secret_basic client authentication method requires a client_secret");let e=`${p(this.client_id)}:${p(this.client_secret)}`,t=n.Buffer.from(e).toString("base64");return{headers:{Authorization:`Basic ${t}`}}}default:throw TypeError(`missing, or unsupported, ${e}_endpoint_auth_method`)}}async function y(e,t,{clientAssertionPayload:r,endpointAuthMethod:n=e,DPoP:i}={}){let o,a=d(t,await h.call(this,n,{clientAssertionPayload:r})),s=this[`${n}_endpoint_auth_method`].includes("tls_client_auth")||"token"===e&&this.tls_client_certificate_bound_access_tokens;if(s&&this.issuer.mtls_endpoint_aliases&&(o=this.issuer.mtls_endpoint_aliases[`${e}_endpoint`]),o=o||this.issuer[`${e}_endpoint`],"form"in a)for(let[e,t]of Object.entries(a.form))void 0===t&&delete a.form[e];return u.call(this,{...a,method:"POST",url:o,headers:{..."revocation"!==e?{Accept:"application/json"}:void 0,...a.headers}},{mTLS:s,DPoP:i})}t.exports={resolveResponseType:function(){let{length:e,0:t}=this.response_types;if(1===e)return t},resolveRedirectUri:function(){let{length:e,0:t}=this.redirect_uris||[];if(1===e)return t},authFor:h,authenticatedPost:y}},368971,(e,t,r)=>{t.exports=(function t(r,n,i){function o(s,c){if(!n[s]){if(!r[s]){var u=e.t;return!c&&u?u(s,!0):a(s,!0)}
4var l=n[s]={exports:{}};r[s][0].call(l.exports,function(e){return o(r[s][1][e]||e)},l,l.exports,t,r,n,i)}return n[s].exports}for(var a=e.t,s=0;s<i.length;s++)o(i[s]);return o})({1:[function(e,t,r){(function(n,i,o,a,s,c,u,l,d){"use strict";var p=e("crypto");function f(e,t){var r=t=g(e,t);if(void 0===(n="passthrough"!==r.algorithm?p.createHash(r.algorithm):new b).write&&(n.write=n.update,n.end=n.update),_(r,n).dispatch(e),n.update||n.end(""),n.digest)return n.digest("buffer"===r.encoding?void 0:r.encoding);var n,i=n.read();return"buffer"!==r.encoding?i.toString(r.encoding):i}(r=t.exports=f).sha1=function(e){return f(e)},r.keys=function(e){return f(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(e){return f(e,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(e){return f(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var h=p.getHashes?p.getHashes().slice():["sha1","md5"];h.push("passthrough");var y=["buffer","hex","binary","base64"];function g(e,t){var r={};if(r.algorithm=(t=t||{}).algorithm||"sha1",r.encoding=t.encoding||"hex",r.excludeValues=!!t.excludeValues,r.algorithm=r.algorithm.toLowerCase(),r.encoding=r.encoding.toLowerCase(),r.ignoreUnknown=!0===t.ignoreUnknown,r.respectType=!1!==t.respectType,r.respectFunctionNames=!1!==t.respectFunctionNames,r.respectFunctionProperties=!1!==t.respectFunctionProperties,r.unorderedArrays=!0===t.unorderedArrays,r.unorderedSets=!1!==t.unorderedSets,r.unorderedObjects=!1!==t.unorderedObjects,r.replacer=t.replacer||void 0,r.excludeKeys=t.excludeKeys||void 0,void 0===e)throw Error("Object argument required.");for(var n=0;n<h.length;++n)h[n].toLowerCase()===r.algorithm.toLowerCase()&&(r.algorithm=h[n]);if(-1===h.indexOf(r.algorithm))throw Error('Algorithm "'+r.algorithm+'"  not supported. supported values: '+h.join(", "));if(-1===y.indexOf(r.encoding)&&"passthrough"!==r.algorithm)throw Error('Encoding "'+r.encoding+'"  not supported. supported values: '+y.join(", "));return r}function m(e){if("function"==typeof e)return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))}function _(e,t,r){function n(e){return t.update?t.update(e,"utf8"):t.write(e,"utf8")}return r=r||[],{dispatch:function(t){return e.replacer&&(t=e.replacer(t)),this["_"+(null===t?"null":typeof t)](t)},_object:function(t){var i,a=Object.prototype.toString.call(t),s=/\[object (.*)\]/i.exec(a);if(s=(s=s?s[1]:"unknown:["+a+"]").toLowerCase(),0<=(i=r.indexOf(t)))return this.dispatch("[CIRCULAR:"+i+"]");if(r.push(t),void 0!==o&&o.isBuffer&&o.isBuffer(t))return n("buffer:"),n(t);if("object"===s||"function"===s||"asyncfunction"===s){var c=Object.keys(t);e.unorderedObjects&&(c=c.sort()),!1===e.respectType||m(t)||c.splice(0,0,"prototype","__proto__","constructor"),e.excludeKeys&&(c=c.filter(function(t){return!e.excludeKeys(t)})),n("object:"+c.length+":");var u=this;return c.forEach(function(r){u.dispatch(r),n(":"),e.excludeValues||u.dispatch(t[r]),n(",")})}if(!this["_"+s]){if(e.ignoreUnknown)return n("["+s+"]");throw Error('Unknown object type "'+s+'"')}this["_"+s](t)},_array:function(t,i){i=void 0!==i?i:!1!==e.unorderedArrays;var o=this;if(n("array:"+t.length+":"),!i||t.length<=1)return t.forEach(function(e){return o.dispatch(e)});var a=[],s=t.map(function(t){var n=new b,i=r.slice();return _(e,n,i).dispatch(t),a=a.concat(i.slice(r.length)),n.read().toString()});return r=r.concat(a),s.sort(),this._array(s,!1)},_date:function(e){return n("date:"+e.toJSON())},_symbol:function(e){return n("symbol:"+e.toString())},_error:function(e){return n("error:"+e.toString())},_boolean:function(e){return n("bool:"+e.toString())},_string:function(e){n("string:"+e.length+":"),n(e.toString())},_function:function(t){n("fn:"),m(t)?this.dispatch("[native]"):this.dispatch(t.toString()),!1!==e.respectFunctionNames&&this.dispatch("function-name:"+String(t.name)),e.respectFunctionProperties&&this._object(t)},_number:function(e){return n("number:"+e.toString())},_xml:function(e){return n("xml:"+e.toString())},_null:function(){return n("Null")},_undefined:function(){return n("Undefined")},_regexp:function(e){return n("regex:"+e.toString())},_uint8array:function(e){return n("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return n("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return n("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return n("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return n("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return n("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return n("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return n("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return n("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return n("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return n("url:"+e.toString())},_map:function(t){n("map:");var r=Array.from(t);return this._array(r,!1!==e.unorderedSets)},_set:function(t){n("set:");var r=Array.from(t);return this._array(r,!1!==e.unorderedSets)},_file:function(e){return n("file:"),this.dispatch([e.name,e.size,e.type,e.lastModfied])},_blob:function(){if(e.ignoreUnknown)return n("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return n("domwindow")},_bigint:function(e){return n("bigint:"+e.toString())},_process:function(){return n("process")},_timer:function(){return n("timer")},_pipe:function(){return n("pipe")},_tcp:function(){return n("tcp")},_udp:function(){return n("udp")},_tty:function(){return n("tty")},_statwatcher:function(){return n("statwatcher")},_securecontext:function(){return n("securecontext")},_connection:function(){return n("connection")},_zlib:function(){return n("zlib")},_context:function(){return n("context")},_nodescript:function(){return n("nodescript")},_httpparser:function(){return n("httpparser")},_dataview:function(){return n("dataview")},_signal:function(){return n("signal")},_fsevent:function(){return n("fsevent")},_tlswrap:function(){return n("tlswrap")}}}function b(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}r.writeToStream=function(e,t,r){return void 0===r&&(r=t,t={}),_(t=g(e,t),r).dispatch(e)}}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_7eac155c.js","/")},{buffer:3,crypto:5,lYpoI2:10}],2:[function(e,t,r){(function(e,t,n,i,o,a,s,c,u){!function(e){"use strict";var t="u">typeof Uint8Array?Uint8Array:Array;function r(e){var t=e.charCodeAt(0);return 43===t||45===t?62:47===t||95===t?63:t<48?-1:t<58?t-48+26+26:t<91?t-65:t<123?t-97+26:void 0}e.toByteArray=function(e){if(0<e.length%4)throw Error("Invalid string. Length must be a multiple of 4");var n,i,o=e.length,a="="===e.charAt(o-2)?2:+("="===e.charAt(o-1)),s=new t(3*e.length/4-a),c=0<a?e.length-4:e.length,u=0;function l(e){s[u++]=e}for(n=0;n<c;n+=4)l((0xff0000&(i=r(e.charAt(n))<<18|r(e.charAt(n+1))<<12|r(e.charAt(n+2))<<6|r(e.charAt(n+3))))>>16),l((65280&i)>>8),l(255&i);return 2==a?l(255&(i=r(e.charAt(n))<<2|r(e.charAt(n+1))>>4)):1==a&&(l((i=r(e.charAt(n))<<10|r(e.charAt(n+1))<<4|r(e.charAt(n+2))>>2)>>8&255),l(255&i)),s},e.fromByteArray=function(e){var t,r,n,i,o=e.length%3,a="";function s(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
4+/".charAt(e)}for(t=0,n=e.length-o;t<n;t+=3)a+=s((i=r=(e[t]<<16)+(e[t+1]<<8)+e[t+2])>>18&63)+s(i>>12&63)+s(i>>6&63)+s(63&i);switch(o){case 1:a+=s((r=e[e.length-1])>>2),a+=s(r<<4&63),a+="==";break;case 2:a+=s((r=(e[e.length-2]<<8)+e[e.length-1])>>10),a+=s(r>>4&63),a+=s(r<<2&63),a+="="}return a}}(void 0===r?this.base64js={}:r)}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(e,t,r){(function(t,n,i,o,a,s,c,u,l){var d=e("base64-js"),p=e("ieee754");function i(e,t,r){if(!(this instanceof i))return new i(e,t,r);var n,o,a,s,c,u=typeof e;if("base64"===t&&"string"==u)for(e=(n=e).trim?n.trim():n.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if("number"==u)o=T(e);else if("string"==u)o=i.byteLength(e,t);else{if("object"!=u)throw Error("First argument needs to be a number, array or string.");o=T(e.length)}if(i._useTypedArrays?a=i._augment(new Uint8Array(o)):((a=this).length=o,a._isBuffer=!0),i._useTypedArrays&&"number"==typeof e.byteLength)a._set(e);else if(O(c=e)||i.isBuffer(c)||c&&"object"==typeof c&&"number"==typeof c.length)for(s=0;s<o;s++)i.isBuffer(e)?a[s]=e.readUInt8(s):a[s]=e[s];else if("string"==u)a.write(e,0,t);else if("number"==u&&!i._useTypedArrays&&!r)for(s=0;s<o;s++)a[s]=0;return a}function f(e,t,r,n){n||(D("boolean"==typeof r,"missing or invalid endian"),D(null!=t,"missing offset"),D(t+1<e.length,"Trying to read beyond buffer length"));var i,o=e.length;if(!(o<=t))return r?(i=e[t],t+1<o&&(i|=e[t+1]<<8)):(i=e[t]<<8,t+1<o&&(i|=e[t+1])),i}function h(e,t,r,n){n||(D("boolean"==typeof r,"missing or invalid endian"),D(null!=t,"missing offset"),D(t+3<e.length,"Trying to read beyond buffer length"));var i,o=e.length;if(!(o<=t))return r?(t+2<o&&(i=e[t+2]<<16),t+1<o&&(i|=e[t+1]<<8),i|=e[t],t+3<o&&(i+=e[t+3]<<24>>>0)):(t+1<o&&(i=e[t+1]<<16),t+2<o&&(i|=e[t+2]<<8),t+3<o&&(i|=e[t+3]),i+=e[t]<<24>>>0),i}function y(e,t,r,n){if(n||(D("boolean"==typeof r,"missing or invalid endian"),D(null!=t,"missing offset"),D(t+1<e.length,"Trying to read beyond buffer length")),!(e.length<=t)){var i=f(e,t,r,!0);return 32768&i?-1*(65535-i+1):i}}function g(e,t,r,n){if(n||(D("boolean"==typeof r,"missing or invalid endian"),D(null!=t,"missing offset"),D(t+3<e.length,"Trying to read beyond buffer length")),!(e.length<=t)){var i=h(e,t,r,!0);return 0x80000000&i?-1*(0xffffffff-i+1):i}}function m(e,t,r,n){return n||(D("boolean"==typeof r,"missing or invalid endian"),D(t+3<e.length,"Trying to read beyond buffer length")),p.read(e,t,r,23,4)}function _(e,t,r,n){return n||(D("boolean"==typeof r,"missing or invalid endian"),D(t+7<e.length,"Trying to read beyond buffer length")),p.read(e,t,r,52,8)}function b(e,t,r,n,i){i||(D(null!=t,"missing value"),D("boolean"==typeof n,"missing or invalid endian"),D(null!=r,"missing offset"),D(r+1<e.length,"trying to write beyond buffer length"),U(t,65535));var o=e.length;if(!(o<=r))for(var a=0,s=Math.min(o-r,2);a<s;a++)e[r+a]=(t&255<<8*(n?a:1-a))>>>8*(n?a:1-a)}function v(e,t,r,n,i){i||(D(null!=t,"missing value"),D("boolean"==typeof n,"missing or invalid endian"),D(null!=r,"missing offset"),D(r+3<e.length,"trying to write beyond buffer length"),U(t,0xffffffff));var o=e.length;if(!(o<=r))for(var a=0,s=Math.min(o-r,4);a<s;a++)e[r+a]=t>>>8*(n?a:3-a)&255}function w(e,t,r,n,i){i||(D(null!=t,"missing value"),D("boolean"==typeof n,"missing or invalid endian"),D(null!=r,"missing offset"),D(r+1<e.length,"Trying to write beyond buffer length"),z(t,32767,-32768)),e.length<=r||b(e,0<=t?t:65535+t+1,r,n,i)}function E(e,t,r,n,i){i||(D(null!=t,"missing value"),D("boolean"==typeof n,"missing or invalid endian"),D(null!=r,"missing offset"),D(r+3<e.length,"Trying to write beyond buffer length"),z(t,0x7fffffff,-0x80000000)),e.length<=r||v(e,0<=t?t:0xffffffff+t+1,r,n,i)}function S(e,t,r,n,i){i||(D(null!=t,"missing value"),D("boolean"==typeof n,"missing or invalid endian"),D(null!=r,"missing offset"),D(r+3<e.length,"Trying to write beyond buffer length"),N(t,34028234663852886e22,-34028234663852886e22)),e.length<=r||p.write(e,t,r,n,23,4)}function k(e,t,r,n,i){i||(D(null!=t,"missing value"),D("boolean"==typeof n,"missing or invalid endian"),D(null!=r,"missing offset"),D(r+7<e.length,"Trying to write beyond buffer length"),N(t,17976931348623157e292,-17976931348623157e292)),e.length<=r||p.write(e,t,r,n,52,8)}r.Buffer=i,r.SlowBuffer=i,r.INSPECT_MAX_BYTES=50,i.poolSize=8192,i._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(e){return!1}}(),i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.byteLength=function(e,t){var r;switch(e+="",t||"utf8"){case"hex":r=e.length/2;break;case"utf8":case"utf-8":r=P(e).length;break;case"ascii":case"binary":case"raw":r=e.length;break;case"base64":r=C(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*e.length;break;default:throw Error("Unknown encoding")}return r},i.concat=function(e,t){if(D(O(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new i(0);if(1===e.length)return e[0];if("number"!=typeof t)for(o=t=0;o<e.length;o++)t+=e[o].length;for(var r=new i(t),n=0,o=0;o<e.length;o++){var a=e[o];a.copy(r,n),n+=a.length}return r}
4,i.prototype.write=function(e,t,r,n){isFinite(t)?isFinite(r)||(n=r,r=void 0):(u=n,n=t,t=r,r=u),t=Number(t)||0;var o,a,s,c,u,l,d,p,f,h,y=this.length-t;switch((!r||y<(r=Number(r)))&&(r=y),n=String(n||"utf8").toLowerCase()){case"hex":l=function(e,t,r,n){r=Number(r)||0;var o=e.length-r;(!n||o<(n=Number(n)))&&(n=o);var a=t.length;D(a%2==0,"Invalid hex string"),a/2<n&&(n=a/2);for(var s=0;s<n;s++){var c=parseInt(t.substr(2*s,2),16);D(!isNaN(c),"Invalid hex string"),e[r+s]=c}return i._charsWritten=2*s,s}(this,e,t,r);break;case"utf8":case"utf-8":f=t,h=r,l=i._charsWritten=j(P(e),this,f,h);break;case"ascii":case"binary":o=t,a=r,l=i._charsWritten=j(function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t}(e),this,o,a);break;case"base64":d=t,p=r,l=i._charsWritten=j(C(e),this,d,p);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":s=t,c=r,l=i._charsWritten=j(function(e){for(var t,r,n=[],i=0;i<e.length;i++)r=(t=e.charCodeAt(i))>>8,n.push(t%256),n.push(r);return n}(e),this,s,c);break;default:throw Error("Unknown encoding")}return l},i.prototype.toString=function(e,t,r){var n,i,o;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,(r=void 0!==r?Number(r):r=this.length)===t)return"";switch(e){case"hex":n=function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||n<r)&&(r=n);for(var i="",o=t;o<r;o++)i+=R(e[o]);return i}(this,t,r);break;case"utf8":case"utf-8":n=function(e,t,r){var n="",i="";r=Math.min(e.length,r);for(var o=t;o<r;o++)e[o]<=127?(n+=I(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return n+I(i)}(this,t,r);break;case"ascii":case"binary":n=function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;i++)n+=String.fromCharCode(e[i]);return n}(this,t,r);break;case"base64":o=r,n=0===(i=t)&&o===this.length?d.fromByteArray(this):d.fromByteArray(this.slice(i,o));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,t,r);break;default:throw Error("Unknown encoding")}return n},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},i.prototype.copy=function(e,t,r,n){if(r=r||0,n||0===n||(n=this.length),t=t||0,n!==r&&0!==e.length&&0!==this.length){D(r<=n,"sourceEnd < sourceStart"),D(0<=t&&t<e.length,"targetStart out of bounds"),D(0<=r&&r<this.length,"sourceStart out of bounds"),D(0<=n&&n<=this.length,"sourceEnd out of bounds"),n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;if(o<100||!i._useTypedArrays)for(var a=0;a<o;a++)e[a+t]=this[a+r];else e._set(this.subarray(r,r+o),t)}},i.prototype.slice=function(e,t){var r=this.length;if(e=x(e,r,0),t=x(t,r,r),i._useTypedArrays)return i._augment(this.subarray(e,t));for(var n=t-e,o=new i(n,void 0,!0),a=0;a<n;a++)o[a]=this[a+e];return o},i.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},i.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},i.prototype.readUInt8=function(e,t){if(t||(D(null!=e,"missing offset"),D(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return this[e]},i.prototype.readUInt16LE=function(e,t){return f(this,e,!0,t)},i.prototype.readUInt16BE=function(e,t){return f(this,e,!1,t)},i.prototype.readUInt32LE=function(e,t){return h(this,e,!0,t)},i.prototype.readUInt32BE=function(e,t){return h(this,e,!1,t)},i.prototype.readInt8=function(e,t){if(t||(D(null!=e,"missing offset"),D(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){return y(this,e,!0,t)},i.prototype.readInt16BE=function(e,t){return y(this,e,!1,t)},i.prototype.readInt32LE=function(e,t){return g(this,e,!0,t)},i.prototype.readInt32BE=function(e,t){return g(this,e,!1,t)},i.prototype.readFloatLE=function(e,t){return m(this,e,!0,t)},i.prototype.readFloatBE=function(e,t){return m(this,e,!1,t)},i.prototype.readDoubleLE=function(e,t){return _(this,e,!0,t)},i.prototype.readDoubleBE=function(e,t){return _(this,e,!1,t)},i.prototype.writeUInt8=function(e,t,r){r||(D(null!=e,"missing value"),D(null!=t,"missing offset"),D(t<this.length,"trying to write beyond buffer length"),U(e,255)),t>=this.length||(this[t]=e)},i.prototype.writeUInt16LE=function(e,t,r){b(this,e,t,!0,r)},i.prototype.writeUInt16BE=function(e,t,r){b(this,e,t,!1,r)},i.prototype.writeUInt32LE=function(e,t,r){v(this,e,t,!0,r)},i.prototype.writeUInt32BE=function(e,t,r){v(this,e,t,!1,r)},i.prototype.writeInt8=function(e,t,r){r||(D(null!=e,"missing value"),D(null!=t,"missing offset"),D(t<this.length,"Trying to write beyond buffer length"),z(e,127,-128)),t>=this.length||(0<=e?this.writeUInt8(e,t,r):this.writeUInt8(255+e+1,t,r))},i.prototype.writeInt16LE=function(e,t,r){w(this,e,t,!0,r)},i.prototype.writeInt16BE=function(e,t,r){w(this,e,t,!1,r)},i.prototype.writeInt32LE=function(e,t,r){E(this,e,t,!0,r)},i.prototype.writeInt32BE=function(e,t,r){E(this,e,t,!1,r)},i.prototype.writeFloatLE=function(e,t,r){S(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){S(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){k(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){k(this,e,t,!1,r)}
4,i.prototype.fill=function(e,t,r){if(e=e||0,t=t||0,r=r||this.length,"string"==typeof e&&(e=e.charCodeAt(0)),D("number"==typeof e&&!isNaN(e),"value is not a number"),D(t<=r,"end < start"),r!==t&&0!==this.length){D(0<=t&&t<this.length,"start out of bounds"),D(0<=r&&r<=this.length,"end out of bounds");for(var n=t;n<r;n++)this[n]=e}},i.prototype.inspect=function(){for(var e=[],t=this.length,n=0;n<t;n++)if(e[n]=R(this[n]),n===r.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<Buffer "+e.join(" ")+">"},i.prototype.toArrayBuffer=function(){if("u"<typeof Uint8Array)throw Error("Buffer.toArrayBuffer not supported in this browser");if(i._useTypedArrays)return new i(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;t<r;t+=1)e[t]=this[t];return e.buffer};var A=i.prototype;function x(e,t,r){return"number"!=typeof e?r:t<=(e=~~e)?t:0<=e||0<=(e+=t)?e:0}function T(e){return(e=~~Math.ceil(+e))<0?0:e}function O(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function R(e){return e<16?"0"+e.toString(16):e.toString(16)}function P(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<=127)t.push(e.charCodeAt(r));else{var i=r;55296<=n&&n<=57343&&r++;for(var o=encodeURIComponent(e.slice(i,r+1)).substr(1).split("%"),a=0;a<o.length;a++)t.push(parseInt(o[a],16))}}return t}function C(e){return d.toByteArray(e)}function j(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);i++)t[i+r]=e[i];return i}function I(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function U(e,t){D("number"==typeof e,"cannot write a non-number as a number"),D(0<=e,"specified a negative value for writing an unsigned value"),D(e<=t,"value is larger than maximum value for type"),D(Math.floor(e)===e,"value has a fractional component")}function z(e,t,r){D("number"==typeof e,"cannot write a non-number as a number"),D(e<=t,"value larger than maximum allowed value"),D(r<=e,"value smaller than minimum allowed value"),D(Math.floor(e)===e,"value has a fractional component")}function N(e,t,r){D("number"==typeof e,"cannot write a non-number as a number"),D(e<=t,"value larger than maximum allowed value"),D(r<=e,"value smaller than minimum allowed value")}function D(e,t){if(!e)throw Error(t||"Failed assertion")}i._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=A.get,e.set=A.set,e.write=A.write,e.toString=A.toString,e.toLocaleString=A.toString,e.toJSON=A.toJSON,e.copy=A.copy,e.slice=A.slice,e.readUInt8=A.readUInt8,e.readUInt16LE=A.readUInt16LE,e.readUInt16BE=A.readUInt16BE,e.readUInt32LE=A.readUInt32LE,e.readUInt32BE=A.readUInt32BE,e.readInt8=A.readInt8,e.readInt16LE=A.readInt16LE,e.readInt16BE=A.readInt16BE,e.readInt32LE=A.readInt32LE,e.readInt32BE=A.readInt32BE,e.readFloatLE=A.readFloatLE,e.readFloatBE=A.readFloatBE,e.readDoubleLE=A.readDoubleLE,e.readDoubleBE=A.readDoubleBE,e.writeUInt8=A.writeUInt8,e.writeUInt16LE=A.writeUInt16LE,e.writeUInt16BE=A.writeUInt16BE,e.writeUInt32LE=A.writeUInt32LE,e.writeUInt32BE=A.writeUInt32BE,e.writeInt8=A.writeInt8,e.writeInt16LE=A.writeInt16LE,e.writeInt16BE=A.writeInt16BE,e.writeInt32LE=A.writeInt32LE,e.writeInt32BE=A.writeInt32BE,e.writeFloatLE=A.writeFloatLE,e.writeFloatBE=A.writeFloatBE,e.writeDoubleLE=A.writeDoubleLE,e.writeDoubleBE=A.writeDoubleBE,e.fill=A.fill,e.inspect=A.inspect,e.toArrayBuffer=A.toArrayBuffer,e}}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:11,lYpoI2:10}],4:[function(e,t,r){(function(r,n,i,o,a,s,c,u,l){var i=e("buffer").Buffer,d=new i(4);d.fill(0),t.exports={hash:function(e,t,r,n){return i.isBuffer(e)||(e=new i(e)),function(e,t,r){for(var n=new i(t),o=r?n.writeInt32BE:n.writeInt32LE,a=0;a<e.length;a++)o.call(n,e[a],4*a,!0);return n}(t(function(e,t){var r;e.length%4!=0&&(r=e.length+(4-e.length%4),e=i.concat([e,d],r));for(var n=[],o=t?e.readInt32BE:e.readInt32LE,a=0;a<e.length;a+=4)n.push(o.call(e,a));return n}
4(e,n),8*e.length),r,n)}}}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],5:[function(e,t,r){(function(t,n,i,o,a,s,c,u,l){var i=e("buffer").Buffer,d=e("./sha"),p=e("./sha256"),f=e("./rng"),h={sha1:d,sha256:p,md5:e("./md5")},y=new i(64);function g(e,t){var r=h[e=e||"sha1"],n=[];return r||m("algorithm:",e,"is not yet supported"),{update:function(e){return i.isBuffer(e)||(e=new i(e)),n.push(e),e.length,this},digest:function(e){var o=i.concat(n),a=t?function(e,t,r){i.isBuffer(t)||(t=new i(t)),i.isBuffer(r)||(r=new i(r)),t.length>64?t=e(t):t.length<64&&(t=i.concat([t,y],64));for(var n=new i(64),o=new i(64),a=0;a<64;a++)n[a]=54^t[a],o[a]=92^t[a];var s=e(i.concat([n,r]));return e(i.concat([o,s]))}(r,t,o):r(o);return n=null,e?a.toString(e):a}}}function m(){var e=[].slice.call(arguments).join(" ");throw Error([e,"we accept pull requests\nhttp://github.com/dominictarr/crypto-browserify"].join("\n"))}y.fill(0),r.createHash=function(e){return g(e)},r.createHmac=g,r.randomBytes=function(e,t){if(!t||!t.call)return new i(f(e));try{t.call(this,void 0,new i(f(e)))}catch(e){t(e)}},function(e,t){for(var r in e)t(e[r],r)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){r[e]=function(){m("sorry,",e,"is not implemented yet")}})}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:10}],6:[function(e,t,r){(function(r,n,i,o,a,s,c,u,l){var d=e("./helpers");function p(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=0x67452301,n=-0x10325477,i=-0x67452302,o=0x10325476,a=0;a<e.length;a+=16){var s=r,c=n,u=i,l=o,r=h(r,n,i,o,e[a+0],7,-0x28955b88),o=h(o,r,n,i,e[a+1],12,-0x173848aa),i=h(i,o,r,n,e[a+2],17,0x242070db),n=h(n,i,o,r,e[a+3],22,-0x3e423112);r=h(r,n,i,o,e[a+4],7,-0xa83f051),o=h(o,r,n,i,e[a+5],12,0x4787c62a),i=h(i,o,r,n,e[a+6],17,-0x57cfb9ed),n=h(n,i,o,r,e[a+7],22,-0x2b96aff),r=h(r,n,i,o,e[a+8],7,0x698098d8),o=h(o,r,n,i,e[a+9],12,-0x74bb0851),i=h(i,o,r,n,e[a+10],17,-42063),n=h(n,i,o,r,e[a+11],22,-0x76a32842),r=h(r,n,i,o,e[a+12],7,0x6b901122),o=h(o,r,n,i,e[a+13],12,-0x2678e6d),i=h(i,o,r,n,e[a+14],17,-0x5986bc72),r=y(r,n=h(n,i,o,r,e[a+15],22,0x49b40821),i,o,e[a+1],5,-0x9e1da9e),o=y(o,r,n,i,e[a+6],9,-0x3fbf4cc0),i=y(i,o,r,n,e[a+11],14,0x265e5a51),n=y(n,i,o,r,e[a+0],20,-0x16493856),r=y(r,n,i,o,e[a+5],5,-0x29d0efa3),o=y(o,r,n,i,e[a+10],9,0x2441453),i=y(i,o,r,n,e[a+15],14,-0x275e197f),n=y(n,i,o,r,e[a+4],20,-0x182c0438),r=y(r,n,i,o,e[a+9],5,0x21e1cde6),o=y(o,r,n,i,e[a+14],9,-0x3cc8f82a),i=y(i,o,r,n,e[a+3],14,-0xb2af279),n=y(n,i,o,r,e[a+8],20,0x455a14ed),r=y(r,n,i,o,e[a+13],5,-0x561c16fb),o=y(o,r,n,i,e[a+2],9,-0x3105c08),i=y(i,o,r,n,e[a+7],14,0x676f02d9),r=g(r,n=y(n,i,o,r,e[a+12],20,-0x72d5b376),i,o,e[a+5],4,-378558),o=g(o,r,n,i,e[a+8],11,-0x788e097f),i=g(i,o,r,n,e[a+11],16,0x6d9d6122),n=g(n,i,o,r,e[a+14],23,-0x21ac7f4),r=g(r,n,i,o,e[a+1],4,-0x5b4115bc),o=g(o,r,n,i,e[a+4],11,0x4bdecfa9),i=g(i,o,r,n,e[a+7],16,-0x944b4a0),n=g(n,i,o,r,e[a+10],23,-0x41404390),r=g(r,n,i,o,e[a+13],4,0x289b7ec6),o=g(o,r,n,i,e[a+0],11,-0x155ed806),i=g(i,o,r,n,e[a+3],16,-0x2b10cf7b),n=g(n,i,o,r,e[a+6],23,0x4881d05),r=g(r,n,i,o,e[a+9],4,-0x262b2fc7),o=g(o,r,n,i,e[a+12],11,-0x1924661b),i=g(i,o,r,n,e[a+15],16,0x1fa27cf8),r=m(r,n=g(n,i,o,r,e[a+2],23,-0x3b53a99b),i,o,e[a+0],6,-0xbd6ddbc),o=m(o,r,n,i,e[a+7],10,0x432aff97),i=m(i,o,r,n,e[a+14],15,-0x546bdc59),n=m(n,i,o,r,e[a+5],21,-0x36c5fc7),r=m(r,n,i,o,e[a+12],6,0x655b59c3),o=m(o,r,n,i,e[a+3],10,-0x70f3336e),i=m(i,o,r,n,e[a+10],15,-1051523),n=m(n,i,o,r,e[a+1],21,-0x7a7ba22f),r=m(r,n,i,o,e[a+8],6,0x6fa87e4f),o=m(o,r,n,i,e[a+15],10,-0x1d31920),i=m(i,o,r,n,e[a+6],15,-0x5cfebcec),n=m(n,i,o,r,e[a+13],21,0x4e0811a1),r=m(r,n,i,o,e[a+4],6,-0x8ac817e),o=m(o,r,n,i,e[a+11],10,-0x42c50dcb),i=m(i,o,r,n,e[a+2],15,0x2ad7d2bb),n=m(n,i,o,r,e[a+9],21,-0x14792c6f),r=_(r,s),n=_(n,c),i=_(i,u),o=_(o,l)}return[r,n,i,o]}function f(e,t,r,n,i,o){var a;return _((a=_(_(t,e),_(n,o)))<<i|a>>>32-i,r)}function h(e,t,r,n,i,o,a){return f(t&r|~t&n,e,t,i,o,a)}function y(e,t,r,n,i,o,a){return f(t&n|r&~n,e,t,i,o,a)}function g(e,t,r,n,i,o,a){return f(t^r^n,e,t,i,o,a)}function m(e,t,r,n,i,o,a){return f(r^(t|~n),e,t,i,o,a)}function _(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}t.exports=function(e){return d.hash(e,p,16)}}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(e,t,r){(function(e,r,n,i,o,a,s,c,u){t.exports=function(e){for(var t,r=Array(e),n=0;n<e;n++)0==(3&n)&&(t=0x100000000*Math.random()),r[n]=t>>>((3&n)<<3)&255;return r}}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(e,t,r){(function(r,n,i,o,a,s,c,u,l){var d=e("./helpers");function p(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;
4for(var r,n,i,o,a,s=Array(80),c=0x67452301,u=-0x10325477,l=-0x67452302,d=0x10325476,p=-0x3c2d1e10,y=0;y<e.length;y+=16){for(var g=c,m=u,_=l,b=d,v=p,w=0;w<80;w++){s[w]=w<16?e[y+w]:h(s[w-3]^s[w-8]^s[w-14]^s[w-16],1);var E=f(f(h(c,5),(i=u,o=l,a=d,(n=w)<20?i&o|~i&a:!(n<40)&&n<60?i&o|i&a|o&a:i^o^a)),f(f(p,s[w]),(r=w)<20?0x5a827999:r<40?0x6ed9eba1:r<60?-0x70e44324:-0x359d3e2a)),p=d,d=l,l=h(u,30),u=c,c=E}c=f(c,g),u=f(u,m),l=f(l,_),d=f(d,b),p=f(p,v)}return[c,u,l,d,p]}function f(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function h(e,t){return e<<t|e>>>32-t}t.exports=function(e){return d.hash(e,p,20,!0)}}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(e,t,r){(function(r,n,i,o,a,s,c,u,l){function d(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function p(e,t){return e>>>t|e<<32-t}function f(e,t){var r,n,i,o,a,s,c,u,l,f,h=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],y=[0x6a09e66
47,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],g=Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var m,_,b,v,w,E,S,k,A=0;A<e.length;A+=16){r=y[0],n=y[1],i=y[2],o=y[3],a=y[4],s=y[5],c=y[6],u=y[7];for(var x=0;x<64;x++)g[x]=x<16?e[x+A]:d(d(d(p(k=g[x-2],17)^p(k,19)^k>>>10,g[x-7]),p(S=g[x-15],7)^p(S,18)^S>>>3),g[x-16]),l=d(d(d(d(u,p(E=a,6)^p(E,11)^p(E,25)),(w=a)&s^~w&c),h[x]),g[x]),f=d(p(v=r,2)^p(v,13)^p(v,22),(m=r)&(_=n)^m&(b=i)^_&b),u=c,c=s,s=a,a=d(o,l),o=i,i=n,n=r,r=d(l,f);y[0]=d(r,y[0]),y[1]=d(n,y[1]),y[2]=d(i,y[2]),y[3]=d(o,y[3]),y[4]=d(a,y[4]),y[5]=d(s,y[5]),y[6]=d(c,y[6]),y[7]=d(u,y[7])}return y}var h=e("./helpers");t.exports=function(e){return h.hash(e,f,32,!0)}}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],10:[function(e,t,r){(function(e,r,n,i,o,a,s,c,u){function l(){}(e=t.exports={}).nextTick=function(){var e="u">typeof window&&window.setImmediate,t="u">typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;t!==window&&null!==t||"process-tick"!==e.data||(e.stopPropagation(),0<r.length&&r.shift()())},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=l,e.addListener=l,e.once=l,e.off=l,e.removeListener=l,e.removeAllListeners=l,e.emit=l,e.binding=function(e){throw Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:10}],11:[function(e,t,r){(function(e,t,n,i,o,a,s,c,u){r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<<s)-1,u=c>>1,l=-7,d=r?i-1:0,p=r?-1:1,f=e[t+d];for(d+=p,o=f&(1<<-l)-1,f>>=-l,l+=s;0<l;o=256*o+e[t+d],d+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;0<l;a=256*a+e[t+d],d+=p,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<<u)-1,d=l>>1,p=5960464477539062e-23*(23===i),f=n?0:o-1,h=n?1:-1,y=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),2<=(t+=1<=a+d?p/c:p*Math.pow(2,1-d))*c&&(a++,c/=2),l<=a+d?(s=0,a=l):1<=a+d?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));8<=i;e[r+f]=255&s,f+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;0<u;e[r+f]=255&a,f+=h,a/=256,u-=8);e[r+f-h]|=128*y}}).call(this,e("lYpoI2"),"u">typeof self?self:"u">typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:10}]},{},[1])(1)},967983,(e,t,r)=>{let n=e.r(368971),i=e.r(357873),{RPError:o}=e.r(696055),{assertIssuerConfiguration:a}=e.r(918710),s=e.r(198155),{keystores:c}=e.r(366951),u=e.r(738767),l=e.r(508284),d=new WeakMap,p=new WeakMap,f=e=>(p.has(e)||p.set(e,new i({max:100})),p.get(e));async function h(e=!1){a(this,"jwks_uri");let t=c.get(this),r=f(this);return e||!t?(d.has(this)||(r.reset(),d.set(this,(async()=>{let e=u(await l.call(this,{method:"GET",responseType:"json",url:this.jwks_uri,headers:{Accept:"application/json, application/jwk-set+json"}}).finally(()=>{d.delete(this)})),t=s.fromJWKS(e,{onlyPublic:!0});return r.set("throttle",!0,6e4),c.set(this,t),t})())),d.get(this)):t}async function y({kid:e,kty:t,alg:r,use:i},{allowMulti:a=!1}={}){let s=f(this),c={kid:e,kty:t,alg:r,use:i},u=n(c,{algorithm:"sha256",ignoreUnknown:!0,unorderedArrays:!0,unorderedSets:!0,respectType:!1}),l=s.get(u)||s.get("throttle"),d=await h.call(this,!l),p=d.all(c);if(delete c.use,0===p.length)throw new o({printf:["no valid key found in issuer's jwks_uri for key parameters %j",c],jwks:d});if(!a&&p.length>1&&!e)throw new o({printf:["multiple matching keys found in issuer's jwks_uri for key parameters %j, kid must be provided in this case",c],jwks:d});return s.set(u,!0),p}
4t.exports.queryKeyStore=y,t.exports.keystore=h},13028,(e,t,r)=>{var n=e.i(247167);let{inspect:i}=e.r(477398),{RPError:o,OPError:a}=e.r(696055),s=e.r(550766);class c{#t;#r;#n;#i;#o;#a;#s;#c;#u;constructor({client:e,exchangeBody:t,clientAssertionPayload:r,response:n,maxAge:i,DPoP:a}){if(["verification_uri","user_code","device_code"].forEach(e=>{if("string"!=typeof n[e]||!n[e])throw new o(`expected ${e} string to be returned by Device Authorization Response, got %j`,n[e])}),!Number.isSafeInteger(n.expires_in))throw new o("expected expires_in number to be returned by Device Authorization Response, got %j",n.expires_in);this.#a=s()+n.expires_in,this.#r=e,this.#i=a,this.#c=i,this.#o=t,this.#n=r,this.#u=n,this.#s=1e3*n.interval||5e3}abort(){this.#t=!0}async poll({signal:e}={}){let t;if(e&&e.aborted||this.#t)throw new o("polling aborted");if(this.expired())throw new o("the device code %j has expired and the device authorization session has concluded",this.device_code);await new Promise(e=>setTimeout(e,this.#s));try{t=await this.#r.grant({...this.#o,grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:this.device_code},{clientAssertionPayload:this.#n,DPoP:this.#i})}catch(t){switch(t instanceof a&&t.error){case"slow_down":this.#s+=5e3;case"authorization_pending":return this.poll({signal:e});default:throw t}}return"id_token"in t&&(await this.#r.decryptIdToken(t),await this.#r.validateIdToken(t,void 0,"token",this.#c)),t}get device_code(){return this.#u.device_code}get user_code(){return this.#u.user_code}get verification_uri(){return this.#u.verification_uri}get verification_uri_complete(){return this.#u.verification_uri_complete}get expires_in(){return Math.max.apply(null,[this.#a-s(),0])}expired(){return 0===this.expires_in}[i.custom](){return`${this.constructor.name} ${i(this.#u,{depth:1/0,colors:n.default.stdout.isTTY,compact:!1,sorted:!0})}`}}t.exports=c},95328,(e,t,r)=>{let n;var i=e.i(247167),o=e.i(467034);let{inspect:a}=e.r(477398),s=e.r(622184),c=e.r(586914),{strict:u}=e.r(440224),l=e.r(343954),d=e.r(421342),{URL:p,URLSearchParams:f}=e.r(421342),h=e.r(563703),y=e.r(453978),g=e.r(394543),m=e.r(330967),_=e.r(575492),b=e.r(577208),v=e.r(345255),{assertSigningAlgValuesSupport:w,assertIssuerConfiguration:E}=e.r(918710),S=e.r(80042),k=e.r(666285),A=e.r(738767),x=e.r(407066),{OPError:T,RPError:O}=e.r(696055),R=e.r(550766),{random:P}=e.r(852849),C=e.r(508284),{CLOCK_TOLERANCE:j}=e.r(596276),{keystores:I}=e.r(366951),U=e.r(198155),z=e.r(922087),{authenticatedPost:N,resolveResponseType:D,resolveRedirectUri:M}=e.r(121628),{queryKeyStore:H}=e.r(967983),W=e.r(13028),[$,L]=i.default.version.slice(1).split(".").map(e=>parseInt(e,10)),K=$>=17||16===$&&L>=9,B=Symbol(),Z=Symbol(),q=Symbol();function F(e){return S(e,"access_token","code","error_description","error_uri","error","expires_in","id_token","iss","response","session_state","state","token_type")}function J(e,t="Bearer"){return`${t} ${e}`}function G(e){let t=d.parse(e);return t.search?l.parse(t.search.substring(1)):{}}function V(e,t,r){if(void 0===e[r])throw new O({message:`missing required JWT property ${r}`,jwt:t})}function Y(e){let t={client_id:this.client_id,scope:"openid",response_type:D.call(this),redirect_uri:M.call(this),...e};return Object.entries(t).forEach(([e,r])=>{null==r?delete t[e]:"claims"===e&&"object"==typeof r?t[e]=JSON.stringify(r):"resource"===e&&Array.isArray(r)?t[e]=r:"string"!=typeof r&&(t[e]=String(r))}),t}function X(e){if(!k(e)||!Array.isArray(e.keys)||e.keys.some(e=>!k(e)||!("kty"in e)))throw TypeError("jwks must be a JSON Web Key Set formatted object");return U.fromJWKS(e,{onlyPrivate:!0})}class Q{#l;#d;#p;#f;constructor(e,t,r={},n,i){if(this.#l=new Map,this.#d=e,this.#p=t,"string"!=typeof r.client_id||!r.client_id)throw TypeError("client_id is required");const o={grant_types:["authorization_code"],id_token_signed_response_alg:"RS256",authorization_signed_response_alg:"RS256",response_types:["code"],token_endpoint_auth_method:"client_secret_basic",...this.fapi1()?{grant_types:["authorization_code","implicit"],id_token_signed_response_alg:"PS256",authorization_signed_response_alg:"PS256",response_types:["code id_token"],tls_client_certificate_bound_access_tokens:!0,token_endpoint_auth_method:void 0}:void 0,...this.fapi2()?{id_token_signed_response_alg:"PS256",authorization_signed_response_alg:"PS256",token_endpoint_auth_method:void 0}:void 0,...r};if(this.fapi())switch(o.token_endpoint_auth_method){case"self_signed_tls_client_auth":case"tls_client_auth":break;case"private_key_jwt":if(!n)throw TypeError("jwks is required");break;case void 0:throw TypeError("token_endpoint_auth_method is required");default:throw TypeError("invalid or unsupported token_endpoint_auth_method")}if(this.fapi2()&&(o.tls_client_certificate_bound_access_tokens&&o.dpop_bound_access_tokens||!o.tls_client_certificate_bound_access_tokens&&!o.dp
4op_bound_access_tokens))throw TypeError("either tls_client_certificate_bound_access_tokens or dpop_bound_access_tokens must be set to true");if(!function(e,t,r){if(t.token_endpoint_auth_method||function(e,t){try{let r=e.issuer.token_endpoint_auth_methods_supported;!r.includes(t.token_endpoint_auth_method)&&r.includes("client_secret_post")&&(t.token_endpoint_auth_method="client_secret_post")}catch(e){}}(e,r),t.redirect_uri){if(t.redirect_uris)throw TypeError("provide a redirect_uri or redirect_uris, not both");r.redirect_uris=[t.redirect_uri],delete r.redirect_uri}if(t.response_type){if(t.response_types)throw TypeError("provide a response_type or response_types, not both");r.response_types=[t.response_type],delete r.response_type}}(this,r,o),w("token",this.issuer,o),["introspection","revocation"].forEach(e=>{!function(e,t,r){if(!t[`${e}_endpoint`])return;let n=r.token_endpoint_auth_method,i=r.token_endpoint_auth_signing_alg,o=`${e}_endpoint_auth_method`,a=`${e}_endpoint_auth_signing_alg`;void 0===r[o]&&void 0===r[a]&&(void 0!==n&&(r[o]=n),void 0!==i&&(r[a]=i))}(e,this.issuer,o),w(e,this.issuer,o)}),Object.entries(o).forEach(([e,t])=>{this.#l.set(e,t),this[e]||Object.defineProperty(this,e,{get(){return this.#l.get(e)},enumerable:!0})}),void 0!==n){const e=X.call(this,n);I.set(this,e)}null!=i&&i.additionalAuthorizedParties&&(this.#f=z(i.additionalAuthorizedParties)),this[j]=0}authorizationUrl(e={}){if(!k(e))throw TypeError("params must be a plain object");E(this.issuer,"authorization_endpoint");let t=new p(this.issuer.authorization_endpoint);for(let[r,n]of Object.entries(Y.call(this,e)))if(Array.isArray(n))for(let e of(t.searchParams.delete(r),n))t.searchParams.append(r,e);else t.searchParams.set(r,n);return t.href.replace(/\+/g,"%20")}authorizationPost(e={}){if(!k(e))throw TypeError("params must be a plain object");let t=Y.call(this,e),r=Object.keys(t).map(e=>`<input type="hidden" name="${e}" value="${t[e]}"/>`).join("\n");return`<!DOCTYPE html>
5<head>
6<title>Requesting Authorization</title>
7</head>
8<body onload="javascript:document.forms[0].submit()">
9<form method="post" action="${this.issuer.authorization_endpoint}">
10  ${r}
11</form>
12</body>
13</html>`}endSessionUrl(e={}){let t;E(this.issuer,"end_session_endpoint");let{0:r,length:n}=this.post_logout_redirect_uris||[],{post_logout_redirect_uri:i=1===n?r:void 0}=e;if({id_token_hint:t,...e}=e,t instanceof x){if(!t.id_token)throw TypeError("id_token not present in TokenSet");t=t.id_token}let o=d.parse(this.issuer.end_session_endpoint),a=b(G(this.issuer.end_session_endpoint),e,{post_logout_redirect_uri:i,client_id:this.client_id},{id_token_hint:t});return Object.entries(a).forEach(([e,t])=>{null==t&&delete a[e]}),o.search=null,o.query=a,d.format(o)}callbackParams(e){let t=e instanceof s.IncomingMessage||e&&e.method&&e.url;if("string"!=typeof e&&!t)throw TypeError("#callbackParams only accepts string urls, http.IncomingMessage or a lookalike");if(!t)return F(G(e));switch(e.method){case"GET":return F(G(e.url));case"POST":if(void 0===e.body)throw TypeError("incoming message body missing, include a body parser prior to this method call");switch(typeof e.body){case"object":case"string":if(o.Buffer.isBuffer(e.body))return F(l.parse(e.body.toString("utf-8")));if("string"==typeof e.body)return F(l.parse(e.body));return F(e.body);default:throw TypeError("invalid IncomingMessage body object")}default:throw TypeError("invalid IncomingMessage method")}}async callback(e,t,r={},{exchangeBody:n,clientAssertionPayload:i,DPoP:o}={}){let a=F(t);if(!r.jarm||"response"in t){if("response"in t){let e=await this.decryptJARM(a.response);a=await this.validateJARM(e)}}else throw new O({message:"expected a JARM response",checks:r,params:a});if(this.default_max_age&&!r.max_age&&(r.max_age=this.default_max_age),a.state&&!r.state)throw TypeError("checks.state argument is missing");if(!a.state&&r.state)throw new O({message:"state missing from the response",checks:r,params:a});if(r.state!==a.state)throw new O({printf:["state mismatch, expected %s, got: %s",r.state,a.state],checks:r,params:a});if("iss"in a){if(E(this.issuer,"issuer"),a.iss!==this.issuer.issuer)throw new O({printf:["iss mismatch, expected %s, got: %s",this.issuer.issuer,a.iss],params:a})}else if(this.issuer.authorization_response_iss_parameter_supported&&!("id_token"in a)&&!("response"in t))throw new O({message:"iss missing from the response",params:a});if(a.error)throw new T(a);let s={code:["code"],id_token:["id_token"],token:["access_token","token_type"]};if(r.response_type){for(let e of r.response_type.split(" "))if("none"===e){if(a.code||a.id_token||a.access_token)throw new O({message:'unexpected params encountered for "none" response',checks:r,params:a})}else for(let t of s[e])if(!a[t])throw new O({message:`${t} missing from response`,checks:r,params:a})}if(a.id_token){let e=new x(a);if(await this.decryptIdToken(e),await this.validateIdToken(e,r.nonce,"authorization",r.max_age,r.state),!a.code)return e}if(a.code){let t=await this.grant({...n,grant_type:"authorization_code",code:a.code,redirect_uri:e,code_verifier:r.code_verifier},{clientAssertionPayload:i,DPoP:o});return await this.decryptIdToken(t),await this.validateIdToken(t,r.nonce,"token",r.max_age),a.session_state&&(t.session_state=a.session_state),t}return new x(a)}async oauthCallback(e,t,r={},{exchangeBody:n,clientAssertionPayload:i,DPoP:o}={}){let a=F(t);if(!r.jarm||"response"in t){if("response"in t){let e=await this.decryptJARM(a.response);a=await this.validateJARM(e)}}else throw new O({message:"expected a JARM response",checks:r,params:a});if(a.state&&!r.state)throw TypeError("checks.state argument is missing");if(!a.state&&r.state)throw new O({message:"state missing from the response",checks:r,params:a});if(r.state!==a.state)throw new O({printf:["state mismatch, expected %s, got: %s",r.state,a.state],checks:r,params:a});if("iss"in a){if(E(this.issuer,"issuer"),a.iss!==this.issuer.issuer)throw new O({printf:["iss mismatch, expected %s, got: %s",this.issuer.issuer,a.iss],params:a})}else if(this.issuer.authorization_response_iss_parameter_supported&&!("id_token"in a)&&!("response"in t))throw new O({message:"iss missing from the response",params:a});if(a.error)throw new T(a);if("string"==typeof a.id_token&&a.id_token.length)throw new O({message:"id_token detected in the response, you must use client.callback() instead of client.oauthCallback()",params:a});delete a.id_token;let s={code:["code"],token:["access_token","token_type"]};if(r.response_type)for(let e of r.response_type.split(" ")){if("none"===e&&(a.code||a.id_token||a.access_token))throw new O({message:'unexpected params encountered for "none" response',checks:r,params:a});if(s[e]){for(let t of s[e])if(!a[t])throw new O({message:`${t} missing from response`,checks:r,params:a})}}
13if(a.code){let t=await this.grant({...n,grant_type:"authorization_code",code:a.code,redirect_uri:e,code_verifier:r.code_verifier},{clientAssertionPayload:i,DPoP:o});if("string"==typeof t.id_token&&t.id_token.length)throw new O({message:"id_token detected in the response, you must use client.callback() instead of client.oauthCallback()",params:a});return delete t.id_token,t}return new x(a)}async decryptIdToken(e){if(!this.id_token_encrypted_response_alg)return e;let t=e;if(t instanceof x){if(!t.id_token)throw TypeError("id_token not present in TokenSet");t=t.id_token}let r=this.id_token_encrypted_response_alg,n=this.id_token_encrypted_response_enc,i=await this.decryptJWE(t,r,n);return e instanceof x?(e.id_token=i,e):i}async validateJWTUserinfo(e){let t=this.userinfo_signed_response_alg;return this.validateJWT(e,t,[])}async decryptJARM(e){if(!this.authorization_encrypted_response_alg)return e;let t=this.authorization_encrypted_response_alg,r=this.authorization_encrypted_response_enc;return this.decryptJWE(e,t,r)}async decryptJWTUserinfo(e){if(!this.userinfo_encrypted_response_alg)return e;let t=this.userinfo_encrypted_response_alg,r=this.userinfo_encrypted_response_enc;return this.decryptJWE(e,t,r)}async decryptJWE(e,t,r="A128CBC-HS256"){let n,i=JSON.parse(_.decode(e.split(".")[0]));if(i.alg!==t)throw new O({printf:["unexpected JWE alg received, expected %s, got: %s",t,i.alg],jwt:e});if(i.enc!==r)throw new O({printf:["unexpected JWE enc received, expected %s, got: %s",r,i.enc],jwt:e});let o=e=>new TextDecoder().decode(e.plaintext);if(t.match(/^(?:RSA|ECDH)/)){let t=await I.get(this),r=h.decodeProtectedHeader(e);for(let i of t.all({...r,use:"enc"}))if(n=await h.compactDecrypt(e,await i.keyObject(r.alg)).then(o,()=>{}))break}else n=await h.compactDecrypt(e,this.secretForAlg("dir"===t?r:t)).then(o,()=>{});if(!n)throw new O({message:"failed to decrypt JWE",jwt:e});return n}async validateIdToken(e,t,r,n,i){let o=e,a=this.id_token_signed_response_alg;if(o instanceof x){if(!o.id_token)throw TypeError("id_token not present in TokenSet");o=o.id_token}o=String(o);let s=R(),{protected:c,payload:u,key:l}=await this.validateJWT(o,a);if("number"==typeof n||n!==q&&this.require_auth_time){if(!u.auth_time)throw new O({message:"missing required JWT property auth_time",jwt:o});if("number"!=typeof u.auth_time)throw new O({message:"JWT auth_time claim must be a JSON numeric value",jwt:o})}if("number"==typeof n&&u.auth_time+n<s-this[j])throw new O({printf:["too much time has elapsed since the last End-User authentication, max_age %i, auth_time: %i, now %i",n,u.auth_time,s-this[j]],now:s,tolerance:this[j],auth_time:u.auth_time,jwt:o});if(t!==Z&&(u.nonce||void 0!==t)&&u.nonce!==t)throw new O({printf:["nonce mismatch, expected %s, got: %s",t,u.nonce],jwt:o});if("authorization"===r){if(!u.at_hash&&e.access_token)throw new O({message:"missing required property at_hash",jwt:o});if(!u.c_hash&&e.code)throw new O({message:"missing required property c_hash",jwt:o});if(this.fapi1()&&!u.s_hash&&(e.state||i))throw new O({message:"missing required property s_hash",jwt:o});if(u.s_hash){if(!i)throw TypeError('cannot verify s_hash, "checks.state" property not provided');try{y.validate({claim:"s_hash",source:"state"},u.s_hash,i,c.alg,l.jwk&&l.jwk.crv)}catch(e){throw new O({message:e.message,jwt:o})}}}if(this.fapi()&&u.iat<s-3600)throw new O({printf:["JWT issued too far in the past, now %i, iat %i",s,u.iat],now:s,tolerance:this[j],iat:u.iat,jwt:o});if(e.access_token&&void 0!==u.at_hash)try{y.validate({claim:"at_hash",source:"access_token"},u.at_hash,e.access_token,c.alg,l.jwk&&l.jwk.crv)}catch(e){throw new O({message:e.message,jwt:o})}if(e.code&&void 0!==u.c_hash)try{y.validate({claim:"c_hash",source:"code"},u.c_hash,e.code,c.alg,l.jwk&&l.jwk.crv)}catch(e){throw new O({message:e.message,jwt:o})}return e}async validateJWT(e,t,r=["iss","sub","aud","exp","iat"]){let n,i,o,a="https://self-issued.me"===this.issuer.issuer,s=R();try{({header:n,payload:i}=m(e,{complete:!0}))}catch(t){throw new O({printf:["failed to decode JWT (%s: %s)",t.name,t.message],jwt:e})}if(n.alg!==t)throw new O({printf:["unexpected JWT alg received, expected %s, got: %s",t,n.alg],jwt:e});if(a&&(r=[...r,"sub_jwk"]),r.forEach(V.bind(void 0,i,e)),void 0!==i.iss){let t=this.issuer.issuer;if(this.#p&&(t=this.issuer.issuer.replace("{tenantid}",i.tid)),i.iss!==t)throw new O({printf:["unexpected iss value, expected %s, got: %s",t,i.iss],jwt:e})}if(void 0!==i.iat&&"number"!=typeof i.iat)throw new O({message:"JWT iat claim must be a JSON numeric value",jwt:e});if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new O({message:"JWT nbf claim must be a JSON numeric value",jwt:e});if(i.nbf>s+this[j])throw new O({printf:["JWT not active yet, now %i, nbf %i",s+this[j],i.nbf],now:s,tolerance:this[j],nbf:i.nbf,jwt:e})}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new O({message:"JWT exp claim must be a JSON numeric value",jwt:e});if(s-this[j]>
13=i.exp)throw new O({printf:["JWT expired, now %i, exp %i",s-this[j],i.exp],now:s,tolerance:this[j],exp:i.exp,jwt:e})}if(void 0!==i.aud){if(Array.isArray(i.aud)){if(i.aud.length>1&&!i.azp)throw new O({message:"missing required JWT property azp",jwt:e});if(!i.aud.includes(this.client_id))throw new O({printf:["aud is missing the client_id, expected %s to be included in %j",this.client_id,i.aud],jwt:e})}else if(i.aud!==this.client_id)throw new O({printf:["aud mismatch, expected %s, got: %s",this.client_id,i.aud],jwt:e})}if(void 0!==i.azp){let t=this.#f;if(!(t="string"==typeof t?[this.client_id,t]:Array.isArray(t)?[this.client_id,...t]:[this.client_id]).includes(i.azp))throw new O({printf:["azp mismatch, got: %s",i.azp],jwt:e})}if(a){try{u(k(i.sub_jwk));let e=await h.importJWK(i.sub_jwk,n.alg);u.equal(e.type,"public"),o=[{keyObject:()=>e}]}catch(t){throw new O({message:"failed to use sub_jwk claim as an asymmetric JSON Web Key",jwt:e})}if(await h.calculateJwkThumbprint(i.sub_jwk)!==i.sub)throw new O({message:"failed to match the subject with sub_jwk",jwt:e})}else n.alg.startsWith("HS")?o=[this.secretForAlg(n.alg)]:"none"!==n.alg&&(o=await H.call(this.issuer,{...n,use:"sig"}));if(!o&&"none"===n.alg)return{protected:n,payload:i};for(let t of o){let r=await h.compactVerify(e,t instanceof Uint8Array?t:await t.keyObject(n.alg)).catch(()=>{});if(r)return{payload:i,protected:r.protectedHeader,key:t}}throw new O({message:"failed to validate JWT signature",jwt:e})}async refresh(e,{exchangeBody:t,clientAssertionPayload:r,DPoP:n}={}){let i=e;if(i instanceof x){if(!i.refresh_token)throw TypeError("refresh_token not present in TokenSet");i=i.refresh_token}let o=await this.grant({...t,grant_type:"refresh_token",refresh_token:String(i)},{clientAssertionPayload:r,DPoP:n});if(o.id_token&&(await this.decryptIdToken(o),await this.validateIdToken(o,Z,"token",q),e instanceof x&&e.id_token)){let t=e.claims().sub,r=o.claims().sub;if(r!==t)throw new O({printf:["sub mismatch, expected %s, got: %s",t,r],jwt:o.id_token})}return o}async requestResource(e,t,{method:r,headers:n,body:i,DPoP:o,tokenType:a=o?"DPoP":t instanceof x?t.token_type:"Bearer"}={},s){if(t instanceof x){if(!t.access_token)throw TypeError("access_token not present in TokenSet");t=t.access_token}if(t){if("string"!=typeof t)throw TypeError("invalid access token provided")}else throw TypeError("no access token provided");let c={headers:{Authorization:J(t,a),...n},body:i},u=!!this.tls_client_certificate_bound_access_tokens,l=await C.call(this,{...c,responseType:"buffer",method:r,url:e},{accessToken:t,mTLS:u,DPoP:o}),d=l.headers["www-authenticate"];return s!==B&&d&&d.toLowerCase().startsWith("dpop ")&&"use_dpop_nonce"===v(d).error?this.requestResource(e,t,{method:r,headers:n,body:i,DPoP:o,tokenType:a}):l}async userinfo(e,{method:t="GET",via:r="header",tokenType:n,params:i,DPoP:o}={}){let a;E(this.issuer,"userinfo_endpoint");let s={tokenType:n,method:String(t).toUpperCase(),DPoP:o};if("GET"!==s.method&&"POST"!==s.method)throw TypeError("#userinfo() method can only be POST or a GET");if("body"===r&&"POST"!==s.method)throw TypeError("can only send body on POST");let c=!!(this.userinfo_signed_response_alg||this.userinfo_encrypted_response_alg);c?s.headers={Accept:"application/jwt"}:s.headers={Accept:"application/json"},this.tls_client_certificate_bound_access_tokens&&this.issuer.mtls_endpoint_aliases&&(a=this.issuer.mtls_endpoint_aliases.userinfo_endpoint),a=new p(a||this.issuer.userinfo_endpoint),"body"===r&&(s.headers.Authorization=void 0,s.headers["Content-Type"]="application/x-www-form-urlencoded",s.body=new f,s.body.append("access_token",e instanceof x?e.access_token:e)),i&&("GET"===s.method?Object.entries(i).forEach(([e,t])=>{a.searchParams.append(e,t)}):s.body?Object.entries(i).forEach(([e,t])=>{s.body.append(e,t)}):(s.body=new f,s.headers["Content-Type"]="application/x-www-form-urlencoded",Object.entries(i).forEach(([e,t])=>{s.body.append(e,t)}))),s.body&&(s.body=s.body.toString());let l=await this.requestResource(a,e,s),d=A(l,{bearer:!0});if(c){if(!/^application\/jwt/.test(l.headers["content-type"]))throw new O({message:"expected application/jwt response from the userinfo_endpoint",response:l});let e=l.body.toString(),t=await this.decryptJWTUserinfo(e);if(this.userinfo_signed_response_alg)({payload:d}=await this.validateJWTUserinfo(t));else try{d=JSON.parse(t),u(k(d))}catch(e){throw new O({message:"failed to parse userinfo JWE payload as JSON",jwt:t})}}else try{d=JSON.parse(l.body)}catch(e){throw Object.defineProperty(e,"response",{value:l}),e}if(e instanceof x&&e.id_token){let t=e.claims().sub;if(d.sub!==t)throw new O({printf:["userinfo sub mismatch, expected %s, got: %s",t,d.sub],body:d,jwt:e.id_token})}return d}encryptionSecret(e){let t=e<=256?"sha256":e<=384?"sha384":e<=512&&"sha512";if(!t)throw Error("unsupported symmetric encryption key derivation");return c.createHash(t).update(this.client_secret).digest().slice(0,e/8)}secretForAlg(e){if(!this.client_secret)throw TypeError("client_secret is required");return/^A(\d{3})(?:GCM)?KW$/.test(e)?this.encryptionSecret(parseInt(RegExp.$1,10)):/^A(\d{3})(?:GCM|CBC-HS(\d{3}))$/.test(e)?this.encryptionSecret(parseInt(RegExp.$2||RegExp.$1,10)):new TextEncoder().encode(this.client_secret)}async grant(e,{clientAssertionPayload:t,DPoP:r}={},n){let i;E(this.issuer,"token_endpoint");let o=await N.call(this,"token",{form:e,responseType:"json"},{clientAssertionPayload:t,DPoP:r});try{i=A(o)}catch(i){if(n!==B&&i instanceof T&&"use_dpop_nonce"===i.error)return this.grant(e,{clientAssertionPayload:t,DPoP:r},B);throw i}return new x(i)}async deviceAuthorization(e={},{exchangeBody:t,clientAssertionPayload:r,DPoP:n}={}){E(this.issuer,"device_authorization_endpoint"),E(this.issuer,"token_endpoint");let i=Y.call(this,{client_id:this.client_id,redirect_uri:null,response_type:null,...e}),o=A(await N.call(this,"device_authorization",{responseType:"json",form:i},{clientAssertionPayload:r,endpointAuthMethod:"token"}));return new W({client:this,exchangeBody:t,clientAssertionPayload:r,response:o,maxAge:e.max_age,DPoP:n})}async revoke(e,t,{revokeBody:r,clientAssertionPayload:n}={}){if(E(this.issuer,"revocation_endpoint"),void 0!==t&&"string"!=typeof t)throw TypeError("hint must be a string");let i={...r,token:e};t&&(i.token_type_hint=t),A(await N.call(this,"revocation",{form:i},{clientAssertionPayload:n}),{body:!1})}async introspect(e,t,{introspectBody:r,clientAssertionPayload:n}={}){if(E(this.issuer,"introspection_endpoint"),void 0!==t&&"string"!=typeof t)throw TypeError("hint must be a string");let i={...r,token:e};return t&&(i.token_type_hint=t),A(await N.call(this,"introspection",{form:i,responseType:"json"},{clientAssertionPayload:n}))}static async register(e,t={}){let{initialAccessToken:r,jwks:n,...i}=t;return E(this.issuer,"registration_endpoint"),void 0===n||e.jwks||e.jwks_uri||(e.jwks=(await X.call(this,n)).toJWKS()),new this(A(await C.c
13all(this,{headers:{Accept:"application/json",...r?{Authorization:J(r)}:void 0},responseType:"json",json:e,url:this.issuer.registration_endpoint,method:"POST"}),{statusCode:201,bearer:!0}),n,i)}get metadata(){return z(Object.fromEntries(this.#l.entries()))}static async fromUri(e,t,r,n){return new this(A(await C.call(this,{method:"GET",url:e,responseType:"json",headers:{Authorization:J(t),Accept:"application/json"}}),{bearer:!0}),r,n)}async requestObject(e={},{sign:t=this.request_object_signing_alg||"none",encrypt:{alg:r=this.request_object_encryption_alg,enc:n=this.request_object_encryption_enc||"A128CBC-HS256"}={}}={}){let i,o;if(!k(e))throw TypeError("requestObject must be a plain object");let a=R(),s={alg:t,typ:"oauth-authz-req+jwt"},c=JSON.stringify(b({},e,{iss:this.client_id,aud:this.issuer.issuer,client_id:this.client_id,jti:P(),iat:a,exp:a+300,...this.fapi()?{nbf:a}:void 0}));if("none"===t)i=[_.encode(JSON.stringify(s)),_.encode(c),""].join(".");else{let e=t.startsWith("HS");if(e)o=this.secretForAlg(t);else{let e=await I.get(this);if(!e)throw TypeError(`no keystore present for client, cannot sign using alg ${t}`);if(!(o=e.get({alg:t,use:"sig"})))throw TypeError(`no key to sign with found for alg ${t}`)}i=await new h.CompactSign(new TextEncoder().encode(c)).setProtectedHeader({...s,kid:e?void 0:o.jwk.kid}).sign(e?o:await o.keyObject(t))}if(!r)return i;let u={alg:r,enc:n,cty:"oauth-authz-req+jwt"};return u.alg.match(/^(RSA|ECDH)/)?[o]=await H.call(this.issuer,{alg:u.alg,use:"enc"},{allowMulti:!0}):o=this.secretForAlg("dir"===u.alg?u.enc:u.alg),new h.CompactEncrypt(new TextEncoder().encode(i)).setProtectedHeader({...u,kid:o instanceof Uint8Array?void 0:o.jwk.kid}).encrypt(o instanceof Uint8Array?o:await o.keyObject(u.alg))}async pushedAuthorizationRequest(e={},{clientAssertionPayload:t}={}){E(this.issuer,"pushed_authorization_request_endpoint");let r={..."request"in e?e:Y.call(this,e),client_id:this.client_id},n=await N.call(this,"pushed_authorization_request",{responseType:"json",form:r},{clientAssertionPayload:t,endpointAuthMethod:"token"}),i=A(n,{statusCode:201});if(!("expires_in"in i))throw new O({message:"expected expires_in in Pushed Authorization Successful Response",response:n});if("number"!=typeof i.expires_in)throw new O({message:"invalid expires_in value in Pushed Authorization Successful Response",response:n});if(!("request_uri"in i))throw new O({message:"expected request_uri in Pushed Authorization Successful Response",response:n});if("string"!=typeof i.request_uri)throw new O({message:"invalid request_uri value in Pushed Authorization Successful Response",response:n});return i}get issuer(){return this.#d}[a.custom](){return`${this.constructor.name} ${a(this.metadata,{depth:1/0,colors:i.default.stdout.isTTY,compact:!1,sorted:!0})}`}fapi(){return this.fapi1()||this.fapi2()}fapi1(){return"FAPI1Client"===this.constructor.name}fapi2(){return"FAPI2Client"===this.constructor.name}async validateJARM(e){let t=this.authorization_signed_response_alg,{payload:r}=await this.validateJWT(e,t,["iss","exp","aud"]);return F(r)}async dpopProof(e,t,r){let i;if(!k(e))throw TypeError("payload must be a plain object");if(g(t))i=t;else if("CryptoKey"===t[Symbol.toStringTag])i=t;else if("node:crypto"===h.cryptoRuntime)i=c.createPrivateKey(t);else throw TypeError("unrecognized crypto runtime");if("private"!==i.type)throw TypeError('"DPoP" option must be a private key');let o=n.call(this,i,t);if(!o)throw TypeError("could not determine DPoP JWS Algorithm");return new h.SignJWT({ath:r?_.encode(c.createHash("sha256").update(r).digest()):void 0,...e}).setProtectedHeader({alg:o,typ:"dpop+jwt",jwk:await er(i,t)}).setIssuedAt().setJti(P()).sign(i)}}
13function ee(e){switch(e.algorithm.name){case"Ed25519":case"Ed448":return"EdDSA";case"ECDSA":switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512"}break;case"RSASSA-PKCS1-v1_5":return`RS${e.algorithm.hash.name.slice(4)}`;case"RSA-PSS":return`PS${e.algorithm.hash.name.slice(4)}`;default:throw TypeError("unsupported DPoP private key")}}if("node:crypto"===h.cryptoRuntime){n=function(n,o){if("CryptoKey"===o[Symbol.toStringTag])return ee(n);switch(n.asymmetricKeyType){case"ed25519":case"ed448":return"EdDSA";case"ec":var s=n,c=o;switch("object"==typeof c&&"object"==typeof c.key&&c.key.crv){case"P-256":return"ES256";case"secp256k1":return"ES256K";case"P-384":return"ES384";case"P-512":return"ES512"}let u=s.export({format:"der",type:"pkcs8"}),l=u[1]<128?17:18,d=u[l],p=u.slice(l+1,l+1+d);if(p.equals(t))return"ES256";if(p.equals(r))return"ES384";if(p.equals(i))return"ES512";if(p.equals(a))return"ES256K";throw TypeError("unsupported DPoP private key curve");case"rsa":case K&&"rsa-pss":var f=n,h=o,y=this.issuer.dpop_signing_alg_values_supported;if("object"==typeof h&&"jwk"===h.format&&h.key&&h.key.alg)return h.key.alg;if(Array.isArray(y)){let t=y.filter(RegExp.prototype.test.bind(e));return"rsa-pss"===f.asymmetricKeyType&&(t=t.filter(e=>e.startsWith("PS"))),["PS256","PS384","PS512","RS256","RS384","RS384"].find(e=>t.includes(e))}return"PS256";default:throw TypeError("unsupported DPoP private key")}};let e=/^(?:RS|PS)(?:256|384|512)$/,t=o.Buffer.from([42,134,72,206,61,3,1,7]),r=o.Buffer.from([43,129,4,0,34]),i=o.Buffer.from([43,129,4,0,35]),a=o.Buffer.from([43,129,4,0,10])}else n=ee;let et=new WeakMap;async function er(e,t){if("node:crypto"===h.cryptoRuntime&&"object"==typeof t&&"object"==typeof t.key&&"jwk"===t.format)return S(t.key,"kty","crv","x","y","e","n");if(et.has(t))return et.get(t);let r=S(await h.exportJWK(e),"kty","crv","x","y","e","n");return(g(t)||"WebCryptoAPI"===h.cryptoRuntime)&&et.set(t,r),r}t.exports=(e,t=!1)=>class extends Q{constructor(...r){super(e,t,...r)}static get issuer(){return e}},t.exports.BaseClient=Q},597361,(e,t,r)=>{t.exports=new(e.r(357873))({max:100})},333928,(e,t,r)=>{let n=/^\d+$/;t.exports=function(e){if("string"!=typeof e)throw TypeError("input must be a string");return(!function(e){if(e.includes("://"))return!0;let t=e.replace(/(\/|\?)/g,"#").split("#")[0];if(t.includes(":")){let e=t.indexOf(":"),r=t.slice(e+1);if(!n.test(r))return!0}return!1}(e)?!function(e){if(!e.includes("@"))return!1;let t=e.split("@"),r=t[t.length-1];return!(r.includes(":")||r.includes("/")||r.includes("?"))}(e)?`https://${e}`:`acct:${e}`:e).split("#")[0]}},882529,(e,t,r)=>{var n=e.i(247167);let{inspect:i}=e.r(477398),o=e.r(421342),{RPError:a}=e.r(696055),s=e.r(95328),c=e.r(597361),u=e.r(738767),l=e.r(333928),d=e.r(508284),p=e.r(922087),{keystore:f}=e.r(967983),h=["https://login.microsoftonline.com/common/.well-known/openid-configuration","https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration","https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration","https://login.microsoftonline.com/consumers/v2.0/.well-known/openid-configuration"],y=Symbol(),g={claim_types_supported:["normal"],claims_parameter_supported:!1,grant_types_supported:["authorization_code","implicit"],request_parameter_supported:!1,request_uri_parameter_supported:!0,require_request_uri_registration:!1,response_modes_supported:["query","fragment"],token_endpoint_auth_methods_supported:["client_secret_basic"]};class m{#l;constructor(e={}){const t=e[y];delete e[y],["introspection","revocation"].forEach(t=>{e[`${t}_endpoint`]&&void 0===e[`${t}_endpoint_auth_methods_supported`]&&void 0===e[`${t}_endpoint_auth_signing_alg_values_supported`]&&(e.token_endpoint_auth_methods_supported&&(e[`${t}_endpoint_auth_methods_supported`]=e.token_endpoint_auth_methods_supported),e.token_endpoint_auth_signing_alg_values_supported&&(e[`${t}_endpoint_auth_signing_alg_values_supported`]=e.token_endpoint_auth_signing_alg_values_supported))}),this.#l=new Map,Object.entries(e).forEach(([e,t])=>{this.#l.set(e,t),this[e]||Object.defineProperty(this,e,{get(){return this.#l.get(e)},enumerable:!0})}),c.set(this.issuer,this);const r=s(this,t);Object.defineProperties(this,{Client:{value:r,enumerable:!0},FAPI1Client:{value:class extends r{},enumerable:!0},FAPI2Client:{value:class extends r{},enumerable:!0}})}get metadata(){return p(Object.fromEntries(this.#l.entries()))}static async webfinger(e){let t=l(e),{host:r}=o.parse(t),n=`https://${r}/.well-known/webfinger`,i=u(await d.call(this,{method:"GET",url:n,responseType:"json",searchParams:{resource:t,rel:"http://openid.net/specs/connect/1.0/issuer"},headers:{Accept:"application/json"}})),s=Array.isArray(i.links)&&i.links.find(e=>"object"==typeof e&&"http://openid.net/specs/connect/1.0/issuer"===e.rel&&e.href);if(!s)throw new a({message:"no issuer found in webfinger response",body:i});if("string"!=typeof s.href||!s.href.startsWith("https://"))throw new a({printf:["invalid issuer location %s",s.href],body:i});let p=s.href;if(c.has(p))return c.get(p);let f=await this.discover(p);if(f.issuer!==p)throw c.del(f.issuer),new a("discovered issuer mismatch, expected %s, got: %s",p,f.issuer);return f}static async discover(e){let t=function(e){let t=o.parse(e);if(t.pathname.includes("/.well-known/"))return e;{let e;return e=t.pathname.endsWith("/")?`${t.pathname}.well-known/openid-configuration`:`${t.pathname}/.well-known/openid-configuration`,o.format({...t,pathname:e})}}(e),r=u(await d.call(this,{method:"GET",responseType:"json",url:t,headers:{Accept:"application/json"}}));return new m({...g,...r,[y]:!!h.find(e=>t.startsWith(e))})}async reloadJwksUri(){await f.call(this,!0)}[i.custom](){return`${this.constructor.name} ${i(this.metadata,{depth:1/0,colors:n.default.stdout.isTTY,compact:!1,sorted:!0}
13)}`}}t.exports=m},324055,(e,t,r)=>{let n=e.r(421342),{format:i}=e.r(477398),o=e.r(922087),{RPError:a,OPError:s}=e.r(696055),{BaseClient:c}=e.r(95328),{random:u,codeChallenge:l}=e.r(852849),d=e.r(80042),{resolveResponseType:p,resolveRedirectUri:f}=e.r(121628);function h(e,t,r={}){e?this.error(e):t?this.success(t,r):this.fail(r)}function y({client:e,params:t={},passReqToCallback:r=!1,sessionKey:i,usePKCE:a=!0,extras:s={}}={},u){if(!(e instanceof c))throw TypeError("client must be an instance of openid-client Client");if("function"!=typeof u)throw TypeError("verify callback must be a function");if(!e.issuer||!e.issuer.issuer)throw TypeError("client must have an issuer with an identifier");if(this._client=e,this._issuer=e.issuer,this._verify=u,this._passReqToCallback=r,this._usePKCE=a,this._key=i||`oidc:${n.parse(this._issuer.issuer).hostname}`,this._params=o(t),delete this._params.state,delete this._params.nonce,this._extras=o(s),this._params.response_type||(this._params.response_type=p.call(e)),this._params.redirect_uri||(this._params.redirect_uri=f.call(e)),this._params.scope||(this._params.scope="openid"),!0===this._usePKCE){let e=!!Array.isArray(this._issuer.code_challenge_methods_supported)&&this._issuer.code_challenge_methods_supported;if(e&&e.includes("S256"))this._usePKCE="S256";else if(e&&e.includes("plain"))this._usePKCE="plain";else if(e)throw TypeError("neither code_challenge_method supported by the client is supported by the issuer");else this._usePKCE="S256"}else if("string"==typeof this._usePKCE&&!["plain","S256"].includes(this._usePKCE))throw TypeError(`${this._usePKCE} is not valid/implemented PKCE code_challenge_method`);this.name=n.parse(e.issuer.issuer).hostname}y.prototype.authenticate=function(e,t){(async()=>{let r=this._client;if(!e.session)throw TypeError("authentication requires session support");let n=r.callbackParams(e),o=this._key,{0:s,length:c}=Object.keys(n);if(0===c||1===c&&"iss"===s){let n={state:u(),...this._params,...t};if(!n.nonce&&n.response_type.includes("id_token")&&(n.nonce=u()),e.session[o]=d(n,"nonce","state","max_age","response_type"),this._usePKCE&&n.response_type.includes("code")){let t=u();switch(e.session[o].code_verifier=t,this._usePKCE){case"S256":n.code_challenge=l(t),n.code_challenge_method="S256";break;case"plain":n.code_challenge=t}}this.redirect(r.authorizationUrl(n));return}let p=e.session[o];if(0===Object.keys(p||{}).length)throw Error(i('did not find expected authorization request details in session, req.session["%s"] is %j',o,p));let{state:f,nonce:y,max_age:g,code_verifier:m,response_type:_}=p;try{delete e.session[o]}catch(e){}let b={redirect_uri:this._params.redirect_uri,...t},v=await r.callback(b.redirect_uri,n,{state:f,nonce:y,max_age:g,code_verifier:m,response_type:_},this._extras),w=this._passReqToCallback,E=this._verify.length>(w?3:2)&&r.issuer.userinfo_endpoint,S=[v,h.bind(this)];if(E){if(!v.access_token)throw new a({message:"expected access_token to be returned when asking for userinfo in verify callback",tokenset:v});let e=await r.userinfo(v);S.splice(1,0,e)}w&&S.unshift(e),this._verify(...S)})().catch(e=>{e instanceof s&&"server_error"!==e.error&&!e.error.startsWith("invalid")||e instanceof a?this.fail(e):this.error(e)})},t.exports=y},434744,(e,t,r)=>{let n=e.r(882529),{OPError:i,RPError:o}=e.r(696055),a=e.r(324055),s=e.r(407066),{CLOCK_TOLERANCE:c,HTTP_OPTIONS:u}=e.r(596276),l=e.r(852849),{setDefaults:d}=e.r(508284);t.exports={Issuer:n,Strategy:a,TokenSet:s,errors:{OPError:i,RPError:o},custom:{setHttpOptionsDefaults:d,http_options:u,clock_tolerance:c},generators:l}},577021,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.openidClient=i;var n=e.r(434744);async function i(e){let t,r=e.provider;if(r.httpOptions&&n.custom.setHttpOptionsDefaults(r.httpOptions),r.wellKnown)t=await n.Issuer.discover(r.wellKnown);else{var i,o,a;t=new n.Issuer({issuer:r.issuer,authorization_endpoint:null==(i=r.authorization)?void 0:i.url,token_endpoint:null==(o=r.token)?void 0:o.url,userinfo_endpoint:null==(a=r.userinfo)?void 0:a.url,jwks_uri:r.jwks_endpoint})}let s=new t.Client({client_id:r.clientId,client_secret:r.clientSecret,redirect_uris:[r.callbackUrl],...r.client},r.jwks);return s[n.custom.clock_tolerance]=10,s}},128811,(e,t,r)=>{function n(e){for(var t,r,n="",i=-1;++i<e.length;)t=e.charCodeAt(i),r=i+1<e.length?e.charCodeAt(i+1):0,55296<=t&&t<=56319&&56320<=r&&r<=57343&&(t=65536+((1023&t)<<10)+(1023&r),i++),t<=127?n+=String.fromCharCode(t):t<=2047?n+=String.fromCharCode(192|t>>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n}function i(e){for(var t=Array(e.length>>2),r=0;r<t.length;r++)t[r]=0;for(var r=0;r<8*e.length;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}function o(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var r=Array(80),n=0x67452301,i=-0x10325477,o=-0x67452302,c=0x10325476,u=-0x3c2d1e10,l=0;l<e.length;l+=16){for(var d=n,p=i,f=o,h=c,y=u,g=0;g<80;g++){g<16?r[g]=e[l+g]:r[g]=s(r[g-3]^r[g-8]^r[g-14]^r[g-16],1);var m,_,b,v,w,E=a(a(s(n,5),(m=g,_=i,b=o,v=c,m<20?_&b|~_&v:m<40?_^b^v:m<60?_&b|_&v|b&v:_^b^v)),a(a(u,r[g]),(w=g)<20?0x5a827999:w<40?0x6ed9eba1:w<60?-0x70e44324:-0x359d3e2a));u=c,c=o,o=s(i,30),i=n,n=E}n=a(n,d),i=a(i,p),o=a(o,f),c=a(c,h),u=a(u,y)}return[n,i,o,c,u]}function a(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function s(e,t){return e<<t|e>>>32-t}r.HMACSHA1=function(e,t){return function(e){for(var t="",r=e.length,n=0;n<r;n+=3)for(var i=e.charCodeAt(n)<<16|(n+1<r?e.charCodeAt(n+1)<<8:0)|(n+2<r?e.charCodeAt(n+2):0),o=0;o<4;o++)8*n+6*o>8*e.length?t+="=":t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
13+/".charAt(i>>>6*(3-o)&63);return t}(function(e,t){var r=i(e);r.length>16&&(r=o(r,8*e.length));for(var n=Array(16),a=Array(16),s=0;s<16;s++)n[s]=0x36363636^r[s],a[s]=0x5c5c5c5c^r[s];for(var c=o(n.concat(i(t)),512+8*t.length),u=o(a.concat(c),672),l="",d=0;d<32*u.length;d+=8)l+=String.fromCharCode(u[d>>5]>>>24-d%32&255);return l}(n(e),n(t)))}},758859,(e,t,r)=>{t.exports.isAnEarlyCloseHost=function(e){return e&&e.match(".*google(apis)?.com$")}},310205,(e,t,r)=>{var n=e.i(467034),i=e.r(586914),o=e.r(128811),a=e.r(622184),s=e.r(892542),c=e.r(421342),u=e.r(343954),l=e.r(758859);r.OAuth=function(e,t,r,n,i,o,a,s,c){if(this._isEcho=!1,this._requestUrl=e,this._accessUrl=t,this._consumerKey=r,this._consumerSecret=this._encodeData(n),"RSA-SHA1"==a&&(this._privateKey=n),this._version=i,void 0===o?this._authorize_callback="oob":this._authorize_callback=o,"PLAINTEXT"!=a&&"HMAC-SHA1"!=a&&"RSA-SHA1"!=a)throw Error("Un-supported signature method: "+a);this._signatureMethod=a,this._nonceSize=s||32,this._headers=c||{Accept:"*/*",Connection:"close","User-Agent":"Node authentication"},this._clientOptions=this._defaultClientOptions={requestTokenHttpMethod:"POST",accessTokenHttpMethod:"POST",followRedirects:!0},this._oauthParameterSeperator=","},r.OAuthEcho=function(e,t,r,n,i,o,a,s){if(this._isEcho=!0,this._realm=e,this._verifyCredentials=t,this._consumerKey=r,this._consumerSecret=this._encodeData(n),"RSA-SHA1"==o&&(this._privateKey=n),this._version=i,"PLAINTEXT"!=o&&"HMAC-SHA1"!=o&&"RSA-SHA1"!=o)throw Error("Un-supported signature method: "+o);this._signatureMethod=o,this._nonceSize=a||32,this._headers=s||{Accept:"*/*",Connection:"close","User-Agent":"Node authentication"},this._oauthParameterSeperator=","},r.OAuthEcho.prototype=r.OAuth.prototype,r.OAuth.prototype._getTimestamp=function(){return Math.floor(new Date().getTime()/1e3)},r.OAuth.prototype._encodeData=function(e){return null==e||""==e?"":encodeURIComponent(e).replace(/\!/g,"%21").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")},r.OAuth.prototype._decodeData=function(e){return null!=e&&(e=e.replace(/\+/g," ")),decodeURIComponent(e)},r.OAuth.prototype._getSignature=function(e,t,r,n){var i=this._createSignatureBase(e,t,r);return this._createSignature(i,n)},r.OAuth.prototype._normalizeUrl=function(e){var t=c.parse(e,!0),r="";return t.port&&("http:"==t.protocol&&"80"!=t.port||"https:"==t.protocol&&"443"!=t.port)&&(r=":"+t.port),t.pathname&&""!=t.pathname||(t.pathname="/"),t.protocol+"//"+t.hostname+r+t.pathname},r.OAuth.prototype._isParameterNameAnOAuthParameter=function(e){var t=e.match("^oauth_");return!!t&&"oauth_"===t[0]},r.OAuth.prototype._buildAuthorizationHeaders=function(e){var t="OAuth ";this._isEcho&&(t+='realm="'+this._realm+'",');for(var r=0;r<e.length;r++)this._isParameterNameAnOAuthParameter(e[r][0])&&(t+=""+this._encodeData(e[r][0])+'="'+this._encodeData(e[r][1])+'"'+this._oauthParameterSeperator);return t.substring(0,t.length-this._oauthParameterSeperator.length)},r.OAuth.prototype._makeArrayOfArgumentsHash=function(e){var t=[];for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(Array.isArray(n))for(var i=0;i<n.length;i++)t[t.length]=[r,n[i]];else t[t.length]=[r,n]}return t}
13,r.OAuth.prototype._sortRequestParams=function(e){return e.sort(function(e,t){return e[0]==t[0]?e[1]<t[1]?-1:1:e[0]<t[0]?-1:1}),e},r.OAuth.prototype._normaliseRequestParams=function(e){for(var t=this._makeArrayOfArgumentsHash(e),r=0;r<t.length;r++)t[r][0]=this._encodeData(t[r][0]),t[r][1]=this._encodeData(t[r][1]);t=this._sortRequestParams(t);for(var e="",r=0;r<t.length;r++)e+=t[r][0],e+="=",e+=t[r][1],r<t.length-1&&(e+="&");return e},r.OAuth.prototype._createSignatureBase=function(e,t,r){return t=this._encodeData(this._normalizeUrl(t)),r=this._encodeData(r),e.toUpperCase()+"&"+t+"&"+r},r.OAuth.prototype._createSignature=function(e,t){if(void 0===t)var t="";else t=this._encodeData(t);var r=this._consumerSecret+"&"+t,n="";return"PLAINTEXT"==this._signatureMethod?n=r:"RSA-SHA1"==this._signatureMethod?(r=this._privateKey||"",n=i.createSign("RSA-SHA1").update(e).sign(r,"base64")):n=i.Hmac?i.createHmac("sha1",r).update(e).digest("base64"):o.HMACSHA1(r,e),n},r.OAuth.prototype.NONCE_CHARS=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"],r.OAuth.prototype._getNonce=function(e){for(var t,r=[],n=this.NONCE_CHARS,i=n.length,o=0;o<e;o++)t=Math.floor(Math.random()*i),r[o]=n[t];return r.join("")},r.OAuth.prototype._createClient=function(e,t,r,n,i,o){return(o?s:a).request({host:t,port:e,path:n,method:r,headers:i})},r.OAuth.prototype._prepareParameters=function(e,t,r,n,i){var o={oauth_timestamp:this._getTimestamp(),oauth_nonce:this._getNonce(this._nonceSize),oauth_version:this._version,oauth_signature_method:this._signatureMethod,oauth_consumer_key:this._consumerKey};if(e&&(o.oauth_token=e),this._isEcho)l=this._getSignature("GET",this._verifyCredentials,this._normaliseRequestParam
13s(o),t);else{if(i)for(var a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);var s=c.parse(n,!1);if(s.query){var l,d,p=u.parse(s.query);for(var a in p){var f=p[a];if("object"==typeof f)for(d in f)o[a+"["+d+"]"]=f[d];else o[a]=f}}l=this._getSignature(r,n,this._normaliseRequestParams(o),t)}var h=this._sortRequestParams(this._makeArrayOfArgumentsHash(o));return h[h.length]=["oauth_signature",l],h},r.OAuth.prototype._performSecureRequest=function(e,t,r,i,o,a,s,d){var p,f,h=this._prepareParameters(e,t,r,i,o);s||(s="application/x-www-form-urlencoded");var y=c.parse(i,!1);"http:"!=y.protocol||y.port||(y.port=80),"https:"!=y.protocol||y.port||(y.port=443);var g={},m=this._buildAuthorizationHeaders(h);for(var _ in this._isEcho?g["X-Verify-Credentials-Authorization"]=m:g.Authorization=m,g.Host=y.host,this._headers)this._headers.hasOwnProperty(_)&&(g[_]=this._headers[_]);for(var _ in o)this._isParameterNameAnOAuthParameter(_)&&delete o[_];("POST"==r||"PUT"==r)&&null==a&&null!=o&&(a=u.stringify(o).replace(/\!/g,"%21").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")),a?n.Buffer.isBuffer(a)?g["Content-length"]=a.length:g["Content-length"]=n.Buffer.byteLength(a):g["Content-length"]=0,g["Content-Type"]=s,y.pathname&&""!=y.pathname||(y.pathname="/"),p=y.query?y.pathname+"?"+y.query:y.pathname,f="https:"==y.protocol?this._createClient(y.port,y.hostname,r,p,g,!0):this._createClient(y.port,y.hostname,r,p,g);var b=this._clientOptions;if(!d)return("POST"==r||"PUT"==r)&&null!=a&&""!=a&&f.write(a),f;var v="",w=this,E=l.isAnEarlyCloseHost(y.hostname),S=!1,k=function(n){S||(S=!0,n.statusCode>=200&&n.statusCode<=299?d(null,v,n):(301==n.statusCode||302==n.statusCode)&&b.followRedirects&&n.headers&&n.headers.location?w._performSecureRequest(e,t,r,n.headers.location,o,a,s,d):d({statusCode:n.statusCode,data:v},v,n))};f.on("response",function(e){e.setEncoding("utf8"),e.on("data",function(e){v+=e}),e.on("end",function(){k(e)}),e.on("close",function(){E&&k(e)})}),f.on("error",function(e){S||(S=!0,d(e))}),("POST"==r||"PUT"==r)&&null!=a&&""!=a&&f.write(a),f.end()},r.OAuth.prototype.setClientOptions=function(e){var t,r={},n=Object.prototype.hasOwnProperty;for(t in this._defaultClientOptions)n.call(e,t)?r[t]=e[t]:r[t]=this._defaultClientOptions[t];this._clientOptions=r},r.OAuth.prototype.getOAuthAccessToken=function(e,t,r,n){var i={};"function"==typeof r?n=r:i.oauth_verifier=r,this._performSecureRequest(e,t,this._clientOptions.accessTokenHttpMethod,this._accessUrl,i,null,null,function(e,t,r){if(e)n(e);else{var i=u.parse(t),o=i.oauth_token;delete i.oauth_token;var a=i.oauth_token_secret;delete i.oauth_token_secret,n(null,o,a,i)}})},r.OAuth.prototype.getProtectedResource=function(e,t,r,n,i){this._performSecureRequest(r,n,t,e,null,"",null,i)},r.OAuth.prototype.delete=function(e,t,r,n){return this._performSecureRequest(t,r,"DELETE",e,null,"",null,n)},r.OAuth.prototype.get=function(e,t,r,n){return this._performSecureRequest(t,r,"GET",e,null,"",null,n)},r.OAuth.prototype._putOrPost=function(e,t,r,i,o,a,s){var c=null;return"function"==typeof a&&(s=a,a=null),"string"==typeof o||n.Buffer.isBuffer(o)||(a="application/x-www-form-urlencoded",c=o,o=null),this._performSecureRequest(r,i,e,t,c,o,a,s)},r.OAuth.prototype.put=function(e,t,r,n,i,o){return this._putOrPost("PUT",e,t,r,n,i,o)},r.OAuth.prototype.post=function(e,t,r,n,i,o){return this._putOrPost("POST",e,t,r,n,i,o)},r.OAuth.prototype.getOAuthRequestToken=function(e,t){"function"==typeof e&&(t=e,e={}),this._authorize_callback&&(e.oauth_callback=this._authorize_callback),this._performSecureRequest(null,null,this._clientOptions.requestTokenHttpMethod,this._requestUrl,e,null,null,function(e,r,n){if(e)t(e);else{var i=u.parse(r),o=i.oauth_token,a=i.oauth_token_secret;delete i.oauth_token,delete i.oauth_token_secret,t(null,o,a,i)}})},r.OAuth.prototype.signUrl=function(e,t,r,n){if(void 0===n)var n="GET";for(var i=this._prepareParameters(t,r,n,e,{}),o=c.parse(e,!1),a="",s=0;s<i.length;s++)a+=i[s][0]+"="+this._encodeData(i[s][1])+"&";return a=a.substring(0,a.length-1),o.protocol+"//"+o.host+o.pathname+"?"+a},r.OAuth.prototype.authHeader=function(e,t,r,n){if(void 0===n)var n="GET";var i=this._prepareParameters(t,r,n,e,{});return this._buildAuthorizationHeaders(i)}},507018,(e,t,r)=>{var n=e.i(467034),i=e.r(343954),o=(e.r(586914),e.r(892542)),a=e.r(622184),s=e.r(421342),c=e.r(758859);r.OAuth2=function(e,t,r,n,i,o){this._clientId=e,this._clientSecret=t,this._baseSite=r,this._authorizeUrl=n||"/oauth/authorize",this._accessTokenUrl=i||"/oauth/access_token",this._accessTokenName="access_token",this._authMethod="Bearer",this._customHeaders=o||{},this._useAuthorizationHeaderForGET=!1,this._agent=void 0},r.OAuth2.prototype.setAgent=function(e){this._agent=e},r.OAuth2.prototype.setAccessTokenName=function(e){this._accessTokenName=e},r.OAuth2.prototype.setAuthMethod=function(e){this._authMethod=e},r.OAuth2.prototype.useAuthorizationHeaderforGET=function(e){this._useAuthorizationHeaderForGET=e},r.OAuth2.prototype._getAccessTokenUrl=function(){return this._baseSite+this._accessTokenUrl},r.OAuth2.prototype.buildAuthHeader=function(e){return this._authMethod+" "+e},r.OAuth2.prototype._chooseHttpLibrary=function(e){var t=o;return"https:"!=e.protocol&&(t=a),t},r.OAuth2.prototype._request=function(e,t,r,o,a,c){var u=s.parse(t,!0);"https:"!=u.protocol||u.port||(u.port=443);var l=this._chooseHttpLibrary(u),d={};for(var p in this._customHeaders)d[p]=this._customHeaders[p];if(r)for(var p in r)d[p]=r[p];d.Host=u.host,d["User-Agent"]||(d["User-Agent"]="Node-oauth"),o?n.Buffer.isBuffer(o)?d["Content-Length"]=o.length:d["Content-Length"]=n.Buffer.byteLength(o):d["Content-length"]=0,!a||"Authorization"in d||(u.query||(u.query={}),u.query[this._accessTokenName]=a);var f=i.stringify(u.query);f&&(f="?"+f);var h={host:u.hostname,port:u.port,path:u.pathname+f,method:e,headers:d};this._executeRequest(l,h,o,c)},r.OAuth2.prototype._executeRequest=function(e,t,r,n){var i=c.isAnEarlyCloseHost(t.host),o=!1;function a(e,t){o||(o=!0,e.statusCode>=200&&e.statusCode<=299||301==e.statusCode||302==e.statusCode?n(null,t,e):n({statusCode:e.statusCode,data:t}))}var s="";this._agent&&(t.agent=this._agent);var u=e.request(t);u.on("response",function(e){e.on("data",function(e){s+=e}),e.on("close",function(t){i&&a(e,s)}),e.addListener("end",function(){a(e,s)})}),u.on("error",function(e){o=!0,n(e)}),("POST"==t.method||"PUT"==t.method)&&r&&u.write(r),u.end()},r.OAuth2.prototype.getAuthorizeUrl=function(e){var e=e||{};return e.client_id=this._clientId,this._baseSite+this._authorizeUrl+"?"+i.stringify(e)},r.OAuth2.prototype.getOAuthAccessToken=function(e,t,r){var t=t||{};t.client_id=this._clientId,t.client_secret=this._clientSecret;var n="refresh_token"===t.grant_type?"refresh_token":"code";t[n]=e;var o=i.stringify(t);this._request("POST",this._getAccessTokenUrl(),{"Content-Type":"application/x-www-form-urlencoded"},o,null,function(e,t,n){if(e)r(e);else{try{o=JSON.parse(t)}catch(e){o=i.parse(t)}var o,a=o.access_token,s=o.refresh_token;delete o.refresh_token,r(null,a,s,o)}})},r.OAuth2.prototype.getProtectedResource=function(e,t,r){this._request("GET",e,{},"",t,r)},r.OAuth2.prototype.get=function(e,t,r){if(this._useAuthorizationHeaderForGET){var n={Authorization:this.buildAuthHeader(t)};t=null}else n={};this._request("GET",e,n,"",t,r)}},139257,(e,t,r)=>{r.OAuth=e.r(310205).OAuth,r.OAuthEcho=e.r(310205).OAuthEcho,r.OAuth2=e.r(507018).OAuth2},28503,(e,t,r)=>{"use strict";
13Object.defineProperty(r,"__esModule",{value:!0}),r.oAuth1Client=function(e){var t,r;let i=e.provider,o=new n.OAuth(i.requestTokenUrl,i.accessTokenUrl,i.clientId,i.clientSecret,null!=(t=i.version)?t:"1.0",i.callbackUrl,null!=(r=i.encoding)?r:"HMAC-SHA1"),a=o.get.bind(o);o.get=async(...e)=>await new Promise((t,r)=>{a(...e,(e,n)=>{if(e)return r(e);t(n)})});let s=o.getOAuthAccessToken.bind(o);o.getOAuthAccessToken=async(...e)=>await new Promise((t,r)=>{s(...e,(e,n,i)=>{if(e)return r(e);t({oauth_token:n,oauth_token_secret:i})})});let c=o.getOAuthRequestToken.bind(o);return o.getOAuthRequestToken=async(e={})=>await new Promise((t,r)=>{c(e,(e,n,i,o)=>{if(e)return r(e);t({oauth_token:n,oauth_token_secret:i,params:o})})}),o},r.oAuth1TokenStore=void 0;var n=e.r(139257);r.oAuth1TokenStore=new Map},855271,e=>{"use strict";let t=async(e,t,r,n,i)=>{let{crypto:{subtle:o}}=(()=>{if("u">typeof globalThis)return globalThis;if("u">typeof self)return self;if("u">typeof window)return window;throw Error("unable to locate global object")})();return new Uint8Array(await o.deriveBits({name:"HKDF",hash:`SHA-${e.substr(3)}`,salt:r,info:n},await o.importKey("raw",t,"HKDF",!1,["deriveBits"]),i<<3))};function r(e,t){if("string"==typeof e)return new TextEncoder().encode(e);if(!(e instanceof Uint8Array))throw TypeError(`"${t}"" must be an instance of Uint8Array or a string`);return e}async function n(e,n,i,o,a){return t(function(e){switch(e){case"sha256":case"sha384":case"sha512":case"sha1":return e;default:throw TypeError('unsupported "digest" value')}}(e),function(e){let t=r(e,"ikm");if(!t.byteLength)throw TypeError('"ikm" must be at least one byte in length');return t}(n),r(i,"salt"),function(e){let t=r(e,"info");if(t.byteLength>1024)throw TypeError('"info" must not contain more than 1024 bytes');return t}(o),function(e,t){if("number"!=typeof e||!Number.isInteger(e)||e<1)throw TypeError('"keylen" must be a positive integer');if(e>255*(parseInt(t.substr(3),10)>>3||20))throw TypeError('"keylen" too large');return e}(a,e))}e.s(["default",0,n,"hkdf",0,n],855271)},565279,e=>{"use strict";e.s([],267695),e.i(267695);var t,r,n,i=new Uint8Array(16);function o(){if(!t&&!(t="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"u">typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(i)}let a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=function(e){return"string"==typeof e&&a.test(e)};for(var c=[],u=0;u<256;++u)c.push((u+256).toString(16).substr(1));let l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase();if(!s(r))throw TypeError("Stringified UUID is invalid");return r};var d=0,p=0;let f=function(e){if(!s(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/0x10000000000&255,r[11]=t/0x100000000&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};function h(e,t,r){function n(e,n,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=f(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(n),a.set(e,n.length),(a=r(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(var s=0;s<16;++s)i[o+s]=a[s];return i}return l(a)}try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function y(e){return(e+64>>>9<<4)+14+1}function g(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function m(e,t,r,n,i,o){var a;return g((a=g(g(t,e),g(n,o)))<<i|a>>>32-i,r)}function _(e,t,r,n,i,o,a){return m(t&r|~t&n,e,t,i,o,a)}function b(e,t,r,n,i,o,a){return m(t&n|r&~n,e,t,i,o,a)}function v(e,t,r,n,i,o,a){return m(t^r^n,e,t,i,o,a)}function w(e,t,r,n,i,o,a){return m(r^(t|~n),e,t,i,o,a)}var E=h("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){for(var t=[],r=32*e.length,n="0123456789abcdef",i=0;i<r;i+=8){var o=e[i>>5]>>>i%32&255,a=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[y(t)-1]=t;
13for(var r=0x67452301,n=-0x10325477,i=-0x67452302,o=0x10325476,a=0;a<e.length;a+=16){var s=r,c=n,u=i,l=o;r=_(r,n,i,o,e[a],7,-0x28955b88),o=_(o,r,n,i,e[a+1],12,-0x173848aa),i=_(i,o,r,n,e[a+2],17,0x242070db),n=_(n,i,o,r,e[a+3],22,-0x3e423112),r=_(r,n,i,o,e[a+4],7,-0xa83f051),o=_(o,r,n,i,e[a+5],12,0x4787c62a),i=_(i,o,r,n,e[a+6],17,-0x57cfb9ed),n=_(n,i,o,r,e[a+7],22,-0x2b96aff),r=_(r,n,i,o,e[a+8],7,0x698098d8),o=_(o,r,n,i,e[a+9],12,-0x74bb0851),i=_(i,o,r,n,e[a+10],17,-42063),n=_(n,i,o,r,e[a+11],22,-0x76a32842),r=_(r,n,i,o,e[a+12],7,0x6b901122),o=_(o,r,n,i,e[a+13],12,-0x2678e6d),i=_(i,o,r,n,e[a+14],17,-0x5986bc72),n=_(n,i,o,r,e[a+15],22,0x49b40821),r=b(r,n,i,o,e[a+1],5,-0x9e1da9e),o=b(o,r,n,i,e[a+6],9,-0x3fbf4cc0),i=b(i,o,r,n,e[a+11],14,0x265e5a51),n=b(n,i,o,r,e[a],20,-0x16493856),r=b(r,n,i,o,e[a+5],5,-0x29d0efa3),o=b(o,r,n,i,e[a+10],9,0x2441453),i=b(i,o,r,n,e[a+15],14,-0x275e197f),n=b(n,i,o,r,e[a+4],20,-0x182c0438),r=b(r,n,i,o,e[a+9],5,0x21e1cde6),o=b(o,r,n,i,e[a+14],9,-0x3cc8f82a),i=b(i,o,r,n,e[a+3],14,-0xb2af279),n=b(n,i,o,r,e[a+8],20,0x455a14ed),r=b(r,n,i,o,e[a+13],5,-0x561c16fb),o=b(o,r,n,i,e[a+2],9,-0x3105c08),i=b(i,o,r,n,e[a+7],14,0x676f02d9),n=b(n,i,o,r,e[a+12],20,-0x72d5b376),r=v(r,n,i,o,e[a+5],4,-378558),o=v(o,r,n,i,e[a+8],11,-0x788e097f),i=v(i,o,r,n,e[a+11],16,0x6d9d6122),n=v(n,i,o,r,e[a+14],23,-0x21ac7f4),r=v(r,n,i,o,e[a+1],4,-0x5b4115bc),o=v(o,r,n,i,e[a+4],11,0x4bdecfa9),i=v(i,o,r,n,e[a+7],16,-0x944b4a0),n=v(n,i,o,r,e[a+10],23,-0x41404390),r=v(r,n,i,o,e[a+13],4,0x289b7ec6),o=v(o,r,n,i,e[a],11,-0x155ed806),i=v(i,o,r,n,e[a+3],16,-0x2b10cf7b),n=v(n,i,o,r,e[a+6],23,0x4881d05),r=v(r,n,i,o,e[a+9],4,-0x262b2fc7),o=v(o,r,n,i,e[a+12],11,-0x1924661b),i=v(i,o,r,n,e[a+15],16,0x1fa27cf8),n=v(n,i,o,r,e[a+2],23,-0x3b53a99b),r=w(r,n,i,o,e[a],6,-0xbd6ddbc),o=w(o,r,n,i,e[a+7],10,0x432aff97),i=w(i,o,r,n,e[a+14],15,-0x546bdc59),n=w(n,i,o,r,e[a+5],21,-0x36c5fc7),r=w(r,n,i,o,e[a+12],6,0x655b59c3),o=w(o,r,n,i,e[a+3],10,-0x70f3336e),i=w(i,o,r,n,e[a+10],15,-1051523),n=w(n,i,o,r,e[a+1],21,-0x7a7ba22f),r=w(r,n,i,o,e[a+8],6,0x6fa87e4f),o=w(o,r,n,i,e[a+15],10,-0x1d31920),i=w(i,o,r,n,e[a+6],15,-0x5cfebcec),n=w(n,i,o,r,e[a+13],21,0x4e0811a1),r=w(r,n,i,o,e[a+4],6,-0x8ac817e),o=w(o,r,n,i,e[a+11],10,-0x42c50dcb),i=w(i,o,r,n,e[a+2],15,0x2ad7d2bb),n=w(n,i,o,r,e[a+9],21,-0x14792c6f),r=g(r,s),n=g(n,c),i=g(i,u),o=g(o,l)}return[r,n,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(y(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length))});function S(e,t){return e<<t|e>>>32-t}var k=h("v5",80,function(e){var t=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],r=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var i=0;i<n.length;++i)e.push(n.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=Math.ceil((e.length/4+2)/16),a=Array(o),s=0;s<o;++s){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[64*s+4*u]<<24|e[64*s+4*u+1]<<16|e[64*s+4*u+2]<<8|e[64*s+4*u+3];a[s]=c}a[o-1][14]=(e.length-1)*8/0x100000000,a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=(e.length-1)*8|0;for(var l=0;l<o;++l){for(var d=new Uint32Array(80),p=0;p<16;++p)d[p]=a[l][p];for(var f=16;f<80;++f)d[f]=S(d[f-3]^d[f-8]^d[f-14]^d[f-16],1);for(var h=r[0],y=r[1],g=r[2],m=r[3],_=r[4],b=0;b<80;++b){var v=Math.floor(b/20),w=S(h,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}(v,y,g,m)+_+t[v]+d[b]>>>0;_=m,m=g,g=S(y,30)>>>0,y=h,h=w}r[0]=r[0]+h>>>0,r[1]=r[1]+y>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+_>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]});e.s(["NIL",0,"00000000-0000-0000-0000-000000000000","parse",0,f,"stringify",0,l,"v1",0,function(e,t,i){var a=t&&i||0,s=t||Array(16),c=(e=e||{}).node||r,u=void 0!==e.clockseq?e.clockseq:n;if(null==c||null==u){var f=e.random||(e.rng||o)();null==c&&(c=r=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==u&&(u=n=(f[6]<<8|f[7])&16383)}var h=void 0!==e.msecs?e.msecs:Date.now(),y=void 0!==e.nsecs?e.nsecs:p+1,g=h-d+(y-p)/1e4;if(g<0&&void 0===e.clockseq&&(u=u+1&16383),(g<0||h>d)&&void 0===e.nsecs&&(y=0),y>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");d=h,p=y,n=u;var m=((0xfffffff&(h+=122192928e5))*1e4+y)%0x100000000;s[a++]=m>>>24&255,s[a++]=m>>>16&255,s[a++]=m>>>8&255,s[a++]=255&m;var _=h/0x100000000*1e4&0xfffffff;s[a++]=_>>>8&255,s[a++]=255&_,s[a++]=_>>>
1324&15|16,s[a++]=_>>>16&255,s[a++]=u>>>8|128,s[a++]=255&u;for(var b=0;b<6;++b)s[a+b]=c[b];return t||l(s)},"v3",0,E,"v4",0,function(e,t,r){var n=(e=e||{}).random||(e.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return l(n)},"v5",0,k,"validate",0,s,"version",0,function(e){if(!s(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}],565279)},401776,(e,t,r)=>{"use strict";function n(e,t,r){i(e,t),t.set(e,r)}function i(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t){return e.get(s(e,t))}function a(e,t,r){return e.set(s(e,t),r),r}function s(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw TypeError("Private element is not present on this object")}Object.defineProperty(r,"__esModule",{value:!0}),r.SessionStore=void 0,r.defaultCookies=function(e){let t=e?"__Secure-":"";return{sessionToken:{name:`${t}next-auth.session-token`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}},callbackUrl:{name:`${t}next-auth.callback-url`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}},csrfToken:{name:`${e?"__Host-":""}next-auth.csrf-token`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}},pkceCodeVerifier:{name:`${t}next-auth.pkce.code_verifier`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e,maxAge:900}},state:{name:`${t}next-auth.state`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e,maxAge:900}},nonce:{name:`${t}next-auth.nonce`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}}}};var c=new WeakMap,u=new WeakMap,l=new WeakMap,d=new WeakSet;function p(e){let t=Math.ceil(e.value.length/3933);if(1===t)return o(c,this)[e.name]=e.value,[e];let r=[];for(let n=0;n<t;n++){let t=`${e.name}.${n}`,i=e.value.substr(3933*n,3933);r.push({...e,name:t,value:i}),o(c,this)[t]=i}return o(l,this).debug("CHUNKING_SESSION_COOKIE",{message:"Session cookie exceeds allowed 4096 bytes.",emptyCookieSize:163,valueSize:e.value.length,chunks:r.map(e=>e.value.length+163)}),r}function f(){let e={};for(let r in o(c,this)){var t;null==(t=o(c,this))||delete t[r],e[r]={name:r,value:"",options:{...o(u,this).options,maxAge:0}}}return e}r.SessionStore=class{constructor(e,t,r){!function(e,t){i(e,t),t.add(e)}(this,d),n(this,c,{}),n(this,u,void 0),n(this,l,void 0),a(l,this,r),a(u,this,e);const{cookies:s}=t,{name:p}=e;if("function"==typeof(null==s?void 0:s.getAll))for(const{name:e,value:t}of s.getAll())e.startsWith(p)&&(o(c,this)[e]=t);else if(s instanceof Map)for(const e of s.keys())e.startsWith(p)&&(o(c,this)[e]=s.get(e));else for(const e in s)e.startsWith(p)&&(o(c,this)[e]=s[e])}get value(){return Object.keys(o(c,this)).sort((e,t)=>{var r,n;return parseInt(null!=(r=e.split(".").pop())?r:"0")-parseInt(null!=(n=t.split(".").pop())?n:"0")}).map(e=>o(c,this)[e]).join("")}chunk(e,t){let r=s(d,this,f).call(this);for(let n of s(d,this,p).call(this,{name:o(u,this).name,value:e,options:{...o(u,this).options,...t}}))r[n.name]=n;return Object.values(r)}clean(){return Object.values(s(d,this,f).call(this))}}},587245,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},151071,(e,t,r)=>{"use strict";var n=e.i(247167),i=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0});var o={encode:!0,decode:!0,getToken:!0};r.decode=p,r.encode=d,r.getToken=f;var a=e.r(563703),s=i(e.r(855271)),c=e.r(565279),u=e.r(401776),l=e.r(587245);async function d(e){let{token:t={},secret:r,maxAge:n=2592e3,salt:i=""}=e,o=await h(r,i);return await new a.EncryptJWT(t).setProtectedHeader({alg:"dir",enc:"A256GCM"}).setIssuedAt().setExpirationTime((Date.now()/1e3|0)+n).setJti((0,c.v4)()).encrypt(o)}async function p(e){let{token:t,secret:r,salt:n=""}=e;if(!t)return null;let i=await h(r,n),{payload:o}=await (0,a.jwtDecrypt)(t,i,{clockTolerance:15});return o}async function f(e){var t,r,i,o;let{req:a,secureCookie:s=null!=(t=null==(r=n.default.env.NEXTAUTH_URL)?void 0:r.startsWith("https://"))?t:!!n.default.env.VERCEL,cookieName:c=s?"__Secure-next-auth.session-token":"next-auth.session-token",raw:l,decode:d=p,logger:f=console,secret:h=null!=(i=n.default.env.NEXTAUTH_SECRET)?i:n.default.env.AUTH_SECRET}=e;
13if(!a)throw Error("Must pass `req` to JWT getToken()");let y=new u.SessionStore({name:c,options:{secure:s}},{cookies:a.cookies,headers:a.headers},f).value,g=a.headers instanceof Headers?a.headers.get("authorization"):null==(o=a.headers)?void 0:o.authorization;if(y||(null==g?void 0:g.split(" ")[0])!=="Bearer"||(y=decodeURIComponent(g.split(" ")[1])),!y)return null;if(l)return y;try{return await d({token:y,secret:h})}catch(e){return null}}async function h(e,t){return await (0,s.default)("sha256",e,t,`NextAuth.js Generated Encryption Key${t?` (${t})`:""}`,32)}Object.keys(l).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(o,e)||e in r&&r[e]===l[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return l[e]}})})},365055,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.pkce=r.nonce=r.PKCE_CODE_CHALLENGE_METHOD=void 0,r.signCookie=a,r.state=void 0;var n=e.r(434744),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o(void 0);if(t&&t.has(e))return t.get(e);var r={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&({}).hasOwnProperty.call(e,i)){var a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}(e.r(151071));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}async function a(e,t,r,n){let{cookies:o,logger:a}=n;a.debug(`CREATE_${e.toUpperCase()}`,{value:t,maxAge:r});let{name:s}=o[e],c=new Date;return c.setTime(c.getTime()+1e3*r),{name:s,value:await i.encode({...n.jwt,maxAge:r,token:{value:t},salt:s}),options:{...o[e].options,expires:c}}}let s=r.PKCE_CODE_CHALLENGE_METHOD="S256";r.pkce={async create(e,t,r){var i,o;if(!(null!=(i=e.provider)&&null!=(i=i.checks)&&i.includes("pkce")))return;let c=n.generators.codeVerifier();r.code_challenge=n.generators.codeChallenge(c),r.code_challenge_method=s;let u=null!=(o=e.cookies.pkceCodeVerifier.options.maxAge)?o:900;t.push(await a("pkceCodeVerifier",c,u,e))},async use(e,t,r,n){var o;if(!(null!=(o=r.provider)&&null!=(o=o.checks)&&o.includes("pkce")))return;let a=null==e?void 0:e[r.cookies.pkceCodeVerifier.name];if(!a)throw TypeError("PKCE code_verifier cookie was missing.");let{name:s}=r.cookies.pkceCodeVerifier,c=await i.decode({...r.jwt,token:a,salt:s});if(!(null!=c&&c.value))throw TypeError("PKCE code_verifier value could not be parsed.");t.push({name:s,value:"",options:{...r.cookies.pkceCodeVerifier.options,maxAge:0}}),n.code_verifier=c.value}},r.state={async create(e,t,r){var i,o;if(!(null!=(i=e.provider.checks)&&i.includes("state")))return;let s=n.generators.state();r.state=s;let c=null!=(o=e.cookies.state.options.maxAge)?o:900;t.push(await a("state",s,c,e))},async use(e,t,r,n){var o;if(!(null!=(o=r.provider.checks)&&o.includes("state")))return;let a=null==e?void 0:e[r.cookies.state.name];if(!a)throw TypeError("State cookie was missing.");let{name:s}=r.cookies.state,c=await i.decode({...r.jwt,token:a,salt:s});if(!(null!=c&&c.value))throw TypeError("State value could not be parsed.");t.push({name:s,value:"",options:{...r.cookies.state.options,maxAge:0}}),n.state=c.value}},r.nonce={async create(e,t,r){var i,o;if(!(null!=(i=e.provider.checks)&&i.includes("nonce")))return;let s=n.generators.nonce();r.nonce=s;let c=null!=(o=e.cookies.nonce.options.maxAge)?o:900;t.push(await a("nonce",s,c,e))},async use(e,t,r,n){var o;if(!(null!=(o=r.provider)&&null!=(o=o.checks)&&o.includes("nonce")))return;let a=null==e?void 0:e[r.cookies.nonce.name];if(!a)throw TypeError("Nonce cookie was missing.");let{name:s}=r.cookies.nonce,c=await i.decode({...r.jwt,token:a,salt:s});if(!(null!=c&&c.value))throw TypeError("Nonce value could not be parsed.");t.push({name:s,value:"",options:{...r.cookies.nonce.options,maxAge:0}}),n.nonce=c.value}}},957078,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=u;var n=e.r(434744),i=e.r(577021),o=e.r(28503),a=function(e){if(e&&e.__esMo
13dule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c(void 0);if(t&&t.has(e))return t.get(e);var r={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&({}).hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}(e.r(365055)),s=e.r(641731);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}async function u(e){var t,r,c,u,d,p;let{options:f,query:h,body:y,method:g,cookies:m}=e,{logger:_,provider:b}=f,v=null!=(t=null==y?void 0:y.error)?t:null==h?void 0:h.error;if(v){let e=Error(v);throw _.error("OAUTH_CALLBACK_HANDLER_ERROR",{error:e,error_description:null==h?void 0:h.error_description,providerId:b.id}),_.debug("OAUTH_CALLBACK_HANDLER_ERROR",{body:y}),e}if(null!=(r=b.version)&&r.startsWith("1."))try{let e=await (0,o.oAuth1Client)(f),{oauth_token:t,oauth_verifier:r}=null!=h?h:{},n=await e.getOAuthAccessToken(t,o.oAuth1TokenStore.get(t),r),i=await e.get(b.profileUrl,n.oauth_token,n.oauth_token_secret);return"string"==typeof i&&(i=JSON.parse(i)),{...await l({profile:i,tokens:n,provider:b,logger:_}),cookies:[]}}catch(e){throw _.error("OAUTH_V1_GET_ACCESS_TOKEN_ERROR",e),e}null!=h&&h.oauth_token&&o.oAuth1TokenStore.delete(h.oauth_token);try{let e,t,r=await (0,i.openidClient)(f),o={},s=[];await a.state.use(m,s,f,o),await a.pkce.use(m,s,f,o),await a.nonce.use(m,s,f,o);let v={...r.callbackParams({url:`http://n?${new URLSearchParams(h)}`,body:y,method:g}),...null==(c=b.token)?void 0:c.params};if(null!=(u=b.token)&&u.request){let t=await b.token.request({provider:b,params:v,checks:o,client:r});e=new n.TokenSet(t.tokens)}else e=b.idToken?await r.callback(b.callbackUrl,v,o):await r.oauthCallback(b.callbackUrl,v,o);return Array.isArray(e.scope)&&(e.scope=e.scope.join(" ")),t=null!=(d=b.userinfo)&&d.request?await b.userinfo.request({provider:b,tokens:e,client:r}):b.idToken?e.claims():await r.userinfo(e,{params:null==(p=b.userinfo)?void 0:p.params}),{...await l({profile:t,provider:b,tokens:e,logger:_}),cookies:s}}catch(e){throw new s.OAuthCallbackError(e)}}async function l({profile:e,tokens:t,provider:r,logger:n}){try{var i;n.debug("PROFILE_DATA",{OAuthProfile:e});let o=await r.profile(e,t);if(o.email=null==(i=o.email)?void 0:i.toLowerCase(),!o.id)throw TypeError(`Profile id is missing in ${r.name} OAuth profile response`);return{profile:o,account:{provider:r.id,type:r.type,providerAccountId:o.id.toString(),...t},OAuthProfile:e}}catch(t){n.error("OAUTH_PARSE_PROFILE_ERROR",{error:t,OAuthProfile:e})}}},762342,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.createSecret=function(e){var t;let{authOptions:r,url:i}=e;return null!=(t=r.secret)?t:(0,n.createHash)("sha256").update(JSON.stringify({...i,...r})).digest("hex")},r.fromDate=function(e,t=Date.now()){return new Date(t+1e3*e)},r.hashToken=function(e,t){var r;let{provider:i,secret:o}=t;return(0,n.createHash)("sha256").update(`${e}${null!=(r=i.secret)?r:o}`).digest("hex")};var n=e.r(586914)},25504,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=o;var n=e.r(641731),i=e.r(762342);async function o(e){var t,r,o,a,s,c;let{sessionToken:u,profile:l,account:d,options:p}=e;if(!(null!=d&&d.providerAccountId)||!d.type)throw Error("Missing or invalid provider account");if(!["email","oauth"].includes(d.type))throw Error("Provider not supported");let{adapter:f,jwt:h,events:y,session:{strategy:g,generateSessionToken:m}}=p;if(!f)return{user:l,account:d};let{createUser:_,updateUser:b,getUser:v,getUserByAccount:w,getUserByEmail:E,linkAccount:S,createSession:k,getSessionAndUser:A,deleteSession:x}=f,T=null,O=null,R=!1,P="jwt"===g;if(u)if(P)try{(T=await h.decode({...h,token:u}))&&"sub"in T&&T.sub&&(O=await v(T.sub))}catch(e){}else{let e=await A(u);e&&(T=e.session,O=e.user)}if("email"===d.type){let e=await E(l.email);if(e)(null==(t=O)?void 0:t.id)!==e.id&&!P&&u&&await x(u),O=await b({id:e.id,emailVerified:new Date}),await (null==(r=y.updateUser)?void 0:r.call(y,{user:O}));else{let{id:e,...t}={...l,emailVerified:new Date};O=await _(t),await (null==(o=y.createUser)?void 0:o.call(y,{user:O})),R=!0}return{session:T=P?{}:await k({sessionToken:await m(),userId:O.id,expires:(0,i.fromDate)(p.session.maxAge)}),user:O,isNewUser:R}}if("oauth"===d.type){let e=await w({providerAccountId:d.providerAccountId,provider:d.provider});if(e){if(O){if(e.id===O.id)return{session:T,user:O,isNewUser:R};throw new n.AccountNotLinkedError("The account is already associated with another user")}return{session:T=P?{}:await k({sessionToken:await m(),userId:e.id,expires:(0,i.fromDate)(p.session.maxAge)}),user:e,isNewUser:R}}{if(O)return await S({...d,userId:O.id}),await (null==(c=y.linkAccount)?void 0:c.call(y,{user:O,account:d,profile:l})),{session:T,user:O,isNewUser:R};let e=l.email?await E(l.email):null;if(e){let t=p.provider;
13if(null!=t&&t.allowDangerousEmailAccountLinking)O=e;else throw new n.AccountNotLinkedError("Another account already exists with the same e-mail address")}else{let{id:e,...t}={...l,emailVerified:null};O=await _(t)}return await (null==(a=y.createUser)?void 0:a.call(y,{user:O})),await S({...d,userId:O.id}),await (null==(s=y.linkAccount)?void 0:s.call(y,{user:O,account:d,profile:l})),{session:T=P?{}:await k({sessionToken:await m(),userId:O.id,expires:(0,i.fromDate)(p.session.maxAge)}),user:O,isNewUser:!0}}}throw Error("Unsupported account type")}},237042,(e,t,r)=>{"use strict";async function n({email:e,adapter:t}){let{getUserByEmail:r}=t,i=e?await r(e):null;return i||{id:e,email:e,emailVerified:null}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n},870717,(e,t,r)=>{"use strict";var n=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.default=c;var i=n(e.r(957078)),o=n(e.r(25504)),a=e.r(762342),s=n(e.r(237042));async function c(e){var t,r,n,c,u,l;let{options:d,query:p,body:f,method:h,headers:y,sessionStore:g}=e,{provider:m,adapter:_,url:b,callbackUrl:v,pages:w,jwt:E,events:S,callbacks:k,session:{strategy:A,maxAge:x},logger:T}=d,O=[],R="jwt"===A;if("oauth"===m.type)try{let{profile:n,account:a,OAuthProfile:s,cookies:c}=await (0,i.default)({query:p,body:f,method:h,options:d,cookies:e.cookies});c.length&&O.push(...c);try{if(T.debug("OAUTH_CALLBACK_RESPONSE",{profile:n,account:a,OAuthProfile:s}),!n||!a||!s)return{redirect:`${b}/signin`,cookies:O};let e=n;if(_){let{getUserByAccount:t}=_,r=await t({providerAccountId:a.providerAccountId,provider:m.id});r&&(e=r)}try{let t=await k.signIn({user:e,account:a,profile:s});if(!t)return{redirect:`${b}/error?error=AccessDenied`,cookies:O};if("string"==typeof t)return{redirect:t,cookies:O}}catch(e){return{redirect:`${b}/error?error=${encodeURIComponent(e.message)}`,cookies:O}}let{user:i,session:c,isNewUser:u}=await (0,o.default)({sessionToken:g.value,profile:n,account:a,options:d});if(R){let e={name:i.name,email:i.email,picture:i.image,sub:null==(r=i.id)?void 0:r.toString()},t=await k.jwt({token:e,user:i,account:a,profile:s,isNewUser:u,trigger:u?"signUp":"signIn"}),n=await E.encode({...E,token:t}),o=new Date;o.setTime(o.getTime()+1e3*x);let c=g.chunk(n,{expires:o});O.push(...c)}else O.push({name:d.cookies.sessionToken.name,value:c.sessionToken,options:{...d.cookies.sessionToken.options,expires:c.expires}});if(await (null==(t=S.signIn)?void 0:t.call(S,{user:i,account:a,profile:n,isNewUser:u})),u&&w.newUser)return{redirect:`${w.newUser}${w.newUser.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(v)}`,cookies:O};return{redirect:v,cookies:O}}catch(e){if("AccountNotLinkedError"===e.name)return{redirect:`${b}/error?error=OAuthAccountNotLinked`,cookies:O};if("CreateUserError"===e.name)return{redirect:`${b}/error?error=OAuthCreateAccount`,cookies:O};return T.error("OAUTH_CALLBACK_HANDLER_ERROR",e),{redirect:`${b}/error?error=Callback`,cookies:O}}}catch(e){if("OAuthCallbackError"===e.name)return T.error("OAUTH_CALLBACK_ERROR",{error:e,providerId:m.id}),{redirect:`${b}/error?error=OAuthCallback`,cookies:O};return T.error("OAUTH_CALLBACK_ERROR",e),{redirect:`${b}/error?error=Callback`,cookies:O}}if("email"===m.type)try{let e=null==p?void 0:p.token,t=null==p?void 0:p.email;if(!e)return{redirect:`${b}/error?error=configuration`,cookies:O};let r=await _.useVerificationToken({identifier:t,token:(0,a.hashToken)(e,d)});if(!r||r.expires.valueOf()<Date.now()||t&&r.identifier!==t)return{redirect:`${b}/error?error=Verification`,cookies:O};let i=await (0,s.default)({email:r.identifier,adapter:_}),u={providerAccountId:i.email,type:"email",provider:m.id};try{let e=await k.signIn({user:i,account:u});if(!e)return{redirect:`${b}/error?error=AccessDenied`,cookies:O};if("string"==typeof e)return{redirect:e,cookies:O}}catch(e){return{redirect:`${b}/error?error=${encodeURIComponent(e.message)}`,cookies:O}}let{user:l,session:f,isNewUser:h}=await (0,o.default)({sessionToken:g.value,profile:i,account:u,options:d});if(R){let e={name:l.name,email:l.email,picture:l.image,sub:null==(c=l.id)?void 0:c.toString()},t=await k.jwt({token:e,user:l,account:u,isNewUser:h,trigger:h?"signUp":"signIn"}),r=await E.encode({...E,token:t}),n=new Date;n.setTime(n.getTime()+1e3*x);let i=g.chunk(r,{expires:n});
13O.push(...i)}else O.push({name:d.cookies.sessionToken.name,value:f.sessionToken,options:{...d.cookies.sessionToken.options,expires:f.expires}});if(await (null==(n=S.signIn)?void 0:n.call(S,{user:l,account:u,isNewUser:h})),h&&w.newUser)return{redirect:`${w.newUser}${w.newUser.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(v)}`,cookies:O};return{redirect:v,cookies:O}}catch(e){if("CreateUserError"===e.name)return{redirect:`${b}/error?error=EmailCreateAccount`,cookies:O};return T.error("CALLBACK_EMAIL_ERROR",e),{redirect:`${b}/error?error=Callback`,cookies:O}}if("credentials"===m.type&&"POST"===h){let e;try{if(!(e=await m.authorize(f,{query:p,body:f,headers:y,method:h})))return{status:401,redirect:`${b}/error?${new URLSearchParams({error:"CredentialsSignin",provider:m.id})}`,cookies:O}}catch(e){return{status:401,redirect:`${b}/error?error=${encodeURIComponent(e.message)}`,cookies:O}}let t={providerAccountId:e.id,type:"credentials",provider:m.id};try{let r=await k.signIn({user:e,account:t,credentials:f});if(!r)return{status:403,redirect:`${b}/error?error=AccessDenied`,cookies:O};if("string"==typeof r)return{redirect:r,cookies:O}}catch(e){return{redirect:`${b}/error?error=${encodeURIComponent(e.message)}`,cookies:O}}let r={name:e.name,email:e.email,picture:e.image,sub:null==(u=e.id)?void 0:u.toString()},n=await k.jwt({token:r,user:e,account:t,isNewUser:!1,trigger:"signIn"}),i=await E.encode({...E,token:n}),o=new Date;o.setTime(o.getTime()+1e3*x);let a=g.chunk(i,{expires:o});return O.push(...a),await (null==(l=S.signIn)?void 0:l.call(S,{user:e,account:t})),{redirect:v,cookies:O}}return{status:500,body:`Error: Callback for provider type ${m.type} not supported`,cookies:O}}},980816,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=s;var n=e.r(577021),i=e.r(28503),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a(void 0);if(t&&t.has(e))return t.get(e);var r={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&({}).hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}(e.r(365055));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}async function s({options:e,query:t}){var r,a,c;let{logger:u,provider:l}=e,d={};if("string"==typeof l.authorization){let e=Object.fromEntries(new URL(l.authorization).searchParams);d={...d,...e}}else d={...d,...null==(a=l.authorization)?void 0:a.params};if(d={...d,...t},null!=(r=l.version)&&r.startsWith("1.")){let t=(0,i.oAuth1Client)(e),r=await t.getOAuthRequestToken(d),n=`${null==(c=l.authorization)?void 0:c.url}?${new URLSearchParams({oauth_token:r.oauth_token,oauth_token_secret:r.oauth_token_secret,...r.params})}`;return i.oAuth1TokenStore.set(r.oauth_token,r.oauth_token_secret),u.debug("GET_AUTHORIZATION_URL",{url:n,provider:l}),{redirect:n}}let p=await (0,n.openidClient)(e),f=d,h=[];await o.state.create(e,h,f),await o.pkce.create(e,h,f),await o.nonce.create(e,h,f);let y=p.authorizationUrl(f);return u.debug("GET_AUTHORIZATION_URL",{url:y,cookies:h,provider:l}),{redirect:y,cookies:h}}},289473,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=o;var n=e.r(586914),i=e.r(762342);async function o(e,t){var r,o,a,s;let{url:c,adapter:u,provider:l,callbackUrl:d,theme:p}=t,f=null!=(r=await (null==(o=l.generateVerificationToken)?void 0:o.call(l)))?r:(0,n.randomBytes)(32).toString("hex"),h=new Date(Date.now()+(null!=(a=l.maxAge)?a:86400)*1e3),y=new URLSearchParams({callbackUrl:d,token:f,email:e}),g=`${c}/callback/${l.id}?${y}`;return await Promise.all([l.sendVerificationRequest({identifier:e,token:f,expires:h,url:g,provider:l,theme:p}),null==(s=u.createVerificationToken)?void 0:s.call(u,{identifier:e,token:(0,i.hashToken)(f,t),expires:h})]),`${c}/verify-request?${new URLSearchParams({provider:l.id,type:l.type})}`}},335480,(e,t,r)=>{"use strict";var n=e.r(13451);
13Object.defineProperty(r,"__esModule",{value:!0}),r.default=s;var i=n(e.r(980816)),o=n(e.r(289473)),a=n(e.r(237042));async function s(e){let{options:t,query:r,body:n}=e,{url:s,callbacks:c,logger:u,provider:l}=t;if(!l.type)return{status:500,text:`Error: Type not specified for ${l.name}`};if("oauth"===l.type)try{return await (0,i.default)({options:t,query:r})}catch(e){return u.error("SIGNIN_OAUTH_ERROR",{error:e,providerId:l.id}),{redirect:`${s}/error?error=OAuthSignin`}}if("email"===l.type){var d;let e=null==n?void 0:n.email;if(!e)return{redirect:`${s}/error?error=EmailSignin`};let r=null!=(d=l.normalizeIdentifier)?d:e=>{var t;let r=e.trim();if(1!==(null!=(t=r.match(/@/g))?t:[]).length||r.includes('"'))throw Error("Invalid email address format.");let[n,i]=r.toLowerCase().split("@");if(!n||!i||!(i=i.split(",")[0]).includes("."))throw Error("Invalid email address format.");return`${n}@${i}`};try{e=r(null==n?void 0:n.email)}catch(e){return u.error("SIGNIN_EMAIL_ERROR",{error:e,providerId:l.id}),{redirect:`${s}/error?error=EmailSignin`}}let i=await (0,a.default)({email:e,adapter:t.adapter}),p={providerAccountId:e,userId:e,type:"email",provider:l.id};try{let e=await c.signIn({user:i,account:p,email:{verificationRequest:!0}});if(!e)return{redirect:`${s}/error?error=AccessDenied`};if("string"==typeof e)return{redirect:e}}catch(e){return{redirect:`${s}/error?${new URLSearchParams({error:e})}`}}try{return{redirect:await (0,o.default)(e,t)}}catch(e){return u.error("SIGNIN_EMAIL_ERROR",{error:e,providerId:l.id}),{redirect:`${s}/error?error=EmailSignin`}}}return{redirect:`${s}/signin`}}},955091,(e,t,r)=>{"use strict";async function n(e){var t,r;let{options:n,sessionStore:i}=e,{adapter:o,events:a,jwt:s,callbackUrl:c,logger:u,session:l}=n,d=null==i?void 0:i.value;if(!d)return{redirect:c};if("jwt"===l.strategy)try{let e=await s.decode({...s,token:d});await (null==(t=a.signOut)?void 0:t.call(a,{token:e}))}catch(e){u.error("SIGNOUT_ERROR",e)}else try{let e=await o.deleteSession(d);await (null==(r=a.signOut)?void 0:r.call(a,{session:e}))}catch(e){u.error("SIGNOUT_ERROR",e)}return{redirect:c,cookies:i.clean()}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n},941939,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=i;var n=e.r(762342);async function i(e){var t,r,i,o,a,s;let{options:c,sessionStore:u,newSession:l,isUpdate:d}=e,{adapter:p,jwt:f,events:h,callbacks:y,logger:g,session:{strategy:m,maxAge:_}}=c,b={body:{},headers:[{key:"Content-Type",value:"application/json"},...d?[]:[{key:"Cache-Control",value:"private, no-cache, no-store"},{key:"Pragma",value:"no-cache"},{key:"Expires",value:"0"}]].filter(Boolean),cookies:[]},v=u.value;if(!v)return b;if("jwt"===m)try{let e=await f.decode({...f,token:v});if(!e)throw Error("JWT invalid");let i=await y.jwt({token:e,...d&&{trigger:"update"},session:l}),o=(0,n.fromDate)(_),a=await y.session({session:{user:{name:null==e?void 0:e.name,email:null==e?void 0:e.email,image:null==e?void 0:e.picture},expires:o.toISOString()},token:i});b.body=a;let s=await f.encode({...f,token:i,maxAge:c.session.maxAge}),p=u.chunk(s,{expires:o});null==(t=b.cookies)||t.push(...p),await (null==(r=h.session)?void 0:r.call(h,{session:a,token:i}))}catch(e){g.error("JWT_SESSION_ERROR",e),null==(i=b.cookies)||i.push(...u.clean())}else try{let{getSessionAndUser:e,deleteSession:t,updateSession:r}=p,i=await e(v);if(i&&i.session.expires.valueOf()<Date.now()&&(await t(v),i=null),i){let{user:e,session:t}=i,s=c.session.updateAge,u=t.expires.valueOf()-1e3*_+1e3*s,p=(0,n.fromDate)(_);u<=Date.now()&&await r({sessionToken:v,expires:p});let f=await y.session({session:{user:{name:e.name,email:e.email,image:e.image},expires:t.expires.toISOString()},user:e,newSession:l,...d?{trigger:"update"}:{}});b.body=f,null==(o=b.cookies)||o.push({name:c.cookies.sessionToken.name,value:v,options:{...c.cookies.sessionToken.options,expires:p}}),await (null==(a=h.session)?void 0:a.call(h,{session:f}))}else v&&(null==(s=b.cookies)||s.push(...u.clean()))}catch(e){g.error("SESSION_ERROR",e)}return b}},801020,(e,t,r)=>{"use strict";
13Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return{headers:[{key:"Content-Type",value:"application/json"}],body:e.reduce((e,{id:t,name:r,type:n,signinUrl:i,callbackUrl:o})=>(e[t]={id:t,name:r,type:n,signinUrl:i,callbackUrl:o},e),{})}}},588962,(e,t,r)=>{"use strict";var n=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"callback",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"providers",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(r,"session",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"signin",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"signout",{enumerable:!0,get:function(){return a.default}});var i=n(e.r(870717)),o=n(e.r(335480)),a=n(e.r(955091)),s=n(e.r(941939)),c=n(e.r(801020))},928020,e=>{"use strict";var t,r,n,i,o,a,s,c,u,l,d,p,f={},h=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(e,t){for(var r in t)e[r]=t[r];return e}function _(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(e,r,n){var i,o,a,s={};for(a in r)"key"==a?i=r[a]:"ref"==a?o=r[a]:s[a]=r[a];if(arguments.length>2&&(s.children=arguments.length>3?t.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]
vendor: 8,895 bytes, line 13
13);return v(e,s,i,o,null)}function v(e,t,i,o,a){var s={type:e,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++n:a,__i:-1,__u:0};return null==a&&null!=r.vnode&&r.vnode(s),s}function w(e){return e.children}function E(e,t){this.props=e,this.context=t}function S(e,t){if(null==t)return e.__?S(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?S(e):null}function k(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!A.__r++||o!=r.debounceRendering)&&((o=r.debounceRendering)||a)(A)}function A(){for(var e,t,n,o,a,c,u=1;i.length;)i.length>u&&i.sort(s),e=i.shift(),u=i.length,e.__d&&(t=void 0,n=void 0,o=(n=e.__v).__e,a=[],c=[],e.__P&&((t=m({},n)).__v=n.__v+1,r.vnode&&r.vnode(t),P(e.__P,t,n,e.__n,e.__P.namespaceURI,32&n.__u?[o]:null,a,null==o?S(n):o,!!(32&n.__u),c),t.__v=n.__v,t.__.__k[t.__i]=t,j(a,t,c),n.__e=n.__=null,t.__e!=o&&function e(t){var r,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,r=0;r<t.__k.length;r++)if(null!=(n=t.__k[r])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return e(t)}}(t)));A.__r=0}function x(e,t,n,i,o,a,s,c,u,l,d){var p,y,m,b,E,k,A,x=i&&i.__k||h,T=t.length;for(u=function(e,t,n,i,o){var a,s,c,u,l,d=n.length,p=d,f=0;for(e.__k=Array(o),a=0;a<o;a++)null!=(s=t[a])&&"boolean"!=typeof s&&"function"!=typeof s?("string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?s=e.__k[a]=v(null,s,null,null,null):g(s)?s=e.__k[a]=v(w,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?s=e.__k[a]=v(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,u=a+f,s.__=e,s.__b=e.__b+1,c=null,-1!=(l=s.__i=function(e,t,r,n){var i,o,a,s=e.key,c=e.type,u=t[r],l=null!=u&&0==(2&u.__u);if(null===u&&null==s||l&&s==u.key&&c==u.type)return r;if(n>+!!l){for(i=r-1,o=r+1;i>=0||o<t.length;)if(null!=(u=t[a=i>=0?i--:o++])&&0==(2&u.__u)&&s==u.key&&c==u.type)return a}return -1}(s,n,u,p))&&(p--,(c=n[l])&&(c.__u|=2)),null==c||null==c.__v?(-1==l&&(o>d?f--:o<d&&f++),"function"!=typeof s.type&&(s.__u|=4)):l!=u&&(l==u-1?f--:l==u+1?f++:(l>u?f--:f++,s.__u|=4))):e.__k[a]=null;if(p)for(a=0;a<d;a++)null!=(c=n[a])&&0==(2&c.__u)&&(c.__e==i&&(i=S(c)),function e(t,n,i){var o,a;if(r.unmount&&r.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||I(o,null,n)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){r.__e(e,n)}o.base=o.__P=null}if(o=t.__k)for(a=0;a<o.length;a++)o[a]&&e(o[a],n,i||"function"!=typeof t.type);i||_(t.__e),t.__c=t.__=t.__e=void 0}(c,c));return i}(n,t,x,u,T),p=0;p<T;p++)null!=(m=n.__k[p])&&(y=-1==m.__i?f:x[m.__i]||f,m.__i=p,k=P(e,m,y,o,a,s,c,u,l,d),b=m.__e,m.ref&&y.ref!=m.ref&&(y.ref&&I(y.ref,null,m),d.push(m.ref,m.__c||b,m)),null==E&&null!=b&&(E=b),(A=!!(4&m.__u))||y.__k===m.__k?u=function e(t,r,n,i){var o,a;if("function"==typeof t.type){for(o=t.__k,a=0;o&&a<o.length;a++)o[a]&&(o[a].__=t,r=e(o[a],r,n,i));return r}t.__e!=r&&(i&&(r&&t.type&&!r.parentNode&&(r=S(t)),n.insertBefore(t.__e,r||null)),r=t.__e);do r=r&&r.nextSibling;while(null!=r&&8==r.nodeType)return r}(m,u,e,A):"function"==typeof m.type&&void 0!==k?u=k:b&&(u=b.nextSibling),m.__u&=-7);return n.__e=E,u}function T(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||y.test(t)?r:r+"px"}function O(e,t,r,n,i){var o,a;e:if("style"==t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||T(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||T(e.style,t,r[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(c,"$1")),t=(a=t.toLowerCase())in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=u,e.addEventListener(t,o?d:l,o)):e.removeEventListener(t,o?d:l,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function R(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=u++;else if(t.t<n.u)return;return n(r.event?r.event(t):t)}}}function P(e,n,i,o,a,s,c,u,l,d){var p,h,y,b,v,k,A,T,R,P,j,I,z,N,D,M,H,W=n.type;if(void 0!==n.constructor)return null;128&i.__u&&(l=!!(32&i.__u),s=[u=n.__e=i.__e]),(p=r.__b)&&p(n);e:if("function"==typeof W)try{if(T=n.props,R="prototype"in W&&W.prototype.render,P=(p=W.contextType)&&o[p.__c],j=p?P?P.props.value:p.__:o,i.__c?A=(h=n.__c=i.__c).__=h.__E:(R?n.__c=h=new W(T,j):(n.__c=h=new E(T,j),h.constructor=W,h.render=U),P&&P.sub(h),h.state||(h.state={}),h.__n=o,y=h.__d=!0,h.__h=[],h._sb=[]),R&&null==h.__s&&(h.__s=h.state),R&&null!=W.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,W.getDerivedStateFromProps(T,h.__s))),b=h.props,v=h.state,h.__v=n,y)R&&null==W.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),R&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(R&&null==W.getDerivedStateFromProps&&T!==b&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(T,j),n.__v==i.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(T,h.__s,j)){for(n.__v!=i.__v&&(h.props=T,h.state=h.__s,h.__d=!1),n.__e=i.__e,n.__k=i.__k,n.__k.some(function(e){e&&(e.__=n)}),I=0;I<h._sb.length;I++)h.__h.push(h._sb[I]);h._sb=[],h.__h.length&&c.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(T,h.__s,j),R&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(b,v,k)})}if(h.context=j,h.props=T,h.__P=e,h.__e=!1,z=r.__r,N=0,R){for(h.state=h.__s,h.__d=!1,z&&z(n),p=h.render(h.props,h.state,h.context),D=0;D<h._sb.length;D++)h.__h.push(h._sb[D]);h._sb=[]}else do h.__d=!1,z&&z(n),p=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++N<25)h.state=h.__s,null!=h.getChildContext&&(o=m(m({},o),h.getChildContext())),R&&!y&&null!=h.getSnapshotBeforeUpdate&&(k=h.getSnapshotBeforeUpdate(b,v)),M=p,null!=p&&p.type===w&&null==p.key&&(M=function e(t){return"object"!=typeof t||null==t||t.__b&&t.__b>0?t:g(t)?t.map(e):m({},t)}(p.props.children)),u=x(e,g(M)?M:[M],n,i,o,a,s,c,u,l,d),h.base=n.__e,n.__u&=-161,h.__h.length&&c.push(h),A&&(h.__E=h.__=null)}catch(e){if(n.__v=null,l||null!=s)if(e.then){for(n.__u|=l?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;s[s.indexOf(u)]=null,n.__e=u}else{for(H=s.length;H--;)_(s[H]);C(n)}else n.__e=i.__e,n.__k=i.__k,e.then||C(n);r.__e(e,n,i)}else null==s&&n.__v==i.__v?(n.__k=i.__k,n.__e=i.__e):u=n.__e=function(e,n,i,o,a,s,c,u,l){var d,p,h,y,m,b,v,w=i.props||f,E=n.props,k=n.type;if("svg"==k?a="http://www.w3.org/2000/svg":"math"==k?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=s){for(d=0;d<s.length;d++)if((m=s[d])&&"setAttribute"in m==!!k&&(k?m.localName==k:3==m.nodeType)){e=m,s[d]=null;break}}if(null==e){if(null==k)return document.createTextNode(E);e=document.createElementNS(a,k,E.is&&E),u&&(r.__m&&r.__m(n,s),u=!1),s=null}if(null==k)w===E||u&&e.data==E||(e.data=E);else{if(s=s&&t.call(e.childNodes),!u&&null!=s)for(w={},d=0;d<e.attributes.length;d++)w[(m=e.attributes[d]).name]=m.value;for(d in w)if(m=w[d],"children"==d);else if("dangerouslySetInnerHTML"==d)h=m;else if(!(d in E)){if("value"==d&&"defaultValue"in E||"checked"==d&&"defaultChecked"in E)continue;O(e,d,null,m,a)}for(d in E)m=E[d],"children"==d?y=m:"dangerouslySetInnerHTML"==d?p=m:"value"==d?b=m:"checked"==d?v=m:u&&"function"!=typeof m||w[d]===m||O(e,d,m,w[d],a);if(p)u||h&&(p.__html==h.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),n.__k=[];else if(h&&(e.innerHTML=""),x("template"==n.type?e.content:e,g(y)?y:[y],n,i,o,"foreignObject"==k?"http://www.w3.org/1999/xhtml":a,s,c,s?s[0]:i.__k&&S(i,0),u,l),null!=s)for(d=s.length;d--;)_(s[d]);u||(d="value","progress"==k&&null==b?e.removeAttribute("value"):null==b||b===e[d]&&("progress"!=k||b)&&("option"!=k||b==w[d])||O(e,d,b,w[d],a),d="checked",null!=v&&v!=e[d]&&O(e,d,v,w[d],a))}return e}(i.__e,n,i,o,a,s,c,l,d);return(p=r.diffed)&&p(n),128&n.__u?void 0:u}function C(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(C)}function j(e,t,n){for(var i=0;i<n.length;i++)I(n[i],n[++i],n[++i]);r.__c&&r.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){r.__e(e,t.__v)}})}function I(e,t,n){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==t||(e.__u=e(t))}else e.current=t}catch(e){r.__e(e,n)}}function U(e,t,r){return this.constructor(e,r)}function z(e,n,i){var o,a,s,c;n==document&&(n=document.documentElement),r.__&&r.__(e,n),a=(o="function"==typeof i)?null:i&&i.__k||n.__k,s=[],c=[],P(n,e=(!o&&i||n).__k=b(w,null,[e]),a||f,f,n.namespaceURI,!o&&i?[i]:a?null:n.firstChild?t.call(n.childNodes):null,
13s,!o&&i?i:a?a.__e:n.firstChild,o,c),j(s,e,c)}t=h.slice,r={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},n=0,E.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},r),this.props)),e&&m(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),k(this))},E.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},E.prototype.render=w,i=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},A.__r=0,c=/(PointerCapture)$|Capture$/i,u=0,l=R(!1),d=R(!0),p=0,e.s(["Component",0,E,"Fragment",0,w,"cloneElement",0,function(e,r,n){var i,o,a,s,c=m({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),r)"key"==a?i=r[a]:"ref"==a?o=r[a]:c[a]=void 0===r[a]&&null!=s?s[a]:r[a];return arguments.length>2&&(c.children=arguments.length>3?t.call(arguments,2):n),v(e.type,c,i||e.key,o||e.ref,null)},"createContext",0,function(e){function t(e){var r,n;return this.getChildContext||(r=new Set,(n={})[t.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&r.forEach(function(e){e.__e=!0,k(e)})},this.sub=function(e){r.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r&&r.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+p++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t},"createElement",0,b,"createRef",0,function(){return{current:null}},"h",0,b,"hydrate",0,function e(t,r){z(t,r,e)},"isValidElement",0,function(e){return null!=e&&void 0===e.constructor},"options",0,r,"render",0,z,"toChildArray",0,function e(t,r){return r=r||[],null==t||"boolean"==typeof t||(g(t)?t.some(function(t){e(t,r)}):r.push(t)),r}])},874820,e=>{"use strict";var t=e.i(928020),r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,n=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,i=/[\s\n\\/='"\0<>]/,o=/^xlink:?./,a=/["&<]/;function s(e){if(!1===a.test(e+=""))return e;for(var t=0,r=0,n="",i="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 60:i="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=i,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var c=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"	"))},u=function(e,t,r){return String(e).length>(t||40)||!r&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},l={},d=/([A-Z])/g;function p(e){var t="";for(var n in e){var i=e[n];null!=i&&""!==i&&(t&&(t+=" "),t+="-"==n[0]?n:l[n]||(l[n]=n.replace(d,"-$1").toLowerCase()),t="number"==typeof i&&!1===r.test(n)?t+": "+i+"px;":t+": "+i+";")}return t||void 0}function f(e,t){return Array.isArray(t)?t.reduce(f,e):null!=t&&!1!==t&&e.push(t),e}function h(){this.__d=!0}function y(e,t){return{__v:e,context:t,props:e.props,setState:h,forceUpdate:h,__d:!0,__h:[]}}function g(e,t){var r=e.contextType,n=r&&t[r.__c];return null!=r?n?n.props.value:r.__:t}var m=[],_={shallow:!0};w.render=w;var b=function(e,t){return w(e,t,_)},v=[];function w(e,r,a){r=r||{};var l=t.options.__s;t.options.__s=!0;var d,h=(0,t.h)(t.Fragment,null);return h.__k=[e],d=a&&(a.pretty||a.voidElements||a.sortAttributes||a.shallow||a.allAttributes||a.xml||a.attributeHook)?function e(r,a,l,d,h,_){if(null==r||"boolean"==typeof r)return"";if("object"!=typeof r)return"function"==typeof r?"":s(r);var b=l.pretty,v=b&&"string"==typeof b?b:"	";if(Array.isArray(r)){for(var w="",E=0;E<r.length;E++)b&&E>0&&(w+="\n"),w+=e(r[E],a,l,d,h,_);return w}if(void 0!==r.constructor)return"";var S,k=r.type,A=r.props,x=!1;if("function"==typeof k){if(x=!0,!l.shallow||!d&&!1!==l.renderRootComponent){if(k===t.Fragment){var T=[];return f(T,r.props.children),e(T,a,l,!1!==l.shallowHighOrder,h,_)}var O,R=r.__c=y(r,a);t.options.__b&&t.options.__b(r);var P=t.options.__r;if(k.prototype&&"function"==typeof k.prototype.render){var C=g(k,a);(R=r.__c=new k(A,C)).__v=r,R._dirty=R.__d=!0,R.props=A,null==R.state&&(R.state={}),null==R._nextState&&null==R.__s&&(R._nextState=R.__s=R.state),R.context=C,k.getDerivedStateFromProps?R.state=Object.assign({},R.state,k.getDerivedStateFromProps(R.props,R.state)):R.componentWillMount&&(R.componentWillMount(),R.state=R._nextState!==R.state?R._nextState:R.__s!==R.state?R.__s:R.state),P&&P(r),O=R.render(R.props,R.state,R.context)}else for(var j=g(k,a),I=0;R.__d&&I++<25;)R.__d=!1,P&&P(r),O=k.call(r.__c,A,j);return R.getChildContext&&(a=Object.assign({},a,R.getChildContext())),t.options.diffed&&t.options.diffed(r),e(O,a,l,!1!==l.shallowHighOrder,h,_)}k=(S=k).displayName||S!==Function&&S.name||function(e){var t=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!t){for(var r=-1,n=m.length;n--;)if(m[n]===e){r=n;break}r<0&&(r=m.push(e)-1),t="UnnamedComponent"+r}return t}(S)}var U,z,N="<"+k;
13if(A){var D=Object.keys(A);l&&!0===l.sortAttributes&&D.sort();for(var M=0;M<D.length;M++){var H=D[M],W=A[H];if("children"!==H){if(!i.test(H)&&(l&&l.allAttributes||"key"!==H&&"ref"!==H&&"__self"!==H&&"__source"!==H)){if("defaultValue"===H)H="value";else if("defaultChecked"===H)H="checked";else if("defaultSelected"===H)H="selected";else if("className"===H){if(void 0!==A.class)continue;H="class"}else h&&o.test(H)&&(H=H.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===H){if(A.for)continue;H="for"}"style"===H&&W&&"object"==typeof W&&(W=p(W)),"a"===H[0]&&"r"===H[1]&&"boolean"==typeof W&&(W=String(W));var $=l.attributeHook&&l.attributeHook(H,W,a,l,x);if($||""===$)N+=$;else if("dangerouslySetInnerHTML"===H)z=W&&W.__html;else if("textarea"===k&&"value"===H)U=W;else if((W||0===W||""===W)&&"function"!=typeof W){if(!(!0!==W&&""!==W||(W=H,l&&l.xml))){N=N+" "+H;continue}if("value"===H){if("select"===k){_=W;continue}"option"===k&&_==W&&void 0===A.selected&&(N+=" selected")}N=N+" "+H+'="'+s(W)+'"'}}}else U=W}}if(b){var L=N.replace(/\n\s*/," ");L===N||~L.indexOf("\n")?b&&~N.indexOf("\n")&&(N+="\n"):N=L}if(N+=">",i.test(k))throw Error(k+" is not a valid HTML tag name in "+N);var K,B=n.test(k)||l.voidElements&&l.voidElements.test(k),Z=[];if(z)b&&u(z)&&(z="\n"+v+c(z,v)),N+=z;else if(null!=U&&f(K=[],U).length){for(var q=b&&~N.indexOf("\n"),F=!1,J=0;J<K.length;J++){var G=K[J];if(null!=G&&!1!==G){var V=e(G,a,l,!0,"svg"===k||"foreignObject"!==k&&h,_);if(b&&!q&&u(V)&&(q=!0),V)if(b){var Y=V.length>0&&"<"!=V[0];F&&Y?Z[Z.length-1]+=V:Z.push(V),F=Y}else Z.push(V)}}if(b&&q)for(var X=Z.length;X--;)Z[X]="\n"+v+c(Z[X],v)}if(Z.length||z)N+=Z.join("");else if(l&&l.xml)return N.substring(0,N.length-1)+" />";return!B||K||z?(b&&~N.indexOf("\n")&&(N+="\n"),N=N+"</"+k+">"):N=N.replace(/>$/," />"),N}(e,r,a):function e(r,a,c,u,l){if(null==r||!0===r||!1===r||""===r)return"";if("object"!=typeof r)return"function"==typeof r?"":s(r);if(S(r)){var d="";l.__k=r;for(var f=0;f<r.length;f++)d+=e(r[f],a,c,u,l),r[f]=E(r[f]);return d}if(void 0!==r.constructor)return"";r.__=l,t.options.__b&&t.options.__b(r);var h=r.type,m=r.props;if("function"==typeof h){if(h===t.Fragment)x=m.children;else{var _,b,v,w,A,x=h.prototype&&"function"==typeof h.prototype.render?(_=a,v=g(b=r.type,_),w=new b(r.props,v),r.__c=w,w.__v=r,w.__d=!0,w.props=r.props,null==w.state&&(w.state={}),null==w.__s&&(w.__s=w.state),w.context=v,b.getDerivedStateFromProps?w.state=k({},w.state,b.getDerivedStateFromProps(w.props,w.state)):w.componentWillMount&&(w.componentWillMount(),w.state=w.__s!==w.state?w.__s:w.state),(A=t.options.__r)&&A(r),w.render(w.props,w.state,w.context)):function(e,r){var n,i=y(e,r),o=g(e.type,r);e.__c=i;for(var a=t.options.__r,s=0;i.__d&&s++<25;)i.__d=!1,a&&a(e),n=e.type.call(i,e.props,o);return n}(r,a),T=r.__c;T.getChildContext&&(a=k({},a,T.getChildContext()))}var O=e(x=null!=x&&x.type===t.Fragment&&null==x.key?x.props.children:x,a,c,u,r);return t.options.diffed&&t.options.diffed(r),r.__=void 0,t.options.unmount&&t.options.unmount(r),O}var R,P,C="<";if(C+=h,m)for(var j in R=m.children,m){var I,U,z,N=m[j];if(!("key"===j||"ref"===j||"__self"===j||"__source"===j||"children"===j||"className"===j&&"class"in m||"htmlFor"===j&&"for"in m||i.test(j))){if(U=j="className"===(I=j)?"class":"htmlFor"===I?"for":"defaultValue"===I?"value":"defaultChecked"===I?"checked":"defaultSelected"===I?"selected":c&&o.test(I)?I.toLowerCase().replace(/^xlink:?/,"xlink:"):I,z=N,N="style"===U&&null!=z&&"object"==typeof z?p(z):"a"===U[0]&&"r"===U[1]&&"boolean"==typeof z?String(z):z,"dangerouslySetInnerHTML"===j)P=N&&N.__html;else if("textarea"===h&&"value"===j)R=N;else if((N||0===N||""===N)&&"function"!=typeof N){if(!0===N||""===N){N=j,C=C+" "+j;continue}if("value"===j){if("select"===h){u=N;continue}"option"!==h||u!=N||"selected"in m||(C+=" selected")}C=C+" "+j+'="'+s(N)+'"'}}}var D=C;if(C+=">",i.test(h))throw Error(h+" is not a valid HTML tag name in "+C);var M="",H=!1;if(P)M+=P,H=!0;else if("string"==typeof R)M+=s(R),H=!0;else if(S(R)){r.__k=R;for(var W=0;W<R.length;W++){var $=R[W];if(R[W]=E($),null!=$&&!1!==$){var L=e($,a,"svg"===h||"foreignObject"!==h&&c,u,r);L&&(M+=L,H=!0)}}}else if(null!=R&&!1!==R&&!0!==R){r.__k=[E(R)];var K=e(R,a,"svg"===h||"foreignObject"!==h&&c,u,r);K&&(M+=K,H=!0)}if(t.options.diffed&&t.options.diffed(r),r.__=void 0,t.options.unmount&&t.options.unmount(r),H)C+=M;else if(n.test(h))return D+" />";return C+"</"+h+">"}(e,r,!1,void 0,h),t.options.__c&&t.options.__c(e,v),t.options.__s=l,v.length=0,d}function E(e){return null==e||"boolean"==typeof e?null:"string"==typeof e||"number"==typeof e||"bigint"==typeof e?(0,t.h)(null,null,e):e}var S=Array.isArray,k=Object.assign;w.shallowRender=b,e.s(["default",0,w,"render",0,w,"renderToStaticMarkup",0,w,"renderToString",0,w,"shallowRender",0,b])}
13,343676,(e,t,r)=>{function n(){return t.exports=n=Object.assign.bind(),t.exports.__esModule=!0,t.exports.default=t.exports,n.apply(null,arguments)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},588436,(e,t,r)=>{"use strict";var n=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t;let{csrfToken:r,providers:n,callbackUrl:s,theme:c,email:u,error:l}=e,d=n.filter(e=>"oauth"===e.type||"email"===e.type||"credentials"===e.type&&!!e.credentials);"u">typeof document&&c.buttonText&&document.documentElement.style.setProperty("--button-text-color",c.buttonText),"u">typeof document&&c.brandColor&&document.documentElement.style.setProperty("--brand-color",c.brandColor);let p={Signin:"Try signing in with a different account.",OAuthSignin:"Try signing in with a different account.",OAuthCallback:"Try signing in with a different account.",OAuthCreateAccount:"Try signing in with a different account.",EmailCreateAccount:"Try signing in with a different account.",Callback:"Try signing in with a different account.",OAuthAccountNotLinked:"To confirm your identity, sign in with the same account you used originally.",EmailSignin:"The e-mail could not be sent.",CredentialsSignin:"Sign in failed. Check the details you provided are correct.",SessionRequired:"Please sign in to access this page.",default:"Unable to sign in."},f=l&&(null!=(t=p[l])?t:p.default),h="https://authjs.dev/img/providers";return(0,i.h)("div",{className:"signin"},c.brandColor&&(0,i.h)("style",{dangerouslySetInnerHTML:{__html:`
14        :root {
15          --brand-color: ${c.brandColor}
16        }
17      `}}),c.buttonText&&(0,i.h)("style",{dangerouslySetInnerHTML:{__html:`
18        :root {
19          --button-text-color: ${c.buttonText}
20        }
21      `}}),(0,i.h)("div",{className:"card"},c.logo&&(0,i.h)("img",{src:c.logo,alt:"Logo",className:"logo"}),f&&(0,i.h)("div",{className:"error"},(0,i.h)("p",null,f)),d.map((e,t)=>{let n,c,l,p,f,y;if("oauth"===e.type){var g;({bg:n="",text:c="",logo:l="",bgDark:f=n,textDark:y=c,logoDark:p=""}=null!=(g=e.style)?g:{}),l=l.startsWith("/")?`${h}${l}`:l,(p=p.startsWith("/")?`${h}${p}`:p||l)||(p=l)}return(0,i.h)("div",{key:e.id,className:"provider"},"oauth"===e.type&&(0,i.h)("form",{action:e.signinUrl,method:"POST"},(0,i.h)("input",{type:"hidden",name:"csrfToken",value:r}),s&&(0,i.h)("input",{type:"hidden",name:"callbackUrl",value:s}),(0,i.h)("button",{type:"submit",className:"button",style:{"--provider-bg":n,"--provider-dark-bg":f,"--provider-color":c,"--provider-dark-color":y,"--provider-bg-hover":a(n,.8),"--provider-dark-bg-hover":a(f,.8)}},l&&(0,i.h)("img",{loading:"lazy",height:24,width:24,id:"provider-logo",src:`${l.startsWith("/")?h:""}${l}`}),p&&(0,i.h)("img",{loading:"lazy",height:24,width:24,id:"provider-logo-dark",src:`${l.startsWith("/")?h:""}${p}`}),(0,i.h)("span",null,"Sign in with ",e.name))),("email"===e.type||"credentials"===e.type)&&t>
210&&"email"!==d[t-1].type&&"credentials"!==d[t-1].type&&(0,i.h)("hr",null),"email"===e.type&&(0,i.h)("form",{action:e.signinUrl,method:"POST"},(0,i.h)("input",{type:"hidden",name:"csrfToken",value:r}),(0,i.h)("label",{className:"section-header",htmlFor:`input-email-for-${e.id}-provider`},"Email"),(0,i.h)("input",{id:`input-email-for-${e.id}-provider`,autoFocus:!0,type:"email",name:"email",value:u,placeholder:"[email protected]",required:!0}),(0,i.h)("button",{id:"submitButton",type:"submit"},"Sign in with ",e.name)),"credentials"===e.type&&(0,i.h)("form",{action:e.callbackUrl,method:"POST"},(0,i.h)("input",{type:"hidden",name:"csrfToken",value:r}),Object.keys(e.credentials).map(t=>{var r,n,a;return(0,i.h)("div",{key:`input-group-${e.id}`},(0,i.h)("label",{className:"section-header",htmlFor:`input-${t}-for-${e.id}-provider`},null!=(r=e.credentials[t].label)?r:t),(0,i.h)("input",(0,o.default)({name:t,id:`input-${t}-for-${e.id}-provider`,type:null!=(n=e.credentials[t].type)?n:"text",placeholder:null!=(a=e.credentials[t].placeholder)?a:""},e.credentials[t])))}),(0,i.h)("button",{type:"submit"},"Sign in with ",e.name)),("email"===e.type||"credentials"===e.type)&&t+1<d.length&&(0,i.h)("hr",null))})))};var i=e.r(928020),o=n(e.r(343676));function a(e,t=1){if(!e)return;3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let r=parseInt(e,16);return t=Math.min(Math.max(t,0),1),`rgba(${r>>16&255}, ${r>>8&255}, ${255&r}, ${t})`}},50072,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){let{url:t,csrfToken:r,theme:i}=e;return(0,n.h)("div",{className:"signout"},i.brandColor&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:`
22        :root {
23          --brand-color: ${i.brandColor}
24        }
25      `}}),i.buttonText&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:`
26        :root {
27          --button-text-color: ${i.buttonText}
28        }
29      `}}),(0,n.h)("div",{className:"card"},i.logo&&(0,n.h)("img",{src:i.logo,alt:"Logo",className:"logo"}),(0,n.h)("h1",null,"Signout"),(0,n.h)("p",null,"Are you sure you want to sign out?"),(0,n.h)("form",{action:`${t}/signout`,method:"POST"},(0,n.h)("input",{type:"hidden",name:"csrfToken",value:r}),(0,n.h)("button",{id:"submitButton",type:"submit"},"Sign out"))))};var n=e.r(928020)},11359,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){let{url:t,theme:r}=e;return(0,n.h)("div",{className:"verify-request"},r.brandColor&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:`
30        :root {
31          --brand-color: ${r.brandColor}
32        }
33      `}}),(0,n.h)("div",{className:"card"},r.logo&&(0,n.h)("img",{src:r.logo,alt:"Logo",className:"logo"}),(0,n.h)("h1",null,"Check your email"),(0,n.h)("p",null,"A sign in link has been sent to your email address."),(0,n.h)("p",null,(0,n.h)("a",{className:"site",href:t.origin},t.host))))};var n=e.r(928020)},400413,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t;let{url:r,error:i="default",theme:o}=e,a=`${r}/signin`,s={default:{status:200,heading:"Error",message:(0,n.h)("p",null,(0,n.h)("a",{className:"site",href:null==r?void 0:r.origin},null==r?void 0:r.host))},configuration:{status:500,heading:"Server error",message:(0,n.h)("div",null,(0,n.h)("p",null,"There is a problem with the server configuration."),(0,n.h)("p",null,"Check the server logs for more information."))},accessdenied:{status:403,heading:"Access Denied",message:(0,n.h)("div",null,(0,n.h)("p",null,"You do not have permission to sign in."),(0,n.h)("p",null,(0,n.h)("a",{className:"button",href:a}
33,"Sign in")))},verification:{status:403,heading:"Unable to sign in",message:(0,n.h)("div",null,(0,n.h)("p",null,"The sign in link is no longer valid."),(0,n.h)("p",null,"It may have been used already or it may have expired.")),signin:(0,n.h)("a",{className:"button",href:a},"Sign in")}},{status:c,heading:u,message:l,signin:d}=null!=(t=s[i.toLowerCase()])?t:s.default;return{status:c,html:(0,n.h)("div",{className:"error"},(null==o?void 0:o.brandColor)&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:`
34        :root {
35          --brand-color: ${null==o?void 0:o.brandColor}
36        }
37      `}}),(0,n.h)("div",{className:"card"},(null==o?void 0:o.logo)&&(0,n.h)("img",{src:o.logo,alt:"Logo",className:"logo"}),(0,n.h)("h1",null,u),(0,n.h)("div",{className:"message"},l),d))}};var n=e.r(928020)},465424,(e,t,r)=>{t.exports=function(){return':root{--border-width:1px;--border-radius:0.5rem;--color-error:#c94b4b;--color-info:#157efb;--color-info-hover:#0f6ddb;--color-info-text:#fff}.__next-auth-theme-auto,.__next-auth-theme-light{--color-background:#ececec;--color-background-hover:hsla(0,0%,93%,.8);--color-background-card:#fff;--color-text:#000;--color-primary:#444;--color-control-border:#bbb;--color-button-active-background:#f9f9f9;--color-button-active-border:#aaa;--color-separator:#ccc}.__next-auth-theme-dark{--color-background:#161b22;--color-background-hover:rgba(22,27,34,.8);--color-background-card:#0d1117;--color-text:#fff;--color-primary:#ccc;--color-control-border:#555;--color-button-active-background:#060606;--color-button-active-border:#666;--color-separator:#444}@media (prefers-color-scheme:dark){.__next-auth-theme-auto{--color-background:#161b22;--color-background-hover:rgba(22,27,34,.8);--color-background-card:#0d1117;--color-text:#fff;--color-primary:#ccc;--color-control-border:#555;--color-button-active-background:#060606;--color-button-active-border:#666;--color-separator:#444}a.button,button{background-color:var(--provider-dark-bg,var(--color-background));color:var(--provider-dark-color,var(--color-primary))}a.button:hover,button:hover{background-color:var(--provider-dark-bg-hover,var(--color-background-hover))!important}#provider-logo{display:none!important}#provider-logo-dark{display:block!important;width:25px}}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit;margin:0;padding:0}body{background-color:var(--color-background);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;margin:0;padding:0}h1{font-weight:400}h1,p{color:var(--color-text);margin-bottom:1.5rem;padding:0 1rem}form{margin:0;padding:0}label{font-weight:500;margin-bottom:.25rem;text-align:left}input[type],label{color:var(--color-text);display:block}input[type]{background:var(--color-background-card);border:var(--border-width) solid var(--color-control-border);border-radius:var(--border-radius);box-sizing:border-box;font-size:1rem;padding:.5rem 1rem;width:100%}input[type]:focus{box-shadow:none}p{font-size:1.1rem;line-height:2rem}a.button{line-height:1rem;text-decoration:none}a.button:link,a.button:visited{background-color:var(--color-background);color:var(--color-primary)}button span{flex-grow:1}a.button,button{align-items:center;background-color:var(--provider-bg);border-color:rgba(0,0,0,.1);border-radius:var(--border-radius);color:var(--provider-color,var(--color-primary));display:flex;font-size:1.1rem;font-weight:500;justify-content:center;min-height:62px;padding:.75rem 1rem;position:relative;transition:all .1s ease-in-out}a.button:hover,button:hover{background-color:var(--provider-bg-hover,var(--color-background-hover));cursor:pointer}a.button:active,button:active{cursor:pointer}a.button #provider-logo,button #provider-logo{display:block;width:25px}a.button #provider-logo-dark,button #provider-logo-dark{display:none}#submitButton{background-color:var(--brand-color,var(--color-info));color:var(--button-text-color,var(--color-info-text));width:100%}#submitButton:hover{background-color:var(--button-hover-bg,var(--color-info-hover))!important}a.site{color:var(--color-primary);font-size:1rem;line-height:2rem;text-decoration:none}a.site:hover{text-decoration:underline}.page{box-sizing:border-box;display:grid;height:100%;margin:0;padding:0;place-items:center;position:absolute;width:100%}.page>div{text-align:center}.error a.button{margin-top:.5rem;padding-left:2rem;padding-right:2rem}.error .message{margin-bottom:1.5rem}.signin input[type=text]{display:block;margin-left:auto;margin-right:auto}.signin hr{border:0;border-top:1px solid var(--color-separator);display:block;margin:2rem auto 1rem;overflow:visible}.signin hr:before{background:var(--color-background-card);color:#888;content:"or";padding:0 .4rem;position:relative;top:-.7rem}.signin .error{background:#f5f5f5;background:var(--color-error);border-radius:.3rem;font-weight:500}.signin .error p{color:var(--color-info-text);font-size:.9rem;line-height:1.2rem;padding:.5rem 1rem;text-align:left}.signin form,.signin>div{display:block}.signin form input[type],.signin>div input[type]{margin-bottom:.5rem}.signin form button,.signin>div button{width:100%}.signin .provider+.provider{margin-top:1rem}.logo{display:inline-block;margin:1.25rem 0;max-height:70px;max-width:150px}.card{background-color:var(--color-background-card);border-radius:2rem;padding:1.25rem 2rem}.card .header{color:var(--color-primary)}.section-header{color:var(--color-text)}@media screen and (min-width:450px){.card{margin:2rem 0;width:368px}}@media screen and (max-width:450px){.card{margin:1rem 0;width:343px}}'}},739447,(e,t,r)=>{"use strict";var n=e.r(13451);
37Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){let{url:t,theme:r,query:n,cookies:l}=e;function d({html:e,title:t,status:n}){var o;return{cookies:l,status:n,headers:[{key:"Content-Type",value:"text/html"}],body:`<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><style>${(0,u.default)()}</style><title>${t}</title></head><body class="__next-auth-theme-${null!=(o=null==r?void 0:r.colorScheme)?o:"auto"}"><div class="page">${(0,i.default)(e)}</div></body></html>`}}return{signin:t=>d({html:(0,o.default)({csrfToken:e.csrfToken,providers:e.providers,callbackUrl:e.callbackUrl,theme:r,...n,...t}),title:"Sign In"}),signout:n=>d({html:(0,a.default)({csrfToken:e.csrfToken,url:t,theme:r,...n}),title:"Sign Out"}),verifyRequest:e=>d({html:(0,s.default)({url:t,theme:r,...e}),title:"Verify Request"}),error:e=>d({...(0,c.default)({url:t,theme:r,...e}),title:"Error"})}};var i=n(e.r(874820)),o=n(e.r(588436)),a=n(e.r(50072)),s=n(e.r(11359)),c=n(e.r(400413)),u=n(e.r(465424))},80975,(e,t,r)=>{"use strict";function n(e){return e&&"object"==typeof e&&!Array.isArray(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.merge=function e(t,...r){if(!r.length)return t;let i=r.shift();if(n(t)&&n(i))for(let r in i)n(i[r])?(t[r]||Object.assign(t,{[r]:{}}),e(t[r],i[r])):Object.assign(t,{[r]:i[r]});return e(t,...r)}},580484,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){let{url:t,providerId:r}=e,o=e.providers.map(({options:e,...r})=>{var o,a;if("oauth"===r.type){let o=i(r),s=i(e,!0),c=null!=(a=null==s?void 0:s.id)?a:r.id;return(0,n.merge)(o,{...s,signinUrl:`${t}/signin/${c}`,callbackUrl:`${t}/callback/${c}`})}let s=null!=(o=null==e?void 0:e.id)?o:r.id;return(0,n.merge)(r,{...e,signinUrl:`${t}/signin/${s}`,callbackUrl:`${t}/callback/${s}`})});return{providers:o,provider:o.find(({id:e})=>e===r)}};var n=e.r(80975);function i(e,t=!1){var r,n,o,a,s;if(!e)return;let c=Object.entries(e).reduce((e,[t,r])=>{if(["authorization","token","userinfo"].includes(t)&&"string"==typeof r){var n;let i=new URL(r);e[t]={url:`${i.origin}${i.pathname}`,params:Object.fromEntries(null!=(n=i.searchParams)?n:[])}}else e[t]=r;return e},{});return t||null!=(r=c.version)&&r.startsWith("1.")||(c.idToken=!!(null!=(n=null!=(o=c.idToken)?o:null==(a=c.wellKnown)?void 0:a.includes("openid-configuration"))?n:null==(s=c.authorization)||null==(s=s.params)||null==(s=s.scope)?void 0:s.includes("openid")),c.checks||(c.checks=["state"])),c}},729309,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.defaultCallbacks=void 0,r.defaultCallbacks={signIn:()=>!0,redirect:({url:e,baseUrl:t})=>e.startsWith("/")?`${t}${e}`:new URL(e).origin===t?e:t,session:({session:e})=>e,jwt:({token:e})=>e}},428105,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.createCSRFToken=function({options:e,cookieValue:t,isPost:r,bodyValue:i}){if(t){let[o,a]=t.split("|");if(a===(0,n.createHash)("sha256").update(`${o}${e.secret}`).digest("hex"))return{csrfTokenVerified:r&&o===i,csrfToken:o}}let o=(0,n.randomBytes)(32).toString("hex"),a=(0,n.createHash)("sha256").update(`${o}${e.secret}`).digest("hex");return{cookie:`${o}|${a}`,csrfToken:o}};var n=e.r(586914)},986169,(e,t,r)=>{"use strict";async function n({options:e,paramValue:t,cookieValue:r}){let{url:i,callbacks:o}=e,a=i.origin;return t?a=await o.redirect({url:t,baseUrl:i.origin}):r&&(a=await o.redirect({url:r,baseUrl:i.origin})),{callbackUrl:a,callbackUrlCookie:a!==r?a:void 0}}Object.defineProperty(r,"__esModule",{value:!0}),r.createCallbackUrl=n},196240,(e,t,r)=>{"use strict";var n=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.init=m;var i=e.r(586914),o=n(e.r(36357)),a=e.r(641731),s=n(e.r(580484)),c=e.r(762342),u=g(e.r(401776)),l=g(e.r(151071)),d=e.r(729309),p=e.r(428105),f=e.r(986169),h=n(e.r(498520));function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(y=function(e){return e?r:t})(e)}
37function g(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=y(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}async function m({authOptions:e,providerId:t,action:r,origin:n,cookies:y,callbackUrl:g,csrfToken:_,isPost:b}){var v,w;let E=(0,h.default)(n),S=(0,c.createSecret)({authOptions:e,url:E}),{providers:k,provider:A}=(0,s.default)({providers:e.providers,url:E,providerId:t}),x={debug:!1,pages:{},theme:{colorScheme:"auto",logo:"",brandColor:"",buttonText:""},...e,url:E,action:r,provider:A,cookies:{...u.defaultCookies(null!=(v=e.useSecureCookies)?v:E.base.startsWith("https://")),...e.cookies},secret:S,providers:k,session:{strategy:e.adapter?"database":"jwt",maxAge:2592e3,updateAge:86400,generateSessionToken:()=>{var e;return null!=(e=null===i.randomUUID||void 0===i.randomUUID?void 0:(0,i.randomUUID)())?e:(0,i.randomBytes)(32).toString("hex")},...e.session},jwt:{secret:S,maxAge:2592e3,encode:l.encode,decode:l.decode,...e.jwt},events:(0,a.eventsErrorHandler)(null!=(w=e.events)?w:{},o.default),adapter:(0,a.adapterErrorHandler)(e.adapter,o.default),callbacks:{...d.defaultCallbacks,...e.callbacks},logger:o.default,callbackUrl:E.origin},T=[],{csrfToken:O,cookie:R,csrfTokenVerified:P}=(0,p.createCSRFToken)({options:x,cookieValue:null==y?void 0:y[x.cookies.csrfToken.name],isPost:b,bodyValue:_});x.csrfToken=O,x.csrfTokenVerified=P,R&&T.push({name:x.cookies.csrfToken.name,value:R,options:x.cookies.csrfToken.options});let{callbackUrl:C,callbackUrlCookie:j}=await (0,f.createCallbackUrl)({options:x,cookieValue:null==y?void 0:y[x.cookies.callbackUrl.name],paramValue:g});return x.callbackUrl=C,j&&T.push({name:x.cookies.callbackUrl.name,value:j,options:x.cookies.callbackUrl.options}),{options:x,cookies:T}}},896380,(e,t,r)=>{"use strict";var n=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.assertConfig=function(e){var t,r,n,u,l,d,p;let f,h,y,{options:g,req:m}=e,_=[];if(!s&&(m.origin||_.push("NEXTAUTH_URL"),g.debug&&_.push("DEBUG_ENABLED")),!g.secret)return new i.MissingSecret("Please define a `secret` in production.");if(!(null!=(t=m.query)&&t.nextauth)&&!m.action)return new i.MissingAPIRoute("Cannot find [...nextauth].{js,ts} in `/pages/api/auth`. Make sure the filename is written correctly.");let b=null==(r=m.query)?void 0:r.callbackUrl,v=(0,o.default)(m.origin);if(b&&!c(b,v.base))return new i.InvalidCallbackUrl(`Invalid callback URL. Received: ${b}`);let{callbackUrl:w}=(0,a.defaultCookies)(null!=(n=g.useSecureCookies)?n:v.base.startsWith("https://")),E=null==(u=m.cookies)?void 0:u[null!=(l=null==(d=g.cookies)||null==(d=d.callbackUrl)?void 0:d.name)?l:w.name];if(E&&!c(E,v.base))return new i.InvalidCallbackUrl(`Invalid callback URL. Received: ${E}`);for(let e of g.providers)"credentials"===e.type?f=!0:"email"===e.type?h=!0:"twitter"===e.id&&"2.0"===e.version&&(y=!0);if(f){let e=(null==(p=g.session)?void 0:p.strategy)==="database",t=!g.providers.some(e=>
37"credentials"!==e.type);if(e&&t)return new i.UnsupportedStrategy("Signin in with credentials only supported if JWT strategy is enabled");if(g.providers.some(e=>"credentials"===e.type&&!e.authorize))return new i.MissingAuthorize("Must define an authorize() handler to use credentials authentication provider")}if(h){let{adapter:e}=g;if(!e)return new i.MissingAdapter("E-mail login requires an adapter.");let t=["createVerificationToken","useVerificationToken","getUserByEmail"].filter(t=>!e[t]);if(t.length)return new i.MissingAdapterMethods(`Required adapter methods were missing: ${t.join(", ")}`)}return s||(y&&_.push("TWITTER_OAUTH_2_BETA"),s=!0),_};var i=e.r(641731),o=n(e.r(498520)),a=e.r(401776);let s=!1;function c(e,t){try{return/^https?:/.test(new URL(e,e.startsWith("/")?t:void 0).protocol)}catch(e){return!1}}},319001,(e,t,r)=>{"use strict";var n=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.AuthHandler=g;var i=f(e.r(36357)),o=e.r(508222),a=f(e.r(588962)),s=n(e.r(739447)),c=e.r(196240),u=e.r(896380),l=e.r(401776),d=e.r(462819);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}async function h(e){try{return await e.json()}catch(e){}}async function y(e){var t,r,n,i;if(e instanceof Request){let t=new URL(e.url),a=t.pathname.split("/").slice(3),s=Object.fromEntries(e.headers),c=Object.fromEntries(t.searchParams);return c.nextauth=a,{action:a[0],method:e.method,headers:s,body:await h(e),cookies:(0,d.parse)(null!=(r=e.headers.get("cookie"))?r:""),providerId:a[1],error:null!=(n=t.searchParams.get("error"))?n:a[1],origin:(0,o.detectOrigin)(null!=(i=s["x-forwarded-host"])?i:s.host,s["x-forwarded-proto"]),query:c}}let{headers:a}=e,s=null!=(t=null==a?void 0:a["x-forwarded-host"])?t:null==a?void 0:a.host;return e.origin=(0,o.detectOrigin)(s,null==a?void 0:a["x-forwarded-proto"]),e}async function g(e){var t,r,n,o,d,p,f;let{options:h,req:g}=e,m=await y(g);(0,i.setLogger)(h.logger,h.debug);let _=(0,u.assertConfig)({options:h,req:m});if(Array.isArray(_))_.forEach(i.default.warn);else if(_ instanceof Error){if(i.default.error(_.code,_),!["signin","signout","error","verify-request"].includes(m.action)||"GET"!==m.method)return{status:500,headers:[{key:"Content-Type",value:"application/json"}],body:{message:"There is a problem with the server configuration. Check the server logs for more information."}};let{pages:e,theme:t}=h,r=(null==e?void 0:e.error)&&(null==(d=m.query)||null==(d=d.callbackUrl)?void 0:d.startsWith(e.error));return!(null!=e&&e.error)||r?(r&&i.default.error("AUTH_ON_ERROR_PAGE_ERROR",Error(`The error page ${null==e?void 0:e.error} should not require authentication`)),(0,s.default)({theme:t}).error({error:"configuration"})):{redirect:`${e.error}?error=Configuration`}}let{action:b,providerId:v,error:w,method:E="GET"}=m,{options:S,cookies:k}=await (0,c.init)({authOptions:h,action:b,providerId:v,origin:m.origin,callbackUrl:null!=(t=null==(r=m.body)?void 0:r.callbackUrl)?t:null==(n=m.query)?void 0:n.callbackUrl,csrfToken:null==(o=m.body)?void 0:o.csrfToken,cookies:m.cookies,isPost:"POST"===E}),A=new l.SessionStore(S.cookies.sessionToken,m,S.logger);if("GET"===E){let e=(0,s.default)({...S,query:m.query,cookies:k}),{pages:t}=S;switch(b){case"providers":return await a.providers(S.providers);case"session":{let e=await a.session({options:S,sessionStore:A});return e.cookies&&k.push(...e.cookies),{...e,cookies:k}}case"csrf":return{headers:[{key:"Content-Type",value:"application/json"},{key:"Cache-Control",value:"private, no-cache, no-store"},{key:"Pragma",value:"no-cache"},{key:"Expires",value:"0"}],body:{csrfToken:S.csrfToken},cookies:k};case"signin":if(t.signIn){let e=`${t.signIn}${t.signIn.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(S.callbackUrl)}`;return w&&(e=`${e}&error=${encodeURIComponent(w)}`),{redirect:e,cookies:k}}return e.signin();case"signout":if(t.signOut)return{redirect:t.signOut,cookies:k};return e.signout();case"callback":if(S.provider){let e=await a.callback({body:m.body,query:m.query,headers:m.headers,cookies:m.cookies,method:E,options:S,sessionStore:A});return e.cookies&&k.push(...e.cookies),{...e,cookies:k}}break;case"verify-request":if(t.verifyRequest)return{redirect:t.verifyRequest,cookies:k};return e.verifyRequest();case"error":if(["Signin","OAuthSignin","OAuthCallback","OAuthCreateAccount","EmailCreateAccount","Callback","OAuthAccountNotLinked","EmailSignin","CredentialsSignin","SessionRequired"].includes(w))return{redirect:`${S.url}/signin?error=${w}`,cookies:k};if(t.error)return{redirect:`${t.error}${t.error.includes("?")?"&":"?"}error=${w}`,cookies:k};return e.error({error:w})}}else if("POST"===E)switch(b){case"signin":if(S.csrfTokenVerified&&S.provider){let e=await a.signin({query:m.query,body:m.body,options:S});return e.cookies&&k.push(...e.cookies),{...e,cookies:k}}return{redirect:`${S.url}/signin?csrf=true`,cookies:k};case"signout":if(S.csrfTokenVerified){let e=await a.signout({options:S,sessionStore:A});return e.cookies&&k.push(...e.cookies),{...e,cookies:k}}return{redirect:`${S.url}/signout?csrf=true`,cookies:k};case"callback":if(S.provider){if("credentials"===S.provider.type&&!S.csrfTokenVerified)return{redirect:`${S.url}/signin?csrf=true`,cookies:k};let e=await a.callback({body:m.body,query:m.query,headers:m.headers,cookies:m.cookies,method:E,options:S,sessionStore:A});return e.cookies&&k.push(...e.cookies),{...e,cookies:k}}break;case"_log":if(h.logger)try{let{code:e,level:t,...r}=null!=(p=m.body)?p:{};i.default[t](e,r)}catch(e){i.default.error("LOGGER_ERROR",e)}return{};case"session":if(S.csrfTokenVerified){let e=await a.session({options:S,sessionStore:A,newSession:null==(f=m.body)?void 0:f.data,isUpdate:!0});return e.cookies&&k.push(...e.cookies),{...e,cookies:k}}return{status:400,body:{},cookies:k}}return{status:400,body:`Error: This action with HTTP ${E} is not supported by NextAuth.js`}}},456095,(e,t,r)=>{"use strict";
37Object.defineProperty(r,"__esModule",{value:!0}),r.getBody=i,r.setCookie=function(e,t){var r;let i=null!=(r=e.getHeader("Set-Cookie"))?r:[];Array.isArray(i)||(i=[i]);let{name:o,value:a,options:s}=t,c=(0,n.serialize)(o,a,s);i.push(c),e.setHeader("Set-Cookie",i)},r.toResponse=function(e){var t,r,i;let o=new Headers(null==(t=e.headers)?void 0:t.reduce((e,{key:t,value:r})=>(e[t]=r,e),{}));null==(r=e.cookies)||r.forEach(e=>{let{name:t,value:r,options:i}=e,a=(0,n.serialize)(t,r,i);o.has("Set-Cookie")?o.append("Set-Cookie",a):o.set("Set-Cookie",a)});let a=e.body;"application/json"===o.get("content-type")?a=JSON.stringify(e.body):"application/x-www-form-urlencoded"===o.get("content-type")&&(a=new URLSearchParams(e.body).toString());let s=new Response(a,{headers:o,status:e.redirect?302:null!=(i=e.status)?i:200});return e.redirect&&s.headers.set("Location",e.redirect),s};var n=e.r(462819);async function i(e){if(!("body"in e)||!e.body||"POST"!==e.method)return;let t=e.headers.get("content-type");return null!=t&&t.includes("application/json")?await e.json():null!=t&&t.includes("application/x-www-form-urlencoded")?Object.fromEntries(new URLSearchParams(await e.text())):void 0}},232124,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"cookies",{enumerable:!0,get:function(){return f}});let n=e.r(397270),i=e.r(196883),o=e.r(563599),a=e.r(662141),s=e.r(67673),c=e.r(643248),u=e.r(963138),l=e.r(876361),d=e.r(850999),p=e.r(312718);function f(){let e="cookies",t=o.workAsyncStorage.getStore(),r=a.workUnitAsyncStorage.getStore();if(t){if(r&&"after"===r.phase&&!(0,d.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${t.route} used \`cookies()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`cookies()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E843",enumerable:!1,configurable:!0});if(t.forceStatic)return y(n.RequestCookiesAdapter.seal(new i.RequestCookies(new Headers({}))));if(t.dynamicShouldError)throw Object.defineProperty(new c.StaticGenBailoutError(`Route ${t.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E849",enumerable:!1,configurable:!0});if(r)switch(r.type){case"cache":let o=Object.defineProperty(Error(`Route ${t.route} used \`cookies()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(o,f),t.invalidDynamicUsageError??=o,o;case"unstable-cache":throw Object.defineProperty(Error(`Route ${t.route} used \`cookies()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${t.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var l=t,g=r;let m=h.get(g);if(m)return m;let _=(0,u.makeHangingPromise)(g.renderSignal,l.route,"`cookies()`");return h.set(g,_),_;case"prerender-client":case"validation-client":let b="`cookies`";throw Object.defineProperty(new p.InvariantError(`${b} must not be used within a Client Component. Next.js should be preventing ${b} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,
37configurable:!0});case"prerender-ppr":return(0,s.postponeWithTracking)(t.route,e,r.dynamicTracking);case"prerender-legacy":return(0,s.throwToInterruptStaticGeneration)(e,t,r);case"prerender-runtime":return(0,u.delayUntilRuntimeStage)(r,y(r.cookies));case"private-cache":return y(r.cookies);case"request":let v;if((0,s.trackDynamicDataInDynamicRender)(r),v=(0,n.areCookiesMutableInCurrentPhase)(r)?r.userspaceMutableCookies:r.cookies,!r.asyncApiPromises)return y(v);{let e=(0,a.isInEarlyRenderStage)(r);if(v===r.mutableCookies)return e?r.asyncApiPromises.earlyMutableCookies:r.asyncApiPromises.mutableCookies;return e?r.asyncApiPromises.earlyCookies:r.asyncApiPromises.cookies}}}(0,a.throwForMissingRequestStore)(e)}e.r(142852);let h=new WeakMap;function y(e){let t=h.get(e);if(t)return t;let r=Promise.resolve(e);return h.set(e,r),r}(0,l.createDedupedByCallsiteServerErrorLoggerDev)(function(e,t){let r=e?`Route "${e}" `:"This route ";return Object.defineProperty(Error(`${r}used ${t}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},835407,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"headers",{enumerable:!0,get:function(){return p}});let n=e.r(687720),i=e.r(563599),o=e.r(662141),a=e.r(67673),s=e.r(643248),c=e.r(963138),u=e.r(876361),l=e.r(850999),d=e.r(312718);function p(){let e="headers",t=i.workAsyncStorage.getStore(),r=o.workUnitAsyncStorage.getStore();if(t){if(r&&"after"===r.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${t.route} used \`headers()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`headers()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E839",enumerable:!1,configurable:!0});if(t.forceStatic)return h(n.HeadersAdapter.seal(new Headers({})));if(r)switch(r.type){case"cache":{let e=Object.defineProperty(Error(`Route ${t.route} used \`headers()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E833",enumerable:!1,configurable:!0});throw Error.captureStackTrace(e,p),t.invalidDynamicUsageError??=e,e}case"unstable-cache":throw Object.defineProperty(Error(`Route ${t.route} used \`headers()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E838",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${t.route} used \`headers()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1134",enumerable:!1,configurable:!0})}if(t.dynamicShouldError)throw Object.defineProperty(new s.StaticGenBailoutError(`Route ${t.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E828",enumerable:!1,configurable:!0});if(r)switch(r.type){case"prerender":var u=t,y=r;let i=f.get(y);if(i)return i;let g=(0,c.makeHangingPromise)(y.renderSignal,u.route,"`headers()`");return f.set(y,g),g;case"prerender-client":case"validation-client":let m="`headers`";throw Object.defineProperty(new d.InvariantError(`${m} must not be used within a client component. Next.js should be preventing ${m} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1017",enumerable:!1,
37configurable:!0});case"prerender-ppr":return(0,a.postponeWithTracking)(t.route,e,r.dynamicTracking);case"prerender-legacy":return(0,a.throwToInterruptStaticGeneration)(e,t,r);case"prerender-runtime":return(0,c.delayUntilRuntimeStage)(r,h(r.headers));case"private-cache":return h(r.headers);case"request":if((0,a.trackDynamicDataInDynamicRender)(r),r.asyncApiPromises)return(0,o.isInEarlyRenderStage)(r)?r.asyncApiPromises.earlyHeaders:r.asyncApiPromises.headers;return h(r.headers)}}(0,o.throwForMissingRequestStore)(e)}e.r(142852);let f=new WeakMap;function h(e){let t=f.get(e);if(t)return t;let r=Promise.resolve(e);return f.set(e,r),r}(0,u.createDedupedByCallsiteServerErrorLoggerDev)(function(e,t){let r=e?`Route "${e}" `:"This route ";return Object.defineProperty(Error(`${r}used ${t}. \`headers()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E836",enumerable:!1,configurable:!0})})},491516,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"draftMode",{enumerable:!0,get:function(){return d}});let n=e.r(662141),i=e.r(563599),o=e.r(67673),a=e.r(876361),s=e.r(643248),c=e.r(476353),u=e.r(312718),l=e.r(963138);function d(){let e="draftMode",t=i.workAsyncStorage.getStore(),r=n.workUnitAsyncStorage.getStore();switch((!t||!r)&&(0,n.throwForMissingRequestStore)(e),r.type){case"prerender-runtime":return(0,l.delayUntilRuntimeStage)(r,p(r.draftMode,t));case"request":return p(r.draftMode,t);case"cache":case"private-cache":case"unstable-cache":let o=(0,n.getDraftModeProviderForCacheScope)(t,r);if(o)return p(o,t);case"prerender":case"prerender-ppr":case"prerender-legacy":return p(null,t);case"prerender-client":case"validation-client":{let e="`draftMode`";throw Object.defineProperty(new u.InvariantError(`${e} must not be used within a Client Component. Next.js should be preventing ${e} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${t.route} used \`${e}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return r}}function p(e,t){let r=h.get(e??f);return r||Promise.resolve(new y(e))}e.r(242715);let f={},h=new WeakMap;class y{constructor(e){this._provider=e}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){g("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){g("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function g(e,t){let r=i.workAsyncStorage.getStore(),a=n.workUnitAsyncStorage.getStore();if(r){if((null==a?void 0:a.phase)==="after")throw Object.defineProperty(Error(`Route ${r.route} used "${e}" inside \`after()\`. The enabled status of \`draftMode()\` can be read inside \`after()\` but you cannot enable or disable \`draftMode()\`. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E845",enumerable:!1,configurable:!0});if(r.dynamicShouldError)throw Object.defineProperty(new s.StaticGenBailoutError(`Route ${r.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${e}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(a)switch(a.type){case"cache":case"private-cache":{let n=Object.defineProperty(Error(`Route ${r.route} used "${e}" inside "use cache". The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E829",enumerable:!1,
37configurable:!0});throw Error.captureStackTrace(n,t),r.invalidDynamicUsageError??=n,n}case"unstable-cache":throw Object.defineProperty(Error(`Route ${r.route} used "${e}" inside a function cached with \`unstable_cache()\`. The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let t=Object.defineProperty(Error(`Route ${r.route} used ${e} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});return(0,o.abortAndThrowOnSynchronousRequestDataAccess)(r.route,e,t,a)}case"prerender-client":case"validation-client":let n="`draftMode`";throw Object.defineProperty(new u.InvariantError(`${n} must not be used within a Client Component. Next.js should be preventing ${n} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,o.postponeWithTracking)(r.route,e,a.dynamicTracking);case"prerender-legacy":a.revalidate=0;let i=Object.defineProperty(new c.DynamicServerError(`Route ${r.route} couldn't be rendered statically because it used \`${e}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw r.dynamicUsageDescription=e,r.dynamicUsageStack=i.stack,i;case"request":(0,o.trackDynamicDataInDynamicRender)(a);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${r.route} used \`${e}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,a.createDedupedByCallsiteServerErrorLoggerDev)(function(e,t){let r=e?`Route "${e}" `:"This route ";return Object.defineProperty(Error(`${r}used ${t}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},630029,(e,t,r)=>{t.exports.cookies=e.r(232124).cookies,t.exports.headers=e.r(835407).headers,t.exports.draftMode=e.r(491516).draftMode},192111,(e,t,r)=>{"use strict";var n=e.i(247167);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.getServerSession=c,r.unstable_getServerSession=u;var i=e.r(319001),o=e.r(456095);async function a(e,t,r){var a,s,c,u,l,d,p,f;let{nextauth:h,...y}=e.query;null!=r.secret||(r.secret=null!=(a=null!=(s=null==(c=r.jwt)?void 0:c.secret)?s:n.default.env.NEXTAUTH_SECRET)?a:n.default.env.AUTH_SECRET);let g=await (0,i.AuthHandler)({req:{body:e.body,query:y,cookies:e.cookies,headers:e.headers,method:e.method,action:null==h?void 0:h[0],providerId:null==h?void 0:h[1],error:null!=(u=e.query.error)?u:null==h?void 0:h[1]},options:r});if(t.status(null!=(l=g.status)?l:200),null==(d=g.cookies)||d.forEach(e=>(0,o.setCookie)(t,e)),null==(p=g.headers)||p.forEach(e=>t.setHeader(e.key,e.value)),g.redirect){if((null==(f=e.body)?void 0:f.json)!=="true"){t.status(302).setHeader("Location",g.redirect),t.end();return}return t.json({url:g.redirect})}return t.send(g.body)}async function s(t,r,a){var s,c,u;null!=a.secret||(a.secret=null!=(s=n.default.env.NEXTAUTH_SECRET)?s:n.default.env.AUTH_SECRET);let{headers:l,cookies:d}=e.r(630029),p=null==(c=await r.params)?void 0:c.nextauth,f=Object.fromEntries(t.nextUrl.searchParams),h=await (0,o.getBody)(t),y=await (0,i.AuthHandler)({req:{body:h,query:f,cookies:Object.fromEntries((await d()).getAll().map(e=>[e.name,e.value])),headers:Object.fromEntries(await l()),method:t.method,action:null==p?void 0:p[0],providerId:null==p?void 0:p[1],error:null!=(u=f.error)?u:null==p?void 0:p[1]},options:a}),g=(0,o.toResponse)(y),m=g.headers.get("Location");return(null==h?void 0:h.json)==="true"&&m?(g.headers.delete("Location"),g.headers.set("Content-Type","application/json"),new Response(JSON.stringify({url:m}),{status:y.status,headers:g.headers})):g}async function c(...t){var r,a;let s,u,l,d=0===t.length||1===t.length;if(d){l=Object.assign({},t[0],{providers:[]});let{headers:r,cookies:n}=e.r(630029);s={headers:Object.fromEntries(await r()),cookies:Object.fromEntries((await n()).getAll().map(e=>[e.name,e.value]))},u={getHeader(){},setCookie(){},setHeader(){}}}else s=t[0],u=t[1],l=Object.assign({},t[2],{providers:[]});null!=(r=l).secret||(r.secret=null!=(a=n.default.env.NEXTAUTH_SECRET)?a:n.default.env.AUTH_SECRET);let{body:p,cookies:f,status:h=200}=await (0,i.AuthHandler)({options:l,req:{action:"session",method:"GET",cookies:s.
37cookies,headers:s.headers}});if(null==f||f.forEach(e=>(0,o.setCookie)(u,e)),p&&"string"!=typeof p&&Object.keys(p).length){if(200===h)return d&&delete p.expires,p;throw Error(p.message)}return null}async function u(...e){return await c(...e)}r.default=function(...e){var t;return 1===e.length?async(t,r)=>null!=r&&r.params?await s(t,r,e[0]):await a(t,r,e[0]):null!=(t=e[1])&&t.params?s(...e):a(...e)}},941004,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={};Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o.default}});var i=e.r(445959);Object.keys(i).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}})});var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a(void 0);if(t&&t.has(e))return t.get(e);var r={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&({}).hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}(e.r(192111));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}Object.keys(o).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(n,e)||e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}})})},542759,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return{id:"credentials",name:"Credentials",type:"credentials",credentials:{},authorize:()=>null,options:e}}},108790,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return{id:"google",name:"Google",type:"oauth",wellKnown:"https://accounts.google.com/.well-known/openid-configuration",authorization:{params:{scope:"openid email profile"}},idToken:!0,checks:["pkce","state"],profile:e=>({id:e.sub,name:e.name,email:e.email,image:e.picture}),style:{logo:"/google.svg",bg:"#fff",text:"#000"},options:e}}},38570,e=>{"use strict";e.s([])},169790,904783,e=>{"use strict";var t,r,n;(n=t||(t={})).assertEqual=e=>{},n.assertIs=function(e){},n.assertNever=function(e){throw Error()},n.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},n.getValidEnumValues=e=>{let t=n.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let n of t)r[n]=e[n];return n.objectValues(r)},n.objectValues=e=>n.objectKeys(e).map(function(t){return e[t]}),n.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},n.find=(e,t)=>{for(let r of e)if(t(r))return r},n.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,n.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},n.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(r||(r={})).mergeShapes=(e,t)=>({...e,...t});let i=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);e.s(["ZodParsedType",0,i,"getParsedType",0,e=>{switch(typeof e){case"undefined":return i.undefined;case"string":return i.string;case"number":return Number.isNaN(e)?i.nan:i.number;case"boolean":return i.boolean;case"function":return i.function;case"bigint":return i.bigint;case"symbol":return i.symbol;case"object":if(Array.isArray(e))return i.array;if(null===e)return i.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return i.promise;if("u">typeof Map&&e instanceof Map)return i.map;if("u">typeof Set&&e instanceof Set)return i.set;if("u">typeof Date&&e instanceof Date)return i.date;return i.object;default:return i.unknown}},"objectUtil",0,r,"util",0,t],904783);
37let o=t.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class a extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){let r=i.path[n];n===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof a))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,t.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let r=n.path[0];t[r]=t[r]||[],t[r].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}a.create=e=>new a(e),e.s(["ZodError",0,a,"ZodIssueCode",0,o,"quotelessJson",0,e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:")],169790)},50270,788685,e=>{"use strict";let t;e.i(38570);var r,n,i,o,a=e.i(169790),s=e.i(904783);let c=(e,t)=>{let r;switch(e.code){case a.ZodIssueCode.invalid_type:r=e.received===s.ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case a.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,s.util.jsonStringifyReplacer)}`;break;case a.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${s.util.joinValues(e.keys,", ")}`;break;case a.ZodIssueCode.invalid_union:r="Invalid input";break;case a.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${s.util.joinValues(e.options)}`;break;case a.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${s.util.joinValues(e.options)}, received '${e.received}'`;break;case a.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case a.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case a.ZodIssueCode.invalid_date:r="Invalid date";break;case a.ZodIssueCode.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:s.util.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case a.ZodIssueCode.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case a.ZodIssueCode.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case a.ZodIssueCode.custom:r="Invalid input";break;case a.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case a.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case a.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,s.util.assertNever(e)}return{message:r}},u=c;function l(e){u=e}function d(){return u}e.s(["getErrorMap",0,d,"setErrorMap",0,l],937904),e.i(937904),e.s(["defaultErrorMap",0,c,"getErrorMap",0,d,"setErrorMap",0,l],27729
370),e.i(277290);let p=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],a={...i,path:o};if(void 0!==i.message)return{...i,path:o,message:i.message};let s="";for(let e of n.filter(e=>!!e).slice().reverse())s=e(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},f=[];function h(e,t){let r=d(),n=p({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===c?void 0:c].filter(e=>!!e)});e.common.issues.push(n)}class y{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return g;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return y.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return g;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let g=Object.freeze({status:"aborted"}),m=e=>({status:"dirty",value:e}),_=e=>({status:"valid",value:e}),b=e=>"aborted"===e.status,v=e=>"dirty"===e.status,w=e=>"valid"===e.status,E=e=>"u">typeof Promise&&e instanceof Promise;e.s(["DIRTY",0,m,"EMPTY_PATH",0,f,"INVALID",0,g,"OK",0,_,"ParseStatus",0,y,"addIssueToContext",0,h,"isAborted",0,b,"isAsync",0,E,"isDirty",0,v,"isValid",0,w,"makeIssue",0,p],665354),e.i(665354),e.s([],527404),e.i(527404),(r=i||(i={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},r.toString=e=>"string"==typeof e?e:e?.message;class S{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let k=(e,t)=>{if(w(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new a.ZodError(e.common.issues);return this._error=t,this._error}}};function A(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:o}=e;return"invalid_enum_value"===t.code?{message:o??i.defaultError}:void 0===i.data?{message:o??n??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:o??r??i.defaultError}},description:i}}class x{get description(){return this._def.description}_getType(e){return(0,s.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,s.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new y,ctx:{common:e.parent.common,data:e.data,parsedType:(0,s.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(E(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,s.getParsedType)(e)},n=this._parseSync({data:e,path:r.path,parent:r});return k(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,s.getParsedType)(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return w(r)?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>w(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,s.getParsedType)(e)},n=this._parse({data:e,path:r.path,parent:r});return k(r,await (E(n)?n:Promise.resolve(n)))}refine(e,t){return this._refinement((r,n)=>{let i=e(r),o=()=>n.addIssue({code:a.ZodIssueCode.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"u">typeof Promise&&i instanceof Promise?i.then(e=>!!e||(o(),!1)):!!i||(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new ev({schema:this,typeName:o.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return ew.create(this,this._def)}nullable(){return eE.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return en.create(this)}promise(){return eb.create(this,this._def)}or(e){return eo.create([this,e],this._def)}and(e){return ec.create(this,e,this._def)}transform(e){return new ev({...A(this._def),schema:this,typeName:o.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eS({...A(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:o.ZodDefault})}brand(){return new eT({typeName:o.ZodBranded,type:this,...A(this._def)})}catch(e){return new ek({...A(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:o.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eO.create(this,e)}readonly(){return eR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let T=/^c[^\s-]{8,}
37$/i,O=/^[0-9a-z]+$/,R=/^[0-9A-HJKMNP-TV-Z]{26}$/i,P=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,C=/^[a-z0-9_-]{21}$/i,j=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,I=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,U=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,z=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,N=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,D=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,M=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,H=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,W=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",L=RegExp(`^${$}$`);function K(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function B(e){let t=`${$}T${K(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)}class Z extends x{_parse(e){var r,n,i,o;let c;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==s.ZodParsedType.string){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.string,received:t.parsedType}),g}let u=new y;for(let l of this._def.checks)if("min"===l.kind)e.data.length<l.value&&(h(c=this._getOrReturnCtx(e,c),{code:a.ZodIssueCode.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),u.dirty());else if("max"===l.kind)e.data.length>l.value&&(h(c=this._getOrReturnCtx(e,c),{code:a.ZodIssueCode.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),u.dirty());else if("length"===l.kind){let t=e.data.length>l.value,r=e.data.length<l.value;(t||r)&&(c=this._getOrReturnCtx(e,c),t?h(c,{code:a.ZodIssueCode.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):r&&h(c,{code:a.ZodIssueCode.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),u.dirty())}else if("email"===l.kind)U.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"email",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty());else if("emoji"===l.kind)t||(t=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),t.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"emoji",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty());else if("uuid"===l.kind)P.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"uuid",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty());else if("nanoid"===l.kind)C.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"nanoid",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty());else if("cuid"===l.kind)T.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"cuid",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty());else if("cuid2"===l.kind)O.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"cuid2",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty());else if("ulid"===l.kind)R.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"ulid",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty());else if("url"===l.kind)try{new URL(e.data)}catch{h(c=this._getOrReturnCtx(e,c),{validation:"url",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty()}else"regex"===l.kind?(l.regex.lastIndex=0,l.regex.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"regex",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty())):"trim"===l.kind?e.data=e.data.trim():"includes"===l.kind?e.data.includes(l.value,l.position)||(h(c=this._getOrReturnCtx(e,c),{
37code:a.ZodIssueCode.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),u.dirty()):"toLowerCase"===l.kind?e.data=e.data.toLowerCase():"toUpperCase"===l.kind?e.data=e.data.toUpperCase():"startsWith"===l.kind?e.data.startsWith(l.value)||(h(c=this._getOrReturnCtx(e,c),{code:a.ZodIssueCode.invalid_string,validation:{startsWith:l.value},message:l.message}),u.dirty()):"endsWith"===l.kind?e.data.endsWith(l.value)||(h(c=this._getOrReturnCtx(e,c),{code:a.ZodIssueCode.invalid_string,validation:{endsWith:l.value},message:l.message}),u.dirty()):"datetime"===l.kind?B(l).test(e.data)||(h(c=this._getOrReturnCtx(e,c),{code:a.ZodIssueCode.invalid_string,validation:"datetime",message:l.message}),u.dirty()):"date"===l.kind?L.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{code:a.ZodIssueCode.invalid_string,validation:"date",message:l.message}),u.dirty()):"time"===l.kind?RegExp(`^${K(l)}$`).test(e.data)||(h(c=this._getOrReturnCtx(e,c),{code:a.ZodIssueCode.invalid_string,validation:"time",message:l.message}),u.dirty()):"duration"===l.kind?I.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"duration",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty()):"ip"===l.kind?(r=e.data,!(("v4"===(n=l.version)||!n)&&z.test(r)||("v6"===n||!n)&&D.test(r))&&1&&(h(c=this._getOrReturnCtx(e,c),{validation:"ip",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty())):"jwt"===l.kind?!function(e,t){if(!j.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(e.data,l.alg)&&(h(c=this._getOrReturnCtx(e,c),{validation:"jwt",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty()):"cidr"===l.kind?(i=e.data,!(("v4"===(o=l.version)||!o)&&N.test(i)||("v6"===o||!o)&&M.test(i))&&1&&
vendor: 9,323 bytes, line 37
37(h(c=this._getOrReturnCtx(e,c),{validation:"cidr",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty())):"base64"===l.kind?H.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"base64",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty()):"base64url"===l.kind?W.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"base64url",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty()):s.util.assertNever(l);return{status:u.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:a.ZodIssueCode.invalid_string,...i.errToObj(r)})}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...i.errToObj(e)})}url(e){return this._addCheck({kind:"url",...i.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...i.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...i.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...i.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...i.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...i.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...i.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...i.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...i.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...i.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...i.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...i.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...i.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...i.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...i.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...i.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...i.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...i.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...i.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...i.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...i.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...i.errToObj(t)})}nonempty(e){return this.min(1,i.errToObj(e))}trim(){return new Z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Z.create=e=>new Z({checks:[],typeName:o.ZodString,coerce:e?.coerce??!1,...A(e)});class q extends x{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==s.ZodParsedType.number){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.number,received:t.parsedType}),g}let r=new y;for(let n of this._def.checks)"int"===n.kind?s.util.isInteger(e.data)||(h(t=this._getOrReturnCtx(e,t),{code:a.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.ZodIssueCode.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.ZodIssueCode.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.ZodIssueCode.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(h(t=this._getOrReturnCtx(e,t),{code:a.ZodIssueCode.not_finite,message:n.message}),r.dirty()):s.util.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,i.toString(t))}gt(e,t){return this.setLimit("min",e,!1,i.toString(t))}lte(e,t){return this.setLimit("max",e,!0,i.toString(t))}lt(e,t){return this.setLimit("max",e,!1,i.toString(t))}setLimit(e,t,r,n){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:i.toString(n)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:i.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:i.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:i.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:i.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:i.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:i.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:i.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:i.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:i.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&s.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}q.create=e=>new q({checks:[],typeName:o.ZodNumber,coerce:e?.coerce||!1,...A(e)});class F extends x{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==s.ZodParsedType.bigint)return this._getInvalidInput(e);let r=new y;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.ZodIssueCode.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.ZodIssueCode.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(h(t=this._getOrReturnCtx(e,t),{code:a.ZodIssueCode.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):s.util.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.bigint,received:t.parsedType}),g}gte(e,t){return this.setLimit("min",e,!0,i.toString(t))}gt(e,t){return this.setLimit("min",e,!1,i.toString(t))}lte(e,t){return this.setLimit("max",e,!0,i.toString(t))}lt(e,t){return this.setLimit("max",e,!1,i.toString(t))}setLimit(e,t,r,n){return new F({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:i.toString(n)}]})}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}
37positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:i.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:i.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:i.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:i.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:i.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}F.create=e=>new F({checks:[],typeName:o.ZodBigInt,coerce:e?.coerce??!1,...A(e)});class J extends x{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==s.ZodParsedType.boolean){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.boolean,received:t.parsedType}),g}return _(e.data)}}J.create=e=>new J({typeName:o.ZodBoolean,coerce:e?.coerce||!1,...A(e)});class G extends x{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==s.ZodParsedType.date){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.date,received:t.parsedType}),g}if(Number.isNaN(e.data.getTime()))return h(this._getOrReturnCtx(e),{code:a.ZodIssueCode.invalid_date}),g;let r=new y;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(h(t=this._getOrReturnCtx(e,t),{code:a.ZodIssueCode.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(h(t=this._getOrReturnCtx(e,t),{code:a.ZodIssueCode.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):s.util.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new G({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:i.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:i.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}G.create=e=>new G({checks:[],coerce:e?.coerce||!1,typeName:o.ZodDate,...A(e)});class V extends x{_parse(e){if(this._getType(e)!==s.ZodParsedType.symbol){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.symbol,received:t.parsedType}),g}return _(e.data)}}V.create=e=>new V({typeName:o.ZodSymbol,...A(e)});class Y extends x{_parse(e){if(this._getType(e)!==s.ZodParsedType.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.undefined,received:t.parsedType}),g}return _(e.data)}}Y.create=e=>new Y({typeName:o.ZodUndefined,...A(e)});class X extends x{_parse(e){if(this._getType(e)!==s.ZodParsedType.null){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.null,received:t.parsedType}),g}return _(e.data)}}X.create=e=>new X({typeName:o.ZodNull,...A(e)});class Q extends x{constructor(){super(...arguments),this._any=!0}_parse(e){return _(e.data)}}Q.create=e=>new Q({typeName:o.ZodAny,...A(e)});class ee extends x{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _(e.data)}}ee.create=e=>new ee({typeName:o.ZodUnknown,...A(e)});class et extends x{_parse(e){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.never,received:t.parsedType}),g}}et.create=e=>new et({typeName:o.ZodNever,...A(e)});class er extends x{_parse(e){if(this._getType(e)!==s.ZodParsedType.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.void,received:t.parsedType}),g}return _(e.data)}}er.create=e=>new er({typeName:o.ZodVoid,...A(e)});class en extends x{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==s.ZodParsedType.array)return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.array,received:t.parsedType}),g;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(h(t,{code:e?a.ZodIssueCode.too_big:a.ZodIssueCode.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(h(t,{code:a.ZodIssueCode.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(h(t,{code:a.ZodIssueCode.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new S(t,e,t.path,r)))).then(e=>y.mergeArray(r,e));let i=[...t.data].map((e,r)=>n.type._parseSync(new S(t,e,t.path,r)));return y.mergeArray(r,i)}
vendor: 5,228 bytes, line 37
37get element(){return this._def.type}min(e,t){return new en({...this._def,minLength:{value:e,message:i.toString(t)}})}max(e,t){return new en({...this._def,maxLength:{value:e,message:i.toString(t)}})}length(e,t){return new en({...this._def,exactLength:{value:e,message:i.toString(t)}})}nonempty(e){return this.min(1,e)}}en.create=(e,t)=>new en({type:e,minLength:null,maxLength:null,exactLength:null,typeName:o.ZodArray,...A(t)});class ei extends x{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=s.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==s.ZodParsedType.object){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.object,received:t.parsedType}),g}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof et&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||o.push(e);let c=[];for(let e of i){let t=n[e],i=r.data[e];c.push({key:{status:"valid",value:e},value:t._parse(new S(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof et){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of o)c.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)o.length>0&&(h(r,{code:a.ZodIssueCode.unrecognized_keys,keys:o}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of o){let n=r.data[t];c.push({key:{status:"valid",value:t},value:e._parse(new S(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of c){let r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>y.mergeObjectSync(t,e)):y.mergeObjectSync(t,c)}get shape(){return this._def.shape()}strict(e){return i.errToObj,new ei({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:i.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new ei({...this._def,unknownKeys:"strip"})}passthrough(){return new ei({...this._def,unknownKeys:"passthrough"})}extend(e){return new ei({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ei({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:o.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ei({...this._def,catchall:e})}pick(e){let t={};for(let r of s.util.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new ei({...this._def,shape:()=>t})}omit(e){let t={};for(let r of s.util.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new ei({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ei){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=ew.create(e(i))}return new ei({...t._def,shape:()=>r})}if(t instanceof en)return new en({...t._def,type:e(t.element)});if(t instanceof ew)return ew.create(e(t.unwrap()));if(t instanceof eE)return eE.create(e(t.unwrap()));if(t instanceof eu)return eu.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of s.util.objectKeys(this.shape)){let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new ei({...this._def,shape:()=>t})}required(e){let t={};for(let r of s.util.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof ew;)e=e._def.innerType;t[r]=e}return new ei({...this._def,shape:()=>t})}keyof(){return eg(s.util.objectKeys(this.shape))}}ei.create=(e,t)=>new ei({shape:()=>e,unknownKeys:"strip",catchall:et.create(),typeName:o.ZodObject,...A(t)}),ei.strictCreate=(e,t)=>new ei({shape:()=>e,unknownKeys:"strict",catchall:et.create(),typeName:o.ZodObject,...A(t)}),ei.lazycreate=(e,t)=>new ei({shape:e,unknownKeys:"strip",catchall:et.create(),typeName:o.ZodObject,...A(t)});class eo extends x{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new a.ZodError(e.ctx.common.issues));return h(t,{code:a.ZodIssueCode.invalid_union,unionErrors:r}),g});{let e,n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new a.ZodError(e));return h(t,{code:a.ZodIssueCode.invalid_union,unionErrors:i}),g}}get options(){return this._def.options}}eo.create=(e,t)=>
37new eo({options:e,typeName:o.ZodUnion,...A(t)});let ea=e=>{if(e instanceof eh)return ea(e.schema);if(e instanceof ev)return ea(e.innerType());if(e instanceof ey)return[e.value];if(e instanceof em)return e.options;if(e instanceof e_)return s.util.objectValues(e.enum);else if(e instanceof eS)return ea(e._def.innerType);else if(e instanceof Y)return[void 0];else if(e instanceof X)return[null];else if(e instanceof ew)return[void 0,...ea(e.unwrap())];else if(e instanceof eE)return[null,...ea(e.unwrap())];else if(e instanceof eT)return ea(e.unwrap());else if(e instanceof eR)return ea(e.unwrap());else if(e instanceof ek)return ea(e._def.innerType);else return[]};class es extends x{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.ZodParsedType.object)return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.object,received:t.parsedType}),g;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:a.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),g)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let r of t){let t=ea(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(n.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new es({typeName:o.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...A(r)})}}class ec extends x{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(b(e)||b(n))return g;let i=function e(t,r){let n=(0,s.getParsedType)(t),i=(0,s.getParsedType)(r);if(t===r)return{valid:!0,data:t};if(n===s.ZodParsedType.object&&i===s.ZodParsedType.object){let n=s.util.objectKeys(r),i=s.util.objectKeys(t).filter(e=>-1!==n.indexOf(e)),o={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};o[n]=i.data}return{valid:!0,data:o}}if(n===s.ZodParsedType.array&&i===s.ZodParsedType.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let o=e(t[i],r[i]);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}if(n===s.ZodParsedType.date&&i===s.ZodParsedType.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,n.value);return i.valid?((v(e)||v(n))&&t.dirty(),{status:t.value,value:i.data}):(h(r,{code:a.ZodIssueCode.invalid_intersection_types}),g)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ec.create=(e,t,r)=>new ec({left:e,right:t,typeName:o.ZodIntersection,...A(r)});class eu extends x{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==s.ZodParsedType.array)return h(r,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.array,received:r.parsedType}),g;if(r.data.length<this._def.items.length)return h(r,{code:a.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;!this._def.rest&&r.data.length>this._def.items.length&&(h(r,{code:a.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new S(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>y.mergeArray(t,e)):y.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new eu({...this._def,rest:e})}}eu.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eu({items:e,typeName:o.ZodTuple,rest:null,...A(t)})};class el extends x{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==s.ZodParsedType.object)return h(r,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.object,received:r.parsedType}),g;let n=[],i=this._def.keyType,o=this._def.valueType;for(let e in r.data)n.push({key:i._parse(new S(r,e,r.path,e)),value:o._parse(new S(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?y.mergeObjectAsync(t,n):y.mergeObjectSync(t,n)}
37get element(){return this._def.valueType}static create(e,t,r){return new el(t instanceof x?{keyType:e,valueType:t,typeName:o.ZodRecord,...A(r)}:{keyType:Z.create(),valueType:e,typeName:o.ZodRecord,...A(t)})}}class ed extends x{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==s.ZodParsedType.map)return h(r,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.map,received:r.parsedType}),g;let n=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([e,t],o)=>({key:n._parse(new S(r,e,r.path,[o,"key"])),value:i._parse(new S(r,t,r.path,[o,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of o){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return g;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of o){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return g;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}ed.create=(e,t,r)=>new ed({valueType:t,keyType:e,typeName:o.ZodMap,...A(r)});class ep extends x{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==s.ZodParsedType.set)return h(r,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.set,received:r.parsedType}),g;let n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(h(r,{code:a.ZodIssueCode.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(h(r,{code:a.ZodIssueCode.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let i=this._def.valueType;function o(e){let r=new Set;for(let n of e){if("aborted"===n.status)return g;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let c=[...r.data.values()].map((e,t)=>i._parse(new S(r,e,r.path,t)));return r.common.async?Promise.all(c).then(e=>o(e)):o(c)}min(e,t){return new ep({...this._def,minSize:{value:e,message:i.toString(t)}})}max(e,t){return new ep({...this._def,maxSize:{value:e,message:i.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ep.create=(e,t)=>new ep({valueType:e,minSize:null,maxSize:null,typeName:o.ZodSet,...A(t)});class ef extends x{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.ZodParsedType.function)return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.function,received:t.parsedType}),g;function r(e,r){return p({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,d(),c].filter(e=>!!e),issueData:{code:a.ZodIssueCode.invalid_arguments,argumentsError:r}})}function n(e,r){return p({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,d(),c].filter(e=>!!e),issueData:{code:a.ZodIssueCode.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof eb){let e=this;return _(async function(...t){let s=new a.ZodError([]),c=await e._def.args.parseAsync(t,i).catch(e=>{throw s.addIssue(r(t,e)),s}),u=await Reflect.apply(o,this,c);return await e._def.returns._def.type.parseAsync(u,i).catch(e=>{throw s.addIssue(n(u,e)),s})})}{let e=this;return _(function(...t){let s=e._def.args.safeParse(t,i);if(!s.success)throw new a.ZodError([r(t,s.error)]);let c=Reflect.apply(o,this,s.data),u=e._def.returns.safeParse(c,i);if(!u.success)throw new a.ZodError([n(c,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ef({...this._def,args:eu.create(e).rest(ee.create())})}returns(e){return new ef({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new ef({args:e||eu.create([]).rest(ee.create()),returns:t||ee.create(),typeName:o.ZodFunction,...A(r)})}}class eh extends x{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eh.create=(e,t)=>
37new eh({getter:e,typeName:o.ZodLazy,...A(t)});class ey extends x{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:a.ZodIssueCode.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eg(e,t){return new em({values:e,typeName:o.ZodEnum,...A(t)})}ey.create=(e,t)=>new ey({value:e,typeName:o.ZodLiteral,...A(t)});class em extends x{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return h(t,{expected:s.util.joinValues(r),received:t.parsedType,code:a.ZodIssueCode.invalid_type}),g}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return h(t,{received:t.data,code:a.ZodIssueCode.invalid_enum_value,options:r}),g}return _(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return em.create(e,{...this._def,...t})}exclude(e,t=this._def){return em.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}em.create=eg;class e_ extends x{_parse(e){let t=s.util.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==s.ZodParsedType.string&&r.parsedType!==s.ZodParsedType.number){let e=s.util.objectValues(t);return h(r,{expected:s.util.joinValues(e),received:r.parsedType,code:a.ZodIssueCode.invalid_type}),g}if(this._cache||(this._cache=new Set(s.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=s.util.objectValues(t);return h(r,{received:r.data,code:a.ZodIssueCode.invalid_enum_value,options:e}),g}return _(e.data)}get enum(){return this._def.values}}e_.create=(e,t)=>new e_({values:e,typeName:o.ZodNativeEnum,...A(t)});class eb extends x{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==s.ZodParsedType.promise&&!1===t.common.async?(h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.promise,received:t.parsedType}),g):_((t.parsedType===s.ZodParsedType.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eb.create=(e,t)=>new eb({type:e,typeName:o.ZodPromise,...A(t)});class ev extends x{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===o.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{h(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let e=n.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return g;let n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?g:"dirty"===n.status||"dirty"===t.value?m(n.value):n});{if("aborted"===t.value)return g;let n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?g:"dirty"===n.status||"dirty"===t.value?m(n.value):n}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?g:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?g:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>w(e)?Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})):g);else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!w(e))return g;let o=n.transform(e.value,i);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}s.util.assertNever(n)}}ev.create=(e,t,r)=>new ev({schema:e,typeName:o.ZodEffects,effect:t,...A(r)}),ev.createWithPreprocess=(e,t,r)=>new ev({schema:t,effect:{type:"preprocess",transform:e},typeName:o.ZodEffects,...A(r)});class ew extends x{_parse(e){return this._getType(e)===s.ZodParsedType.undefined?_(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ew.create=(e,t)=>
37new ew({innerType:e,typeName:o.ZodOptional,...A(t)});class eE extends x{_parse(e){return this._getType(e)===s.ZodParsedType.null?_(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eE.create=(e,t)=>new eE({innerType:e,typeName:o.ZodNullable,...A(t)});class eS extends x{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===s.ZodParsedType.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eS.create=(e,t)=>new eS({innerType:e,typeName:o.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...A(t)});class ek extends x{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return E(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new a.ZodError(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new a.ZodError(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ek.create=(e,t)=>new ek({innerType:e,typeName:o.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...A(t)});class eA extends x{_parse(e){if(this._getType(e)!==s.ZodParsedType.nan){let t=this._getOrReturnCtx(e);return h(t,{code:a.ZodIssueCode.invalid_type,expected:s.ZodParsedType.nan,received:t.parsedType}),g}return{status:"valid",value:e.data}}}eA.create=e=>new eA({typeName:o.ZodNaN,...A(e)});let ex=Symbol("zod_brand");class eT extends x{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eO extends x{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?g:"dirty"===e.status?(t.dirty(),m(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?g:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eO({in:e,out:t,typeName:o.ZodPipeline})}}class eR extends x{_parse(e){let t=this._def.innerType._parse(e),r=e=>(w(e)&&(e.value=Object.freeze(e.value)),e);return E(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function eP(e,t){let r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function eC(e,t={},r){return e?Q.create().superRefine((n,i)=>{let o=e(n);if(o instanceof Promise)return o.then(e=>{if(!e){let e=eP(t,n),o=e.fatal??r??!0;i.addIssue({code:"custom",...e,fatal:o})}});if(!o){let e=eP(t,n),o=e.fatal??r??!0;i.addIssue({code:"custom",...e,fatal:o})}}):Q.create()}eR.create=(e,t)=>new eR({innerType:e,typeName:o.ZodReadonly,...A(t)});let ej={object:ei.lazycreate};(n=o||(o={})).ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",
37n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly";let eI=(e,t={message:`Input not instance of ${e.name}`})=>eC(t=>t instanceof e,t),eU=Z.create,ez=q.create,eN=eA.create,eD=F.create,eM=J.create,eH=G.create,eW=V.create,e$=Y.create,eL=X.create,eK=Q.create,eB=ee.create,eZ=et.create,eq=er.create,eF=en.create,eJ=ei.create,eG=ei.strictCreate,eV=eo.create,eY=es.create,eX=ec.create,eQ=eu.create,e0=el.create,e1=ed.create,e2=ep.create,e5=ef.create,e4=eh.create,e6=ey.create,e3=em.create,e8=e_.create,e9=eb.create,e7=ev.create,te=ew.create,tt=eE.create,tr=ev.createWithPreprocess,tn=eO.create,ti=()=>eU().optional(),to=()=>ez().optional(),ta=()=>eM().optional(),ts={string:e=>Z.create({...e,coerce:!0}),number:e=>q.create({...e,coerce:!0}),boolean:e=>J.create({...e,coerce:!0}),bigint:e=>F.create({...e,coerce:!0}),date:e=>G.create({...e,coerce:!0})};e.s(["BRAND",0,ex,"NEVER",0,g,"Schema",0,x,"ZodAny",0,Q,"ZodArray",0,en,"ZodBigInt",0,F,"ZodBoolean",0,J,"ZodBranded",0,eT,"ZodCatch",0,ek,"ZodDate",0,G,"ZodDefault",0,eS,"ZodDiscriminatedUnion",0,es,"ZodEffects",0,ev,"ZodEnum",0,em,"ZodFirstPartyTypeKind",0,o,"ZodFunction",0,ef,"ZodIntersection",0,ec,"ZodLazy",0,eh,"ZodLiteral",0,ey,"ZodMap",0,ed,"ZodNaN",0,eA,"ZodNativeEnum",0,e_,"ZodNever",0,et,"ZodNull",0,X,"ZodNullable",0,eE,"ZodNumber",0,q,"ZodObject",0,ei,"ZodOptional",0,ew,"ZodPipeline",0,eO,"ZodPromise",0,eb,"ZodReadonly",0,eR,"ZodRecord",0,el,"ZodSchema",0,x,"ZodSet",0,ep,"ZodString",0,Z,"ZodSymbol",0,V,"ZodTransformer",0,ev,"ZodTuple",0,eu,"ZodType",0,x,"ZodUndefined",0,Y,"ZodUnion",0,eo,"ZodUnknown",0,ee,"ZodVoid",0,er,"any",0,eK,"array",0,eF,"bigint",0,eD,"boolean",0,eM,"coerce",0,ts,"custom",0,eC,"date",0,eH,"datetimeRegex",0,B,"discriminatedUnion",0,eY,"effect",0,e7,"enum",0,e3,"function",0,e5,"instanceof",0,eI,"intersection",0,eX,"late",0,ej,"lazy",0,e4,"literal",0,e6,"map",0,e1,"nan",0,eN,"nativeEnum",0,e8,"never",0,eZ,"null",0,eL,"nullable",0,tt,"number",0,ez,"object",0,eJ,"oboolean",0,ta,"onumber",0,to,"optional",0,te,"ostring",0,ti,"pipeline",0,tn,"preprocess",0,tr,"promise",0,e9,"record",0,e0,"set",0,e2,"strictObject",0,eG,"string",0,eU,"symbol",0,eW,"transformer",0,e7,"tuple",0,eQ,"undefined",0,e$,"union",0,eV,"unknown",0,eB,"void",0,eq],965638),e.i(965638),e.s(["BRAND",0,ex,"DIRTY",0,m,"EMPTY_PATH",0,f,"INVALID",0,g,"NEVER",0,g,"OK",0,_,"ParseStatus",0,y,"Schema",0,x,"ZodAny",0,Q,"ZodArray",0,en,"ZodBigInt",0,F,"ZodBoolean",0,J,"ZodBranded",0,eT,"ZodCatch",0,ek,"ZodDate",0,G,"ZodDefault",0,eS,"ZodDiscriminatedUnion",0,es,"ZodEffects",0,ev,"ZodEnum",0,em,"ZodError",()=>a.ZodError,"ZodFirstPartyTypeKind",0,o,"ZodFunction",0,ef,"ZodIntersection",0,ec,"ZodIssueCode",()=>a.ZodIssueCode,"ZodLazy",0,eh,"ZodLiteral",0,ey,"ZodMap",0,ed,"ZodNaN",0,eA,"ZodNativeEnum",0,e_,"ZodNever",0,et,"ZodNull",0,X,"ZodNullable",0,eE,"ZodNumber",0,q,"ZodObject",0,ei,"ZodOptional",0,ew,"ZodParsedType",()=>s.ZodParsedType,"ZodPipeline",0,eO,"ZodPromise",0,eb,"ZodReadonly",0,eR,"ZodRecord",0,el,"ZodSchema",0,x,"ZodSet",0,ep,"ZodString",0,Z,"ZodSymbol",0,V,"ZodTransformer",0,ev,"ZodTuple",0,eu,"ZodType",0,x,"ZodUndefined",0,Y,"ZodUnion",0,eo,"ZodUnknown",0,ee,"ZodVoid",0,er,"addIssueToContext",0,h,"any",0,eK,"array",0,eF,"bigint",0,eD,"boolean",0,eM,"coerce",0,ts,"custom",0,eC,"date",0,eH,"datetimeRegex",0,B,"defaultErrorMap",0,c,"discriminatedUnion",0,eY,"effect",0,e7,"enum",0,e3,"function",0,e5,"getErrorMap",0,d,"getParsedType",()=>s.getParsedType,"instanceof",0,eI,"intersection",0,eX,"isAborted",0,b,"isAsync",0,E,"isDirty",0,v,"isValid",0,w,"late",0,ej,"lazy",0,e4,"literal",0,e6,"makeIssue",0,p,"map",0,e1,"nan",0,eN,"nativeEnum",0,e8,"never",0,eZ,"null",0,eL,"nullable",0,tt,"number",0,ez,"object",0,eJ,"objectUtil",()=>s.objectUtil,"oboolean",0,ta,"onumber",0,to,"optional",0,te,"ostring",0,ti,"pipeline",0,tn,"preprocess",0,tr,"promise",0,e9,"quotelessJson",()=>a.quotelessJson,"record",0,e0,"set",0,e2,"setErrorMap",0,l,"strictObject",0,eG,"string",0,eU,"symbol",0,eW,"transformer",0,e7,"tuple",0,eQ,"undefined",0,e$,"union",0,eV,"unknown",0,eB,"util",()=>s.util,"void",0,eq],788685);var tc=e.i(788685);e.s(["z",0,tc],50270)},191807,3353,397874,e=>{"use strict";var t,r=e.i(514109);e.i(658655);var n=e.i(867438);let i=new r.Fetch({baseUrl:n.API_URL,credentials:"same-origin"});e.s(["api",0,i],191807),e.s([],3353),e.i(994113);var o=e.i(50270);let a=o.z.object({google_auth_enabled:o.z.boolean(),google_auth_client_id:o.z.string().optional(),google_auth_secret_key:o.z.string().optional()});o.z.object({data:a});let s=a.pick({google_auth_enabled:!0});o.z.object({data:s});var c=((t={}).users="users",t.two_fa_via_email="two_fa_via_email",t.mfa="mfa",t.two_fa_via_totp="two_fa_via_totp",t.password_reset_required="password_reset_required",t);e.s(["AUTH_RESPONSE_TYPE",()=>c],397874)},155466,e=>{"use strict";e.i(658655),e.s([])},896306,475384,452241,953761,901717,194310,389044,87709,e=>{"use strict";var t,r=e.i(50270);let n=r.z.object({api_key:r.z.string()}),i=r.z.object({data:n});e.s(["GenerateUserApiKeyResponseSchema",0,i],896306);var o=((t={}).NON_VERIFIED="NON_VERIFIED",t.APPROVED="APPROVED",t.DECLINED="DECLINED",t.IN_PROGRESS="IN_PROGRESS",t);e.s(["VERIFICATION_STATUS",()=>o,"userStatusColors",0,{APPROVED:"status.green",NON_VERIFIED:"status.red",DECLINED:"status.red",IN_PROGRESS:"status.orange"}],475384);let a=r.z.object({id:r.z.number(),type:r.z.enum(["requisites"]),value:r.z.string(),verification_status:r.z.enum([o.NON_VERIFIED,o.APPROVED,o.DECLINED,o.IN_PROGRESS]),display_name:r.z.string()}),s=r.z.object({data:r.z.array(a)});e.s(["PaymentDetailsResponseSchema",0,s],452241);let c=r.z.enum([o.NON_VERIFIED,o.IN_PROGRESS,o.DECLINED,o.APPROVED]),u=r.z.object({id:r.z.number(),type:r.z.enum(["users"]),properties:r.z.object({telegram_id:r.z.string(),telegram_username:r.z.string(),email:r.z.string(),reward:r.z.string(),referral_percent:r.z.string(),orders_count:r.z.number().nullish(),referrals_count:r.z.number().nullish(),requisites_count:r.z.number().nullish(),withdrawals_count:r.z.number().nullish(),two_fa_via_email:r.z.boolean().optional(),two_fa_via_totp:r.z.boolean().optional(),verification_status:c,data:r.z.object({phone:r.z.string().nullish(),last_name:r.z.string().nullish(),first_name:r.z.string().nullish()}),api_key:r.z.string().nullish(),api_key_last_used_at:r.z.string().nullish(),available_aml_checks:r.z.number().nullish()}),data:r.z.object({phone:r.z.string().nullish(),last_name:r.z.string().nullish(),first_name:r.z.string().nullish()})}),l=r.z.object({id:r.z.number(),telegram_id:r.z.string().optional(),type:r.z.string(),telegram_username:r.z.string().optional(),email:r.z.string(),reward:r.z.string().optional(),referral_percent:r.z.string().optional(),orders_count:r.z.number().nullish(),referrals_count:r.z.number().nullish(),requisites_count:r.z.number().nullish(),withdrawals_count:r.z.number().nullish(),verification_status:c.optional(),phone:r.z.string().nullish().nullish(),last_name:r.z.string().nullish(),first_name:r.z.string().nullish(),two_fa_via_email:r.z.boolean().optional(),two_fa_via_totp:r.z.boolean().optional(),api_key:r.z.string().nullish(),api_key_last_used_at:r.z.string().nullish(),available_aml_checks:r.z.number().nullish()});r.z.object({data:u});let d=r.z.object({data:l});e.s(["UserResponseSchema",0,d,"UserSchema",0,l],953761);let p=r.z.object({data:l.extend({meta:r.z.object({expires_in_s:r.z.string().nullish()})})}),f=r.z.object({data:l});r.z.object({password:r.z.string(),type:r.z.enum(["email","totp"])}),e.s(["ResendEmailCodeResponseSchema",0,p,"SendCodeResponseSchema",0,f],901717),r.z.object({email:r.z.string().optional(),phone:r.z.string().optional(),first_name:r.z.string().optional(),last_name:r.z.string().optional()}),e.s([],194310);let h=r.z.object({id:r.z.number(),code:r.z.string(),value:r.z.number(),label:r.z.string(),city_rate:r.z.number(),from_min_amount:r.z.number(),to_min_amount:r.z.number()});e.s(["CitySchema",0,h],389044),e.s([],87709)},413669,e=>{"use strict";e.s(["createLocaleRequestConfig",0,e=>{if(e)return{params:{lang:e},headers:{"Accept-Language":e}}}])},640983,e=>{"use strict";var t,r,n,i=((t={}).site="site",t.telegram_app="telegram_app",t),o=((r={}).CREATED="CREATED",r.APPROVED="APPROVED",r.WAITING="WAITING",r.PAID="PAID",r.DELETED="DELETED",r.ERROR="ERROR",r.CHECK="CHECK",r.CANCELLED="CANCELLED",r.COMPLETED="COMPLETED",r.WAITING_AUTO_WITHDRAWS="WAITING_AUTO_WITHDRAWS",r.AML_CHECK="AML_CHECK",r.ERROR_AUTO_WITHDRAWS="ERROR_AUTO_WITHDRAWS",r.PARTIALLY_PROCESSED_AUTO_WITHDRAWS="PARTIALLY_PROCESSED_AUTO_WITHDRAWS",r),a=((n={}
37).online="online",n.offline="offline",n);e.s(["OPERATOR_STATUS",()=>a,"SOURCE_ORDER",()=>i,"STATUS_ORDER",()=>o,"finalOrderStatuses",0,["DELETED","CANCELLED","COMPLETED"],"orderStatusColors",0,{COMPLETED:"status.green",APPROVED:"status.orange",CREATED:"status.blue",PAID:"status.orange",DELETED:"status.red",CANCELLED:"status.red",ERROR:"status.red",WAITING:"status.orange",CHECK:"status.orange",WAITING_AUTO_WITHDRAWS:"status.orange",AML_CHECK:"status.orange",ERROR_AUTO_WITHDRAWS:"status.red",PARTIALLY_PROCESSED_AUTO_WITHDRAWS:"status.orange"}])},596298,e=>{"use strict";var t=e.i(50270),r=e.i(640983);let n=t.z.enum([r.STATUS_ORDER.CREATED,r.STATUS_ORDER.APPROVED,r.STATUS_ORDER.WAITING,r.STATUS_ORDER.PAID,r.STATUS_ORDER.DELETED,r.STATUS_ORDER.ERROR,r.STATUS_ORDER.CHECK,r.STATUS_ORDER.CANCELLED,r.STATUS_ORDER.COMPLETED,r.STATUS_ORDER.WAITING_AUTO_WITHDRAWS,r.STATUS_ORDER.AML_CHECK,r.STATUS_ORDER.ERROR_AUTO_WITHDRAWS,r.STATUS_ORDER.PARTIALLY_PROCESSED_AUTO_WITHDRAWS]),i=t.z.enum([r.SOURCE_ORDER.site,r.SOURCE_ORDER.telegram_app]),o=t.z.object({provider:t.z.string(),username:t.z.string()}),a=t.z.object({is_priority:t.z.boolean(),fee_type:t.z.enum(["percent","static"]),fee_value:t.z.string(),fee_amount:t.z.string(),payout_minutes:t.z.number()}),s=t.z.object({is_single_payment:t.z.boolean(),fee_type:t.z.enum(["percent","static"]),fee_value:t.z.string(),fee_amount:t.z.string()});t.z.object({data:t.z.object({id:t.z.number(),properties:t.z.object({status:n,change_message:t.z.string(),status_description:t.z.string(),user_data:t.z.object({from:t.z.object({label:t.z.string(),value:t.z.string()}).optional(),to:t.z.object({label:t.z.string(),value:t.z.string(),render:t.z.boolean().optional().nullish()}).optional()}),is_manual:t.z.boolean(),show_tx_id_input:t.z.boolean(),created_at:t.z.string(),rate:t.z.string().optional().nullish(),in:t.z.string(),out:t.z.string(),in_requisite:t.z.string(),in_requisite_memo:t.z.string(),out_requisite:t.z.string(),user_email:t.z.string().email(),redirect_url:t.z.string(),receipts_file_path:t.z.array(t.z.string()),social_provider:o.nullish(),priority_processing:a.nullish(),single_payment:s.nullish(),rate_fixed_at_create:t.z.boolean().optional()}),relationships:t.z.object({direction:t.z.object({from_name:t.z.string(),to_name:t.z.string(),from_is_crypto:t.z.boolean(),from_base_currency:t.z.string(),to_base_currency:t.z.string(),from_annotation:t.z.string(),to_annotation:t.z.string(),from_merchant_description:t.z.string()}),city:t.z.object({name:t.z.object({name:t.z.string()})}).optional().nullish()})})});let c=t.z.record(t.z.string(),t.z.object({label:t.z.string(),value:t.z.string(),render:t.z.boolean().optional().nullish()})),u=t.z.object({id:t.z.number(),status:n,is_manual:t.z.boolean(),show_tx_id_input:t.z.boolean(),change_message:t.z.string(),created_at:t.z.string(),rate:t.z.string().optional().nullish(),user_email:t.z.string().email(),status_description:t.z.string(),in_requisite:t.z.string(),out_requisite:t.z.string(),in_requisite_memo:t.z.string(),out_requisite_memo:t.z.string().optional(),in:t.z.string(),out:t.z.string(),redirect_url:t.z.string(),receipts_file_path:t.z.array(t.z.string()),user_data:t.z.object({from:c.optional(),to:c.optional()}),direction:t.z.object({from_name:t.z.string(),to_name:t.z.string(),from_is_crypto:t.z.boolean(),from_base_currency:t.z.string(),to_base_currency:t.z.string(),from_annotation:t.z.string(),to_annotation:t.z.string(),from_merchant_description:t.z.string()}),social_provider:o.nullish(),city:t.z.object({name:t.z.string().optional().nullish()}).optional().nullish(),priority_processing:a.nullish(),single_payment:s.nullish(),rate_fixed_at_create:t.z.boolean().optional()}),l=t.z.object({data:u});e.s(["OrderResponseSchema",0,l,"SocialProviderSchema",0,o,"SourceOrderSchema",0,i,"StatusOrderSchema",0,n])},682163,455248,483388,e=>{"use strict";e.s([],682163),e.s(["cancelOrder",()=>d,"createOrder",()=>u,"getOrderByHash",()=>l,"paidOrder",()=>p],483388),e.i(155466);var t=e.i(658655);e.i(994113);var r=e.i(191807),n=e.i(413669),i=e.i(50270),o=e.i(596298);let a=i.z.record(i.z.string(),i.z.union([i.z.string(),i.z.record(i.z.string(),i.z.union([i.z.string(),i.z.number()]))])),s=i.z.object({in:i.z.string(),out:i.z.string(),direction_id:i.z.number(),user_email:i.z.string().email(),telegram_username:i.z.string().optional(),ref:i.z.string().optional(),aml_accept:i.z.boolean(),order_creation_fields:i.z.array(i.z.object({id:i.z.number(),value:i.z.union([i.z.boolean(),i.z.number()]).nullish()})).optional(),custom_fields:i.z.object({from:a.optional(),to:a.optional()}),social_provider:o.SocialProviderSchema.optional(),priority_processing:i.z.boolean().nullish(),single_payment:i.z.boolean().nullish()}),c=i.z.object({data:i.z.object({properties:i.z.object({hash:i.z.string()})})});e.s(["CreateOrderRequestSchema",0,s,"CreateOrderResponseSchema",0,c],455248);let u=async e=>{let n=await r.api.post("/api/order",{data:e,secure:!0});if(t.isOfType.nil(n))throw Error("Data is empty");return c.parse(n).data.properties.hash},l=async({token:e,locale:i})=>{let a=await r.api.get(`/api/orders/${e}`,(0,n.createLocaleRequestConfig)(i));if(t.isOfType.nil(a))throw Error("Data is empty");return o.OrderResponseSchema.parse({data:{id:a.data.id,direction:a.fullResponse.data.relationships.direction,...a.data.properties,city:a.fullResponse.data.relationships.city}})},d=e=>r.api.post(`/api/order/cancel/${e}`),p=({token:e,data:t})=>r.api.post(`/api/orders/${e}/mark-as-paid`,{data:t})},127927,906505,567537,618604,e=>{"use strict";e.s([],127927),e.s(["addTwoFactor",()=>T,"addTwoFactorTotp",()=>P,"addUserInvoice",()=>_,"deletePaymentDetail",()=>w,"generateUserApiKey",()=>v,"getPaymentDetails",()=>b,"getUserData",()=>g,"getUserHistory",()=>E,"removeTwoFactor",()=>O,"resendConnectCode",()=>R,"sendRequisiteVerify",()=>A,"sendTwoFactorEmail",()=>x,"sendUserKycVerification",()=>k,"sendUserVerification",()=>S,"updateUserInfo",()=>m],618604),e.i(155466);var t=e.i(658655);e.i(994113);var r=e.i(191807),n=e.i(21198),i=e.i(896306),o=e.i(452241),a=e.i(901717);e.i(194310);var s=e.i(953761),c=e.i(50270);e.i(87709);var u=e.i(389044);e.i(682163);var l=e.i(596298);c.z.object({completed_orders:c.z.number(),total_amount:c.z.string(),data:c.z.array(c.z.object({id:c.z.number(),type:c.z.enum(["orders"]),properties:c.z.object({in:c.z.string(),out:c.z.string(),in_icon_path:c.z.string(),out_icon_path:c.z.string(),in_requisite:c.z.string(),in_requisite_memo:c.z.string(),out_requisite:c.z.string(),status:l.StatusOrderSchema,marked_as_paid:c.z.number(),status_description:c.z.string(),comment:c.z.string(),rate:c.z.string(),paid_amount:c.z.string(),confirmations_count:c.z.number(),is_first:c.z.boolean(),source:l.SourceOrderSchema,completed_at:c.z.string().nullish(),old_out:c.z.string(),old_rate:c.z.string(),reward:c.z.string(),user_email:c.z.string().email(),remote:c.z.string(),amount_in_usd:c.z.string(),hash:c.z.string(),created_at:c.z.string(),redirect_url:c.z.string(),is_manual:c.z.boolean(),show_tx_id_input:c.z.boolean(),change_message:c.z.string(),receipts_file_path:c.z.array(c.z.string())}),relationships:c.z.object({direction:c.z.object({id:c.z.number(),type:c.z.enum(["directions"]),from_base_currency:c.z.string(),to_base_currency:c.z.string(),from_shorthand:c.z.string(),from_name:c.z.string(),from_merchant_description:c.z.string(),from_is_crypto:c.z.boolean(),to_name:c.z.string(),from_annotation:c.z.string(),to_annotation:c.z.string()}),city:c.z.object({id:c.z.number(),code:c.z.string(),langs:c.z.array(c.z.object({name:c.z.string()})),pivot:c.z.object({city_rate:c.z.string(),from_min_amount:c.z.string().optional(),to_min_amount:c.z.string().optional()})}).optional()})}))});let d=c.z.object({from_base_currency:c.z.string(),to_base_currency:c.z.string(),from_shorthand:c.z.string(),from_name:c.z.string(),from_merchant_description:c.z.string(),from_is_crypto:c.z.boolean(),to_name:c.z.string(),from_annotation:c.z.string(),to_annotation:c.z.string()}),p=c.z.object({id:c.z.number(),type:c.z.enum(["orders"]),created_at:c.z.string(),source:l.SourceOrderSchema,rate:c.z.string(),in:c.z.string(),out:c.z.string(),status:l.StatusOrderSchema,hash:c.z.string(),city:u.CitySchema.optional(),receipts_file_path:c.z.array(c.z.string()),direction:d});c.z.object({data:c.z.object({completed_orders:c.z.number(),total_amount:c.z.string(),orders:c.z.array(p)})}),c.z.object({password:c.z.string(),password_confirmation:c.z.string()});let f=c.z.object({surname:c.z.string(),first_name:c.z.string(),last_name:c.z.string(),passport_code:c.z.string(),photos:c.z.array(c.z.string())}),h=c.z.object({data:c.z.object({url:c.z.string()})});
37e.s(["UserVerifyKycResponseSchema",0,h,"UserVerifyRequestSchema",0,f],906505);let y=c.z.object({requisite_id:c.z.number(),photos:c.z.array(c.z.string())});e.s(["RequisiteVerifyRequestSchema",0,y],567537);let g=async e=>{let n=await r.api.get("/api/v1/user/me",{headers:{Authorization:`Bearer ${e}`}});if(t.isOfType.nil(n))throw Error("Data is empty");return s.UserResponseSchema.parse({data:{...n.data,...n.data?.data,...n.data.properties,...n.data.properties?.data}})},m=async e=>{let t=await (0,n.auth)();return r.api.post("/api/user/info",{data:e,headers:{...t?.user?.accessToken&&{Authorization:`Bearer ${t?.user?.accessToken}`}}})},_=async e=>{let t=await (0,n.auth)();return r.api.post("/api/user/requisite",{data:e,headers:{...t?.user?.accessToken&&{Authorization:`Bearer ${t?.user?.accessToken}`}}})},b=async()=>{let e=await (0,n.auth)(),t=await r.api.get("/api/user/me/requisites",{headers:{...e?.user?.accessToken&&{Authorization:`Bearer ${e?.user?.accessToken}`}}});return o.PaymentDetailsResponseSchema.parse(t)},v=async()=>{let e=await (0,n.auth)(),t=await r.api.post("/api/v1/user/me/generate-api-key",{headers:{...e?.user?.accessToken&&{Authorization:`Bearer ${e?.user?.accessToken}`}}});return i.GenerateUserApiKeyResponseSchema.parse(t)},w=async e=>{let t=await (0,n.auth)();return r.api.del(`/api/user/requisite/${e}`,{headers:{...t?.user?.accessToken&&{Authorization:`Bearer ${t?.user?.accessToken}`}}})},E=async()=>{let e=await (0,n.auth)();return r.api.get("/api/user/orders/history/download",{responseType:"blob",headers:{...e?.user?.accessToken&&{Authorization:`Bearer ${e?.user?.accessToken}`}}}).then(e=>e?.fullResponse??null)},S=async e=>{let t=await (0,n.auth)();return r.api.post("/api/v2/user/verification",{data:e,headers:{...t?.user?.accessToken&&{Authorization:`Bearer ${t?.user?.accessToken}`}}})},k=async()=>{let e=await (0,n.auth)(),t=await r.api.post("/api/v1/user/kyc/start",{headers:{...e?.user?.accessToken&&{Authorization:`Bearer ${e?.user?.accessToken}`}}});return h.parse(t)},A=async e=>{let t=await (0,n.auth)();return r.api.post("/api/v2/user/requisite-verification",{data:e,headers:{...t?.user?.accessToken&&{Authorization:`Bearer ${t?.user?.accessToken}`}}})},x=async()=>{let e=await (0,n.auth)();return r.api.post("/api/2fa/send-email-enable",{headers:{...e?.user?.accessToken&&{Authorization:`Bearer ${e?.user?.accessToken}`}}})},T=async e=>{let t=await (0,n.auth)(),i=await r.api.put("/api/2fa/enable",{data:{code:e},headers:{...t?.user?.accessToken&&{Authorization:`Bearer ${t?.user?.accessToken}`}}});return a.SendCodeResponseSchema.parse(i)},O=async e=>{let t=await (0,n.auth)(),i=await r.api.put("/api/2fa/disable",{data:e,headers:{...t?.user?.accessToken&&{Authorization:`Bearer ${t?.user?.accessToken}`}}});return s.UserResponseSchema.parse(i)},R=async()=>{let e=await (0,n.auth)(),t=await r.api.post("/api/2fa/resend-email-enable",{headers:{...e?.user?.accessToken&&{Authorization:`Bearer ${e?.user?.accessToken}`}}});return a.ResendEmailCodeResponseSchema.parse(t)},P=async e=>{let t=await (0,n.auth)(),i=await r.api.put("/api/2fa/totp-enable",{data:{code:e},headers:{...t?.user?.accessToken&&{Authorization:`Bearer ${t?.user?.accessToken}`}}});return a.SendCodeResponseSchema.parse(i)};e.i(546815),e.i(475384)},202659,e=>{"use strict";e.s(["authCallbacks",()=>i]);var t=e.i(397874);e.i(127927);var r=e.i(618604),n=e.i(867438);let i={signIn:async({user:e})=>!e?.signinType||e?.signinType===t.AUTH_RESPONSE_TYPE.users||`${n.WEBSITE_URL}/auth-result?data=${encodeURIComponent(JSON.stringify(e?.user))}`,jwt:async({token:e,user:t,trigger:n})=>{try{if(t?.token){let{data:e}=await (0,r.getUserData)(t.token);return{...e,token:t.token}}if(e?.token&&"update"===n){let{data:t}=await (0,r.getUserData)(e.token);return{...e,...t}}}catch(e){throw console.error("callbacks.jwt",e),Error(JSON.stringify(e))}return{...t,...e}},session:({session:e,token:t})=>({...e,user:{...t,accessToken:t.token}})}},436729,e=>{"use strict";var t=e.i(50270),r=e.i(397874);let n=t.z.object({"2fa_code_via_email":t.z.string().optional(),"2fa_code_via_totp":t.z.string().optional(),temp_access_token:t.z.string()}),i=t.z.object({data:t.z.object({type:t.z.literal("users"),id:t.z.number(),email:t.z.string().email(),is_verified:t.z.boolean(),meta:t.z.object({token:t.z.string().nullable(),expires_in_s:t.z.string().nullable()})})}),o=t.z.object({data:t.z.object({type:t.z.enum([r.AUTH_RESPONSE_TYPE.two_fa_via_email]),id:t.z.number(),token:t.z.string().nullable(),expires_in_s:t.z.string().nullable()})});e.s(["EmailTwoFactorRequestScheme",0,n,"EmailTwoFactorResendResponseScheme",0,o,"EmailTwoFactorResponseScheme",0,i])},570335,e=>{"use strict";var t=e.i(50270);let r=t.z.object({id_token:t.z.string()}),n=t.z.object({data:t.z.object({type:t.z.literal("users"),id:t.z.number(),email:t.z.string().email(),email_verified_at:t.z.string().optional(),data:t.z.object({first_name:t.z.string().nullish(),last_name:t.z.string().nullish()}),meta:t.z.object({token:t.z.string().nullable(),expires_in_s:t.z.string().nullable()})})});e.s(["GoogleSignInRequestScheme",0,r,"GoogleSignInResponseScheme",0,n])},682503,e=>{"use strict";var t=e.i(50270);let r=t.z.object({token:t.z.string()});t.z.object({data:t.z.object({id:t.z.number(),email:t.z.string().optional(),is_verified:t.z.boolean().optional(),meta:t.z.object({token:t.z.string(),expires_in_s:t.z.string()})})}),e.s(["SendEmailCodeRequestScheme",0,r])},921296,e=>{"use strict";var t=e.i(50270),r=e.i(397874);t.z.enum([r.AUTH_RESPONSE_TYPE.users,r.AUTH_RESPONSE_TYPE.two_fa_via_email,r.AUTH_RESPONSE_TYPE.mfa,r.AUTH_RESPONSE_TYPE.two_fa_via_totp]);let n=t.z.object({email:t.z.string(),password:t.z.string()}),i=t.z.object({id:t.z.number(),token:t.z.string(),expires_in_s:t.z.string().nullable()}),o=t.z.object({type:t.z.literal(r.AUTH_RESPONSE_TYPE.users),id:t.z.number(),email:t.z.string().email(),is_verified:t.z.boolean().nullish(),meta:t.z.object({token:t.z.string().nullable(),expires_in_s:t.z.string().nullable()})}),a=i.extend({type:t.z.literal(r.AUTH_RESPONSE_TYPE.two_fa_via_email)}),s=i.extend({type:t.z.literal(r.AUTH_RESPONSE_TYPE.two_fa_via_totp)}),c=i.extend({type:t.z.literal(r.AUTH_RESPONSE_TYPE.mfa)}),u=t.z.object({type:t.z.literal(r.AUTH_RESPONSE_TYPE.password_reset_required)}),l=t.z.object({data:t.z.discriminatedUnion("type",[o,a,s,u,c])});e.s(["SignInRequestSchema",0,n,"SignInResponseSchema",0,l])},339777,871074,546905,842094,e=>{"use strict";e.s([],339777),e.s(["loginGoogle",()=>T,"loginUser",()=>w,"registerUser",()=>v,"resendTwoFactorCode",()=>x,"sendEmailCode",()=>k,"sendForgotPassword",()=>E,"sendResetPassword",()=>S,"sendTwoFactorEmailCode",()=>A],842094),e.i(994113);var t=e.i(191807);e.i(21198);var r=e.i(436729),n=e.i(570335);e.i(682503);var i=e.i(921296),o=e.i(50270),a=e.i(170161);let s=o.z.string({required_error:"defaultRequired"}).min(1,"defaultRequired").email("emailInvalidFormat"),c=o.z.string({required_error:"defaultRequired"}).min(1,"defaultRequired"),u=o.z.string({required_error:""}).regex(a.passwordRegex.characters,"").regex(a.passwordRegex.upperLower,"").regex(a.passwordRegex.number,"").regex(a.passwordRegex.symbol,""),l=o.z.string({required_error:"defaultRequired"}).min(1,"defaultRequired"),d=o.z.string({required_error:"defaultRequired"}).min(1,"defaultRequired"),p=o.z.number({required_error:"paymentSystemSchema"}).min(1,"paymentSystemSchema"),f=o.z.string({required_error:"invoiceRequired"}).min(1,"invoiceRequired"),h=o.z.string().trim().refine(e=>"+"===e||0===e.length||/^[+\d\s-]{8,15}$/.test(e),{message:"phoneInvalidFormat"}).transform(e=>"+"===e?"":e).optional();o.z.string({required_error:"urlRequired"}).url("urlInvalidFormat"),o.z.date({required_error:"dateRequired",invali
37d_type_error:"dateInvalidFormat"});let y=o.z.literal(!0,{errorMap:()=>({message:"defaultRequired"})}),g=o.z.array(o.z.object({file:o.z.instanceof(File)})).min(1,{message:"fileUploadRequired"});e.s(["checkboxSchema",0,y,"emailSchema",0,s,"filesSchema",0,g,"invoiceSchema",0,f,"passwordInteractiveSchema",0,u,"passwordSchema",0,c,"paymentSystemSchema",0,p,"phoneSchema",0,h,"reviewSchema",0,d,"textSchema",0,l],871074);let m=o.z.object({email:s,password:c,ref:o.z.string().optional()}),_=o.z.object({data:o.z.object({type:o.z.literal("users"),id:o.z.number(),email:o.z.string().email().optional(),is_verified:o.z.boolean().optional(),meta:o.z.object({token:o.z.string().nullable(),expires_in_s:o.z.string().nullable()})})});e.s(["SignUpRequestSchema",0,m,"SignUpResponseSchema",0,_],546905);var b=e.i(788685);b.object({data:b.object({id:b.number(),type:b.enum(["users"]),qr_code_url:b.string()})});let v=async e=>{let r=await t.api.post("/api/register",{data:e});return _.parse(r)},w=async(e,r)=>{let n=await t.api.post("/api/login",{data:e,headers:r});return i.SignInResponseSchema.parse(n)},E=e=>t.api.post("/api/reset",{data:e}),S=e=>t.api.post("/api/restore",{data:e}),k=async e=>{await t.api.post("/api/verify-email",{data:e})},A=async(e,n)=>{let i=await t.api.post("/api/2fa/verify",{data:e,headers:n});return r.EmailTwoFactorResponseScheme.parse(i)},x=async e=>{let n=await t.api.post("/api/2fa/resend",{data:{token:e}});return r.EmailTwoFactorResendResponseScheme.parse(n)},T=async e=>{let r=await t.api.post("/api/v1/login-via-google",{data:e});return n.GoogleSignInResponseScheme.parse(r)};e.i(397874)},165658,e=>{"use strict";e.s([]),e.i(339777),e.i(570335),e.i(842094)},869114,844226,e=>{"use strict";e.s(["signinProvider",()=>o],869114),e.i(339777);var t=e.i(842094),r=e.i(921296),n=e.i(397874);let i=e=>{let t=e?.["x-forwarded-for"]??e?.["x-real-ip"]??"0.0.0.0";return t.includes("::ffff:")?t.replace(/^::ffff:/,""):t};e.s(["getUserIp",0,i],844226);let o={id:"signin",name:"Credentials",type:"credentials",credentials:{email:{},password:{},rememberMe:{type:"checkbox"}},authorize:async(e,o)=>{try{if(!e?.email&&!e?.password)throw Error("His not email");let a={email:e.email,password:e.password},s=r.SignInRequestSchema.parse(a),{data:c}=await (0,t.loginUser)(s,{"X-User-Client-Ip":i(o.headers)}),u=c.type===n.AUTH_RESPONSE_TYPE.password_reset_required,l=c.type===n.AUTH_RESPONSE_TYPE.users;if(u)return{token:"",signinType:c.type,user:c};let d=l?c.meta?.token??"":c.token,p=l?Number(c.meta?.expires_in_s??0):Number(c.expires_in_s??0);return{email:e.email,token:d,serverExpires:p,rememberMe:!0,signinType:c.type,user:c}}catch(e){throw Error(JSON.stringify(e))}}}},994113,21198,136673,e=>{"use strict";e.s([],994113);var t=e.i(191807);e.s(["multipleDirectUpload",()=>y],136673),e.s(["auth",()=>f],21198);var r=e.i(247167),n=e.i(941004),i=e.i(542759);e.i(108790);var o=e.i(217255);e.i(3353);var a=e.i(867438),s=e.i(202659);e.i(165658);var c=e.i(869114);e.i(339777);var u=e.i(436729),l=e.i(842094),d=e.i(844226);let p={secret:r.default.env.NEXTAUTH_SECRET??"",session:{strategy:"jwt"},providers:[(0,i.default)(c.signinProvider),(0,i.default)({id:"2fa_email",name:"Credentials",type:"credentials",credentials:{temp_access_token:{}},authorize:async(e,t)=>{try{if(!e?.temp_access_token)throw Error("Missing temporary token");let{"2fa_code_via_email":r="","2fa_code_via_totp":n=""}=e,i={...!!r&&{"2fa_code_via_email":r},...!!n&&{"2fa_code_via_totp":n},temp_access_token:e.temp_access_token},o=u.EmailTwoFactorRequestScheme.parse(i),{data:a}=await (0,l.sendTwoFactorEmailCode)(o,{"X-User-Client-Ip":(0,d.getUserIp)(t.headers)});return{email:a.email,authType:"signIn",token:a.meta.token??"",isVerified:a.is_verified}}catch(e){throw Error(JSON.stringify(e))}}})],callbacks:s.authCallbacks,pages:{error:"/error",signIn:"/"}};function f(...e){return a.IS_SERVER?(0,n.getServerSession)(...e,p):(0,o.getSession)()}let h=async e=>{try{let r=await f(),n=r?.user?.accessToken,i=new FormData;return i.append("file",e),(await t.api.post("/api/load-image",{headers:{...n&&{Authorization:`Bearer ${n}`}},data:i})).fullResponse}catch(e){return Promise.reject(e)}},y=async e=>{try{let t=e.map(({file:e})=>h(e));return await Promise.all(t)}catch(e){return Promise.reject(e)}}}]);
38
39//# debugId=8eb1ae47-bf43-472d-91aa-c5dc72ee9602

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.