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]="4da258f3-7d55-66ed-a23e-40bc6ae43dd5")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,398113,(e,t,r)=>{t.exports=function(e,t){this.v=e,this.k=t},t.exports.__esModule=!0,t.exports.default=t.exports},178679,(e,t,r)=>{function n(e,r,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}t.exports=n=function(e,t,r,o){function i(t,r){n(e,t,function(e){return this._invoke(t,r,e)})}t?a?a(e,t,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r,o,i)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},755157,(e,t,r)=>{var n=e.r(178679);function o(){var e,r,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.toStringTag||"@@toStringTag";function c(t,o,i,a){var s=Object.create((o&&o.prototype instanceof l?o:l).prototype);return n(s,"_invoke",function(t,n,o){var i,a,s,c=0,l=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,a=0,s=e,f.n=r,u}};function p(t,n){for(a=t,s=n,r=0;!d&&c&&!o&&r<l.length;r++){var o,i=l[r],p=f.p,h=i[2];t>3?(o=h===n)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=t<2&&p<i[1])?(a=0,f.v=n,f.n=i[1]):p<h&&(o=t<3||i[0]>n||n>h)&&(i[4]=t,i[5]=n,f.n=h,a=0))}if(o||t>1)return u;throw d=!0,n}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),a=l,s=h;(r=a<2?e:s)||!d;){i||(a?a<3?(a>1&&(f.n=-1),p(a,s)):f.n=s:f.v=s);try{if(c=2,i){if(a||(o="next"),r=i[o]){if(!(r=r.call(i,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,a<2&&(a=0)}else 1===a&&(r=i.return)&&r.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((r=(d=f.n<0)?s:t.call(n,f))!==u)break}catch(t){i=e,a=1,s=t}finally{c=1}}return{value:r,done:d}}}(t,i,a),!0),s}var u={};function l(){}function d(){}function f(){}r=Object.getPrototypeOf;var p=f.prototype=l.prototype=Object.create([][a]?r(r([][a]())):(n(r={},a,function(){return this}),r));function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,n(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return d.prototype=f,n(p,"constructor",f),n(f,"constructor",d),d.displayName="GeneratorFunction",n(f,s,"GeneratorFunction"),n(p),n(p,s,"Generator"),n(p,a,function(){return this}),n(p,"toString",function(){return"[object Generator]"}),(t.exports=o=function(){return{w:c,m:h}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},336852,(e,t,r)=>{var n=e.r(398113),o=e.r(178679);t.exports=function e(t,r){var i;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,o,a){function s(){return new r(function(o,i){!function e(o,i,a,s){try{var c=t[o](i),u=c.value;return u instanceof n?r.resolve(u.v).then(function(t){e("next",t,a,s)},function(t){e("throw",t,a,s)}):r.resolve(u).then(function(e){c.value=e,a(c)},function(t){return e("throw",t,a,s)})}catch(e){s(e)}}(e,a,o,i)})}return i=i?i.then(s,s):s()},!0)},t.exports.__esModule=!0,t.exports.default=t.exports},506822,(e,t,r)=>{var n=e.r(755157),o=e.r(336852);t.exports=function(e,t,r,i,a){return new o(n().w(e,t,r,i),a||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},288691,(e,t,r)=>{var n=e.r(506822);t.exports=function(e,t,r,o,i){var a=n(e,t,r,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},t.exports.__esModule=!0,t.exports.default=t.exports},354534,(e,t,r)=>{t.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},t.exports.__esModule=!0,t.exports.default=t.exports},31159,(e,t,r)=>{t.exports=function(e){if(Array.isArray(e))return e}
2,t.exports.__esModule=!0,t.exports.default=t.exports},773973,(e,t,r)=>{t.exports=function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}},t.exports.__esModule=!0,t.exports.default=t.exports},427500,(e,t,r)=>{t.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},737906,(e,t,r)=>{var n=e.r(427500);t.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},294441,(e,t,r)=>{t.exports=function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},462195,(e,t,r)=>{var n=e.r(31159),o=e.r(773973),i=e.r(737906),a=e.r(294441);t.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},352445,(e,t,r)=>{t.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},514356,(e,t,r)=>{var n=e.r(863974);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}t.exports=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},t.exports.__esModule=!0,t.exports.default=t.exports},332164,(e,t,r)=>{t.exports=function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e},t.exports.__esModule=!0,t.exports.default=t.exports},180689,(e,t,r)=>{var n=e.r(935045).default,o=e.r(332164);t.exports=function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return o(e)},t.exports.__esModule=!0,t.exports.default=t.exports},619823,(e,t,r)=>{function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},410885,(e,t,r)=>{function n(e,r){return t.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},59947,(e,t,r)=>{var n=e.r(410885);t.exports=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},t.exports.__esModule=!0,t.exports.default=t.exports},245813,(e,t,r)=>{t.exports=function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}},t.exports.__esModule=!0,t.exports.default=t.exports},858524,(e,t,r)=>{function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(t.exports=n=function(){return!!e},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},742062,(e,t,r)=>{var n=e.r(858524),o=e.r(410885);t.exports=function(e,t,r){if(n())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var a=new(e.bind.apply(e,i));return r&&o(a,r.prototype),a}
2,t.exports.__esModule=!0,t.exports.default=t.exports},413098,(e,t,r)=>{var n=e.r(619823),o=e.r(410885),i=e.r(245813),a=e.r(742062);function s(e){var r="function"==typeof Map?new Map:void 0;return t.exports=s=function(e){if(null===e||!i(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return a(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports,s(e)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports},641731,(e,t,r)=>{"use strict";var n=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.UnsupportedStrategy=r.UnknownError=r.OAuthCallbackError=r.MissingSecret=r.MissingAuthorize=r.MissingAdapterMethods=r.MissingAdapter=r.MissingAPIRoute=r.InvalidCallbackUrl=r.AccountNotLinkedError=void 0,r.adapterErrorHandler=function(e,t){if(e)return Object.keys(e).reduce(function(r,n){return r[n]=(0,i.default)(o.default.mark(function r(){var i,a,s,c,u,l=arguments;return o.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:for(r.prev=0,a=Array(i=l.length),s=0;s<i;s++)a[s]=l[s];return t.debug("adapter_".concat(n),{args:a}),c=e[n],r.next=6,c.apply(void 0,a);case 6:return r.abrupt("return",r.sent);case 9:throw r.prev=9,r.t0=r.catch(0),t.error("adapter_error_".concat(n),r.t0),(u=new h(r.t0)).name="".concat(g(n),"Error"),u;case 15:case"end":return r.stop()}},r,null,[[0,9]])})),r},{})},r.capitalize=g,r.eventsErrorHandler=function(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=(0,i.default)(o.default.mark(function r(){var i,a=arguments;return o.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=e[n],r.next=4,i.apply(void 0,a);case 4:return r.abrupt("return",r.sent);case 7:r.prev=7,r.t0=r.catch(0),t.error("".concat(y(n),"_EVENT_ERROR"),r.t0);case 10:case"end":return r.stop()}},r,null,[[0,7]])})),r},{})},r.upperSnake=y;var o=n(e.r(231277)),i=n(e.r(145940)),a=n(e.r(514414)),s=n(e.r(352445)),c=n(e.r(514356)),u=n(e.r(180689)),l=n(e.r(619823)),d=n(e.r(59947));function f(e,t,r){return t=(0,l.default)(t),(0,u.default)(e,p()?Reflect.construct(t,r||[],(0,l.default)(e).constructor):t.apply(e,r))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var h=r.UnknownError=function(e){function t(e){var r,n;return(0,s.default)(this,t),(n=f(this,t,[null!=(r=null==e?void 0:e.message)?r:e])).name="UnknownError",n.code=e.code,e instanceof Error&&(n.stack=e.stack),n}return(0,d.default)(t,e),(0,c.default)(t,[{key:"toJSON",value:function(){return{name:this.name,message:this.message,stack:this.stack}}}])}((0,n(e.r(413098)).default)(Error));function y(e){return e.replace(/([A-Z])/g,"_$1").toUpperCase()}function g(e){return"".concat(e[0].toUpperCase()).concat(e.slice(1))}r.OAuthCallbackError=function(e){function t(){var e;(0,s.default)(this,t);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return e=f(this,t,[].concat(n)),(0,a.default)(e,"name","OAuthCallbackError"),e}return(0,d.default)(t,e),(0,c.default)(t)}(h),r.AccountNotLinkedError=function(e){function t(){var e;(0,s.default)(this,t);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return e=f(this,t,[].concat(n)),(0,a.default)(e,"name","AccountNotLinkedError"),e}return(0,d.default)(t,e),(0,c.default)(t)}(h),r.MissingAPIRoute=function(e){function t(){var e;(0,s.default)(this,t);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return e=f(this,t,[].concat(n)),(0,a.default)(e,"name","MissingAPIRouteError"),(0,a.default)(e,"code","MISSING_NEXTAUTH_API_ROUTE_ERROR"),e}return(0,d.default)(t,e),(0,c.default)(t)}(h),r.MissingSecret=function(e){function t(){var e;(0,s.default)(this,t);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return e=f(this,t,[].concat(n)),(0,a.default)(e,"name","MissingSecretError"),(0,a.default)(e,"code","NO_SECRET"),e}return(0,d.default)(t,e),(0,c.default)(t)}(h),r.MissingAuthorize=function(e){function t(){var e;(0,s.default)(this,t);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return e=f(this,t,[].concat(n)),(0,a.default)(e,"name","MissingAuthorizeError"),(0,a.default)(e,"code","CALLBACK_CREDENTIALS_HANDLER_ERROR"),e}return(0,d.default)(t,e),(0,c.default)(t)}(h),r.MissingAdapter=function(e){function t(){var e;(0,s.default)(this,t);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return e=f(this,t,[].concat(n)),(0,a.default)(e,"name","MissingAdapterError"),(0,a.default)(e,"code","
2EMAIL_REQUIRES_ADAPTER_ERROR"),e}return(0,d.default)(t,e),(0,c.default)(t)}(h),r.MissingAdapterMethods=function(e){function t(){var e;(0,s.default)(this,t);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return e=f(this,t,[].concat(n)),(0,a.default)(e,"name","MissingAdapterMethodsError"),(0,a.default)(e,"code","MISSING_ADAPTER_METHODS_ERROR"),e}return(0,d.default)(t,e),(0,c.default)(t)}(h),r.UnsupportedStrategy=function(e){function t(){var e;(0,s.default)(this,t);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return e=f(this,t,[].concat(n)),(0,a.default)(e,"name","UnsupportedStrategyError"),(0,a.default)(e,"code","CALLBACK_CREDENTIALS_JWT_ERROR"),e}return(0,d.default)(t,e),(0,c.default)(t)}(h),r.InvalidCallbackUrl=function(e){function t(){var e;(0,s.default)(this,t);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return e=f(this,t,[].concat(n)),(0,a.default)(e,"name","InvalidCallbackUrl"),(0,a.default)(e,"code","INVALID_CALLBACK_URL_ERROR"),e}return(0,d.default)(t,e),(0,c.default)(t)}(h)},36357,(e,t,r)=>{"use strict";var n=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.proxyLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0;try{if("u"<typeof window)return e;var r={},n=function(e){var n;r[e]=(n=(0,a.default)(o.default.mark(function r(n,a){var s,d;return o.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(l[e](n,a),"error"===e&&(a=u(a)),a.client=!0,s="".concat(t,"/_log"),d=new URLSearchParams(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){(0,i.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({level:e,code:n},a)),!navigator.sendBeacon){r.next=8;break}return r.abrupt("return",navigator.sendBeacon(s,d));case 8:return r.next=10,fetch(s,{method:"POST",body:d,keepalive:!0});case 10:return r.abrupt("return",r.sent);case 11:case"end":return r.stop()}},r)})),function(e,t){return n.apply(this,arguments)})};for(var s in e)n(s);return r}catch(e){return l}},r.setLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t||(l.debug=function(){}),e.error&&(l.error=e.error),e.warn&&(l.warn=e.warn),e.debug&&(l.debug=e.debug)};var o=n(e.r(231277)),i=n(e.r(514414)),a=n(e.r(145940)),s=e.r(641731);function c(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}function u(e){var t,r;if(e instanceof Error&&!(e instanceof s.UnknownError))return{message:e.message,stack:e.stack,name:e.name};if(null!=(t=e)&&t.error){e.error=u(e.error),e.message=null!=(r=e.message)?r:e.error.message}return e}var l={error:function(e,t){t=u(t),console.error("[next-auth][error][".concat(e,"]"),"\nhttps://next-auth.js.org/errors#".concat(e.toLowerCase()),t.message,t)},warn:function(e){console.warn("[next-auth][warn][".concat(e,"]"),"\nhttps://next-auth.js.org/warnings#".concat(e.toLowerCase()))},debug:function(e,t){console.log("[next-auth][debug][".concat(e,"]"),t)}};r.default=l},13451,(e,t,r)=>{t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},56299,(e,t,r)=>{var n=e.r(935045).default;t.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(n(e)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},330659,(e,t,r)=>{var n=e.r(398113),o=e.r(755157),i=e.r(288691),a=e.r(506822),s=e.r(336852),c=e.r(354534),u=e.r(56299);function l(){"use strict";var e=o(),r=e.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function f(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var p={throw:1,return:2,break:3,continue:3};function h(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,p[e],t)},delegateYield:function(e,o,i){return t.resultName=o,r(n.d,u(e),i)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(t.exports=l=function(){return{wrap:function(t,r,n,o){return e.w(
2h(t),r,n,o&&o.reverse())},isGeneratorFunction:f,mark:e.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:s,async:function(e,t,r,n,o){return(f(t)?a:i)(h(e),t,r,n,o)},keys:c,values:u}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports},231277,(e,t,r)=>{var n=e.r(330659)();t.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},226252,(e,t,r)=>{var n=e.r(935045).default;t.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},t.exports.__esModule=!0,t.exports.default=t.exports},863974,(e,t,r)=>{var n=e.r(935045).default,o=e.r(226252);t.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:t+""},t.exports.__esModule=!0,t.exports.default=t.exports},514414,(e,t,r)=>{var n=e.r(863974);t.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},t.exports.__esModule=!0,t.exports.default=t.exports},145940,(e,t,r)=>{function n(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}t.exports=function(e){return function(){var t=this,r=arguments;return new Promise(function(o,i){var a=e.apply(t,r);function s(e){n(a,o,i,s,c,"next",e)}function c(e){n(a,o,i,s,c,"throw",e)}s(void 0)})}},t.exports.__esModule=!0,t.exports.default=t.exports},935045,(e,t,r)=>{function n(e){return t.exports=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},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},726232,38570,e=>{"use strict";e.i(38535),e.i(193189),e.s([],726232),e.s([],38570)},790120,(e,t,r)=>{"use strict";var n=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.BroadcastChannel=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"nextauth.message";return{receive:function(t){var r=function(r){if(r.key===e){var n,o=JSON.parse(null!=(n=r.newValue)?n:"{}");(null==o?void 0:o.event)==="session"&&null!=o&&o.data&&t(o)}};return window.addEventListener("storage",r),function(){return window.removeEventListener("storage",r)}},post:function(t){if("u">typeof window)try{localStorage.setItem(e,JSON.stringify(c(c({},t),{},{timestamp:d()})))}catch(e){}}}},r.apiBaseUrl=l,r.fetchData=function(e,t,r){return u.apply(this,arguments)},r.now=d;var o=n(e.r(231277)),i=n(e.r(514414)),a=n(e.r(145940));function s(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}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){(0,i.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(){return(u=(0,a.default)(o.default.mark(function e(t,r,n){var i,a,s,u,d,f,p,h,y,g=arguments;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=(i=g.length>3&&void 0!==g[3]?g[3]:{}).ctx,u=void 0===(s=i.req)?null==a?void 0:a.req:s,d="".concat(l(r),"/").concat(t),e.prev=2,p={headers:c({"Content-Type":"application/json"},null!=u&&null!=(f=u.headers)&&f.cookie?{cookie:u.headers.cookie}:{})},null!=u&&u.body&&(p.body=JSON.stringify(u.body),p.method="POST"),e.next=7,fetch(d,p);case 7:return h=e.sent,e.next=10,h.json();case 10:if(y=e.sent,h.ok){e.next=13;break}throw y;case 13:return e.abrupt("return",Object.keys(y).length>0?y:null);case 16:return e.prev=16,e.t0=e.catch(2),n.error("CLIENT_FETCH_ERROR",{error:e.t0,url:d}),e.abrupt("return",null);case 20:case"end":return e.stop()}},e,null,[[2,16]])}))).apply(this,arguments)}function l(e){return"u"<typeof window?"".concat(e.baseUrlServer).concat(e.basePathServer):e.basePath}function d(){return Math.floor(Date.now()/1e3)}},319001,(e,t,r)=>{"use strict";var n=e.r(13451);
2Object.defineProperty(r,"__esModule",{value:!0}),r.AuthHandler=g;var o=p(e.r(36357)),i=e.r(508222),a=p(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 f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function p(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&({}).hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}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,o;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,i.detectOrigin)(null!=(o=s["x-forwarded-host"])?o: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,i.detectOrigin)(s,null==a?void 0:a["x-forwarded-proto"]),e}async function g(e){var t,r,n,i,d,f,p;let{options:h,req:g}=e,m=await y(g);(0,o.setLogger)(h.logger,h.debug);let b=(0,u.assertConfig)({options:h,req:m});if(Array.isArray(b))b.forEach(o.default.warn);else if(b instanceof Error){if(o.default.error(b.code,b),!["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&&o.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:_,providerId:v,error:w,method:E="GET"}=m,{options:S,cookies:k}=await (0,c.init)({authOptions:h,action:_,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==(i=m.body)?void 0:i.csrfToken,cookies:m.cookies,isPost:"POST"===E}),x=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(_){case"providers":return await a.providers(S.providers);case"session":{let e=await a.session({options:S,sessionStore:x});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:x});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(_){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:x});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:x});return e.cookies&&k.push(...e.cookies),{...e,cookies:k}}break;case"_log":if(h.logger)try{let{code:e,level:t,...r}=null!=(f=m.body)?f:{};o.default[t](e,r)}catch(e){o.default.error("LOGGER_ERROR",e)}return{};case"session":if(S.csrfTokenVerified){let e=await a.session({options:S,sessionStore:x,newSession:null==(p=m.body)?void 0:p.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";
2Object.defineProperty(r,"__esModule",{value:!0}),r.getBody=o,r.setCookie=function(e,t){var r;let o=null!=(r=e.getHeader("Set-Cookie"))?r:[];Array.isArray(o)||(o=[o]);let{name:i,value:a,options:s}=t,c=(0,n.serialize)(i,a,s);o.push(c),e.setHeader("Set-Cookie",o)},r.toResponse=function(e){var t,r,o;let i=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:o}=e,a=(0,n.serialize)(t,r,o);i.has("Set-Cookie")?i.append("Set-Cookie",a):i.set("Set-Cookie",a)});let a=e.body;"application/json"===i.get("content-type")?a=JSON.stringify(e.body):"application/x-www-form-urlencoded"===i.get("content-type")&&(a=new URLSearchParams(e.body).toString());let s=new Response(a,{headers:i,status:e.redirect?302:null!=(o=e.status)?o:200});return e.redirect&&s.headers.set("Location",e.redirect),s};var n=e.r(462819);async function o(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}},196240,(e,t,r)=>{"use strict";var n=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.init=m;var o=e.r(586914),i=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),f=e.r(428105),p=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)}function 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},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&({}).hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}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:b,isPost:_}){var v,w;let E=(0,h.default)(n),S=(0,c.createSecret)({authOptions:e,url:E}),{providers:k,provider:x}=(0,s.default)({providers:e.providers,url:E,providerId:t}),A={debug:!1,pages:{},theme:{colorScheme:"auto",logo:"",brandColor:"",buttonText:""},...e,url:E,action:r,provider:x,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===o.randomUUID||void 0===o.randomUUID?void 0:(0,o.randomUUID)())?e:(0,o.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:{},i.default),adapter:(0,a.adapterErrorHandler)(e.adapter,i.default),callbacks:{...d.defaultCallbacks,...e.callbacks},logger:i.default,callbackUrl:E.origin},O=[],{csrfToken:R,cookie:P,csrfTokenVerified:T}=(0,f.createCSRFToken)({options:A,cookieValue:null==y?void 0:y[A.cookies.csrfToken.name],isPost:_,bodyValue:b});A.csrfToken=R,A.csrfTokenVerified=T,P&&O.push({name:A.cookies.csrfToken.name,value:P,options:A.cookies.csrfToken.options});let{callbackUrl:j,callbackUrlCookie:C}=await (0,p.createCallbackUrl)({options:A,cookieValue:null==y?void 0:y[A.cookies.callbackUrl.name],paramValue:g});return A.callbackUrl=j,C&&O.push({name:A.cookies.callbackUrl.name,value:C,options:A.cookies.callbackUrl.options}),{options:A,cookies:O}}},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,f;let p,h,y,{options:g,req:m}=e,b=[];if(!s&&(m.origin||b.push("NEXTAUTH_URL"),g.debug&&b.push("DEBUG_ENABLED")),!g.secret)return new o.MissingSecret("Please define a `secret` in production.");if(!(null!=(t=m.query)&&t.nextauth)&&!m.action)return new o.MissingAPIRoute("Cannot find [...nextauth].{js,ts} in `/pages/api/auth`. Make sure the filename is written correctly.");let _=null==(r=m.query)?void 0:r.callbackUrl,v=(0,i.default)(m.origin);if(_&&!c(_,v.base))return new o.InvalidCallbackUrl(`Invalid callback URL. Received: ${_}`);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 o.InvalidCallbackUrl(`Invalid callback URL. Received: ${E}`);for(let e of g.providers)"credentials"===e.type?p=!0:"email"===e.type?h=!0:"twitter"===e.id&&"2.0"===e.version&&(y=!0);if(p){let e=(null==(f=g.session)?void 0:f.strategy)==="database",t=!g.providers.some(e=>
2"credentials"!==e.type);if(e&&t)return new o.UnsupportedStrategy("Signin in with credentials only supported if JWT strategy is enabled");if(g.providers.some(e=>"credentials"===e.type&&!e.authorize))return new o.MissingAuthorize("Must define an authorize() handler to use credentials authentication provider")}if(h){let{adapter:e}=g;if(!e)return new o.MissingAdapter("E-mail login requires an adapter.");let t=["createVerificationToken","useVerificationToken","getUserByEmail"].filter(t=>!e[t]);if(t.length)return new o.MissingAdapterMethods(`Required adapter methods were missing: ${t.join(", ")}`)}return s||(y&&b.push("TWITTER_OAUTH_2_BETA"),s=!0),b};var o=e.r(641731),i=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}}},445959,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},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}}},627667,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},217255,(e,t,r)=>{"use strict";var n,o,i,a,s,c=e.i(247167),u=e.r(13451),l=e.r(935045);Object.defineProperty(r,"__esModule",{value:!0});var d={SessionContext:!0,useSession:!0,getSession:!0,getCsrfToken:!0,getProviders:!0,signIn:!0,signOut:!0,SessionProvider:!0};r.SessionContext=void 0,r.SessionProvider=function(e){if(!P)throw Error("React Context is unavailable in Server Components");var t,r,n,o,i,a,s=e.children,c=e.basePath,u=e.refetchInterval,l=e.refetchWhenOffline;c&&(A.basePath=c);var d=void 0!==e.session;A._lastSync=d?(0,_.now)():0;var p=g.useState(function(){return d&&(A._session=e.session),e.session}),m=(0,y.default)(p,2),b=m[0],w=m[1],E=g.useState(!d),S=(0,y.default)(E,2),k=S[0],x=S[1];g.useEffect(function(){return A._getSession=(0,h.default)(f.default.mark(function e(){var t,r,n=arguments;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(n.length>0&&void 0!==n[0]?n[0]:{}).event,e.prev=1,!((r="storage"===t)||void 0===A._session)){e.next=10;break}return A._lastSync=(0,_.now)(),e.next=7,T({broadcast:!r});case 7:return A._session=e.sent,w(A._session),e.abrupt("return");case 10:if(!(!t||null===A._session||(0,_.now)()<A._lastSync)){e.next=12;break}return e.abrupt("return");case 12:return A._lastSync=(0,_.now)(),e.next=15,T();case 15:A._session=e.sent,w(A._session),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),R.error("CLIENT_SESSION_ERROR",e.t0);case 22:return e.prev=22,x(!1),e.finish(22);case 25:case"end":return e.stop()}},e,null,[[1,19,22,25]])})),A._getSession(),function(){A._lastSync=0,A._session=void 0,A._getSession=function(){}}},[]),g.useEffect(function(){var e=O.receive(function(){return A._getSession({event:"storage"})});return function(){return e()}},[]),g.useEffect(function(){var t=e.refetchOnWindowFocus,r=void 0===t||t,n=function(){r&&"visible"===document.visibilityState&&A._getSession({event:"visibilitychange"})};return document.addEventListener("visibilitychange",n,!1),function(){return document.removeEventListener("visibilitychange",n,!1)}},[e.refetchOnWindowFocus]);var j=(t=g.useState("u">typeof navigator&&navigator.onLine),n=(r=(0,y.default)(t,2))[0],o=r[1],i=function(){return o(!0)},a=function(){return o(!1)},g.useEffect(function(){return window.addEventListener("online",i),window.addEventListener("offline",a),function(){window.removeEventListener("online",i),window.removeEventListener("offline",a)}},[]),n),I=!1!==l||j;g.useEffect(function(){if(u&&I){var e=setInterval(function(){A._session&&A._getSession({event:"poll"})},1e3*u);return function(){return clearInterval(e)}}},[u,I]);var D=g.useMemo(function(){return{data:b,status:k?"loading":b?"authenticated":"unauthenticated",update:function(e){return(0,h.default)(f.default.mark(function t(){var r;return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(k||!b)){t.next=2;break}return t.abrupt("return");case 2:return x(!0),t.t0=_.fetchData,t.t1=A,t.t2=R,t.next=8,C();case 8:return t.t3=t.sent,t.t4=e,t.t5={csrfToken:t.t3,data:t.t4},t.t6={body:t.t5},t.t7={req:t.t6},t.next=15,(0,t.t0)("session",t.t1,t.t2,t.t7);case 15:return r=t.sent,x(!1),r&&(w(r),O.post({event:"session",data:{trigger:"getSession"}})),t.abrupt("return",r);case 19:case"end":return t.stop()}},t)}))()}}},[b,k]);return(0,v.jsx)(P.Provider,{value:D,children:s})},r.getCsrfToken=C,r.getProviders=D,r.getSession=T,r.signIn=function(e,t,r){return N.apply(this,arguments)},r.signOut=function(e){return U.apply(this,arguments)},r.useSession=function(e){if(!P)throw Error("React Context is unavailable in Server Components");var t=g.useContext(P),r=null!=e?e:{},n=r.required,o=r.onUnauthenticated,i=n&&"unauthenticated"===t.status;return(g.useEffect(function(){if(i){var e="/api/auth/signin?".concat(new
2URLSearchParams({error:"SessionRequired",callbackUrl:window.location.href}));o?o():window.location.href=e}},[i,o]),i)?{data:t.data,update:t.update,status:"loading"}:t};var f=u(e.r(231277)),p=u(e.r(514414)),h=u(e.r(145940)),y=u(e.r(462195)),g=S(e.r(271645)),m=S(e.r(36357)),b=u(e.r(498520)),_=e.r(790120),v=e.r(843476),w=e.r(627667);function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(E=function(e){return e?r:t})(e)}function S(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=l(e)&&"function"!=typeof e)return{default:e};var r=E(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&({}).hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function k(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}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach(function(t){(0,p.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}
2Object.keys(w).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(d,e)||e in r&&r[e]===w[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return w[e]}})});var A={baseUrl:(0,b.default)(null!=(n=c.default.env.NEXTAUTH_URL)?n:c.default.env.VERCEL_URL).origin,basePath:(0,b.default)(c.default.env.NEXTAUTH_URL).path,baseUrlServer:(0,b.default)(null!=(o=null!=(i=c.default.env.NEXTAUTH_URL_INTERNAL)?i:c.default.env.NEXTAUTH_URL)?o:c.default.env.VERCEL_URL).origin,basePathServer:(0,b.default)(null!=(a=c.default.env.NEXTAUTH_URL_INTERNAL)?a:c.default.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:function(){}},O=(0,_.BroadcastChannel)(),R=(0,m.proxyLogger)(m.default,A.basePath),P=r.SessionContext=null==(s=g.createContext)?void 0:s.call(g,void 0);function T(e){return j.apply(this,arguments)}function j(){return(j=(0,h.default)(f.default.mark(function e(t){var r,n;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.fetchData)("session",A,R,t);case 2:return n=e.sent,(null==(r=null==t?void 0:t.broadcast)||r)&&O.post({event:"session",data:{trigger:"getSession"}}),e.abrupt("return",n);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function C(e){return I.apply(this,arguments)}function I(){return(I=(0,h.default)(f.default.mark(function e(t){var r;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.fetchData)("csrf",A,R,t);case 2:return r=e.sent,e.abrupt("return",null==r?void 0:r.csrfToken);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function D(){return M.apply(this,arguments)}function M(){return(M=(0,h.default)(f.default.mark(function e(){return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.fetchData)("providers",A,R);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function N(){return(N=(0,h.default)(f.default.mark(function e(t,r,n){var o,i,a,s,c,u,l,d,p,h,y,g,m,b,v,w,E;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=void 0===(i=(o=null!=r?r:{}).callbackUrl)?window.location.href:i,c=void 0===(s=o.redirect)||s,u=(0,_.apiBaseUrl)(A),e.next=4,D();case 4:if(l=e.sent){e.next=8;break}return window.location.href="".concat(u,"/error"),e.abrupt("return");case 8:if(!(!t||!(t in l))){e.next=11;break}return window.location.href="".concat(u,"/signin?").concat(new URLSearchParams({callbackUrl:a})),e.abrupt("return");case 11:return d="credentials"===l[t].type,p="email"===l[t].type,h=d||p,y="".concat(u,"/").concat(d?"callback":"signin","/").concat(t),g="".concat(y).concat(n?"?".concat(new URLSearchParams(n)):""),e.t0=fetch,e.t1=g,e.t2={"Content-Type":"application/x-www-form-urlencoded"},e.t3=URLSearchParams,e.t4=x,e.t5=x({},r),e.t6={},e.next=25,C();case 25:return e.t7=e.sent,e.t8=a,e.t9={csrfToken:e.t7,callbackUrl:e.t8,json:!0},e.t10=(0,e.t4)(e.t5,e.t6,e.t9),e.t11=new e.t3(e.t10),e.t12={method:"post",headers:e.t2,body:e.t11},e.next=33,(0,e.t0)(e.t1,e.t12);case 33:return m=e.sent,e.next=36,m.json();case 36:if(b=e.sent,!(c||!h)){e.next=42;break}return w=null!=(v=b.url)?v:a,window.location.href=w,w.includes("#")&&window.location.reload(),e.abrupt("return");case 42:if(E=new URL(b.url).searchParams.get("error"),!m.ok){e.next=46;break}return e.next=46,A._getSession({event:"storage"});case 46:return e.abrupt("return",{error:E,status:m.status,ok:m.ok,url:E?null:b.url});case 47:case"end":return e.stop()}},e)}))).apply(this,arguments)}function U(){return(U=(0,h.default)(f.default.mark(function e(t){var r,n,o,i,a,s,c,u,l;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=void 0===(n=(null!=t?t:{}
2).callbackUrl)?window.location.href:n,i=(0,_.apiBaseUrl)(A),e.t0={"Content-Type":"application/x-www-form-urlencoded"},e.t1=URLSearchParams,e.next=6,C();case 6:return e.t2=e.sent,e.t3=o,e.t4={csrfToken:e.t2,callbackUrl:e.t3,json:!0},e.t5=new e.t1(e.t4),a={method:"post",headers:e.t0,body:e.t5},e.next=13,fetch("".concat(i,"/signout"),a);case 13:return s=e.sent,e.next=16,s.json();case 16:if(c=e.sent,O.post({event:"session",data:{trigger:"signout"}}),!(null==(r=null==t?void 0:t.redirect)||r)){e.next=23;break}return l=null!=(u=c.url)?u:o,window.location.href=l,l.includes("#")&&window.location.reload(),e.abrupt("return");case 23:return e.next=25,A._getSession({event:"storage"});case 25:return e.abrupt("return",c);case 26:case"end":return e.stop()}},e)}))).apply(this,arguments)}},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 n.default.env.NEXTAUTH_URL?n.default.env.NEXTAUTH_URL:(null!=(r=n.default.env.VERCEL)?r:n.default.env.AUTH_TRUST_HOST)?`${"http"===t?"http":"https"}://${e}`:n.default.env.NEXTAUTH_URL}},498520,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t;let r=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e=`https://${e}`);let n=new URL(null!=(t=e)?t:r),o=("/"===n.pathname?r.pathname:n.pathname).replace(/\/$/,""),i=`${n.origin}${o}`;return{origin:n.origin,host:n.host,path:o,base:i,toString:()=>i}}},476353,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DynamicServerError:function(){return a},isDynamicServerError:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i="DYNAMIC_SERVER_USAGE";class a extends Error{constructor(e){super(`Dynamic server usage: ${e}`),this.description=e,this.digest=i}}function s(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===i}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},643248,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={StaticGenBailoutError:function(){return a},isStaticGenBailoutError:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i="NEXT_STATIC_GEN_BAILOUT";class a extends Error{constructor(...e){super(...e),this.code=i}}function s(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===i}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},928649,(e,t,r)=>{"use strict";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={},c={RequestCookies:()=>y,ResponseCookies:()=>g,parseCookie:()=>d,parseSetCookie:()=>f,stringifyCookie:()=>l};for(var u in c)n(s,u,{get:c[u],enumerable:!0});function l(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,o]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=o?o:"true"))}catch{}}return t}function f(e){if(!e)return;let[[t,r],...n]=d(e),{domain:o,expires:i,httponly:a,maxage:s,path:c,samesite:u,secure:l,partitioned:f,priority:y}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,m,b={name:t,value:decodeURIComponent(r),domain:o,...i&&{expires:new Date(i)},...a&&{httpOnly:!0},..."string"==typeof s&&{maxAge:Number(s)},path:c,...u&&{sameSite:p.includes(g=(g=u).toLowerCase())?g:void 0},...l&&{secure:!0},...y&&{priority:h.includes(m=(m=y).toLowerCase())?m:void 0},...f&&{partitioned:!0}};let e={};for(let t in b)b[t]&&(e[t]=b[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))a.call(e,s)||void 0===s||n(e,s,{get:()=>t[s],enumerable:!(r=o(t,s))||r.enumerable});return e})(n({},"__esModule",{value:!0}),s);var p=["strict","lax","none"],h=["low","medium","high"],y=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}
2has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>l(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>l(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;const o=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(const e of Array.isArray(o)?o:function(e){if(!e)return[];var t,r,n,o,i,a=[],s=0;function c(){for(;s<e.length&&/\s/.test(e.charAt(s));)s+=1;return s<e.length}for(;s<e.length;){for(t=s,i=!1;c();)if(","===(r=e.charAt(s))){for(n=s,s+=1,c(),o=s;s<e.length&&"="!==(r=e.charAt(s))&&";"!==r&&","!==r;)s+=1;s<e.length&&"="===e.charAt(s)?(i=!0,s=o,a.push(e.substring(t,n)),t=s):s=n+1}else s+=1;(!i||s>=e.length)&&a.push(e.substring(t,e.length))}return a}(o)){const t=f(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,o=this._parsed;return o.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=l(r);t.append("set-cookie",e)}}(o,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(l).join("; ")}}},196883,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={RequestCookies:function(){return i.RequestCookies},ResponseCookies:function(){return i.ResponseCookies},stringifyCookie:function(){return i.stringifyCookie}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(928649)},440224,(e,t,r)=>{var n=e.i(247167),o=e.i(467034),i={7492: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 o=[],i=0;i<e.length;i++)if(t.call(e,i)){var a=e[i];r.call(n,a,i,e)&&o.push(a)}return o};var t=Object.prototype.hasOwnProperty},6810:function(e,t,r){"use strict";function o(e){return(o="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 i,a,s=r(3431).codes,c=s.ERR_AMBIGUOUS_ARGUMENT,u=s.ERR_INVALID_ARG_TYPE,l=s.ERR_INVALID_ARG_VALUE,d=s.ERR_INVALID_RETURN_VALUE,f=s.ERR_MISSING_ARGS,p=r(9396),h=r(4268).inspect,y=r(4268).types,g=y.isPromise,m=y.isRegExp,b=Object.assign,_=Object.is?Object.is:r(8388);function v(){var e=r(2761);i=e.isDeepEqual,a=e.isDeepStrictEqual}var w=!1,E=e.exports=A,S={};function k(e){if(e.message instanceof Error)throw e.message;throw new p(e)}function x(e,t,r,n){if(!r){var o=!1;if(0===t)o=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var i=new p({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw i.generatedMessage=o,i}}function A(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];x.apply(void 0,[A,t.length].concat(t))}E.fail=function e(t,r,o,i,a){var s,c=arguments.length;if(0===c?s="Failed":1===c?(o=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&&(i="!=")),o instanceof Error)throw o;var u={actual:t,expected:r,operator:void 0===i?"fail":i,stackStartFn:a||e};
2void 0!==o&&(u.message=o);var l=new p(u);throw s&&(l.message=s,l.generatedMessage=!0),l},E.AssertionError=p,E.ok=A,E.equal=function e(t,r,n){if(arguments.length<2)throw new f("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 f("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 f("actual","expected");void 0===i&&v(),i(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 f("actual","expected");void 0===i&&v(),i(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 f("actual","expected");void 0===i&&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 f("actual","expected");void 0===i&&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 f("actual","expected");_(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 f("actual","expected");_(t,r)&&k({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var O=function e(t,r,n){var o=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])?o[e]=n[e]:o[e]=t[e])})};function R(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"!==o(e)||null===e){var s=new p({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===i&&v(),c.forEach(function(o){if(!("string"==typeof e[o]&&m(t[o])&&t[o].test(e[o]))&&(!(o in e)||!a(e[o],t[o]))){if(!r){var i=new p({actual:new O(e,c),expected:new O(t,c,e),operator:"deepStrictEqual",stackStartFn:n});throw i.actual=e,i.expected=t,i.operator=n.name,i}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 P(e){if("function"!=typeof e)throw new u("fn","Function",e);try{e()}catch(e){return e}return S}function T(e){return g(e)||null!==e&&"object"===o(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function j(e){return Promise.resolve().then(function(){var t;if("function"==typeof e){if(!T(t=e()))throw new d("instance of Promise","promiseFn",t)}else if(T(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 C(e,t,r,n){if("string"==typeof r){if(4==arguments.length)throw new u("error",["Object","Error","Function","RegExp"],r);if("object"===o(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"!==o(r)&&"function"!=typeof r)throw new u("error",["Object","Error","Function","RegExp"],r);if(t===S){var i="";r&&r.name&&(i+=" (".concat(r.name,")")),i+=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(i),stackStartFn:e})}if(r&&!R(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||R(t,r)){var o=n?": ".concat(n):".",i="doesNotReject"===e.name?"rejection":"exception";
2k({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(i).concat(o,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function D(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];x.apply(void 0,[D,t.length].concat(t))}E.throws=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];C.apply(void 0,[e,P(t)].concat(n))},E.rejects=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return j(t).then(function(t){return C.apply(void 0,[e,t].concat(n))})},E.doesNotThrow=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];I.apply(void 0,[e,P(t)].concat(n))},E.doesNotReject=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return j(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"===o(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=h(t);var n=new p({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),i=t.stack;if("string"==typeof i){var a=i.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=b(D,E,{equal:E.strictEqual,deepEqual:E.deepStrictEqual,notEqual:E.notStrictEqual,notDeepEqual:E.notDeepStrictEqual}),E.strict.strict=E.strict},9396:function(e,t,r){"use strict";function o(e,t){return t&&("object"===l(t)||"function"==typeof t)?t:i(e)}function i(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 o=new(Function.bind.apply(e,n));return r&&c(o,r.prototype),o}: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(4268).inspect,f=r(3431).codes.ERR_INVALID_ARG_TYPE;function p(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="",b={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 _(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})}
2e.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 f("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=o(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=_(d),w=_(w)),"deepStrictEqual"===s||"strictEqual"===s)t=o(this,u(r).call(this,function(e,t,r){var o="",i="",a=0,s="",c=!1,u=v(e),d=u.split("\n"),f=v(t).split("\n"),_=0,w="";if("strictEqual"===r&&"object"===l(e)&&"object"===l(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===d.length&&1===f.length&&d[0]!==f[0]){var E=d[0].length+f[0].length;if(E<=10){if(("object"!==l(e)||null===e)&&("object"!==l(t)||null===t)&&(0!==e||0!==t))return"".concat(b[r],"\n\n")+"".concat(d[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r&&E<(n.default.stderr&&n.default.stderr.isTTY?n.default.stderr.columns:80)){for(;d[0][_]===f[0][_];)_++;_>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)}(" ",_),"^"),_=0)}}for(var S=d[d.length-1],k=f[f.length-1];S===k&&(_++<2?s="\n ".concat(S).concat(s):o=S,d.pop(),f.pop(),0!==d.length&&0!==f.length);)S=d[d.length-1],k=f[f.length-1];var x=Math.max(d.length,f.length);if(0===x){var A=u.split("\n");if(A.length>30)for(A[26]="".concat(h,"...").concat(m);A.length>27;)A.pop();return"".concat(b.notIdentical,"\n\n").concat(A.join("\n"),"\n")}_>3&&(s="\n".concat(h,"...").concat(m).concat(s),c=!0),""!==o&&(s="\n ".concat(o).concat(s),o="");var O=0,R=b[r]+"\n".concat(y,"+ actual").concat(m," ").concat(g,"- expected").concat(m),P=" ".concat(h,"...").concat(m," Lines skipped");for(_=0;_<x;_++){var T=_-a;if(d.length<_+1)T>1&&_>2&&(T>4?(i+="\n".concat(h,"...").concat(m),c=!0):T>3&&(i+="\n ".concat(f[_-2]),O++),i+="\n ".concat(f[_-1]),O++),a=_,o+="\n".concat(g,"-").concat(m," ").concat(f[_]),O++;else if(f.length<_+1)T>1&&_>2&&(T>4?(i+="\n".concat(h,"...").concat(m),c=!0):T>3&&(i+="\n ".concat(d[_-2]),O++),i+="\n ".concat(d[_-1]),O++),a=_,i+="\n".concat(y,"+").concat(m," ").concat(d[_]),O++;else{var j=f[_],C=d[_],I=C!==j&&(!p(C,",")||C.slice(0,-1)!==j);I&&p(j,",")&&j.slice(0,-1)===C&&(I=!1,C+=","),I?(T>1&&_>2&&(T>4?(i+="\n".concat(h,"...").concat(m),c=!0):T>3&&(i+="\n ".concat(d[_-2]),O++),i+="\n ".concat(d[_-1]),O++),a=_,i+="\n".concat(y,"+").concat(m," ").concat(C),o+="\n".concat(g,"-").concat(m," ").concat(j),O+=2):(i+=o,o="",(1===T||0===_)&&(i+="\n ".concat(C),O++))}if(O>20&&_<x-2)return"".concat(R).concat(P,"\n").concat(i,"\n").concat(h,"...").concat(m).concat(o,"\n")+"".concat(h,"...").concat(m)}return"".concat(R).concat(c?P:"","\n").concat(i).concat(o).concat(s).concat(w)}(d,w,s)));else if("notDeepStrictEqual"===s||"notStrictEqual"===s){var S=b[s],k=v(d).split("\n");if("notStrictEqual"===s&&"object"===l(d)&&null!==d&&(S=b.notStrictEqualObject),k.length>30)for(k[26]="".concat(h,"...").concat(m);k.length>27;)k.pop();t=1===k.length?o(this,u(r).call(this,"".concat(S," ").concat(k[0]))):o(this,u(r).call(this,"".concat(S,"\n\n").concat(k.join("\n"),"\n")))}else{var x=v(d),A="",O=b[s];"notDeepEqual"===s||"notEqual"===s?(x="".concat(b[s],"\n\n").concat(x)).length>1024&&(x="".concat(x.slice(0,1021),"...")):(A="".concat(v(w)),x.length>512&&(x="".concat(x.slice(0,509),"...")),A.length>512&&(A="".concat(A.slice(0,509),"...")),"deepEqual"===s||"equal"===s?x="".concat(O,"\n\n").concat(x,"\n\nshould equal\n\n"):A=" ".concat(s," ").concat(A)),t=o(this,u(r).call(this,"".concat(x).concat(A)))}return Error.stackTraceLimit=E,t.generatedMessage=!a,Object.defineProperty(i(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(i(t),c),t.stack,t.name="AssertionError",o(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}
2))),n.forEach(function(t){var n,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})}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))},3431: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 o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=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,i,s){var c,u;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");return(c=(u=o(a).call(this,"string"==typeof t?t:t(r,i,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&&i(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,o){if((void 0===a&&(a=r(6810)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(i="not ",t.substr(0,i.length)===i))?(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)f="The ".concat(e," ").concat(d," ").concat(l(t,"type"));else{var i,s,c,u,d,f,p=("number"!=typeof u&&(u=0),u+1>e.length||-1===e.indexOf(".",u))?"argument":"property";f='The "'.concat(e,'" ').concat(p," ").concat(d," ").concat(l(t,"type"))}return f+". Received type ".concat(n(o))},TypeError),u("ERR_INVALID_ARG_VALUE",function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(4268));var o=s.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(o)},TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",function(e,t,r){var o;return o=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(o,".")},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(6810)),a(t.length>0,"At least one arg needs to be specified");var o="The ",i=t.length;switch(t=t.map(function(e){return'"'.concat(e,'"')}),i){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,i-1).join(", "),o+=", and ".concat(t[i-1]," arguments")}return"".concat(o," must be specified")},TypeError),e.exports.codes=c},2761: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,o=!1,i=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){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return(o="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 i=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(8388),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:r(5211);function d(e){return e.call.bind(e)}var f=d(Object.prototype.hasOwnProperty),p=d(Object.prototype.propertyIsEnumerable),h=d(Object.prototype.toString),y=r(4268).types,g=y.isAnyArrayBuffer,m=y.isArrayBufferView,b=y.isDate,_=y.isMap,v=y.isRegExp,w=y.isSet,E=y.isNativeError,S=y.isBoxedPrimitive,k=y.isNumberObject,x=y.isStringObject,A=y.isBooleanObject,O=y.isBigIntObject,R=y.isSymbolObject,P=y.isFloat32Array,T=y.isFloat64Array;function j(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 C(e){return Object.keys(e).filter(j).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,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:+(n<r)}function D(e,t,r,n){if(e===t)return 0!==e||!r||c(e,t);if(r){if("object"!==o(e))return"number"==typeof e&&l(e)&&l(t);if("object"!==o(t)||null===e||null===t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==o(e))return(null===t||"object"!==o(t))&&e==t;if(null===t||"object"!==o(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=C(e),u=C(t);return s.length===u.length&&N(e,t,r,n,1,s)}if("[object Object]"===a&&(!_(e)&&_(t)||!w(e)&&w(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(v(e)){if(!v(t)||(i?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&&(P(e)||T(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=C(e),f=C(t);return d.length===f.length&&N(e,t,r,n,0,d)}else if(w(e))return!!w(t)&&e.size===t.size&&N(e,t,r,n,2);else if(_(e))return!!_(t)&&e.size===t.size&&N(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))):x(e)?!x(t)||String.prototype.valueOf.call(e)!==String.prototype.valueOf.call(t):A(e)?!A(t)||Boolean.prototype.valueOf.call(e)!==Boolean.prototype.valueOf.call(t):O(e)?!O(t)||BigInt.prototype.valueOf.call(e)!==BigInt.prototype.valueOf.call(t):!R(t)||Symbol.prototype.valueOf.call(e)!==Symbol.prototype.valueOf.call(t)))return!1;return N(e,t,r,n,0)}function M(e,t){return t.filter(function(t){return p(e,t)})}function N(e,t,r,i,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(!f(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(p(e,m)){if(!p(t,m))return!1;l.push(m),g++}else if(p(t,m))return!1}var b=u(t);if(y.length!==b.length&&M(t,b).length!==g)return!1}else{var _=u(t);if(0!==_.length&&0!==M(t,_).length)return!1}}
2if(0===l.length&&(0===c||1===c&&0===e.length||0===e.size))return!0;if(void 0===i)i={val1:new Map,val2:new Map,position:0};else{var v=i.val1.get(e);if(void 0!==v){var w=i.val2.get(t);if(void 0!==w)return v===w}i.position++}i.val1.set(e,i.position),i.val2.set(t,i.position);var E=function(e,t,r,i,c,u){var l=0;if(2===u){if(!function(e,t,r,n){for(var i=null,s=a(e),c=0;c<s.length;c++){var u=s[c];if("object"===o(u)&&null!==u)null===i&&(i=new Set),i.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===i&&(i=new Set),i.add(u)}}if(null!==i){for(var l=a(t),d=0;d<l.length;d++){var f=l[d];if("object"===o(f)&&null!==f){if(!U(i,f,r,n))return!1}else if(!r&&!e.has(f)&&!U(i,f,r,n))return!1}return 0===i.size}return!0}(e,t,r,c))return!1}else if(3===u){if(!function(e,t,r,i){for(var a=null,c=s(e),u=0;u<c.length;u++){var l=n(c[u],2),d=l[0],f=l[1];if("object"===o(d)&&null!==d)null===a&&(a=new Set),a.add(d);else{var p=t.get(d);if(void 0===p&&!t.has(d)||!D(f,p,r,i)){if(r||!function(e,t,r,n,o){var i=H(r);if(null!=i)return i;var a=t.get(i);return(void 0!==a||!!t.has(i))&&!!D(n,a,!1,o)&&!e.has(i)&&D(n,a,!1,o)}(e,t,d,f,i))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"===o(d)&&null!==d){if(!$(a,e,d,m,r,i))return!1}else if(!r&&(!e.has(d)||!D(e.get(d),m,!1,i))&&!$(a,e,d,m,!1,i))return!1}return 0===a.size}return!0}(e,t,r,c))return!1}else if(1===u)for(;l<e.length;l++)if(f(e,l)){if(!f(t,l)||!D(e[l],t[l],r,c))return!1}else{if(f(t,l))return!1;for(var d=Object.keys(e);l<d.length;l++){var p=d[l];if(!f(t,p)||!D(e[p],t[p],r,c))return!1}if(d.length!==Object.keys(t).length)return!1;return!0}for(l=0;l<i.length;l++){var h=i[l];if(!D(e[h],t[h],r,c))return!1}return!0}(e,t,r,l,i,c);return i.val1.delete(e),i.val2.delete(t),E}function U(e,t,r,n){for(var o=a(e),i=0;i<o.length;i++){var s=o[i];if(D(t,s,r,n))return e.delete(s),!0}return!1}function H(e){switch(o(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 $(e,t,r,n,o,i){for(var s=a(e),c=0;c<s.length;c++){var u=s[c];if(D(r,u,o,i)&&D(n,t.get(u),o,i))return e.delete(u),!0}return!1}e.exports={isDeepEqual:function(e,t){return D(e,t,!1)},isDeepStrictEqual:function(e,t){return D(e,t,!0)}}},1648:function(e,t,r){"use strict";var n=r(7797),o=r(4834),i=r(8772);e.exports=r(9095)||n.call(i,o)},4757:function(e,t,r){"use strict";var n=r(7797),o=r(4834),i=r(1648);e.exports=function(){return i(n,o,arguments)}},4834:function(e){"use strict";e.exports=Function.prototype.apply},8772:function(e){"use strict";e.exports=Function.prototype.call},2462:function(e,t,r){"use strict";var n=r(7797),o=r(4785),i=r(8772),a=r(1648);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(n,i,e)}},9095:function(e){"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},2400:function(e,t,r){"use strict";var n=r(7797),o=r(1893),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%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,i,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},2982:function(e,t,r){"use strict";var n=r(1893),o=r(5494),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},5494:function(e,t,r){"use strict";var n=r(3798),o=r(871),i=r(2462),a=r(4757);e.exports=function(e){var t=i(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},o?o(e.exports,"apply",{value:a}):e.exports.apply=a},2071:function(e,t,r){"use strict";var n=r(871),o=r(9546),i=r(4785),a=r(8322);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");
2if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`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 o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},1246:function(e,t,r){"use strict";var n=r(7238),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=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]"===i.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]:{},i=n(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s<i.length;s+=1)u(e,i[s],t[i[s]],r[i[s]])};l.supportsDescriptors=!!c,e.exports=l},3859:function(e,t,r){"use strict";var n,o=r(2462),i=r(8322);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&&i&&i(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof c&&function(e){return c(null==e?e:s(e))}},871:function(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},1247:function(e){"use strict";e.exports=EvalError},6621:function(e){"use strict";e.exports=Error},6136:function(e){"use strict";e.exports=RangeError},252:function(e){"use strict";e.exports=ReferenceError},9546:function(e){"use strict";e.exports=SyntaxError},4785:function(e){"use strict";e.exports=TypeError},1223:function(e){"use strict";e.exports=URIError},8300:function(e){"use strict";e.exports=Object},3639: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 o=arguments[n];if(null!=o)for(var i=Object.keys(Object(o)),a=0,s=i.length;a<s;a++){var c=i[a],u=Object.getOwnPropertyDescriptor(o,c);void 0!==u&&u.enumerable&&(r[c]=o[c])}}return r},polyfill:function(){}}},4680:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,o){if("[object Function]"!==r.call(n))throw TypeError("iterator must be a function");var i=e.length;if(i===+i)for(var a=0;a<i;a++)n.call(o,e[a],a,e);else for(var s in e)t.call(e,s)&&n.call(o,e[s],s,e)}},6555: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 o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},o=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},i=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=o(arguments,1),u=r(0,s.length-c.length),l=[],d=0;d<u;d++)l[d]="$"+d;if(a=Function("binder","return function ("+i(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 f=function(){};f.prototype=s.prototype,a.prototype=new f,f.prototype=null}return a}},7797:function(e,t,r){"use strict";var n=r(6555);e.exports=Function.prototype.bind||n},1893:function(e,t,r){"use strict";var n,o=r(8300),i=r(6621),a=r(1247),s=r(6136),c=r(252),u=r(9546),l=r(4785),d=r(1223),f=r(4197),p=r(4455),h=r(1295),y=r(6949),g=r(2943),m=r(1721),b=r(3536),_=Function,v=function(e){try{return _('"use strict"; return ('+e+").constructor;")()}catch(e){}},w=r(8322),E=r(871),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,x=r(9131)(),A=r(9717),O=r(45),R=r(7767),P=r(4834),T=r(8772),j={},C="u">typeof Uint8Array&&A?A(Uint8Array):n,I={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":x&&A?A([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%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%":i,"%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%":_,"%GeneratorFunction%":j,"%Int8Array%":"u"<typeof Int8Array?n:Int8Array,"%Int16Array%":"u"<typeof Int16Array?n:Int16Array,"%Int32Array%":"u"<typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
2IteratorPrototype%":x&&A?A(A([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"u"<typeof Map?n:Map,"%MapIteratorPrototype%":"u">typeof Map&&x&&A?A((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%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&&x&&A?A((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":x&&A?A(""[Symbol.iterator]()):n,"%Symbol%":x?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":k,"%TypedArray%":C,"%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%":T,"%Function.prototype.apply%":P,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":O,"%Math.abs%":f,"%Math.floor%":p,"%Math.max%":h,"%Math.min%":y,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":b,"%Reflect.getPrototypeOf%":R};if(A)try{null.error}catch(e){var D=A(A(e));I["%Error.prototype%"]=D}var M=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 o=e("%AsyncGenerator%");o&&A&&(r=A(o.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"]},U=r(7797),H=r(3383),$=U.call(T,Array.prototype.concat),L=U.call(P,Array.prototype.splice),W=U.call(T,String.prototype.replace),B=U.call(T,String.prototype.slice),K=U.call(T,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,q=function(e){var t=B(e,0,1),r=B(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 W(e,Z,function(e,t,r,o){n[n.length]=r?W(o,F,"$1"):t||e}),n},J=function(e,t){var r,n=e;if(H(N,n)&&(n="%"+(r=N[n])[0]+"%"),H(I,n)){var o=I[n];if(o===j&&(o=M(n)),void 0===o&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}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]:"",o=J("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],L(r,$([0,1],c)));for(var d=1,f=!0;d<r.length;d+=1){var p=r[d],h=B(p,0,1),y=B(p,-1);if(('"'===h||"'"===h||"`"===h||'"'===y||"'"===y||"`"===y)&&h!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==p&&f||(s=!0),n+="."+p,H(I,i="%"+n+"%"))a=I[i];
2else if(null!=a){if(!(p 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,p);a=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[p]}else f=H(a,p),a=a[p];f&&!s&&(I[i]=a)}}return a}},45:function(e,t,r){"use strict";e.exports=r(8300).getPrototypeOf||null},7767:function(e){"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},9717:function(e,t,r){"use strict";var n=r(7767),o=r(45),i=r(3859);e.exports=n?function(e){return n(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},8422:function(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},8322:function(e,t,r){"use strict";var n=r(8422);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8122:function(e,t,r){"use strict";var n=r(871),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},8564:function(e,t,r){"use strict";var n="u">typeof Symbol&&Symbol,o=r(9094);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9094: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 o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9131:function(e,t,r){"use strict";var n="u">typeof Symbol&&Symbol,o=r(6313);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},6313: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 o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[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}},3383:function(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty;e.exports=r(7797).call(n,o)},1638: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}}},6960: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)},o=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)},i=function(){return n(arguments)}();n.isLegacyArguments=o,e.exports=i?n:o},8979:function(e){"use strict";var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,i=Object.getPrototypeOf,a=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?i(a):{};e.exports=function(e){return"function"==typeof e&&(!!n.test(r.call(e))||(o?i(e)===s:"[object GeneratorFunction]"===t.call(e)))}},2397:function(e){"use strict";e.exports=function(e){return e!=e}},5211:function(e,t,r){"use strict";var n=r(2400),o=r(1246),i=r(2397),a=r(8840),s=r(9682),c=n(a(),Number);o(c,{getPolyfill:a,implementation:i,shim:s}),e.exports=c},8840:function(e,t,r){"use strict";var n=r(2397);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},9682:function(e,t,r){"use strict";var n=r(1246),o=r(8840);e.exports=function(){var e=o();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},9572:function(t,r,n){"use strict";var o=n(4680),i=n(3147),a=n(2982),s=a("Object.prototype.toString"),c=n(8564)()&&"symbol"==typeof Symbol.toStringTag,u=i(),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"),f={},p=n(9745),h=Object.getPrototypeOf;c&&p&&h&&o(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),o=p(n,Symbol.toStringTag);o||(o=p(h(n),Symbol.toStringTag)),f[t]=o.get});var y=function(e){var t=!1;return o(f,function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}}),t};t.exports=function(e){return!!e&&"object"==typeof e&&(c?!!p&&y(e):l(u,d(s(e),8,-1))>-1)}},4197:function(e){"use strict";e.exports=Math.abs},4455:function(e){"use strict";e.exports=Math.floor},6128:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},1295:function(e){"use strict";e.exports=Math.max},6949:function(e){"use strict";e.exports=Math.min},2943:function(e){"use strict";e.exports=Math.pow},1721:function(e){"use strict";e.exports=Math.round},3536:function(e,t,r){"use strict";var n=r(6128);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},8388: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))}},7742:function(e,t,r){"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(426),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},f={$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},p=function(){if("u"<typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&o.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||!p)return d(e);try{return d(e)}catch(e){return!1}};n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),n=a(e),s=t&&"[object String]"===i.call(e),d=[];if(!t&&!r&&!n)throw TypeError("Object.keys called on a non-object");var f=u&&r;if(s&&e.length>0&&!o.call(e,0))for(var p=0;p<e.length;++p)d.push(String(p));if(n&&e.length>0)for(var y=0;y<e.length;++y)d.push(String(y));else for(var g in e)!(f&&"prototype"===g)&&o.call(e,g)&&d.push(String(g));if(c)for(var m=h(e),b=0;b<l.length;++b)!(m&&"constructor"===l[b])&&o.call(e,l[b])&&d.push(l[b]);return d}}e.exports=n},7238:function(e,t,r){"use strict";var n=Array.prototype.slice,o=r(426),i=Object.keys,a=i?function(e){return i(e)}:r(7742),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 o(e)?s(n.call(e)):s(e)}):Object.keys=a,Object.keys||a},e.exports=a},426: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}},3798:function(e,t,r){"use strict";var n=r(1893),o=r(2071),i=r(8122)(),a=r(8322),s=r(4785),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)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},3614:function(e){e.exports=function(e){return e instanceof o.Buffer}},7551:function(e,t,r){"use strict";var n=r(6960),o=r(8979),i=r(3051),a=r(9572);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),f=s(String.prototype.valueOf),p=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 b(e){return"[object Set]"===l(e)}function _(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=o,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"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},m.working="u">typeof Map&&m(new Map),t.isMap=function(e){return!("u"<typeof Map)&&(m.working?m(e):e instanceof Map)},b.working="u">typeof Set&&b(new Set),t.isSet=function(e){return!("u"<typeof Set)&&(b.working?b(e):e instanceof Set)},_.working="u">typeof WeakMap&&_(new WeakMap),t.isWeakMap=function(e){return!("u"<typeof WeakMap)&&(_.working?_(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 x="u">typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function A(e){return"[object SharedArrayBuffer]"===l(e)}function O(e){return void 0!==x&&(void 0===A.working&&(A.working=A(new x)),A.working?A(e):e instanceof x)}function R(e){return g(e,d)}function P(e){return g(e,f)}function T(e){return g(e,p)}function j(e){return c&&g(e,h)}function C(e){return u&&g(e,y)}t.isSharedArrayBuffer=O,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=R,t.isStringObject=P,t.isBooleanObject=T,t.isBigIntObject=j,t.isSymbolObject=C,t.isBoxedPrimitive=function(e){return R(e)||P(e)||T(e)||j(e)||C(e)},t.isAnyArrayBuffer=function(e){return"u">typeof Uint8Array&&(E(e)||O(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},4268:function(e,t,r){var o=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},i=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,o=n.length,a=String(e).replace(i,function(e){if("%%"===e)return"%";if(r>=o)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<o;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 o=!1;return function(){if(!o){if(n.default.throwDeprecation)throw Error(r);n.default.traceDeprecation?console.trace(r):console.error(r),o=!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),f(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 f(e,r,n){if(e.customInspect&&r&&x(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var o,i,a,s,c,u,l=r.inspect(n,e);return _(l)||(l=f(e,l,n)),l}var d=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(_(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";
2return e.stylize(r,"string")}return b(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),A=(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 p(r);if(0===E.length){if(x(r)){var O=r.name?": "+r.name:"";return e.stylize("[Function"+O+"]","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 p(r)}var R="",T=!1,j=["{","}"];if(y(r)&&(T=!0,j=["[","]"]),x(r)&&(R=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(R=" "+RegExp.prototype.toString.call(r)),S(r)&&(R=" "+Date.prototype.toUTCString.call(r)),k(r)&&(R=" "+p(r)),0===E.length&&(!T||0==r.length))return j[0]+R+j[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=T?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)P(t,String(a))?i.push(h(e,t,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(h(e,t,r,n,o,!0))}),i}(e,r,n,A,E):E.map(function(t){return h(e,r,n,A,t,T)}),e.seen.pop(),o=u,i=R,a=j,s=0,o.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]+(""===i?"":i+"\n ")+" "+o.join(",\n ")+" "+a[1]:a[0]+i+" "+o.join(", ")+" "+a[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),P(n,o)||(a="["+o+"]"),!s&&(0>e.seen.indexOf(c.value)?(s=m(r)?f(e,c.value,null):f(e,c.value,r-1)).indexOf("\n")>-1&&(s=i?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(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).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 b(e){return"number"==typeof e}function _(e){return"string"==typeof e}function v(e){return void 0===e}function w(e){return E(e)&&"[object RegExp]"===A(e)}function E(e){return"object"==typeof e&&null!==e}function S(e){return E(e)&&"[object Date]"===A(e)}function k(e){return E(e)&&("[object Error]"===A(e)||e instanceof Error)}function x(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function O(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(7551),t.isArray=y,t.isBoolean=g,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=_,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=x,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(3614);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[O((e=new Date).getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":"),[e.getDate(),R[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(1638),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 T="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function j(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(T&&e[T]){var t=e[T];if("function"!=typeof t)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{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}),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push(function(e,n){e?r(e):t(n)});try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),T&&Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=T,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 o=t.pop();if("function"!=typeof o)throw TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then(function(e){n.default.nextTick(a.bind(null,null,e))},function(e){n.default.nextTick(j.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o(e)),t}},3051:function(t,r,n){"use strict";var o=n(4680),i=n(3147),a=n(2982),s=a("Object.prototype.toString"),c=n(8564)()&&"symbol"==typeof Symbol.toStringTag,u=i(),l=a("String.prototype.slice"),d={},f=n(9745),p=Object.getPrototypeOf;c&&f&&p&&o(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=p(r),o=f(n,Symbol.toStringTag);o||(o=f(p(n),Symbol.toStringTag)),d[t]=o.get}});var h=function(e){var t=!1;return o(d,function(r,n){if(!t)try{var o=r.call(e);o===n&&(t=o)}catch(e){}}),t},y=n(9572);t.exports=function(e){return!!y(e)&&(c?h(e):l(s(e),8,-1))}},3147:function(t,r,n){"use strict";var o=n(7492);t.exports=function(){return o(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],function(t){return"function"==typeof e.g[t]})}},9745:function(e,t,r){"use strict";e.exports=r(8322)}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}},n=!0;try{i[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(6810)},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 o extends t{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class i 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 f 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 p 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,o,"JOSEError",0,t,"JOSENotSupported",0,i,"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,p,"JWKSNoMatchingKey",0,f,"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,b=async(e,t)=>{let r=`SHA-${e.slice(-3)}`;return new Uint8Array(await m.subtle.digest(r,t))},_=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 x(e){return w(k(e.length),e)}async function A(e,t,r){let n=Math.ceil((t>>3)/32),o=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),o.set(await b("sha256",n),32*t)}return o.slice(0,t>>3)}let O=e=>{let t=e;"string"==typeof t&&(t=_.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(""))},R=e=>O(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),P=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},T=e=>{let t=e;t instanceof Uint8Array&&(t=v.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return P(t)}catch(e){throw TypeError("The input to be decoded is not correctly encoded.")}};e.s(["decode",0,T,"encode",0,R],840796);var j=e.i(840796);e.s([],964092),e.i(964092);let C=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 i(`Unsupported JWE Algorithm: ${e}`)}}let D=e=>C(new Uint8Array(I(e)>>3)),M=(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 U(e,t="algorithm.name"){return TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function H(e,t){return e.name===t}function $(e){return parseInt(e.name.slice(4),10)}function L(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 W(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!H(e.algorithm,"AES-GCM"))throw U("AES-GCM");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw U(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!H(e.algorithm,"AES-KW"))throw U("AES-KW");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw U(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw U("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!H(e.algorithm,"PBKDF2"))throw U("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!H(e.algorithm,"RSA-OAEP"))throw U("RSA-OAEP");let r=parseInt(t.slice(9),10)||1;if($(e.algorithm.hash)!==r)throw U(`SHA-${r}`,"algorithm.hash");break}default:throw TypeError("CryptoKey does not support this operation")}L(e,r)}function B(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)=>B("Key must be ",e,...t);function Z(e,t,...r){return B(`Key for the ${e} algorithm must be `,t,...r)}let F=["CryptoKey"];async function q(e,t,r,n,o,i){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"]),f=w(i,n,r,S(i.length<<3)),p=new Uint8Array((await m.subtle.sign("HMAC",d,f)).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,o=-1;for(;++o<r;)n|=e[o]^t[o];return 0===n})(o,p)}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 J(e,t,r,n,o,i){let s;t instanceof Uint8Array?s=await m.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(W(t,e,"decrypt"),s=t);try{return new Uint8Array(await m.subtle.decrypt({additionalData:i,iv:n,name:"AES-GCM",tagLength:128},s,w(r,o)))}catch(e){throw new a}}
2let z=async(e,t,r,n,o,a)=>{if(!(t instanceof CryptoKey)&&!(t instanceof Uint8Array))throw TypeError(K(t,...F,"Uint8Array"));switch(M(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,o,a);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&N(t,parseInt(e.slice(1,4),10)),J(e,t,r,n,o,a);default:throw new i("Unsupported JWE Content Encryption Algorithm")}},V=async()=>{throw new i('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.')},G=async()=>{throw new i('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.')},X=(...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 Y(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 W(e,t,r),e;if(e instanceof Uint8Array)return m.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw TypeError(K(e,...F,"Uint8Array"))}let er=async(e,t,r)=>{let n=await et(t,e,"wrapKey");ee(n,e);let o=await m.subtle.importKey("raw",r,...Q);return new Uint8Array(await m.subtle.wrapKey("raw",o,n,"AES-KW"))},en=async(e,t,r)=>{let n=await et(t,e,"unwrapKey");ee(n,e);let o=await m.subtle.unwrapKey("raw",r,n,"AES-KW",...Q);return new Uint8Array(await m.subtle.exportKey("raw",o))};async function eo(e,t,r,n,o=new Uint8Array(0),i=new Uint8Array(0)){let a;if(!(e instanceof CryptoKey))throw TypeError(K(e,...F));if(W(e,"ECDH"),!(t instanceof CryptoKey))throw TypeError(K(t,...F));W(t,"ECDH","deriveBits");let s=w(x(_.encode(r)),x(o),x(i),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,A(new Uint8Array(await m.subtle.deriveBits({name:e.algorithm.name,public:e},t,a)),n,s)}async function ei(e){if(!(e instanceof CryptoKey))throw TypeError(K(e,...F));return m.subtle.generateKey(e.algorithm,!0,["deriveBits"])}function ea(e){if(!(e instanceof CryptoKey))throw TypeError(K(e,...F));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 o=w(_.encode(t),new Uint8Array([0]),e),i=parseInt(t.slice(13,16),10),a={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:o},c=await function(e,t){if(e instanceof Uint8Array)return m.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(e instanceof CryptoKey)return W(e,t,"deriveBits","deriveKey"),e;throw TypeError(K(e,...F,"Uint8Array"))}(n,t);if(c.usages.includes("deriveBits"))return new Uint8Array(await m.subtle.deriveBits(a,c,i));if(c.usages.includes("deriveKey"))return m.subtle.deriveKey(a,c,{length:i,name:"AES-KW"},!1,["wrapKey","unwrapKey"]);throw TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}let ec=async(e,t,r,n=2048,o=C(new Uint8Array(16)))=>{let i=await es(o,e,n,t);return{encryptedKey:await er(e.slice(-6),i,r),p2c:n,p2s:R(o)}},eu=async(e,t,r,n,o)=>{let i=await es(o,e,n,t);return en(e.slice(-6),i,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 i(`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`)}},ef=async(e,t,r)=>{if(!(t instanceof CryptoKey))throw TypeError(K(t,...F));if(W(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')},ep=async(e,t,r)=>{if(!(t instanceof CryptoKey))throw TypeError(K(t,...F));if(W(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 i(`Unsupported JWE Algorithm: ${e}`)}}let ey=e=>C(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,...F));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return eg(O(new Uint8Array(await m.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},eb=(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 o=e.subarray(n,n+t.length);return o.length===t.length&&(o.every((e,r)=>e===t[r])||eb(e,t,n+1))},e_=e=>{switch(!0){case eb(e,[42,134,72,206,61,3,1,7]):return"P-256";case eb(e,[43,129,4,0,34]):return"P-384";case eb(e,[43,129,4,0,35]):return"P-521";case eb(e,[43,101,110]):return"X25519";case eb(e,[43,101,111]):return"X448";case eb(e,[43,101,112]):return"Ed25519";case eb(e,[43,101,113]):return"Ed448";default:throw new i("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},ev=async(e,t,r,n,o)=>{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=e_(u);s=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},c=l?[]:["deriveBits"];break}
4case"EdDSA":s={name:e_(u)},c=l?["verify"]:["sign"];break;default:throw new i('Invalid or unsupported "alg" (Algorithm) value')}return m.subtle.importKey(t,u,s,null!=(a=null==o?void 0:o.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 o=0;o<r;o++)n=256*n+e[t],t++}let o=t+n;return{byteLength:o,contents:e.subarray(t,o),raw:e.subarray(0,o)}}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:o}=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 i(`${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 i('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 i('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 i('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 i('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new i('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:o];if("PBKDF2"===n.name)return m.subtle.importKey("raw",T(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 ex(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 o;let t;o=e,n=eg((t=ew(ew(eE(P(o.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""))).contents)[0].contents),O(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 eA(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 eO(e,t,r){var n;if(!Y(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 T(e.k);case"RSA":if(void 0!==e.oth)throw new i('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return eS({...e,alg:t});default:throw new i('Unsupported "kty" (Key Type) Parameter value')}}let eR=(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(Z(e,t,...F,"Uint8Array"));if("secret"!==t.type)throw TypeError(`${F.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}}else{if(!(t instanceof CryptoKey))throw TypeError(Z(e,t,...F));if("secret"===t.type)throw TypeError(`${F.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw TypeError(`${F.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw TypeError(`${F.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw TypeError(`${F.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw TypeError(`${F.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)}};async function eP(e,t,r,n,o){if(!(r instanceof Uint8Array))throw TypeError(K(r,"Uint8Array"));let i=parseInt(e.slice(1,4),10),a=await m.subtle.importKey("raw",r.subarray(i>>3),"AES-CBC",!1,["encrypt"]),s=await m.subtle.importKey("raw",r.subarray(0,i>>3),{hash:`SHA-${i<<1}`,name:"HMAC"},!1,["sign"]),c=new Uint8Array(await m.subtle.encrypt({iv:n,name:"AES-CBC"},a,t)),u=w(o,n,c,S(o.length<<3));return{ciphertext:c,tag:new Uint8Array((await m.subtle.sign("HMAC",s,u)).slice(0,i>>3))}}async function eT(e,t,r,n,o){let i;r instanceof Uint8Array?i=await m.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(W(r,e,"encrypt"),i=r);let a=new Uint8Array(await m.subtle.encrypt({additionalData:o,iv:n,name:"AES-GCM",tagLength:128},i,t)),s=a.slice(-16);return{ciphertext:a.slice(0,-16),tag:s}}let ej=async(e,t,r,n,o)=>{if(!(r instanceof CryptoKey)&&!(r instanceof Uint8Array))throw TypeError(K(r,...F,"Uint8Array"));switch(M(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&N(r,parseInt(e.slice(-3),10)),eP(e,t,r,n,o);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&N(r,parseInt(e.slice(1,4),10)),eT(e,t,r,n,o);default:throw new i("Unsupported JWE Content Encryption Algorithm")}};async function eC(e,t,r,n){let o=e.slice(0,7);n||(n=D(o));let{ciphertext:i,tag:a}=await ej(o,r,t,n,new Uint8Array(0));return{encryptedKey:i,iv:R(n),tag:R(a)}}async function eI(e,t,r,n,o){return z(e.slice(0,7),t,r,n,o,new Uint8Array(0))}async function eD(e,t,r,n,o){switch(eR(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 o,a;if(!Y(n.epk))throw new s('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!ea(t))throw new i("ECDH with the provided key is not allowed or not supported by your javascript runtime");let c=await eO(n.epk,e);if(void 0!==n.apu){if("string"!=typeof n.apu)throw new s('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{o=T(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=T(n.apv)}catch(e){throw new s("Failed to base64url decode the apv")}}let u=await eo(c,t,"ECDH-ES"===e?n.enc:e,"ECDH-ES"===e?eh(n.enc):parseInt(e.slice(-5,-2),10),o,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 ep(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{let i;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==o?void 0:o.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{i=T(n.p2s)}catch(e){throw new s("Failed to base64url decode the p2s")}return eu(e,t,r,n.p2c,i)}
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 o,i;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{o=T(n.iv)}catch(e){throw new s("Failed to base64url decode the iv")}try{i=T(n.tag)}catch(e){throw new s("Failed to base64url decode the tag")}return eI(e,t,r,o,i)}default:throw new i('Invalid or unsupported "alg" (JWE Algorithm) header value')}}let eM=function(e,t,r,n,o){let a;if(void 0!==o.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 i(`Extension Header Parameter "${s}" is not recognized`);if(void 0===o[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 eU(e,t,r){var n;let a,c,u,l,d,f,p;if(!Y(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&&!Y(e.header))throw new s("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!Y(e.unprotected))throw new s("JWE Per-Recipient Unprotected Header incorrect type");if(e.protected)try{let t=T(e.protected);a=JSON.parse(v.decode(t))}catch(e){throw new s("JWE Protected Header is invalid")}if(!X(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(eM(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 i('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),b=r&&eN("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(m&&!m.has(y))throw new o('"alg" (Algorithm) Header Parameter not allowed');if(b&&!b.has(g))throw new o('"enc" (Encryption Algorithm) Header Parameter not allowed');if(void 0!==e.encrypted_key)try{c=T(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 eD(y,t,c,h,r)}catch(e){if(e instanceof TypeError||e instanceof s||e instanceof i)throw e;u=ey(g)}try{l=T(e.iv)}catch(e){throw new s("Failed to base64url decode the iv")}try{d=T(e.tag)}catch(e){throw new s("Failed to base64url decode the tag")}let S=_.encode(null!=(n=e.protected)?n:"");f=void 0!==e.aad?w(S,_.encode("."),_.encode(e.aad)):S;try{p=T(e.ciphertext)}catch(e){throw new s("Failed to base64url decode the ciphertext")}let k=await z(g,u,p,l,d,f);"DEF"===h.zip&&(k=await ((null==r?void 0:r.inflateRaw)||V)(k));let x={plaintext:k};if(void 0!==e.protected&&(x.protectedHeader=a),void 0!==e.aad)try{x.additionalAuthenticatedData=T(e.aad)}catch(e){throw new s("Failed to base64url decode the aad")}return(void 0!==e.unprotected&&(x.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(x.unprotectedHeader=e.header),E)?{...x,key:t}:x}async function eH(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:o,2:i,3:a,4:c,length:u}=e.split(".");if(5!==u)throw new s("Invalid Compact JWE");let l=await eU({ciphertext:a,iv:i||void 0,protected:n||void 0,tag:c||void 0,encrypted_key:o||void 0},t,r),d={plaintext:l.plaintext,protectedHeader:l.protectedHeader};return"function"==typeof t?{...d,key:l.key}:d}async function e$(e,t,r){if(!Y(e))throw new s("General JWE must be an object");
4if(!Array.isArray(e.recipients)||!e.recipients.every(Y))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 eU({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 eL=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:R(e)};if(!(e instanceof CryptoKey))throw TypeError(K(e,...F,"Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:n,use:o,...i}=await m.subtle.exportKey("jwk",e);return i};async function eW(e){return em("public","spki",e)}async function eB(e){return em("private","pkcs8",e)}async function eK(e){return eL(e)}async function eZ(e,t,r,n,o={}){let a,s,c;switch(eR(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 i("ECDH with the provided key is not allowed or not supported by your javascript runtime");let{apu:u,apv:l}=o,{epk:d}=o;d||(d=(await ei(r)).privateKey);let{x:f,y:p,crv:h,kty:y}=await eK(d),g=await eo(r,d,"ECDH-ES"===e?t:e,"ECDH-ES"===e?eh(t):parseInt(e.slice(-5,-2),10),u,l);if(s={epk:{x:f,crv:h,kty:y}},"EC"===y&&(s.epk.y=p),u&&(s.apu=R(u)),l&&(s.apv=R(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 ef(e,r,c);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{c=n||ey(t);let{p2c:i,p2s:u}=o;({encryptedKey:a,...s}=await ec(e,r,c,i,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:i}=o;({encryptedKey:a,...s}=await eC(e,r,c,i));break}default:throw new i('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:c,encryptedKey:a,parameters:s}}let eF=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,o,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(!X(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(eM(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 i('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}let{alg:f,enc:p}=d;if("string"!=typeof f||!f)throw new s('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof p||!p)throw new s('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if("dir"===f){if(this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}else if("ECDH-ES"===f&&this._cek)throw TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement");{let o;({cek:n,encryptedKey:r,parameters:o}=await eZ(f,p,e,this._cek,this._keyManagementParameters)),o&&(t&&eF in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...o}:this.setUnprotectedHeader(o):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...o}:this.setProtectedHeader(o))}if(this._iv||(this._iv=D(p)),a=this._protectedHeader?_.encode(R(JSON.stringify(this._protectedHeader))):_.encode(""),this._aad?(c=R(this._aad),o=w(a,_.encode("."),_.encode(c))):o=a,"DEF"===d.zip){let e=await ((null==t?void 0:t.deflateRaw)||G)(this._plaintext);({ciphertext:u,tag:l}=await ej(p,e,n,this._iv,o))}else({ciphertext:u,tag:l}=await ej(p,this._plaintext,n,this._iv,o));let h={ciphertext:R(u),iv:R(this._iv),tag:R(l)};return r&&(h.encrypted_key=R(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 eJ{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 ez(e,t){let r=`SHA-${e.slice(-3)}`;
4switch(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 i(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function eV(e,t,r){if(t instanceof CryptoKey)return!function(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!H(e.algorithm,"HMAC"))throw U("HMAC");let r=parseInt(t.slice(2),10);if($(e.algorithm.hash)!==r)throw U(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!H(e.algorithm,"RSASSA-PKCS1-v1_5"))throw U("RSASSA-PKCS1-v1_5");let r=parseInt(t.slice(2),10);if($(e.algorithm.hash)!==r)throw U(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!H(e.algorithm,"RSA-PSS"))throw U("RSA-PSS");let r=parseInt(t.slice(2),10);if($(e.algorithm.hash)!==r)throw U(`SHA-${r}`,"algorithm.hash");break}
4case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw U("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!H(e.algorithm,"ECDSA"))throw U("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 U(r,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}L(e,r)}(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw TypeError(K(t,...F));return m.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw TypeError(K(t,...F,"Uint8Array"))}let eG=async(e,t,r,n)=>{let o=await eV(e,t,"verify");ed(e,o);let i=ez(e,o.algorithm);try{return await m.subtle.verify(i,o,r,n)}catch(e){return!1}};async function eX(e,t,r){var n;let i,a;if(!Y(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&&!Y(e.header))throw new c("JWS Unprotected Header incorrect type");let s={};if(e.protected)try{let t=T(e.protected);s=JSON.parse(v.decode(t))}catch(e){throw new c("JWS Protected Header is invalid")}if(!X(s,e.header))throw new c("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let u={...s,...e.header},l=eM(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:f}=u;if("string"!=typeof f||!f)throw new c('JWS "alg" (Algorithm) Header Parameter missing or invalid');let p=r&&eN("algorithms",r.algorithms);if(p&&!p.has(f))throw new o('"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),eR(f,t,"verify");let g=w(_.encode(null!=(n=e.protected)?n:""),_.encode("."),"string"==typeof e.payload?_.encode(e.payload):e.payload);try{i=T(e.signature)}catch(e){throw new c("Failed to base64url decode the signature")}if(!await eG(f,t,i,g))throw new y;if(d)try{a=T(e.payload)}catch(e){throw new c("Failed to base64url decode the payload")}else a="string"==typeof e.payload?_.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 eY(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:o,2:i,length:a}=e.split(".");if(3!==a)throw new c("Invalid Compact JWS");let s=await eX({payload:o,protected:n,signature:i},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(!Y(e))throw new c("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(Y))throw new c("JWS Signatures missing or incorrect type");for(let n of e.signatures)try{return await eX({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,o={})=>{var i,a;let s,c,{typ:l}=o;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(!Y(s))throw new u("JWT Claims Set must be a top-level JSON object");let{requiredClaims:d=[],issuer:f,subject:p,audience:h,maxTokenAge:y}=o;for(let e of(void 0!==y&&d.push("iat"),void 0!==h&&d.push("aud"),void 0!==p&&d.push("sub"),void 0!==f&&d.push("iss"),new Set(d.reverse())))if(!(e in s))throw new r(`missing required "${e}" claim`,e,"missing");if(f&&!(Array.isArray(f)?f:[f]).includes(s.iss))throw new r('unexpected "iss" claim value',"iss","check_failed");if(p&&s.sub!==p)throw new r('unexpected "sub" claim value',"sub","check_failed");if(h&&(i=s.aud,a="string"==typeof h?[h]:h,"string"==typeof i?!a.includes(i):!(Array.isArray(i)&&a.some(Set.prototype.has.bind(new Set(i))))))throw new r('unexpected "aud" claim value',"aud","check_failed");switch(typeof o.clockTolerance){case"string":c=e2(o.clockTolerance);break;case"number":c=o.clockTolerance;break;case"undefined":c=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:g}=o,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 o=await eY(e,t,r);if((null==(n=o.protectedHeader.crit)?void 0:n.includes("b64"))&&!1===o.protectedHeader.b64)throw new u("JWTs MUST NOT use unencoded payload");let i={payload:e4(o.protectedHeader,o.payload,r),protectedHeader:o.protectedHeader};return"function"==typeof t?{...i,key:o.key}:i}async function e3(e,t,n){let o=await eH(e,t,n),i=e4(o.protectedHeader,o.plaintext,n),{protectedHeader:a}=o;if(void 0!==a.iss&&a.iss!==i.iss)throw new r('replicated "iss" claim header parameter mismatch',"iss","mismatch");if(void 0!==a.sub&&a.sub!==i.sub)throw new r('replicated "sub" claim header parameter mismatch',"sub","mismatch");if(void 0!==a.aud&&JSON.stringify(a.aud)!==JSON.stringify(i.aud))throw new r('replicated "aud" claim header parameter mismatch',"aud","mismatch");let s={payload:i,protectedHeader:a};return"function"==typeof t?{...s,key:o.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 eV(e,t,"sign");return ed(e,n),new Uint8Array(await m.subtle.sign(ez(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(!X(this._protectedHeader,this._unprotectedHeader))throw new c("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...this._protectedHeader,...this._unprotectedHeader},o=eM(c,new Map([["b64",!0]]),null==t?void 0:t.crit,this._protectedHeader,n),i=!0;if(o.has("b64")&&"boolean"!=typeof(i=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');eR(a,e,"sign");let s=this._payload;i&&(s=_.encode(R(s)));let u=w(r=this._protectedHeader?_.encode(R(JSON.stringify(this._protectedHeader))):_.encode(""),_.encode("."),s),l={signature:R(await e9(a,e,u)),payload:""};return i&&(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(!Y(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 to(e,t){let r;if(!Y(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 i('"kty" (Key Type) Parameter missing or unsupported')}let n=_.encode(JSON.stringify(r));return R(await b(t,n))}async function ti(e,t){null!=t||(t="sha256");let r=await to(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(!Y(r.jwk))throw new c('"jwk" (JSON Web Key) Header Parameter must be a JSON object');let n=await eO({...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 Y(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},o=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 i('Unsupported "alg" value for a JSON Web Key Set')}}(r),a=this._jwks.keys.filter(e=>{let t=o===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 f;if(1!==c){let e=new p,{_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 eO({...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 o,i,a=!1;"function"==typeof AbortController&&(o=new AbortController,i=setTimeout(()=>{a=!0,o.abort()},r));let s=await fetch(e.href,{signal:o?o.signal:void 0,redirect:"manual",headers:n.headers}).catch(e=>{if(a)throw new h;throw e});if(void 0!==i&&clearTimeout(i),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 tf 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 f&&!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 tp(e,t){var r;let n,o,a;switch(e){case"HS256":case"HS384":case"HS512":n=parseInt(e.slice(-3),10),o={name:"HMAC",hash:`SHA-${n}`,length:n},a=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return C(new Uint8Array((n=parseInt(e.slice(-3),10))>>3));case"A128KW":case"A192KW":case"A256KW":o={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":o={name:"AES-GCM",length:n=parseInt(e.slice(1,4),10)},a=["encrypt","decrypt"];break;default:throw new i('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return m.subtle.generateKey(o,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 i("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return r}async function ty(e,t){var r,n,o;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 i("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 i("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new i('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return m.subtle.generateKey(a,null!=(o=null==t?void 0:t.extractable)&&o,s)}async function tg(e,t){return ty(e,t)}async function tm(e,t){return tp(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(_.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 eJ(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 o;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(!X(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(o){if(o!==r.enc)throw new s('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else o=r.enc;
4if(eM(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 i=ey(o),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(i).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(c.unprotectedHeader).setKeyManagementParameters({p2c:l}).encrypt(c.key,{...c.options,...e,[eF]:!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:f}=await eZ((null==(t=c.unprotectedHeader)?void 0:t.alg)||(null==(r=this._protectedHeader)?void 0:r.alg)||(null==(n=this._unprotectedHeader)?void 0:n.alg),o,c.key,i,{p2c:l});u.encrypted_key=R(d),(c.unprotectedHeader||f)&&(u.header={...c.unprotectedHeader,...f})}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:o,...i}=await n.sign(r.key,r.options);if(0===t)e.payload=o;else if(e.payload!==o)throw new c("inconsistent use of JWS Unencoded Payload (RFC7797)");e.signatures.push(i)}return e}},"SignJWT",0,class extends tr{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){var r;let n=new te(_.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=R(JSON.stringify({alg:"none"})),t=R(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:o,2:i,length:a}=e.split(".");if(3!==a||""!==i)throw new u("Invalid Unsecured JWT");try{if(r=JSON.parse(v.decode(T(n))),"none"!==r.alg)throw Error()}catch(e){throw new u("Invalid Unsecured JWT")}return{payload:e4(r,T(o),t),header:r}}},"base64url",0,j,"calculateJwkThumbprint",0,to,"calculateJwkThumbprintUri",0,ti,"compactDecrypt",0,eH,"compactVerify",0,eY,"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 tf(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:o}=e.split(".");if(5===o)throw new u("Only JWTs using Compact JWS serialization can be decoded");if(3!==o)throw new u("Invalid JWT");if(!n)throw new u("JWTs must contain a payload");try{t=T(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(!Y(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(T(t)));if(!Y(e))throw Error();return e}catch(e){throw TypeError("Invalid Token or Protected Header formatting")}},"errors",0,g,"exportJWK",0,eK,"exportPKCS8",0,eB,"exportSPKI",0,eW,"flattenedDecrypt",0,eU,"flattenedVerify",0,eX,"generalDecrypt",0,e$,"generalVerify",0,eQ,"generateKeyPair",0,tg,"generateSecret",0,tm,"importJWK",0,eO,"importPKCS8",0,eA,"importSPKI",0,ek,"importX509",0,ex,"jwtDecrypt",0,e3,"
4jwtVerify",0,e6],563703)},453978,(e,t,r)=>{let n;var o=e.i(467034);let{strict:i}=e.r(440224),{createHash:a}=e.r(586914),{format:s}=e.r(477398);function c(e,t,r){let o=(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(o.slice(0,o.length/2))}n=o.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,o){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");i("string"==typeof t&&t,`${e.claim} must be a non-empty string`),i("string"==typeof r&&r,`${e.source} must be a non-empty string`);try{a=c(r,n,o)}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),i.equal(a,t,u)},generate:c}},394543,(e,t,r)=>{let n=e.r(477398),o=e.r(586914);t.exports=n.types.isKeyObject||(e=>e&&e instanceof o.KeyObject)},575492,(e,t,r)=>{let n;var o=e.i(467034);n=o.Buffer.isEncoding("base64url")?(e,t="utf8")=>o.Buffer.from(e,t).toString("base64url"):(e,t="utf8")=>o.Buffer.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),t.exports.decode=e=>o.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:o,length:i}=e.split(".");if(5===i)throw TypeError("encrypted JWTs cannot be decoded");if(3!==i)throw Error("JWTs must have three components");try{return{header:JSON.parse(n.decode(t)),payload:JSON.parse(n.decode(r)),signature:o}}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 o(e,t,...r){for(let i of r)if(n(i))for(let[r,a]of Object.entries(i))"__proto__"!==r&&"constructor"!==r&&(void 0===t[r]&&void 0!==a&&(t[r]=a),e&&n(t[r])&&n(a)&&o(!0,t[r],a));return t}t.exports=o.bind(void 0,!1),t.exports.deep=o.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`,o=`${e}_endpoint_auth_signing_alg`,i=`${e}_endpoint_auth_signing_alg_values_supported`;if(r[n]&&r[n].endsWith("_jwt")&&!r[o]&&!t[i])throw TypeError(`${i} must be configured on the issuer if ${o} 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:o}=e.r(465524),{format:i}=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:i("expected %i %s, got: %i %s",t,o[t],e.statusCode,o[e.statusCode])},e)}if(r&&!e.body)throw new a({error:i("expected %i %s with body but no body was returned",t,o[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),o=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=o()+Number(e)}get expires_in(){return Math.max.apply(null,[this.expires_at-o(),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:o}=e.r(586914),i=e.r(575492),a=(e=32)=>i.encode(o(e));t.exports={random:a,state:a,nonce:a,codeVerifier:a,codeChallenge:e=>i.encode(n("sha256").update(e).digest())}},892542,(e,t,r)=>{var n={572:function(e,t,r){var n=r(611),o=r(16),i=e.exports;for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a]);function s(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,t){return e=s(e),n.request.call(this,e,t)},i.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},611:function(t){"use strict";
4t.exports=e.r(465524)},16:function(t){"use strict";t.exports=e.r(421342)}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},a=!0;try{n[e](r,r.exports,i),a=!1}finally{a&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/next/dist/compiled/https-browserify/",t.exports=i(572)},88850,(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}}},716286,(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,o=arguments.length;r<o;r++)t.push(arguments[r]);return t}function o(e,t,r,n){if(!(this instanceof o))return new o(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=o,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 o(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 o(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,o=this.head;null!==o;)r.push(e.call(t,o.value,this)),o=o.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,o=this.tail;null!==o;)r.push(e.call(t,o.value,this)),o=o.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 o=0;null!==n;o++)r=e(r,n.value,o),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 o=this.length-1;null!==n;o--)r=e(r,n.value,o),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 o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)r.push(i.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 o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;
4for(;null!==i&&o>e;o--,i=i.prev)r.push(i.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,i=this.head;null!==i&&n<e;n++)i=i.next;for(var a=[],n=0;i&&n<t;n++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=function(e,t,r){var n=t===e.head?new o(r,null,t,e):new o(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}(this,i,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(88850)(n)}catch(e){}},357873,(e,t,r)=>{"use strict";let n=e.r(716286),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),f=Symbol("cache"),p=Symbol("updateAgeOnGet"),h=()=>1,y=(e,t,r)=>{let n=e[f].get(t);if(n){let t=n.value;if(g(e,t)){if(b(e,n),!e[s])return}else r&&(e[p]&&(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[i]>e[o])for(let t=e[d].tail;e[i]>e[o]&&null!==t;){let r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){let r=t.value;e[u]&&e[u](r.key,r.value),e[i]-=r.length,e[f].delete(r.key),e[d].removeNode(t)}};class _{constructor(e,t,r,n,o){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=o||0}}let v=(e,t,r,n)=>{let o=r.value;g(e,o)&&(b(e,r),e[s]||(o=void 0)),o&&t.call(n,o.value,o.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[o]=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[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw TypeError("max must be a non-negative number");this[o]=e||1/0,m(this)}get max(){return this[o]}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[i]=0,this[d].forEach(e=>{e.length=this[a](e.value,e.key),this[i]+=e.length})),m(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}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[f]=new Map,this[d]=new n,this[i]=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[f].has(e)){if(s>this[o])return b(this,this[f].get(e)),!1;let a=this[f].get(e).value;return this[u]&&!this[l]&&this[u](e,a.value),a.now=n,a.maxAge=r,a.value=t,this[i]+=s-a.length,a.length=s,this.get(e),m(this),!0}let p=new _(e,t,s,n,r);return p.length>this[o]?(this[u]&&this[u](e,t),!1):(this[i]+=p.length,this[d].unshift(p),this[f].set(e,this[d].head),m(this),!0)}has(e){return!!this[f].has(e)&&!g(this,this[f].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?(b(this,e),e.value):null}del(e){b(this,this[f].get(e))}load(e){this.reset();let t=Date.now();for(let r=e.length-1;r>=0;r--){let n=e[r],o=n.e||0;if(0===o)this.set(n.k,n.v);else{let e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[f].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",moch
4a:"^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 o=e.i(467034);let i=e.r(440224),a=e.r(343954),s=e.r(465524),c=e.r(892542),{once:u}=e.r(430662),{URL:l}=e.r(421342),d=e.r(357873),f=e.r(931825),{RPError:p}=e.r(696055),h=e.r(80042),{deep:y}=e.r(577208),{HTTP_OPTIONS:g}=e.r(596276),m=/^[\x21\x23-\x5B\x5D-\x7E]+$/,b=["agent","ca","cert","crl","headers","key","lookup","passphrase","pfx","timeout"],_=(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",o.Buffer.byteLength(t)),e.write(t)),e.end()}_([],{headers:{"User-Agent":`${f.name}/${f.version} (${f.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 f,_,E,S,k,x,A;try{f=new l(e.url),delete e.url,i(/^(https?:)$/.test(f.protocol))}catch(e){throw TypeError("only valid absolute URLs can be requested")}let O=this[g],R=e,P=`${f.origin}${f.pathname}`;if(d&&"dpopProof"in this&&(R.headers=R.headers||{},R.headers.DPoP=await this.dpopProof({htu:`${f.origin}${f.pathname}`,htm:e.method||"GET",nonce:w.get(P)},d,t)),O&&(_=h(O.call(this,f,y({},R,n)),...b)),R=y({},_,R,n),r&&!R.pfx&&!(R.key&&R.cert))throw TypeError("mutual-TLS certificate and key not set");if(R.searchParams)for(let[e,t]of Object.entries(R.searchParams))f.searchParams.delete(e),f.searchParams.set(e,t);for(let[e,t]of({form:S,responseType:E,json:k,body:x,...R}=R,Object.entries(R.headers||{})))void 0===t&&delete R.headers[e];let T=("https:"===f.protocol?c.request:s.request)(f.href,R);return(async()=>{if(k?v(T,JSON.stringify(k),"application/json"):S?v(T,a.stringify(S),"application/x-www-form-urlencoded"):x?v(T,x):v(T),[A]=await Promise.race([u(T,"response"),u(T,"timeout")]),!A)throw T.destroy(),new p(`outgoing request timed out after ${R.timeout}ms`);let e=[];for await(let t of A)e.push(t);if(e.length)switch(E){case"json":Object.defineProperty(A,"body",{get(){let t=
4o.Buffer.concat(e);try{t=JSON.parse(t)}catch(e){throw Object.defineProperty(e,"response",{value:A}),e}finally{Object.defineProperty(A,"body",{value:t,configurable:!0})}return t},configurable:!0});break;case void 0:case"buffer":Object.defineProperty(A,"body",{get(){let t=o.Buffer.concat(e);return Object.defineProperty(A,"body",{value:t,configurable:!0}),t},configurable:!0});break;default:throw TypeError("unsupported responseType request option")}return A})().catch(e=>{throw A&&Object.defineProperty(e,"response",{value:A}),e}).finally(()=>{let e=A&&A.headers["dpop-nonce"];e&&m.test(e)&&w.set(P,e)})},t.exports.setDefaults=_.bind(void 0,b)},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),o=e.r(922087),i=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:o,qi:i,...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),o={alg:e,use:r};return this.filter(o=>{let i=!0;return void 0!==n&&o.jwk.kty!==n&&(i=!1),i&&void 0!==t&&o.jwk.kid!==t&&(i=!1),i&&void 0!==r&&void 0!==o.jwk.use&&o.jwk.use!==r&&(i=!1),i&&o.jwk.alg&&o.jwk.alg!==e?i=!1:o.algorithms.has(e)||(i=!1),i}).sort((e,t)=>s(t,o)-s(e,o))}get(...e){return this.all(...e)[0]}static async fromJWKS(e,{onlyPublic:t=!1,onlyPrivate:r=!1}={}){if(!i(e)||!Array.isArray(e.keys)||e.keys.some(e=>!i(e)||!("kty"in e)))throw TypeError("jwks must be a JSON Web Key Set formatted object");let s=[];for(let i of e.keys){let{kty:e,kid:a,crv:c}=i=o(i),{alg:u,use:l}=i;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"===i.kty||!i.d))throw Error("jwks must only contain private keys");t&&(i.d||i.k)||s.push({jwk:{...i,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,o){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(o){case"P-256":case"P-384":t=t.concat([`ES${o.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}}},986825,(e,t,r)=>{let n=e.r(666285);t.exports=function e(t,...r){for(let o of r)if(n(o))for(let[r,i]of Object.entries(o))"__proto__"!==r&&"constructor"!==r&&(n(t[r])&&n(i)?t[r]=e(t[r],i):void 0!==i&&(t[r]=i));return t}},121628,(e,t,r)=>{var n=e.i(467034);let o=e.r(563703),{RPError:i}=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(986825),f=e=>encodeURIComponent(e).replace(/%20/g,"+");async function p(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 i(`failed to determine a JWS Algorithm to use for ${this[`${e}_endpoint_auth_method`]} Client Assertion`);return new o.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 i(`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 i(`no key found in client jwks to sign a client assertion with using alg ${r}`);return new o.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 p.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=`${f(this.client_id)}:${f(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:o}={}){let i,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&&(i=this.issuer.mtls_endpoint_aliases[`${e}_endpoint`]),i=i||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:i,headers:{..."revocation"!==e?{Accept:"application/json"}:void 0,...a.headers}},{mTLS:s,DPoP:o})}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,o){function i(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 i(r[s][1][e]||e)},l,l.exports,t,r,n,o)}return n[s].exports}for(var a=e.t,s=0;s<o.length;s++)i(o[s]);return i})({1:[function(e,t,r){(function(n,o,i,a,s,c,u,l,d){"use strict";var f=e("crypto");function p(e,t){var r=t=g(e,t);if(void 0===(n="passthrough"!==r.algorithm?f.createHash(r.algorithm):new _).write&&(n.write=n.update,n.end=n.update),b(r,n).dispatch(e),n.update||n.end(""),n.digest)return n.digest("buffer"===r.encoding?void 0:r.encoding);var n,o=n.read();return"buffer"!==r.encoding?o.toString(r.encoding):o}(r=t.exports=p).sha1=function(e){return p(e)},r.keys=function(e){return p(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(e){return p(e,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(e){return p(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var h=f.getHashes?f.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 b(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 o,a=Object.prototype.toString.call(t),s=/\[object (.*)\]/i.exec(a);if(s=(s=s?s[1]:"unknown:["+a+"]").toLowerCase(),0<=(o=r.indexOf(t)))return this.dispatch("[CIRCULAR:"+o+"]");if(r.push(t),void 0!==i&&i.isBuffer&&i.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,o){o=void 0!==o?o:!1!==e.unorderedArrays;var i=this;if(n("array:"+t.length+":"),!o||t.length<=1)return t.forEach(function(e){return i.dispatch(e)});var a=[],s=t.map(function(t){var n=new _,o=r.slice();return b(e,n,o).dispatch(t),a=a.concat(o.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 _(){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={}),b(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,o,i,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,o,i=e.length,a="="===e.charAt(i-2)?2:+("="===e.charAt(i-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&(o=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&o)>>8),l(255&o);return 2==a?l(255&(o=r(e.charAt(n))<<2|r(e.charAt(n+1))>>4)):1==a&&(l((o=r(e.charAt(n))<<10|r(e.charAt(n+1))<<4|r(e.charAt(n+2))>>2)>>8&255),l(255&o)),s},e.fromByteArray=function(e){var t,r,n,o,i=e.length%3,a="";function s(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
4+/".charAt(e)}for(t=0,n=e.length-i;t<n;t+=3)a+=s((o=r=(e[t]<<16)+(e[t+1]<<8)+e[t+2])>>18&63)+s(o>>12&63)+s(o>>6&63)+s(63&o);switch(i){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,o,i,a,s,c,u,l){var d=e("base64-js"),f=e("ieee754");function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var n,i,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)i=O(e);else if("string"==u)i=o.byteLength(e,t);else{if("object"!=u)throw Error("First argument needs to be a number, array or string.");i=O(e.length)}if(o._useTypedArrays?a=o._augment(new Uint8Array(i)):((a=this).length=i,a._isBuffer=!0),o._useTypedArrays&&"number"==typeof e.byteLength)a._set(e);else if(R(c=e)||o.isBuffer(c)||c&&"object"==typeof c&&"number"==typeof c.length)for(s=0;s<i;s++)o.isBuffer(e)?a[s]=e.readUInt8(s):a[s]=e[s];else if("string"==u)a.write(e,0,t);else if("number"==u&&!o._useTypedArrays&&!r)for(s=0;s<i;s++)a[s]=0;return a}function p(e,t,r,n){n||(U("boolean"==typeof r,"missing or invalid endian"),U(null!=t,"missing offset"),U(t+1<e.length,"Trying to read beyond buffer length"));var o,i=e.length;if(!(i<=t))return r?(o=e[t],t+1<i&&(o|=e[t+1]<<8)):(o=e[t]<<8,t+1<i&&(o|=e[t+1])),o}function h(e,t,r,n){n||(U("boolean"==typeof r,"missing or invalid endian"),U(null!=t,"missing offset"),U(t+3<e.length,"Trying to read beyond buffer length"));var o,i=e.length;if(!(i<=t))return r?(t+2<i&&(o=e[t+2]<<16),t+1<i&&(o|=e[t+1]<<8),o|=e[t],t+3<i&&(o+=e[t+3]<<24>>>0)):(t+1<i&&(o=e[t+1]<<16),t+2<i&&(o|=e[t+2]<<8),t+3<i&&(o|=e[t+3]),o+=e[t]<<24>>>0),o}function y(e,t,r,n){if(n||(U("boolean"==typeof r,"missing or invalid endian"),U(null!=t,"missing offset"),U(t+1<e.length,"Trying to read beyond buffer length")),!(e.length<=t)){var o=p(e,t,r,!0);return 32768&o?-1*(65535-o+1):o}}function g(e,t,r,n){if(n||(U("boolean"==typeof r,"missing or invalid endian"),U(null!=t,"missing offset"),U(t+3<e.length,"Trying to read beyond buffer length")),!(e.length<=t)){var o=h(e,t,r,!0);return 0x80000000&o?-1*(0xffffffff-o+1):o}}function m(e,t,r,n){return n||(U("boolean"==typeof r,"missing or invalid endian"),U(t+3<e.length,"Trying to read beyond buffer length")),f.read(e,t,r,23,4)}function b(e,t,r,n){return n||(U("boolean"==typeof r,"missing or invalid endian"),U(t+7<e.length,"Trying to read beyond buffer length")),f.read(e,t,r,52,8)}function _(e,t,r,n,o){o||(U(null!=t,"missing value"),U("boolean"==typeof n,"missing or invalid endian"),U(null!=r,"missing offset"),U(r+1<e.length,"trying to write beyond buffer length"),D(t,65535));var i=e.length;if(!(i<=r))for(var a=0,s=Math.min(i-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,o){o||(U(null!=t,"missing value"),U("boolean"==typeof n,"missing or invalid endian"),U(null!=r,"missing offset"),U(r+3<e.length,"trying to write beyond buffer length"),D(t,0xffffffff));var i=e.length;if(!(i<=r))for(var a=0,s=Math.min(i-r,4);a<s;a++)e[r+a]=t>>>8*(n?a:3-a)&255}function w(e,t,r,n,o){o||(U(null!=t,"missing value"),U("boolean"==typeof n,"missing or invalid endian"),U(null!=r,"missing offset"),U(r+1<e.length,"Trying to write beyond buffer length"),M(t,32767,-32768)),e.length<=r||_(e,0<=t?t:65535+t+1,r,n,o)}function E(e,t,r,n,o){o||(U(null!=t,"missing value"),U("boolean"==typeof n,"missing or invalid endian"),U(null!=r,"missing offset"),U(r+3<e.length,"Trying to write beyond buffer length"),M(t,0x7fffffff,-0x80000000)),e.length<=r||v(e,0<=t?t:0xffffffff+t+1,r,n,o)}function S(e,t,r,n,o){o||(U(null!=t,"missing value"),U("boolean"==typeof n,"missing or invalid endian"),U(null!=r,"missing offset"),U(r+3<e.length,"Trying to write beyond buffer length"),N(t,34028234663852886e22,-34028234663852886e22)),e.length<=r||f.write(e,t,r,n,23,4)}function k(e,t,r,n,o){o||(U(null!=t,"missing value"),U("boolean"==typeof n,"missing or invalid endian"),U(null!=r,"missing offset"),U(r+7<e.length,"Trying to write beyond buffer length"),N(t,17976931348623157e292,-17976931348623157e292)),e.length<=r||f.write(e,t,r,n,52,8)}r.Buffer=o,r.SlowBuffer=o,r.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._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}}(),o.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}},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.byteLength=function(e,t){var r;switch(e+="",t||"utf8"){case"hex":r=e.length/2;break;case"utf8":case"utf-8":r=T(e).length;break;case"ascii":case"binary":case"raw":r=e.length;break;case"base64":r=j(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},o.concat=function(e,t){if(U(R(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new o(0);if(1===e.length)return e[0];if("number"!=typeof t)for(i=t=0;i<e.length;i++)t+=e[i].length;for(var r=new o(t),n=0,i=0;i<e.length;i++){var a=e[i];a.copy(r,n),n+=a.length}return r}
4,o.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 i,a,s,c,u,l,d,f,p,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 i=e.length-r;(!n||i<(n=Number(n)))&&(n=i);var a=t.length;U(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);U(!isNaN(c),"Invalid hex string"),e[r+s]=c}return o._charsWritten=2*s,s}(this,e,t,r);break;case"utf8":case"utf-8":p=t,h=r,l=o._charsWritten=C(T(e),this,p,h);break;case"ascii":case"binary":i=t,a=r,l=o._charsWritten=C(function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t}(e),this,i,a);break;case"base64":d=t,f=r,l=o._charsWritten=C(j(e),this,d,f);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":s=t,c=r,l=o._charsWritten=C(function(e){for(var t,r,n=[],o=0;o<e.length;o++)r=(t=e.charCodeAt(o))>>8,n.push(t%256),n.push(r);return n}(e),this,s,c);break;default:throw Error("Unknown encoding")}return l},o.prototype.toString=function(e,t,r){var n,o,i;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 o="",i=t;i<r;i++)o+=P(e[i]);return o}(this,t,r);break;case"utf8":case"utf-8":n=function(e,t,r){var n="",o="";r=Math.min(e.length,r);for(var i=t;i<r;i++)e[i]<=127?(n+=I(o)+String.fromCharCode(e[i]),o=""):o+="%"+e[i].toString(16);return n+I(o)}(this,t,r);break;case"ascii":case"binary":n=function(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;o++)n+=String.fromCharCode(e[o]);return n}(this,t,r);break;case"base64":i=r,n=0===(o=t)&&i===this.length?d.fromByteArray(this):d.fromByteArray(this.slice(o,i));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=function(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}(this,t,r);break;default:throw Error("Unknown encoding")}return n},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.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){U(r<=n,"sourceEnd < sourceStart"),U(0<=t&&t<e.length,"targetStart out of bounds"),U(0<=r&&r<this.length,"sourceStart out of bounds"),U(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 i=n-r;if(i<100||!o._useTypedArrays)for(var a=0;a<i;a++)e[a+t]=this[a+r];else e._set(this.subarray(r,r+i),t)}},o.prototype.slice=function(e,t){var r=this.length;if(e=A(e,r,0),t=A(t,r,r),o._useTypedArrays)return o._augment(this.subarray(e,t));for(var n=t-e,i=new o(n,void 0,!0),a=0;a<n;a++)i[a]=this[a+e];return i},o.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},o.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},o.prototype.readUInt8=function(e,t){if(t||(U(null!=e,"missing offset"),U(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return this[e]},o.prototype.readUInt16LE=function(e,t){return p(this,e,!0,t)},o.prototype.readUInt16BE=function(e,t){return p(this,e,!1,t)},o.prototype.readUInt32LE=function(e,t){return h(this,e,!0,t)},o.prototype.readUInt32BE=function(e,t){return h(this,e,!1,t)},o.prototype.readInt8=function(e,t){if(t||(U(null!=e,"missing offset"),U(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){return y(this,e,!0,t)},o.prototype.readInt16BE=function(e,t){return y(this,e,!1,t)},o.prototype.readInt32LE=function(e,t){return g(this,e,!0,t)},o.prototype.readInt32BE=function(e,t){return g(this,e,!1,t)},o.prototype.readFloatLE=function(e,t){return m(this,e,!0,t)},o.prototype.readFloatBE=function(e,t){return m(this,e,!1,t)},o.prototype.readDoubleLE=function(e,t){return b(this,e,!0,t)},o.prototype.readDoubleBE=function(e,t){return b(this,e,!1,t)},o.prototype.writeUInt8=function(e,t,r){r||(U(null!=e,"missing value"),U(null!=t,"missing offset"),U(t<this.length,"trying to write beyond buffer length"),D(e,255)),t>=this.length||(this[t]=e)},o.prototype.writeUInt16LE=function(e,t,r){_(this,e,t,!0,r)},o.prototype.writeUInt16BE=function(e,t,r){_(this,e,t,!1,r)},o.prototype.writeUInt32LE=function(e,t,r){v(this,e,t,!0,r)},o.prototype.writeUInt32BE=function(e,t,r){v(this,e,t,!1,r)},o.prototype.writeInt8=function(e,t,r){r||(U(null!=e,"missing value"),U(null!=t,"missing offset"),U(t<this.length,"Trying to write beyond buffer length"),M(e,127,-128)),t>=this.length||(0<=e?this.writeUInt8(e,t,r):this.writeUInt8(255+e+1,t,r))},o.prototype.writeInt16LE=function(e,t,r){w(this,e,t,!0,r)},o.prototype.writeInt16BE=function(e,t,r){w(this,e,t,!1,r)},o.prototype.writeInt32LE=function(e,t,r){E(this,e,t,!0,r)},o.prototype.writeInt32BE=function(e,t,r){E(this,e,t,!1,r)},o.prototype.writeFloatLE=function(e,t,r){S(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){S(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){k(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){k(this,e,t,!1,r)}
4,o.prototype.fill=function(e,t,r){if(e=e||0,t=t||0,r=r||this.length,"string"==typeof e&&(e=e.charCodeAt(0)),U("number"==typeof e&&!isNaN(e),"value is not a number"),U(t<=r,"end < start"),r!==t&&0!==this.length){U(0<=t&&t<this.length,"start out of bounds"),U(0<=r&&r<=this.length,"end out of bounds");for(var n=t;n<r;n++)this[n]=e}},o.prototype.inspect=function(){for(var e=[],t=this.length,n=0;n<t;n++)if(e[n]=P(this[n]),n===r.INSPECT_MAX_BYTES){e[n+1]="...";break}return"<Buffer "+e.join(" ")+">"},o.prototype.toArrayBuffer=function(){if("u"<typeof Uint8Array)throw Error("Buffer.toArrayBuffer not supported in this browser");if(o._useTypedArrays)return new o(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 x=o.prototype;function A(e,t,r){return"number"!=typeof e?r:t<=(e=~~e)?t:0<=e||0<=(e+=t)?e:0}function O(e){return(e=~~Math.ceil(+e))<0?0:e}function R(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function P(e){return e<16?"0"+e.toString(16):e.toString(16)}function T(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 o=r;55296<=n&&n<=57343&&r++;for(var i=encodeURIComponent(e.slice(o,r+1)).substr(1).split("%"),a=0;a<i.length;a++)t.push(parseInt(i[a],16))}}return t}function j(e){return d.toByteArray(e)}function C(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);o++)t[o+r]=e[o];return o}function I(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function D(e,t){U("number"==typeof e,"cannot write a non-number as a number"),U(0<=e,"specified a negative value for writing an unsigned value"),U(e<=t,"value is larger than maximum value for type"),U(Math.floor(e)===e,"value has a fractional component")}function M(e,t,r){U("number"==typeof e,"cannot write a non-number as a number"),U(e<=t,"value larger than maximum allowed value"),U(r<=e,"value smaller than minimum allowed value"),U(Math.floor(e)===e,"value has a fractional component")}function N(e,t,r){U("number"==typeof e,"cannot write a non-number as a number"),U(e<=t,"value larger than maximum allowed value"),U(r<=e,"value smaller than minimum allowed value")}function U(e,t){if(!e)throw Error(t||"Failed assertion")}o._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=x.get,e.set=x.set,e.write=x.write,e.toString=x.toString,e.toLocaleString=x.toString,e.toJSON=x.toJSON,e.copy=x.copy,e.slice=x.slice,e.readUInt8=x.readUInt8,e.readUInt16LE=x.readUInt16LE,e.readUInt16BE=x.readUInt16BE,e.readUInt32LE=x.readUInt32LE,e.readUInt32BE=x.readUInt32BE,e.readInt8=x.readInt8,e.readInt16LE=x.readInt16LE,e.readInt16BE=x.readInt16BE,e.readInt32LE=x.readInt32LE,e.readInt32BE=x.readInt32BE,e.readFloatLE=x.readFloatLE,e.readFloatBE=x.readFloatBE,e.readDoubleLE=x.readDoubleLE,e.readDoubleBE=x.readDoubleBE,e.writeUInt8=x.writeUInt8,e.writeUInt16LE=x.writeUInt16LE,e.writeUInt16BE=x.writeUInt16BE,e.writeUInt32LE=x.writeUInt32LE,e.writeUInt32BE=x.writeUInt32BE,e.writeInt8=x.writeInt8,e.writeInt16LE=x.writeInt16LE,e.writeInt16BE=x.writeInt16BE,e.writeInt32LE=x.writeInt32LE,e.writeInt32BE=x.writeInt32BE,e.writeFloatLE=x.writeFloatLE,e.writeFloatBE=x.writeFloatBE,e.writeDoubleLE=x.writeDoubleLE,e.writeDoubleBE=x.writeDoubleBE,e.fill=x.fill,e.inspect=x.inspect,e.toArrayBuffer=x.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,o,i,a,s,c,u,l){var o=e("buffer").Buffer,d=new o(4);d.fill(0),t.exports={hash:function(e,t,r,n){return o.isBuffer(e)||(e=new o(e)),function(e,t,r){for(var n=new o(t),i=r?n.writeInt32BE:n.writeInt32LE,a=0;a<e.length;a++)i.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=o.concat([e,d],r));for(var n=[],i=t?e.readInt32BE:e.readInt32LE,a=0;a<e.length;a+=4)n.push(i.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,o,i,a,s,c,u,l){var o=e("buffer").Buffer,d=e("./sha"),f=e("./sha256"),p=e("./rng"),h={sha1:d,sha256:f,md5:e("./md5")},y=new o(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 o.isBuffer(e)||(e=new o(e)),n.push(e),e.length,this},digest:function(e){var i=o.concat(n),a=t?function(e,t,r){o.isBuffer(t)||(t=new o(t)),o.isBuffer(r)||(r=new o(r)),t.length>64?t=e(t):t.length<64&&(t=o.concat([t,y],64));for(var n=new o(64),i=new o(64),a=0;a<64;a++)n[a]=54^t[a],i[a]=92^t[a];var s=e(o.concat([n,r]));return e(o.concat([i,s]))}(r,t,i):r(i);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 o(p(e));try{t.call(this,void 0,new o(p(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,o,i,a,s,c,u,l){var d=e("./helpers");function f(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=0x67452301,n=-0x10325477,o=-0x67452302,i=0x10325476,a=0;a<e.length;a+=16){var s=r,c=n,u=o,l=i,r=h(r,n,o,i,e[a+0],7,-0x28955b88),i=h(i,r,n,o,e[a+1],12,-0x173848aa),o=h(o,i,r,n,e[a+2],17,0x242070db),n=h(n,o,i,r,e[a+3],22,-0x3e423112);r=h(r,n,o,i,e[a+4],7,-0xa83f051),i=h(i,r,n,o,e[a+5],12,0x4787c62a),o=h(o,i,r,n,e[a+6],17,-0x57cfb9ed),n=h(n,o,i,r,e[a+7],22,-0x2b96aff),r=h(r,n,o,i,e[a+8],7,0x698098d8),i=h(i,r,n,o,e[a+9],12,-0x74bb0851),o=h(o,i,r,n,e[a+10],17,-42063),n=h(n,o,i,r,e[a+11],22,-0x76a32842),r=h(r,n,o,i,e[a+12],7,0x6b901122),i=h(i,r,n,o,e[a+13],12,-0x2678e6d),o=h(o,i,r,n,e[a+14],17,-0x5986bc72),r=y(r,n=h(n,o,i,r,e[a+15],22,0x49b40821),o,i,e[a+1],5,-0x9e1da9e),i=y(i,r,n,o,e[a+6],9,-0x3fbf4cc0),o=y(o,i,r,n,e[a+11],14,0x265e5a51),n=y(n,o,i,r,e[a+0],20,-0x16493856),r=y(r,n,o,i,e[a+5],5,-0x29d0efa3),i=y(i,r,n,o,e[a+10],9,0x2441453),o=y(o,i,r,n,e[a+15],14,-0x275e197f),n=y(n,o,i,r,e[a+4],20,-0x182c0438),r=y(r,n,o,i,e[a+9],5,0x21e1cde6),i=y(i,r,n,o,e[a+14],9,-0x3cc8f82a),o=y(o,i,r,n,e[a+3],14,-0xb2af279),n=y(n,o,i,r,e[a+8],20,0x455a14ed),r=y(r,n,o,i,e[a+13],5,-0x561c16fb),i=y(i,r,n,o,e[a+2],9,-0x3105c08),o=y(o,i,r,n,e[a+7],14,0x676f02d9),r=g(r,n=y(n,o,i,r,e[a+12],20,-0x72d5b376),o,i,e[a+5],4,-378558),i=g(i,r,n,o,e[a+8],11,-0x788e097f),o=g(o,i,r,n,e[a+11],16,0x6d9d6122),n=g(n,o,i,r,e[a+14],23,-0x21ac7f4),r=g(r,n,o,i,e[a+1],4,-0x5b4115bc),i=g(i,r,n,o,e[a+4],11,0x4bdecfa9),o=g(o,i,r,n,e[a+7],16,-0x944b4a0),n=g(n,o,i,r,e[a+10],23,-0x41404390),r=g(r,n,o,i,e[a+13],4,0x289b7ec6),i=g(i,r,n,o,e[a+0],11,-0x155ed806),o=g(o,i,r,n,e[a+3],16,-0x2b10cf7b),n=g(n,o,i,r,e[a+6],23,0x4881d05),r=g(r,n,o,i,e[a+9],4,-0x262b2fc7),i=g(i,r,n,o,e[a+12],11,-0x1924661b),o=g(o,i,r,n,e[a+15],16,0x1fa27cf8),r=m(r,n=g(n,o,i,r,e[a+2],23,-0x3b53a99b),o,i,e[a+0],6,-0xbd6ddbc),i=m(i,r,n,o,e[a+7],10,0x432aff97),o=m(o,i,r,n,e[a+14],15,-0x546bdc59),n=m(n,o,i,r,e[a+5],21,-0x36c5fc7),r=m(r,n,o,i,e[a+12],6,0x655b59c3),i=m(i,r,n,o,e[a+3],10,-0x70f3336e),o=m(o,i,r,n,e[a+10],15,-1051523),n=m(n,o,i,r,e[a+1],21,-0x7a7ba22f),r=m(r,n,o,i,e[a+8],6,0x6fa87e4f),i=m(i,r,n,o,e[a+15],10,-0x1d31920),o=m(o,i,r,n,e[a+6],15,-0x5cfebcec),n=m(n,o,i,r,e[a+13],21,0x4e0811a1),r=m(r,n,o,i,e[a+4],6,-0x8ac817e),i=m(i,r,n,o,e[a+11],10,-0x42c50dcb),o=m(o,i,r,n,e[a+2],15,0x2ad7d2bb),n=m(n,o,i,r,e[a+9],21,-0x14792c6f),r=b
4(r,s),n=b(n,c),o=b(o,u),i=b(i,l)}return[r,n,o,i]}function p(e,t,r,n,o,i){var a;return b((a=b(b(t,e),b(n,i)))<<o|a>>>32-o,r)}function h(e,t,r,n,o,i,a){return p(t&r|~t&n,e,t,o,i,a)}function y(e,t,r,n,o,i,a){return p(t&n|r&~n,e,t,o,i,a)}function g(e,t,r,n,o,i,a){return p(t^r^n,e,t,o,i,a)}function m(e,t,r,n,o,i,a){return p(r^(t|~n),e,t,o,i,a)}function b(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,f,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,o,i,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,o,i,a,s,c,u,l){var d=e("./helpers");function f(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r,n,o,i,a,s=Array(80),c=0x67452301,u=-0x10325477,l=-0x67452302,d=0x10325476,f=-0x3c2d1e10,y=0;y<e.length;y+=16){for(var g=c,m=u,b=l,_=d,v=f,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=p(p(h(c,5),(o=u,i=l,a=d,(n=w)<20?o&i|~o&a:!(n<40)&&n<60?o&i|o&a|i&a:o^i^a)),p(p(f,s[w]),(r=w)<20?0x5a827999:r<40?0x6ed9eba1:r<60?-0x70e44324:-0x359d3e2a)),f=d,d=l,l=h(u,30),u=c,c=E}c=p(c,g),u=p(u,m),l=p(l,b),d=p(d,_),f=p(f,v)}return[c,u,l,d,f]}function p(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,f,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,o,i,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 f(e,t){return e>>>t|e<<32-t}function p(e,t){var r,n,o,i,a,s,c,u,l,p,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,x=0;x<e.length;x+=16){r=y[0],n=y[1],o=y[2],i=y[3],a=y[4],s=y[5],c=y[6],u=y[7];for(var A=0;A<64;A++)g[A]=A<16?e[A+x]:d(d(d(f(k=g[A-2],17)^f(k,19)^k>>>10,g[A-7]),f(S=g[A-15],7)^f(S,18)^S>>>3),g[A-16]),l=d(d(d(d(u,f(E=a,6)^f(E,11)^f(E,25)),(w=a)&s^~w&c),h[A]),g[A]),p=d(f(v=r,2)^f(v,13)^f(v,22),(m=r)&(b=n)^m&(_=o)^b&_),u=c,c=s,s=a,a=d(i,l),i=o,o=n,n=r,r=d(l,p);y[0]=d(r,y[0]),y[1]=d(n,y[1]),y[2]=d(o,y[2]),y[3]=d(i,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,p,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,o,i,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,o,i,a,s,c,u){r.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,c=(1<<s)-1,u=c>>1,l=-7,d=r?o-1:0,f=r?-1:1,p=e[t+d];for(d+=f,i=p&(1<<-l)-1,p>>=-l,l+=s;0<l;i=256*i+e[t+d],d+=f,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;0<l;a=256*a+e[t+d],d+=f,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=u}return(p?-1:1)*a*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,d=l>>1,f=5960464477539062e-23*(23===o),p=n?0:i-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?f/c:f*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,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));8<=o;e[r+p]=255&s,p+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;0<u;e[r+p]=255&a,p+=h,a/=256,u-=8);e[r+p-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),o=e.r(357873),{RPError:i}=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,f=new WeakMap,p=e=>(f.has(e)||f.set(e,new o({max:100})),f.get(e));async function h(e=!1){a(this,"jwks_uri");let t=c.get(this),r=p(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:o},{allowMulti:a=!1}={}){let s=p(this),c={kid:e,kty:t,alg:r,use:o},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),f=d.all(c);if(delete c.use,0===f.length)throw new i({printf:["no valid key found in issuer's jwks_uri for key parameters %j",c],jwks:d});if(!a&&f.length>1&&!e)throw new i({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),f}
4t.exports.queryKeyStore=y,t.exports.keystore=h},13028,(e,t,r)=>{var n=e.i(247167);let{inspect:o}=e.r(477398),{RPError:i,OPError:a}=e.r(696055),s=e.r(550766);class c{#t;#r;#n;#o;#i;#a;#s;#c;#u;constructor({client:e,exchangeBody:t,clientAssertionPayload:r,response:n,maxAge:o,DPoP:a}){if(["verification_uri","user_code","device_code"].forEach(e=>{if("string"!=typeof n[e]||!n[e])throw new i(`expected ${e} string to be returned by Device Authorization Response, got %j`,n[e])}),!Number.isSafeInteger(n.expires_in))throw new i("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.#o=a,this.#c=o,this.#i=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 i("polling aborted");if(this.expired())throw new i("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.#i,grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:this.device_code},{clientAssertionPayload:this.#n,DPoP:this.#o})}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}[o.custom](){return`${this.constructor.name} ${o(this.#u,{depth:1/0,colors:n.default.stdout.isTTY,compact:!1,sorted:!0})}`}}t.exports=c},95328,(e,t,r)=>{let n;var o=e.i(247167),i=e.i(467034);let{inspect:a}=e.r(477398),s=e.r(465524),c=e.r(586914),{strict:u}=e.r(440224),l=e.r(343954),d=e.r(421342),{URL:f,URLSearchParams:p}=e.r(421342),h=e.r(563703),y=e.r(453978),g=e.r(394543),m=e.r(330967),b=e.r(575492),_=e.r(577208),v=e.r(345255),{assertSigningAlgValuesSupport:w,assertIssuerConfiguration:E}=e.r(918710),S=e.r(80042),k=e.r(666285),x=e.r(738767),A=e.r(407066),{OPError:O,RPError:R}=e.r(696055),P=e.r(550766),{random:T}=e.r(852849),j=e.r(508284),{CLOCK_TOLERANCE:C}=e.r(596276),{keystores:I}=e.r(366951),D=e.r(198155),M=e.r(922087),{authenticatedPost:N,resolveResponseType:U,resolveRedirectUri:H}=e.r(121628),{queryKeyStore:$}=e.r(967983),L=e.r(13028),[W,B]=o.default.version.slice(1).split(".").map(e=>parseInt(e,10)),K=W>=17||16===W&&B>=9,Z=Symbol(),F=Symbol(),q=Symbol();function J(e){return S(e,"access_token","code","error_description","error_uri","error","expires_in","id_token","iss","response","session_state","state","token_type")}function z(e,t="Bearer"){return`${t} ${e}`}function V(e){let t=d.parse(e);return t.search?l.parse(t.search.substring(1)):{}}function G(e,t,r){if(void 0===e[r])throw new R({message:`missing required JWT property ${r}`,jwt:t})}function X(e){let t={client_id:this.client_id,scope:"openid",response_type:U.call(this),redirect_uri:H.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 Y(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 D.fromJWKS(e,{onlyPrivate:!0})}class Q{#l;#d;#f;#p;constructor(e,t,r={},n,o){if(this.#l=new Map,this.#d=e,this.#f=t,"string"!=typeof r.client_id||!r.client_id)throw TypeError("client_id is required");const i={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(i.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()&&(i.tls_client_certificate_bound_access_tokens&&i.dpop_bound_access_tokens||!i.tls_client_certificate_bound_access_tokens&&!i.dpop_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;
4!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,i),w("token",this.issuer,i),["introspection","revocation"].forEach(e=>{!function(e,t,r){if(!t[`${e}_endpoint`])return;let n=r.token_endpoint_auth_method,o=r.token_endpoint_auth_signing_alg,i=`${e}_endpoint_auth_method`,a=`${e}_endpoint_auth_signing_alg`;void 0===r[i]&&void 0===r[a]&&(void 0!==n&&(r[i]=n),void 0!==o&&(r[a]=o))}(e,this.issuer,i),w(e,this.issuer,i)}),Object.entries(i).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=Y.call(this,n);I.set(this,e)}null!=o&&o.additionalAuthorizedParties&&(this.#p=M(o.additionalAuthorizedParties)),this[C]=0}authorizationUrl(e={}){if(!k(e))throw TypeError("params must be a plain object");E(this.issuer,"authorization_endpoint");let t=new f(this.issuer.authorization_endpoint);for(let[r,n]of Object.entries(X.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=X.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:o=1===n?r:void 0}=e;if({id_token_hint:t,...e}=e,t instanceof A){if(!t.id_token)throw TypeError("id_token not present in TokenSet");t=t.id_token}let i=d.parse(this.issuer.end_session_endpoint),a=_(V(this.issuer.end_session_endpoint),e,{post_logout_redirect_uri:o,client_id:this.client_id},{id_token_hint:t});return Object.entries(a).forEach(([e,t])=>{null==t&&delete a[e]}),i.search=null,i.query=a,d.format(i)}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 J(V(e));switch(e.method){case"GET":return J(V(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(i.Buffer.isBuffer(e.body))return J(l.parse(e.body.toString("utf-8")));if("string"==typeof e.body)return J(l.parse(e.body));return J(e.body);default:throw TypeError("invalid IncomingMessage body object")}default:throw TypeError("invalid IncomingMessage method")}}async callback(e,t,r={},{exchangeBody:n,clientAssertionPayload:o,DPoP:i}={}){let a=J(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 R({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 R({message:"state missing from the response",checks:r,params:a});if(r.state!==a.state)throw new R({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 R({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 R({message:"iss missing from the response",params:a});if(a.error)throw new O(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 R({message:'unexpected params encountered for "none" response',checks:r,params:a})}else for(let t of s[e])if(!a[t])throw new R({message:`${t} missing from response`,checks:r,params:a})}if(a.id_token){let e=new A(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:o,DPoP:i});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 A(a)}async oauthCallback(e,t,r={},{exchangeBody:n,clientAssertionPayload:o,DPoP:i}={}){let a=J(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 R({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 R({message:"state missing from the response",checks:r,params:a});if(r.state!==a.state)throw new R({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 R({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 R({message:"iss missing from the response",params:a});if(a.error)throw new O(a);if("string"==typeof a.id_token&&a.id_token.length)throw new R({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 R({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 R({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:o,DPoP:i});if("string"==typeof t.id_token&&t.id_token.length)throw new R({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 A(a)}async decryptIdToken(e){if(!this.id_token_encrypted_response_alg)return e;let t=e;if(t instanceof A){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,o=await this.decryptJWE(t,r,n);return e instanceof A?(e.id_token=o,e):o}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,o=JSON.parse(b.decode(e.split(".")[0]));if(o.alg!==t)throw new R({printf:["unexpected JWE alg received, expected %s, got: %s",t,o.alg],jwt:e});if(o.enc!==r)throw new R({printf:["unexpected JWE enc received, expected %s, got: %s",r,o.enc],jwt:e});let i=e=>new TextDecoder().decode(e.plaintext);if(t.match(/^(?:RSA|ECDH)/)){let t=await I.get(this),r=h.decodeProtectedHeader(e);for(let o of t.all({...r,use:"enc"}))if(n=await h.compactDecrypt(e,await o.keyObject(r.alg)).then(i,()=>{}))break}else n=await h.compactDecrypt(e,this.secretForAlg("dir"===t?r:t)).then(i,()=>{});if(!n)throw new R({message:"failed to decrypt JWE",jwt:e});return n}async validateIdToken(e,t,r,n,o){let i=e,a=this.id_token_signed_response_alg;if(i instanceof A){if(!i.id_token)throw TypeError("id_token not present in TokenSet");i=i.id_token}i=String(i);let s=P(),{protected:c,payload:u,key:l}=await this.validateJWT(i,a);if("number"==typeof n||n!==q&&this.require_auth_time){if(!u.auth_time)throw new R({message:"missing required JWT property auth_time",jwt:i});if("number"!=typeof u.auth_time)throw new R({message:"JWT auth_time claim must be a JSON numeric value",jwt:i})}if("number"==typeof n&&u.auth_time+n<s-this[C])throw new R({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[C]],now:s,tolerance:this[C],auth_time:u.auth_time,jwt:i});if(t!==F&&(u.nonce||void 0!==t)&&u.nonce!==t)throw new R({printf:["nonce mismatch, expected %s, got: %s",t,u.nonce],jwt:i});if("authorization"===r){if(!u.at_hash&&e.access_token)throw new R({message:"missing required property at_hash",jwt:i});if(!u.c_hash&&e.code)throw new R({message:"missing required property c_hash",jwt:i});if(this.fapi1()&&!u.s_hash&&(e.state||o))throw new R({message:"missing required property s_hash",jwt:i});if(u.s_hash){if(!o)throw TypeError('cannot verify s_hash, "checks.state" property not provided');try{y.validate({claim:"s_hash",source:"state"},u.s_hash,o,c.alg,l.jwk&&l.jwk.crv)}catch(e){throw new R({message:e.message,jwt:i})}}}if(this.fapi()&&u.iat<s-3600)throw new R({printf:["JWT issued too far in the past, now %i, iat %i",s,u.iat],now:s,tolerance:this[C],iat:u.iat,jwt:i});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 R({message:e.message,jwt:i})}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 R({message:e.message,jwt:i})}return e}async validateJWT(e,t,r=["iss","sub","aud","exp","iat"]){let n,o,i,a="https://self-issued.me"===this.issuer.issuer,s=P();try{({header:n,payload:o}=m(e,{complete:!0}))}catch(t){throw new R({printf:["failed to decode JWT (%s: %s)",t.name,t.message],jwt:e})}if(n.alg!==t)throw new R({printf:["unexpected JWT alg received, expected %s, got: %s",t,n.alg],jwt:e});if(a&&(r=[...r,"sub_jwk"]),r.forEach(G.bind(void 0,o,e)),void 0!==o.iss){let t=this.issuer.issuer;if(this.#f&&(t=this.issuer.issuer.replace("{tenantid}",o.tid)),o.iss!==t)throw new R({printf:["unexpected iss value, expected %s, got: %s",t,o.iss],jwt:e})}if(void 0!==o.iat&&"number"!=typeof o.iat)throw new R({message:"JWT iat claim must be a JSON numeric value",jwt:e});if(void 0!==o.nbf){if("number"!=typeof o.nbf)throw new R({message:"JWT nbf claim must be a JSON numeric value",jwt:e});if(o.nbf>s+this[C])throw new R({printf:["JWT not active yet, now %i, nbf %i",s+this[C],o.nbf],now:s,tolerance:this[C],nbf:o.nbf,jwt:e})}if(void 0!==o.exp){if("number"!=typeof o.exp)throw new R({message:"JWT exp claim must be a JSON numeric value",jwt:e});if(s-this[C]>=o.exp)throw new R({printf:["JWT expired, now %i, exp %i",s-this[C],o.exp],now:s,tolerance:this[C],exp:o.exp,jwt:e})}if(void 0!==o.aud){if(Array.isArray(o.aud)){if(o.aud.length>1&&!o.azp)throw new R({message:"missing required JWT property azp",jwt:e});if(!o.aud.includes(this.client_id))throw new R({printf:["aud is missing the client_id, expected %s to be included in %j",this.client_id,o.aud],jwt:e})}else if(o.aud!==this.client_id)throw new R({printf:["aud mismatch, expected %s, got: %s",this.client_id,o.aud],jwt:e})}if(void 0!==o.azp){let t=this.#p;if(!(t="string"==typeof t?[this.client_id,t]:Array.isArray(t)?[this.client_id,...t]:[this.client_id]).includes(o.azp))throw new R({printf:["azp mismatch, got: %s",o.azp],jwt:e})}if(a){try{u(k(o.sub_jwk));let e=await h.importJWK(o.sub_jwk,n.alg);u.equal(e.type,"public"),i=[{keyObject:()=>e}]}catch(t){throw new R({message:"failed to use sub_jwk claim as an asymmetric JSON Web Key",jwt:e})}if(await h.calculateJwkThumbprint(o.sub_jwk)!==o.sub)throw new R({message:"failed to match the subject with sub_jwk",jwt:e})}else n.alg.startsWith("HS")?i=[this.secretForAlg(n.alg)]:"none"!==n.alg&&(i=await $.call(this.issuer,{...n,use:"sig"}));if(!i&&"none"===n.alg)return{protected:n,payload:o};for(let t of i){let r=await h.compactVerify(e,t instanceof Uint8Array?t:await t.keyObject(n.alg)).catch(()=>{});if(r)return{payload:o,protected:r.protectedHeader,key:t}}throw new R({message:"failed to validate JWT signature",jwt:e})}
13async refresh(e,{exchangeBody:t,clientAssertionPayload:r,DPoP:n}={}){let o=e;if(o instanceof A){if(!o.refresh_token)throw TypeError("refresh_token not present in TokenSet");o=o.refresh_token}let i=await this.grant({...t,grant_type:"refresh_token",refresh_token:String(o)},{clientAssertionPayload:r,DPoP:n});if(i.id_token&&(await this.decryptIdToken(i),await this.validateIdToken(i,F,"token",q),e instanceof A&&e.id_token)){let t=e.claims().sub,r=i.claims().sub;if(r!==t)throw new R({printf:["sub mismatch, expected %s, got: %s",t,r],jwt:i.id_token})}return i}async requestResource(e,t,{method:r,headers:n,body:o,DPoP:i,tokenType:a=i?"DPoP":t instanceof A?t.token_type:"Bearer"}={},s){if(t instanceof A){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:z(t,a),...n},body:o},u=!!this.tls_client_certificate_bound_access_tokens,l=await j.call(this,{...c,responseType:"buffer",method:r,url:e},{accessToken:t,mTLS:u,DPoP:i}),d=l.headers["www-authenticate"];return s!==Z&&d&&d.toLowerCase().startsWith("dpop ")&&"use_dpop_nonce"===v(d).error?this.requestResource(e,t,{method:r,headers:n,body:o,DPoP:i,tokenType:a}):l}async userinfo(e,{method:t="GET",via:r="header",tokenType:n,params:o,DPoP:i}={}){let a;E(this.issuer,"userinfo_endpoint");let s={tokenType:n,method:String(t).toUpperCase(),DPoP:i};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 f(a||this.issuer.userinfo_endpoint),"body"===r&&(s.headers.Authorization=void 0,s.headers["Content-Type"]="application/x-www-form-urlencoded",s.body=new p,s.body.append("access_token",e instanceof A?e.access_token:e)),o&&("GET"===s.method?Object.entries(o).forEach(([e,t])=>{a.searchParams.append(e,t)}):s.body?Object.entries(o).forEach(([e,t])=>{s.body.append(e,t)}):(s.body=new p,s.headers["Content-Type"]="application/x-www-form-urlencoded",Object.entries(o).forEach(([e,t])=>{s.body.append(e,t)}))),s.body&&(s.body=s.body.toString());let l=await this.requestResource(a,e,s),d=x(l,{bearer:!0});if(c){if(!/^application\/jwt/.test(l.headers["content-type"]))throw new R({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 R({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 A&&e.id_token){let t=e.claims().sub;if(d.sub!==t)throw new R({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 o;E(this.issuer,"token_endpoint");let i=await N.call(this,"token",{form:e,responseType:"json"},{clientAssertionPayload:t,DPoP:r});try{o=x(i)}catch(o){if(n!==Z&&o instanceof O&&"use_dpop_nonce"===o.error)return this.grant(e,{clientAssertionPayload:t,DPoP:r},Z);throw o}return new A(o)}async deviceAuthorization(e={},{exchangeBody:t,clientAssertionPayload:r,DPoP:n}={}){E(this.issuer,"device_authorization_endpoint"),E(this.issuer,"token_endpoint");let o=X.call(this,{client_id:this.client_id,redirect_uri:null,response_type:null,...e}),i=x(await N.call(this,"device_authorization",{responseType:"json",form:o},{clientAssertionPayload:r,endpointAuthMethod:"token"}));return new L({client:this,exchangeBody:t,clientAssertionPayload:r,response:i,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 o={...r,token:e};t&&(o.token_type_hint=t),x(await N.call(this,"revocation",{form:o},{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 o={...r,token:e};return t&&(o.token_type_hint=t),x(await N.call(this,"introspection",{form:o,responseType:"json"},{clientAssertionPayload:n}))}static async register(e,t={}){let{initialAccessToken:r,jwks:n,...o}=t;return E(this.issuer,"registration_endpoint"),void 0===n||e.jwks||e.jwks_uri||(e.jwks=(await Y.call(this,n)).toJWKS()),new this(x(await j.call(this,{headers:{Accept:"application/json",...r?{Authorization:z(r)}:void 0},responseType:"json",json:e,url:this.issuer.registration_endpoint,method:"POST"}),{statusCode:201,bearer:!0}),n,o)}get metadata(){return M(Object.fromEntries(this.#l.entries()))}static async fromUri(e,t,r,n){return new this(x(await j.call(this,{method:"GET",url:e,responseType:"json",headers:{Authorization:z(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 o,i;if(!k(e))throw TypeError("requestObject must be a plain object");let a=P(),s={alg:t,typ:"oauth-authz-req+jwt"},c=JSON.stringify(_({},e,{iss:this.client_id,aud:this.issuer.issuer,client_id:this.client_id,jti:T(),iat:a,exp:a+300,...this.fapi()?{nbf:a}:void 0}));if("none"===t)o=[b.encode(JSON.stringify(s)),b.encode(c),""].join(".");else{let e=t.startsWith("HS");if(e)i=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(!(i=e.get({alg:t,use:"sig"})))throw TypeError(`no key to sign with found for alg ${t}`)}o=await new h.CompactSign(new TextEncoder().encode(c)).setProtectedHeader({...s,kid:e?void 0:i.jwk.kid}).sign(e?i:await i.keyObject(t))}if(!r)return o;let u={alg:r,enc:n,cty:"oauth-authz-req+jwt"};return u.alg.match(/^(RSA|ECDH)/)?[i]=await $.call(this.issuer,{alg:u.alg,use:"enc"},{allowMulti:!0}):i=this.secretForAlg("dir"===u.alg?u.enc:u.alg),new h.CompactEncrypt(new TextEncoder().encode(o)).setProtectedHeader({...u,kid:i instanceof Uint8Array?void 0:i.jwk.kid}
13).encrypt(i instanceof Uint8Array?i:await i.keyObject(u.alg))}async pushedAuthorizationRequest(e={},{clientAssertionPayload:t}={}){E(this.issuer,"pushed_authorization_request_endpoint");let r={..."request"in e?e:X.call(this,e),client_id:this.client_id},n=await N.call(this,"pushed_authorization_request",{responseType:"json",form:r},{clientAssertionPayload:t,endpointAuthMethod:"token"}),o=x(n,{statusCode:201});if(!("expires_in"in o))throw new R({message:"expected expires_in in Pushed Authorization Successful Response",response:n});if("number"!=typeof o.expires_in)throw new R({message:"invalid expires_in value in Pushed Authorization Successful Response",response:n});if(!("request_uri"in o))throw new R({message:"expected request_uri in Pushed Authorization Successful Response",response:n});if("string"!=typeof o.request_uri)throw new R({message:"invalid request_uri value in Pushed Authorization Successful Response",response:n});return o}get issuer(){return this.#d}[a.custom](){return`${this.constructor.name} ${a(this.metadata,{depth:1/0,colors:o.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 J(r)}async dpopProof(e,t,r){let o;if(!k(e))throw TypeError("payload must be a plain object");if(g(t))o=t;else if("CryptoKey"===t[Symbol.toStringTag])o=t;else if("node:crypto"===h.cryptoRuntime)o=c.createPrivateKey(t);else throw TypeError("unrecognized crypto runtime");if("private"!==o.type)throw TypeError('"DPoP" option must be a private key');let i=n.call(this,o,t);if(!i)throw TypeError("could not determine DPoP JWS Algorithm");return new h.SignJWT({ath:r?b.encode(c.createHash("sha256").update(r).digest()):void 0,...e}).setProtectedHeader({alg:i,typ:"dpop+jwt",jwk:await er(o,t)}).setIssuedAt().setJti(T()).sign(o)}}
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,i){if("CryptoKey"===i[Symbol.toStringTag])return ee(n);switch(n.asymmetricKeyType){case"ed25519":case"ed448":return"EdDSA";case"ec":var s=n,c=i;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],f=u.slice(l+1,l+1+d);if(f.equals(t))return"ES256";if(f.equals(r))return"ES384";if(f.equals(o))return"ES512";if(f.equals(a))return"ES256K";throw TypeError("unsupported DPoP private key curve");case"rsa":case K&&"rsa-pss":var p=n,h=i,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"===p.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=i.Buffer.from([42,134,72,206,61,3,1,7]),r=i.Buffer.from([43,129,4,0,34]),o=i.Buffer.from([43,129,4,0,35]),a=i.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:o}=e.r(477398),i=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),f=e.r(922087),{keystore:p}=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 f(Object.fromEntries(this.#l.entries()))}static async webfinger(e){let t=l(e),{host:r}=i.parse(t),n=`https://${r}/.well-known/webfinger`,o=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(o.links)&&o.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:o});if("string"!=typeof s.href||!s.href.startsWith("https://"))throw new a({printf:["invalid issuer location %s",s.href],body:o});let f=s.href;if(c.has(f))return c.get(f);let p=await this.discover(f);if(p.issuer!==f)throw c.del(p.issuer),new a("discovered issuer mismatch, expected %s, got: %s",f,p.issuer);return p}static async discover(e){let t=function(e){let t=i.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`,i.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 p.call(this,!0)}[o.custom](){return`${this.constructor.name} ${o(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:o}=e.r(477398),i=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:f,resolveRedirectUri:p}=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:o,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=o||`oidc:${n.parse(this._issuer.issuer).hostname}`,this._params=i(t),delete this._params.state,delete this._params.nonce,this._extras=i(s),this._params.response_type||(this._params.response_type=f.call(e)),this._params.redirect_uri||(this._params.redirect_uri=p.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),i=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[i]=d(n,"nonce","state","max_age","response_type"),this._usePKCE&&n.response_type.includes("code")){let t=u();switch(e.session[i].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 f=e.session[i];if(0===Object.keys(f||{}).length)throw Error(o('did not find expected authorization request details in session, req.session["%s"] is %j',i,f));let{state:p,nonce:y,max_age:g,code_verifier:m,response_type:b}=f;try{delete e.session[i]}catch(e){}let _={redirect_uri:this._params.redirect_uri,...t},v=await r.callback(_.redirect_uri,n,{state:p,nonce:y,max_age:g,code_verifier:m,response_type:b},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:o,RPError:i}=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:o,RPError:i},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=o;var n=e.r(434744);async function o(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 o,i,a;t=new n.Issuer({issuer:r.issuer,authorization_endpoint:null==(o=r.authorization)?void 0:o.url,token_endpoint:null==(i=r.token)?void 0:i.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="",o=-1;++o<e.length;)t=e.charCodeAt(o),r=o+1<e.length?e.charCodeAt(o+1):0,55296<=t&&t<=56319&&56320<=r&&r<=57343&&(t=65536+((1023&t)<<10)+(1023&r),o++),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 o(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 i(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var r=Array(80),n=0x67452301,o=-0x10325477,i=-0x67452302,c=0x10325476,u=-0x3c2d1e10,l=0;l<e.length;l+=16){for(var d=n,f=o,p=i,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,b=o,_=i,v=c,m<20?b&_|~b&v:m<40?b^_^v:m<60?b&_|b&v|_&v:b^_^v)),a(a(u,r[g]),(w=g)<20?0x5a827999:w<40?0x6ed9eba1:w<60?-0x70e44324:-0x359d3e2a));u=c,c=i,i=s(o,30),o=n,n=E}n=a(n,d),o=a(o,f),i=a(i,p),c=a(c,h),u=a(u,y)}return[n,o,i,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 o=e.charCodeAt(n)<<16|(n+1<r?e.charCodeAt(n+1)<<8:0)|(n+2<r?e.charCodeAt(n+2):0),i=0;i<4;i++)8*n+6*i>8*e.length?t+="=":t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
13+/".charAt(o>>>6*(3-i)&63);return t}(function(e,t){var r=o(e);r.length>16&&(r=i(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=i(n.concat(o(t)),512+8*t.length),u=i(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),o=e.r(586914),i=e.r(128811),a=e.r(465524),s=e.r(892542),c=e.r(421342),u=e.r(343954),l=e.r(758859);r.OAuth=function(e,t,r,n,o,i,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=o,void 0===i?this._authorize_callback="oob":this._authorize_callback=i,"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,o,i,a,s){if(this._isEcho=!0,this._realm=e,this._verifyCredentials=t,this._consumerKey=r,this._consumerSecret=this._encodeData(n),"RSA-SHA1"==i&&(this._privateKey=n),this._version=o,"PLAINTEXT"!=i&&"HMAC-SHA1"!=i&&"RSA-SHA1"!=i)throw Error("Un-supported signature method: "+i);this._signatureMethod=i,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 o=this._createSignatureBase(e,t,r);return this._createSignature(o,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 o=0;o<n.length;o++)t[t.length]=[r,n[o]];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=o.createSign("RSA-SHA1").update(e).sign(r,"base64")):n=o.Hmac?o.createHmac("sha1",r).update(e).digest("base64"):i.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,o=n.length,i=0;i<e;i++)t=Math.floor(Math.random()*o),r[i]=n[t];return r.join("")},r.OAuth.prototype._createClient=function(e,t,r,n,o,i){return(i?s:a).request({host:t,port:e,path:n,method:r,headers:o})},r.OAuth.prototype._prepareParameters=function(e,t,r,n,o){var i={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&&(i.oauth_token=e),this._isEcho)l=this._getSignature("GET",this._verifyCredentials,this._normaliseRequestParam
13s(i),t);else{if(o)for(var a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);var s=c.parse(n,!1);if(s.query){var l,d,f=u.parse(s.query);for(var a in f){var p=f[a];if("object"==typeof p)for(d in p)i[a+"["+d+"]"]=p[d];else i[a]=p}}l=this._getSignature(r,n,this._normaliseRequestParams(i),t)}var h=this._sortRequestParams(this._makeArrayOfArgumentsHash(i));return h[h.length]=["oauth_signature",l],h},r.OAuth.prototype._performSecureRequest=function(e,t,r,o,i,a,s,d){var f,p,h=this._prepareParameters(e,t,r,o,i);s||(s="application/x-www-form-urlencoded");var y=c.parse(o,!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 b in this._isEcho?g["X-Verify-Credentials-Authorization"]=m:g.Authorization=m,g.Host=y.host,this._headers)this._headers.hasOwnProperty(b)&&(g[b]=this._headers[b]);for(var b in i)this._isParameterNameAnOAuthParameter(b)&&delete i[b];("POST"==r||"PUT"==r)&&null==a&&null!=i&&(a=u.stringify(i).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="/"),f=y.query?y.pathname+"?"+y.query:y.pathname,p="https:"==y.protocol?this._createClient(y.port,y.hostname,r,f,g,!0):this._createClient(y.port,y.hostname,r,f,g);var _=this._clientOptions;if(!d)return("POST"==r||"PUT"==r)&&null!=a&&""!=a&&p.write(a),p;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)&&_.followRedirects&&n.headers&&n.headers.location?w._performSecureRequest(e,t,r,n.headers.location,i,a,s,d):d({statusCode:n.statusCode,data:v},v,n))};p.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)})}),p.on("error",function(e){S||(S=!0,d(e))}),("POST"==r||"PUT"==r)&&null!=a&&""!=a&&p.write(a),p.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 o={};"function"==typeof r?n=r:o.oauth_verifier=r,this._performSecureRequest(e,t,this._clientOptions.accessTokenHttpMethod,this._accessUrl,o,null,null,function(e,t,r){if(e)n(e);else{var o=u.parse(t),i=o.oauth_token;delete o.oauth_token;var a=o.oauth_token_secret;delete o.oauth_token_secret,n(null,i,a,o)}})},r.OAuth.prototype.getProtectedResource=function(e,t,r,n,o){this._performSecureRequest(r,n,t,e,null,"",null,o)},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,o,i,a,s){var c=null;return"function"==typeof a&&(s=a,a=null),"string"==typeof i||n.Buffer.isBuffer(i)||(a="application/x-www-form-urlencoded",c=i,i=null),this._performSecureRequest(r,o,e,t,c,i,a,s)},r.OAuth.prototype.put=function(e,t,r,n,o,i){return this._putOrPost("PUT",e,t,r,n,o,i)},r.OAuth.prototype.post=function(e,t,r,n,o,i){return this._putOrPost("POST",e,t,r,n,o,i)},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 o=u.parse(r),i=o.oauth_token,a=o.oauth_token_secret;delete o.oauth_token,delete o.oauth_token_secret,t(null,i,a,o)}})},r.OAuth.prototype.signUrl=function(e,t,r,n){if(void 0===n)var n="GET";for(var o=this._prepareParameters(t,r,n,e,{}),i=c.parse(e,!1),a="",s=0;s<o.length;s++)a+=o[s][0]+"="+this._encodeData(o[s][1])+"&";return a=a.substring(0,a.length-1),i.protocol+"//"+i.host+i.pathname+"?"+a},r.OAuth.prototype.authHeader=function(e,t,r,n){if(void 0===n)var n="GET";var o=this._prepareParameters(t,r,n,e,{});return this._buildAuthorizationHeaders(o)}},507018,(e,t,r)=>{var n=e.i(467034),o=e.r(343954),i=(e.r(586914),e.r(892542)),a=e.r(465524),s=e.r(421342),c=e.r(758859);r.OAuth2=function(e,t,r,n,o,i){this._clientId=e,this._clientSecret=t,this._baseSite=r,this._authorizeUrl=n||"/oauth/authorize",this._accessTokenUrl=o||"/oauth/access_token",this._accessTokenName="access_token",this._authMethod="Bearer",this._customHeaders=i||{},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=i;return"https:"!=e.protocol&&(t=a),t},r.OAuth2.prototype._request=function(e,t,r,i,a,c){var u=s.parse(t,!0);"https:"!=u.protocol||u.port||(u.port=443);var l=this._chooseHttpLibrary(u),d={};for(var f in this._customHeaders)d[f]=this._customHeaders[f];if(r)for(var f in r)d[f]=r[f];d.Host=u.host,d["User-Agent"]||(d["User-Agent"]="Node-oauth"),i?n.Buffer.isBuffer(i)?d["Content-Length"]=i.length:d["Content-Length"]=n.Buffer.byteLength(i):d["Content-length"]=0,!a||"Authorization"in d||(u.query||(u.query={}),u.query[this._accessTokenName]=a);var p=o.stringify(u.query);p&&(p="?"+p);var h={host:u.hostname,port:u.port,path:u.pathname+p,method:e,headers:d};this._executeRequest(l,h,i,c)},r.OAuth2.prototype._executeRequest=function(e,t,r,n){var o=c.isAnEarlyCloseHost(t.host),i=!1;function a(e,t){i||(i=!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){o&&a(e,s)}),e.addListener("end",function(){a(e,s)})}),u.on("error",function(e){i=!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+"?"+o.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 i=o.stringify(t);this._request("POST",this._getAccessTokenUrl(),{"Content-Type":"application/x-www-form-urlencoded"},i,null,function(e,t,n){if(e)r(e);else{try{i=JSON.parse(t)}catch(e){i=o.parse(t)}var i,a=i.access_token,s=i.refresh_token;delete i.refresh_token,r(null,a,s,i)}})},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 o=e.provider,i=new n.OAuth(o.requestTokenUrl,o.accessTokenUrl,o.clientId,o.clientSecret,null!=(t=o.version)?t:"1.0",o.callbackUrl,null!=(r=o.encoding)?r:"HMAC-SHA1"),a=i.get.bind(i);i.get=async(...e)=>await new Promise((t,r)=>{a(...e,(e,n)=>{if(e)return r(e);t(n)})});let s=i.getOAuthAccessToken.bind(i);i.getOAuthAccessToken=async(...e)=>await new Promise((t,r)=>{s(...e,(e,n,o)=>{if(e)return r(e);t({oauth_token:n,oauth_token_secret:o})})});let c=i.getOAuthRequestToken.bind(i);return i.getOAuthRequestToken=async(e={})=>await new Promise((t,r)=>{c(e,(e,n,o,i)=>{if(e)return r(e);t({oauth_token:n,oauth_token_secret:o,params:i})})}),i},r.oAuth1TokenStore=void 0;var n=e.r(139257);r.oAuth1TokenStore=new Map},855271,e=>{"use strict";let t=async(e,t,r,n,o)=>{let{crypto:{subtle:i}}=(()=>{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 i.deriveBits({name:"HKDF",hash:`SHA-${e.substr(3)}`,salt:r,info:n},await i.importKey("raw",t,"HKDF",!1,["deriveBits"]),o<<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,o,i,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(o,"salt"),function(e){let t=r(e,"info");if(t.byteLength>1024)throw TypeError('"info" must not contain more than 1024 bytes');return t}(i),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)},625744,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},905368,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default="00000000-0000-0000-0000-000000000000"},953824,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},653199,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(953824);r.default=function(e){return"string"==typeof e&&n.default.test(e)}},202214,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(653199);r.default=function(e){let t;if(!(0,n.default)(e))throw TypeError("Invalid UUID");return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/0x10000000000&255,t/0x100000000&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}},630755,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.unsafeStringify=void 0;let n=e.r(653199),o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));function i(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}r.unsafeStringify=i,r.default=function(e,t=0){let r=i(e,t);if(!(0,n.default)(r))throw TypeError("Stringified UUID is invalid");return r}},888479,(e,t,r)=>{"use strict";let n;Object.defineProperty(r,"__esModule",{value:!0});let o=new Uint8Array(16);r.default=function(){if(!n){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(o)}},287060,(e,t,r)=>{"use strict";
13Object.defineProperty(r,"__esModule",{value:!0}),r.updateV1State=void 0;let n=e.r(888479),o=e.r(630755),i={};function a(e,t,r){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=r.slice(10,16),e.node[0]|=1,e.clockseq=(r[8]<<8|r[9])&16383),e.msecs=t,e}function s(e,t,r,n,o,i,a=0){if(e.length<16)throw Error("Random bytes length must be >= 16");if(i){if(a<0||a+16>i.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`)}else i=new Uint8Array(16),a=0;t??=Date.now(),r??=0,n??=(e[8]<<8|e[9])&16383,o??=e.slice(10,16);let c=((0xfffffff&(t+=122192928e5))*1e4+r)%0x100000000;i[a++]=c>>>24&255,i[a++]=c>>>16&255,i[a++]=c>>>8&255,i[a++]=255&c;let u=t/0x100000000*1e4&0xfffffff;i[a++]=u>>>8&255,i[a++]=255&u,i[a++]=u>>>24&15|16,i[a++]=u>>>16&255,i[a++]=n>>>8|128,i[a++]=255&n;for(let e=0;e<6;++e)i[a++]=o[e];return i}r.updateV1State=a,r.default=function(e,t,r){let c,u=e?._v6??!1;if(e){let t=Object.keys(e);1===t.length&&"_v6"===t[0]&&(e=void 0)}if(e)c=s(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,r);else{let e=Date.now(),o=(0,n.default)();a(i,e,o),c=s(o,i.msecs,i.nsecs,u?void 0:i.clockseq,u?void 0:i.node,t,r)}return t??(0,o.unsafeStringify)(c)}},151928,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(202214),o=e.r(630755);r.default=function(e){var t;let r=(t="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&t[6])<<4|t[7]>>4&15,(15&t[7])<<4|(240&t[4])>>4,(15&t[4])<<4|(240&t[5])>>4,(15&t[5])<<4|(240&t[0])>>4,(15&t[0])<<4|(240&t[1])>>4,(15&t[1])<<4|(240&t[2])>>4,96|15&t[2],t[3],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]));return"string"==typeof e?(0,o.unsafeStringify)(r):r}},121037,(e,t,r)=>{"use strict";function n(e){return(e+64>>>9<<4)+14+1}function o(e,t){let r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,n,i,a){var s;return o((s=o(o(t,e),o(n,a)))<<i|s>>>32-i,r)}function a(e,t,r,n,o,a,s){return i(t&r|~t&n,e,t,o,a,s)}function s(e,t,r,n,o,a,s){return i(t&n|r&~n,e,t,o,a,s)}function c(e,t,r,n,o,a,s){return i(t^r^n,e,t,o,a,s)}function u(e,t,r,n,o,a,s){return i(r^(t|~n),e,t,o,a,s)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t=function(e,t){let r=new Uint32Array(n(t)).fill(0);r.set(e),r[t>>5]|=128<<t%32,r[r.length-1]=t,e=r;let i=0x67452301,l=-0x10325477,d=-0x67452302,f=0x10325476;for(let t=0;t<e.length;t+=16){let r=i,n=l,p=d,h=f;i=a(i,l,d,f,e[t],7,-0x28955b88),f=a(f,i,l,d,e[t+1],12,-0x173848aa),d=a(d,f,i,l,e[t+2],17,0x242070db),l=a(l,d,f,i,e[t+3],22,-0x3e423112),i=a(i,l,d,f,e[t+4],7,-0xa83f051),f=a(f,i,l,d,e[t+5],12,0x4787c62a),d=a(d,f,i,l,e[t+6],17,-0x57cfb9ed),l=a(l,d,f,i,e[t+7],22,-0x2b96aff),i=a(i,l,d,f,e[t+8],7,0x698098d8),f=a(f,i,l,d,e[t+9],12,-0x74bb0851),d=a(d,f,i,l,e[t+10],17,-42063),l=a(l,d,f,i,e[t+11],22,-0x76a32842),i=a(i,l,d,f,e[t+12],7,0x6b901122),f=a(f,i,l,d,e[t+13],12,-0x2678e6d),d=a(d,f,i,l,e[t+14],17,-0x5986bc72),l=a(l,d,f,i,e[t+15],22,0x49b40821),i=s(i,l,d,f,e[t+1],5,-0x9e1da9e),f=s(f,i,l,d,e[t+6],9,-0x3fbf4cc0),d=s(d,f,i,l,e[t+11],14,0x265e5a51),l=s(l,d,f,i,e[t],20,-0x16493856),i=s(i,l,d,f,e[t+5],5,-0x29d0efa3),f=s(f,i,l,d,e[t+10],9,0x2441453),d=s(d,f,i,l,e[t+15],14,-0x275e197f),l=s(l,d,f,i,e[t+4],20,-0x182c0438),i=s(i,l,d,f,e[t+9],5,0x21e1cde6),f=s(f,i,l,d,e[t+14],9,-0x3cc8f82a),d=s(d,f,i,l,e[t+3],14,-0xb2af279),l=s(l,d,f,i,e[t+8],20,0x455a14ed),i=s(i,l,d,f,e[t+13],5,-0x561c16fb),f=s(f,i,l,d,e[t+2],9,-0x3105c08),d=s(d,f,i,l,e[t+7],14,0x676f02d9),l=s(l,d,f,i,e[t+12],20,-0x72d5b376),i=c(i,l,d,f,e[t+5],4,-378558),f=c(f,i,l,d,e[t+8],11,-0x788e097f),d=c(d,f,i,l,e[t+11],16,0x6d9d6122),l=c(l,d,f,i,e[t+14],23,-0x21ac7f4),i=c(i,l,d,f,e[t+1],4,-0x5b4115bc),f=c(f,i,l,d,e[t+4],11,0x4bdecfa9),d=c(d,f,i,l,e[t+7],16,-0x944b4a0),l=c(l,d,f,i,e[t+10],23,-0x41404390),i=c(i,l,d,f,e[t+13],4,0x289b7ec6),f=c(f,i,l,d,e[t],11,-0x155ed806),d=c(d,f,i,l,e[t+3],16,-0x2b10cf7b),l=c(l,d,f,i,e[t+6],23,0x4881d05),i=c(i,l,d,f,e[t+9],4,-0x262b2fc7),f=c(f,i,l,d,e[t+12],11,-0x1924661b),d=c(d,f,i,l,e[t+15],16,0x1fa27cf8),l=c(l,d,f,i,e[t+2],23,-0x3b53a99b),i=u(i,l,d,f,e[t],6,-0xbd6ddbc),f=u(f,i,l,d,e[t+7],10,0x432aff97),d=u(d,f,i,l,e[t+14],15,-0x546bdc59),l=u(l,d,f,i,e[t+5],21,-0x36c5fc7),i=u(i,l,d,f,e[t+12],6,0x655b59c3),f=u(f,i,l,d,e[t+3],10,-0x70f3336e),d=u(d,f,i,l,e[t+10],15,-1051523),l=u(l,d,f,i,e[t+1],21,-0x7a7ba22f),i=u(i,l,d,f,e[t+8],6,0x6fa87e4f),f=u(f,i,l,d,e[t+15],10,-0x1d31920),d=u(d,f,i,l,e[t+6],15,-0x5cfebcec),l=u(l,d,f,i,e[t+13],21,0x4e0811a1),i=u(i,l,d,f,e[t+4],6,-0x8ac817e),f=u(f,i,l,d,e[t+11],10,-0x42c50dcb),d=u(d,f,i,l,e[t+2],15,0x2ad7d2bb),l=u(l,d,f,i,e[t+9],21,-0x14792c6f),i=o(i,r),l=o(l,n),d=o(d,p),f=o(f,h)}return Uint32Array.of(i,l,d,f)}(function(e){if(0===e.length)return new Uint32Array;let t=new Uint32Array(n(8*e.length)).fill(0);for(let r=0;r<e.length;r++)t[r>>2]|=(255&e[r])<<r%4*8;return t}(e),8*e.length);let r=new Uint8Array(4*t.length);for(let e=0;e<4*t.length;e++)r[e]=t[e>>2]>>>e%4*8&255;return r}},880602,(e,t,r)=>{"use strict";
13Object.defineProperty(r,"__esModule",{value:!0}),r.URL=r.DNS=r.stringToBytes=void 0;let n=e.r(202214),o=e.r(630755);function i(e){let t=new Uint8Array((e=unescape(encodeURIComponent(e))).length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}r.stringToBytes=i,r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r.default=function(e,t,r,a,s,c){let u="string"==typeof r?i(r):r,l="string"==typeof a?(0,n.default)(a):a;if("string"==typeof a&&(a=(0,n.default)(a)),a?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let d=new Uint8Array(16+u.length);if(d.set(l),d.set(u,l.length),(d=t(d))[6]=15&d[6]|e,d[8]=63&d[8]|128,s){if((c=c||0)<0||c+16>s.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let e=0;e<16;++e)s[c+e]=d[e];return s}return(0,o.unsafeStringify)(d)}},637784,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.URL=r.DNS=void 0;let n=e.r(121037),o=e.r(880602);var i=e.r(880602);function a(e,t,r,i){return(0,o.default)(48,n.default,e,t,r,i)}Object.defineProperty(r,"DNS",{enumerable:!0,get:function(){return i.DNS}}),Object.defineProperty(r,"URL",{enumerable:!0,get:function(){return i.URL}}),a.DNS=o.DNS,a.URL=o.URL,r.default=a},713202,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}},385329,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(713202),o=e.r(888479),i=e.r(630755);r.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();let a=(e=e||{}).random??e.rng?.()??(0,o.default)();if(a.length<16)throw Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=a[e];return t}return(0,i.unsafeStringify)(a)}},893072,(e,t,r)=>{"use strict";function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){let t=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],r=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],o=new Uint8Array(e.length+1);o.set(e),o[e.length]=128;let i=Math.ceil(((e=o).length/4+2)/16),a=Array(i);for(let t=0;t<i;++t){let r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];a[t]=r}a[i-1][14]=(e.length-1)*8/0x100000000,a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=(e.length-1)*8|0;for(let e=0;e<i;++e){let o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=a[e][t];for(let e=16;e<80;++e)o[e]=n(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let i=r[0],s=r[1],c=r[2],u=r[3],l=r[4];for(let e=0;e<80;++e){let r=Math.floor(e/20),a=n(i,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}}(r,s,c,u)+l+t[r]+o[e]>>>0;l=u,u=c,c=n(s,30)>>>0,s=i,i=a}r[0]=r[0]+i>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+c>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+l>>>0}return Uint8Array.of(r[0]>>24,r[0]>>16,r[0]>>8,r[0],r[1]>>24,r[1]>>16,r[1]>>8,r[1],r[2]>>24,r[2]>>16,r[2]>>8,r[2],r[3]>>24,r[3]>>16,r[3]>>8,r[3],r[4]>>24,r[4]>>16,r[4]>>8,r[4])}},635299,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.URL=r.DNS=void 0;let n=e.r(893072),o=e.r(880602);var i=e.r(880602);function a(e,t,r,i){return(0,o.default)(80,n.default,e,t,r,i)}Object.defineProperty(r,"DNS",{enumerable:!0,get:function(){return i.DNS}}),Object.defineProperty(r,"URL",{enumerable:!0,get:function(){return i.URL}}),a.DNS=o.DNS,a.URL=o.URL,r.default=a},633520,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(630755),o=e.r(287060),i=e.r(151928);r.default=function(e,t,r){e??={},r??=0;let a=(0,o.default)({...e,_v6:!0},new Uint8Array(16));if(a=(0,i.default)(a),t){if(r<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;e++)t[r+e]=a[e];return t}return(0,n.unsafeStringify)(a)}},383857,(e,t,r)=>{"use strict";
13Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(202214),o=e.r(630755);r.default=function(e){var t;let r=(t="string"==typeof e?(0,n.default)(e):e,Uint8Array.of((15&t[3])<<4|t[4]>>4&15,(15&t[4])<<4|(240&t[5])>>4,(15&t[5])<<4|15&t[6],t[7],(15&t[1])<<4|(240&t[2])>>4,(15&t[2])<<4|(240&t[3])>>4,16|(240&t[0])>>4,(15&t[0])<<4|(240&t[1])>>4,t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]));return"string"==typeof e?(0,o.unsafeStringify)(r):r}},573773,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.updateV7State=void 0;let n=e.r(888479),o=e.r(630755),i={};function a(e,t,r){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function s(e,t,r,n,o=0){if(e.length<16)throw Error("Random bytes length must be >= 16");if(n){if(o<0||o+16>n.length)throw RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`)}else n=new Uint8Array(16),o=0;return t??=Date.now(),r??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[o++]=t/0x10000000000&255,n[o++]=t/0x100000000&255,n[o++]=t/0x1000000&255,n[o++]=t/65536&255,n[o++]=t/256&255,n[o++]=255&t,n[o++]=112|r>>>28&15,n[o++]=r>>>20&255,n[o++]=128|r>>>14&63,n[o++]=r>>>6&255,n[o++]=r<<2&255|3&e[10],n[o++]=e[11],n[o++]=e[12],n[o++]=e[13],n[o++]=e[14],n[o++]=e[15],n}r.updateV7State=a,r.default=function(e,t,r){let c;if(e)c=s(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.seq,t,r);else{let e=Date.now(),o=(0,n.default)();a(i,e,o),c=s(o,i.msecs,i.seq,t,r)}return t??(0,o.unsafeStringify)(c)}},87211,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(653199);r.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},95135,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.version=r.validate=r.v7=r.v6ToV1=r.v6=r.v5=r.v4=r.v3=r.v1ToV6=r.v1=r.stringify=r.parse=r.NIL=r.MAX=void 0;var n=e.r(625744);Object.defineProperty(r,"MAX",{enumerable:!0,get:function(){return n.default}});var o=e.r(905368);Object.defineProperty(r,"NIL",{enumerable:!0,get:function(){return o.default}});var i=e.r(202214);Object.defineProperty(r,"parse",{enumerable:!0,get:function(){return i.default}});var a=e.r(630755);Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return a.default}});var s=e.r(287060);Object.defineProperty(r,"v1",{enumerable:!0,get:function(){return s.default}});var c=e.r(151928);Object.defineProperty(r,"v1ToV6",{enumerable:!0,get:function(){return c.default}});var u=e.r(637784);Object.defineProperty(r,"v3",{enumerable:!0,get:function(){return u.default}});var l=e.r(385329);Object.defineProperty(r,"v4",{enumerable:!0,get:function(){return l.default}});var d=e.r(635299);Object.defineProperty(r,"v5",{enumerable:!0,get:function(){return d.default}});var f=e.r(633520);Object.defineProperty(r,"v6",{enumerable:!0,get:function(){return f.default}});var p=e.r(383857);Object.defineProperty(r,"v6ToV1",{enumerable:!0,get:function(){return p.default}});var h=e.r(573773);Object.defineProperty(r,"v7",{enumerable:!0,get:function(){return h.default}});var y=e.r(653199);Object.defineProperty(r,"validate",{enumerable:!0,get:function(){return y.default}});var g=e.r(87211);Object.defineProperty(r,"version",{enumerable:!0,get:function(){return g.default}})},401776,(e,t,r)=>{"use strict";function n(e,t,r){o(e,t),t.set(e,r)}function o(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function i(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 f(e){let t=Math.ceil(e.value.length/3933);if(1===t)return i(c,this)[e.name]=e.value,[e];let r=[];for(let n=0;n<t;n++){let t=`${e.name}.${n}`,o=e.value.substr(3933*n,3933);r.push({...e,name:t,value:o}),i(c,this)[t]=o}return i(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 p(){let e={};for(let r in i(c,this)){var t;null==(t=i(c,this))||delete t[r],e[r]={name:r,value:"",options:{...i(u,this).options,maxAge:0}}}return e}r.SessionStore=class{constructor(e,t,r){!function(e,t){o(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:f}=e;if("function"==typeof(null==s?void 0:s.getAll))for(const{name:e,value:t}of s.getAll())e.startsWith(f)&&(i(c,this)[e]=t);else if(s instanceof Map)for(const e of s.keys())e.startsWith(f)&&(i(c,this)[e]=s.get(e));else for(const e in s)e.startsWith(f)&&(i(c,this)[e]=s[e])}get value(){return Object.keys(i(c,this)).sort((e,t)=>
13{var r,n;return parseInt(null!=(r=e.split(".").pop())?r:"0")-parseInt(null!=(n=t.split(".").pop())?n:"0")}).map(e=>i(c,this)[e]).join("")}chunk(e,t){let r=s(d,this,p).call(this);for(let n of s(d,this,f).call(this,{name:i(u,this).name,value:e,options:{...i(u,this).options,...t}}))r[n.name]=n;return Object.values(r)}clean(){return Object.values(s(d,this,p).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),o=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0});var i={encode:!0,decode:!0,getToken:!0};r.decode=f,r.encode=d,r.getToken=p;var a=e.r(563703),s=o(e.r(855271)),c=e.r(95135),u=e.r(401776),l=e.r(587245);async function d(e){let{token:t={},secret:r,maxAge:n=2592e3,salt:o=""}=e,i=await h(r,o);return await new a.EncryptJWT(t).setProtectedHeader({alg:"dir",enc:"A256GCM"}).setIssuedAt().setExpirationTime((Date.now()/1e3|0)+n).setJti((0,c.v4)()).encrypt(i)}async function f(e){let{token:t,secret:r,salt:n=""}=e;if(!t)return null;let o=await h(r,n),{payload:i}=await (0,a.jwtDecrypt)(t,o,{clockTolerance:15});return i}async function p(e){var t,r,o,i;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=f,logger:p=console,secret:h=null!=(o=n.default.env.NEXTAUTH_SECRET)?o:n.default.env.AUTH_SECRET}=e;if(!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},p).value,g=a.headers instanceof Headers?a.headers.get("authorization"):null==(i=a.headers)?void 0:i.authorization;if(!y&&(null==g?void 0:g.split(" ")[0])==="Bearer"){let e=g.split(" ")[1];try{y=decodeURIComponent(e)}catch(e){return null}}if(!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(i,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),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i(void 0);if(t&&t.has(e))return t.get(e);var r={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}(e.r(151071));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}async function a(e,t,r,n){let{cookies:i,logger:a}=n;a.debug(`CREATE_${e.toUpperCase()}`,{value:t,maxAge:r});let{name:s}=i[e],c=new Date;return c.setTime(c.getTime()+1e3*r),{name:s,value:await o.encode({...n.jwt,maxAge:r,token:{value:t,provider:n.provider.id},salt:s}),options:{...i[e].options,expires:c}}}let s=r.PKCE_CODE_CHALLENGE_METHOD="S256";r.pkce={async create(e,t,r){var o,i;if(!(null!=(o=e.provider)&&null!=(o=o.checks)&&o.includes("pkce")))return;let c=n.generators.codeVerifier();r.code_challenge=n.generators.codeChallenge(c),r.code_challenge_method=s;let u=null!=(i=e.cookies.pkceCodeVerifier.options.maxAge)?i:900;t.push(await a("pkceCodeVerifier",c,u,e))},async use(e,t,r,n){var i,a;if(!(null!=(i=r.provider)&&null!=(i=i.checks)&&i.includes("pkce")))return;let s=null==e?void 0:e[r.cookies.pkceCodeVerifier.name];if(!s)throw TypeError("PKCE code_verifier cookie was missing.");let{name:c}=r.cookies.pkceCodeVerifier,u=await o.decode({...r.jwt,token:s,salt:c});if(!(null!=u&&u.value))throw TypeError("PKCE code_verifier value could not be parsed.");if(u.provider!==(null==(a=r.provider)?void 0:a.id))throw TypeError(`${c} cookie was created for a different provider than the one handling the callback.`);
13t.push({name:c,value:"",options:{...r.cookies.pkceCodeVerifier.options,maxAge:0}}),n.code_verifier=u.value}},r.state={async create(e,t,r){var o,i;if(!(null!=(o=e.provider.checks)&&o.includes("state")))return;let s=n.generators.state();r.state=s;let c=null!=(i=e.cookies.state.options.maxAge)?i:900;t.push(await a("state",s,c,e))},async use(e,t,r,n){var i,a;if(!(null!=(i=r.provider.checks)&&i.includes("state")))return;let s=null==e?void 0:e[r.cookies.state.name];if(!s)throw TypeError("State cookie was missing.");let{name:c}=r.cookies.state,u=await o.decode({...r.jwt,token:s,salt:c});if(!(null!=u&&u.value))throw TypeError("State value could not be parsed.");if(u.provider!==(null==(a=r.provider)?void 0:a.id))throw TypeError(`${c} cookie was created for a different provider than the one handling the callback.`);t.push({name:c,value:"",options:{...r.cookies.state.options,maxAge:0}}),n.state=u.value}},r.nonce={async create(e,t,r){var o,i;if(!(null!=(o=e.provider.checks)&&o.includes("nonce")))return;let s=n.generators.nonce();r.nonce=s;let c=null!=(i=e.cookies.nonce.options.maxAge)?i:900;t.push(await a("nonce",s,c,e))},async use(e,t,r,n){var i,a;if(!(null!=(i=r.provider)&&null!=(i=i.checks)&&i.includes("nonce")))return;let s=null==e?void 0:e[r.cookies.nonce.name];if(!s)throw TypeError("Nonce cookie was missing.");let{name:c}=r.cookies.nonce,u=await o.decode({...r.jwt,token:s,salt:c});if(!(null!=u&&u.value))throw TypeError("Nonce value could not be parsed.");if(u.provider!==(null==(a=r.provider)?void 0:a.id))throw TypeError(`${c} cookie was created for a different provider than the one handling the callback.`);t.push({name:c,value:"",options:{...r.cookies.nonce.options,maxAge:0}}),n.nonce=u.value}}},957078,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=u;var n=e.r(434744),o=e.r(577021),i=e.r(28503),a=function(e){if(e&&e.__esModule)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 o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}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,f;let{options:p,query:h,body:y,method:g,cookies:m}=e,{logger:b,provider:_}=p,v=null!=(t=null==y?void 0:y.error)?t:null==h?void 0:h.error;if(v){let e=Error(v);throw b.error("OAUTH_CALLBACK_HANDLER_ERROR",{error:e,error_description:null==h?void 0:h.error_description,providerId:_.id}),b.debug("OAUTH_CALLBACK_HANDLER_ERROR",{body:y}),e}if(null!=(r=_.version)&&r.startsWith("1."))try{let e=await (0,i.oAuth1Client)(p),{oauth_token:t,oauth_verifier:r}=null!=h?h:{},n=await e.getOAuthAccessToken(t,i.oAuth1TokenStore.get(t),r),o=await e.get(_.profileUrl,n.oauth_token,n.oauth_token_secret);return"string"==typeof o&&(o=JSON.parse(o)),{...await l({profile:o,tokens:n,provider:_,logger:b}),cookies:[]}}catch(e){throw b.error("OAUTH_V1_GET_ACCESS_TOKEN_ERROR",e),e}null!=h&&h.oauth_token&&i.oAuth1TokenStore.delete(h.oauth_token);try{let e,t,r=await (0,o.openidClient)(p),i={},s=[];await a.state.use(m,s,p,i),await a.pkce.use(m,s,p,i),await a.nonce.use(m,s,p,i);let v={...r.callbackParams({url:`http://n?${new URLSearchParams(h)}`,body:y,method:g}),...null==(c=_.token)?void 0:c.params};if(null!=(u=_.token)&&u.request){let t=await _.token.request({provider:_,params:v,checks:i,client:r});e=new n.TokenSet(t.tokens)}else e=_.idToken?await r.callback(_.callbackUrl,v,i):await r.oauthCallback(_.callbackUrl,v,i);return Array.isArray(e.scope)&&(e.scope=e.scope.join(" ")),t=null!=(d=_.userinfo)&&d.request?await _.userinfo.request({provider:_,tokens:e,client:r}):_.idToken?e.claims():await r.userinfo(e,{params:null==(f=_.userinfo)?void 0:f.params}),{...await l({profile:t,provider:_,tokens:e,logger:b}),cookies:s}}catch(e){throw new s.OAuthCallbackError(e)}}async function l({profile:e,tokens:t,provider:r,logger:n}){try{var o;n.debug("PROFILE_DATA",{OAuthProfile:e});let i=await r.profile(e,t);if(i.email=null==(o=i.email)?void 0:o.toLowerCase(),!i.id)throw TypeError(`Profile id is missing in ${r.name} OAuth profile response`);return{profile:i,account:{provider:r.id,type:r.type,providerAccountId:i.id.toString(),...t},OAuthProfile:e}}catch(t){n.error("OAUTH_PARSE_PROFILE_ERROR",{error:t,OAuthProfile:e})}}},762342,(e,t,r)=>{"use strict";
13Object.defineProperty(r,"__esModule",{value:!0}),r.createSecret=function(e){var t;let{authOptions:r,url:o}=e;return null!=(t=r.secret)?t:(0,n.createHash)("sha256").update(JSON.stringify({...o,...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:o,secret:i}=t;return(0,n.createHash)("sha256").update(`${e}${null!=(r=o.secret)?r:i}`).digest("hex")};var n=e.r(586914)},25504,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=i;var n=e.r(641731),o=e.r(762342);async function i(e){var t,r,i,a,s,c;let{sessionToken:u,profile:l,account:d,options:f}=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:p,jwt:h,events:y,session:{strategy:g,generateSessionToken:m}}=f;if(!p)return{user:l,account:d};let{createUser:b,updateUser:_,getUser:v,getUserByAccount:w,getUserByEmail:E,linkAccount:S,createSession:k,getSessionAndUser:x,deleteSession:A}=p,O=null,R=null,P=!1,T="jwt"===g;if(u)if(T)try{(O=await h.decode({...h,token:u}))&&"sub"in O&&O.sub&&(R=await v(O.sub))}catch(e){}else{let e=await x(u);e&&(O=e.session,R=e.user)}if("email"===d.type){let e=await E(l.email);if(e)(null==(t=R)?void 0:t.id)!==e.id&&!T&&u&&await A(u),R=await _({id:e.id,emailVerified:new Date}),await (null==(r=y.updateUser)?void 0:r.call(y,{user:R}));else{let{id:e,...t}={...l,emailVerified:new Date};R=await b(t),await (null==(i=y.createUser)?void 0:i.call(y,{user:R})),P=!0}return{session:O=T?{}:await k({sessionToken:await m(),userId:R.id,expires:(0,o.fromDate)(f.session.maxAge)}),user:R,isNewUser:P}}if("oauth"===d.type){let e=await w({providerAccountId:d.providerAccountId,provider:d.provider});if(e){if(R){if(e.id===R.id)return{session:O,user:R,isNewUser:P};throw new n.AccountNotLinkedError("The account is already associated with another user")}return{session:O=T?{}:await k({sessionToken:await m(),userId:e.id,expires:(0,o.fromDate)(f.session.maxAge)}),user:e,isNewUser:P}}{if(R)return await S({...d,userId:R.id}),await (null==(c=y.linkAccount)?void 0:c.call(y,{user:R,account:d,profile:l})),{session:O,user:R,isNewUser:P};let e=l.email?await E(l.email):null;if(e){let t=f.provider;if(null!=t&&t.allowDangerousEmailAccountLinking)R=e;else throw new n.AccountNotLinkedError("Another account already exists with the same e-mail address")}else{let{id:e,...t}={...l,emailVerified:null};R=await b(t)}return await (null==(a=y.createUser)?void 0:a.call(y,{user:R})),await S({...d,userId:R.id}),await (null==(s=y.linkAccount)?void 0:s.call(y,{user:R,account:d,profile:l})),{session:O=T?{}:await k({sessionToken:await m(),userId:R.id,expires:(0,o.fromDate)(f.session.maxAge)}),user:R,isNewUser:!0}}}throw Error("Unsupported account type")}},237042,(e,t,r)=>{"use strict";async function n({email:e,adapter:t}){let{getUserByEmail:r}=t,o=e?await r(e):null;return o||{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 o=n(e.r(957078)),i=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:f,body:p,method:h,headers:y,sessionStore:g}=e,{provider:m,adapter:b,url:_,callbackUrl:v,pages:w,jwt:E,events:S,callbacks:k,session:{strategy:x,maxAge:A},logger:O}=d,R=[],P="jwt"===x;if("oauth"===m.type)try{let{profile:n,account:a,OAuthProfile:s,cookies:c}=await (0,o.default)({query:f,body:p,method:h,options:d,cookies:e.cookies});c.length&&R.push(...c);try{if(O.debug("OAUTH_CALLBACK_RESPONSE",{profile:n,account:a,OAuthProfile:s}),!n||!a||!s)return{redirect:`${_}/signin`,cookies:R};let e=n;if(b){let{getUserByAccount:t}=b,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:`${_}/error?error=AccessDenied`,cookies:R};if("string"==typeof t)return{redirect:t,cookies:R}}catch(e){return{redirect:`${_}/error?error=${encodeURIComponent(e.message)}`,cookies:R}}let{user:o,session:c,isNewUser:u}=await (0,i.default)({sessionToken:g.value,profile:n,account:a,options:d});if(P){let e={name:o.name,email:o.email,picture:o.image,sub:null==(r=o.id)?void 0:r.toString()},t=await k.jwt({token:e,user:o,account:a,profile:s,isNewUser:u,trigger:u?"signUp":"signIn"}),n=await E.encode({...E,token:t}),i=new Date;i.setTime(i.getTime()+1e3*A);let c=g.chunk(n,{expires:i});R.push(...c)}else R.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:o,account:a,profile:n,isNewUser:u})),u&&w.newUser)return{redirect:`${w.newUser}${w.newUser.includes("?")?"&":"?"}callbackUrl=${encodeURIComponent(v)}`,cookies:R};return{redirect:v,cookies:R}}catch(e){if("AccountNotLinkedError"===e.name)return{redirect:`${_}
13/error?error=OAuthAccountNotLinked`,cookies:R};if("CreateUserError"===e.name)return{redirect:`${_}/error?error=OAuthCreateAccount`,cookies:R};return O.error("OAUTH_CALLBACK_HANDLER_ERROR",e),{redirect:`${_}/error?error=Callback`,cookies:R}}}catch(e){if("OAuthCallbackError"===e.name)return O.error("OAUTH_CALLBACK_ERROR",{error:e,providerId:m.id}),{redirect:`${_}/error?error=OAuthCallback`,cookies:R};return O.error("OAUTH_CALLBACK_ERROR",e),{redirect:`${_}/error?error=Callback`,cookies:R}}if("email"===m.type)try{let e=null==f?void 0:f.token,t=null==f?void 0:f.email;if(!e)return{redirect:`${_}/error?error=configuration`,cookies:R};let r=await b.useVerificationToken({identifier:t,token:(0,a.hashToken)(e,d)});if(!r||r.expires.valueOf()<Date.now()||t&&r.identifier!==t)return{redirect:`${_}/error?error=Verification`,cookies:R};let o=await (0,s.default)({email:r.identifier,adapter:b}),u={providerAccountId:o.email,type:"email",provider:m.id};try{let e=await k.signIn({user:o,account:u});if(!e)return{redirect:`${_}/error?error=AccessDenied`,cookies:R};if("string"==typeof e)return{redirect:e,cookies:R}}catch(e){return{redirect:`${_}/error?error=${encodeURIComponent(e.message)}`,cookies:R}}let{user:l,session:p,isNewUser:h}=await (0,i.default)({sessionToken:g.value,profile:o,account:u,options:d});if(P){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*A);let o=g.chunk(r,{expires:n});R.push(...o)}else R.push({name:d.cookies.sessionToken.name,value:p.sessionToken,options:{...d.cookies.sessionToken.options,expires:p.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:R};return{redirect:v,cookies:R}}catch(e){if("CreateUserError"===e.name)return{redirect:`${_}/error?error=EmailCreateAccount`,cookies:R};return O.error("CALLBACK_EMAIL_ERROR",e),{redirect:`${_}/error?error=Callback`,cookies:R}}if("credentials"===m.type&&"POST"===h){let e;try{if(!(e=await m.authorize(p,{query:f,body:p,headers:y,method:h})))return{status:401,redirect:`${_}/error?${new URLSearchParams({error:"CredentialsSignin",provider:m.id})}`,cookies:R}}catch(e){return{status:401,redirect:`${_}/error?error=${encodeURIComponent(e.message)}`,cookies:R}}let t={providerAccountId:e.id,type:"credentials",provider:m.id};try{let r=await k.signIn({user:e,account:t,credentials:p});if(!r)return{status:403,redirect:`${_}/error?error=AccessDenied`,cookies:R};if("string"==typeof r)return{redirect:r,cookies:R}}catch(e){return{redirect:`${_}/error?error=${encodeURIComponent(e.message)}`,cookies:R}}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"}),o=await E.encode({...E,token:n}),i=new Date;i.setTime(i.getTime()+1e3*A);let a=g.chunk(o,{expires:i});return R.push(...a),await (null==(l=S.signIn)?void 0:l.call(S,{user:e,account:t})),{redirect:v,cookies:R}}return{status:500,body:`Error: Callback for provider type ${m.type} not supported`,cookies:R}}},980816,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=s;var n=e.r(577021),o=e.r(28503),i=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 o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}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,o.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 o.oAuth1TokenStore.set(r.oauth_token,r.oauth_token_secret),u.debug("GET_AUTHORIZATION_URL",{url:n,provider:l}),{redirect:n}}
13let f=await (0,n.openidClient)(e),p=d,h=[];await i.state.create(e,h,p),await i.pkce.create(e,h,p),await i.nonce.create(e,h,p);let y=f.authorizationUrl(p);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=i;var n=e.r(586914),o=e.r(762342);async function i(e,t){var r,i,a,s;let{url:c,adapter:u,provider:l,callbackUrl:d,theme:f}=t,p=null!=(r=await (null==(i=l.generateVerificationToken)?void 0:i.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:p,email:e}),g=`${c}/callback/${l.id}?${y}`;return await Promise.all([l.sendVerificationRequest({identifier:e,token:p,expires:h,url:g,provider:l,theme:f}),null==(s=u.createVerificationToken)?void 0:s.call(u,{identifier:e,token:(0,o.hashToken)(p,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);Object.defineProperty(r,"__esModule",{value:!0}),r.default=s;var o=n(e.r(980816)),i=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,o.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.normalize("NFKC").trim();if(1!==(null!=(t=r.match(/@/g))?t:[]).length||r.includes('"'))throw Error("Invalid email address format.");let[n,o]=r.toLowerCase().split("@");if(!n||!o||!(o=o.split(",")[0]).includes("."))throw Error("Invalid email address format.");return`${n}@${o}`};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 o=await (0,a.default)({email:e,adapter:t.adapter}),f={providerAccountId:e,userId:e,type:"email",provider:l.id};try{let e=await c.signIn({user:o,account:f,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,i.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:o}=e,{adapter:i,events:a,jwt:s,callbackUrl:c,logger:u,session:l}=n,d=null==o?void 0:o.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 i.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:o.clean()}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n},941939,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=o;var n=e.r(762342);async function o(e){var t,r,o,i,a,s;let{options:c,sessionStore:u,newSession:l,isUpdate:d}=e,{adapter:f,jwt:p,events:h,callbacks:y,logger:g,session:{strategy:m,maxAge:b}}=c,_={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 _;if("jwt"===m)try{let e=await p.decode({...p,token:v});if(!e)throw Error("JWT invalid");let o=await y.jwt({token:e,...d&&{trigger:"update"},session:l}),i=(0,n.fromDate)(b),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:i.toISOString()},token:o});_.body=a;let s=await p.encode({...p,token:o,maxAge:c.session.maxAge}),f=u.chunk(s,{expires:i});
13null==(t=_.cookies)||t.push(...f),await (null==(r=h.session)?void 0:r.call(h,{session:a,token:o}))}catch(e){g.error("JWT_SESSION_ERROR",e),null==(o=_.cookies)||o.push(...u.clean())}else try{let{getSessionAndUser:e,deleteSession:t,updateSession:r}=f,o=await e(v);if(o&&o.session.expires.valueOf()<Date.now()&&(await t(v),o=null),o){let{user:e,session:t}=o,s=c.session.updateAge,u=t.expires.valueOf()-1e3*b+1e3*s,f=(0,n.fromDate)(b);u<=Date.now()&&await r({sessionToken:v,expires:f});let p=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"}:{}});_.body=p,null==(i=_.cookies)||i.push({name:c.cookies.sessionToken.name,value:v,options:{...c.cookies.sessionToken.options,expires:f}}),await (null==(a=h.session)?void 0:a.call(h,{session:p}))}else v&&(null==(s=_.cookies)||s.push(...u.clean()))}catch(e){g.error("SESSION_ERROR",e)}return _}},801020,(e,t,r)=>{"use strict";Object.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:o,callbackUrl:i})=>(e[t]={id:t,name:r,type:n,signinUrl:o,callbackUrl:i},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 o.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 i.default}}),Object.defineProperty(r,"signout",{enumerable:!0,get:function(){return a.default}});var o=n(e.r(870717)),i=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,o,i,a,s,c,u,l,d,f,p,h,y,g={},m=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,_=Array.isArray;function v(e,t){for(var r in t)e[r]=t[r];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function E(e,r,n){var o,i,a,s={};for(a in r)"key"==a?o=r[a]:"ref"==a?i=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,929 bytes, line 13
13);return S(e,s,o,i,null)}function S(e,t,o,i,a){var s={type:e,props:t,key:o,ref:i,__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 k(e){return e.children}function x(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(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?A(e):null}function O(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!R.__r++||i!=r.debounceRendering)&&((i=r.debounceRendering)||a)(R)}function R(){try{for(var e,t=1;o.length;)o.length>t&&o.sort(s),e=o.shift(),t=o.length,function(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],i=[],a=v({},t);a.__v=t.__v+1,r.vnode&&r.vnode(a),I(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,null==n?A(t):n,!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,D(o,a,i),t.__e=t.__=null,a.__e!=n&&function e(t){if(null!=(t=t.__)&&null!=t.__c)return t.__e=t.__c.base=null,t.__k.some(function(e){if(null!=e&&null!=e.__e)return t.__e=t.__c.base=e.__e}),e(t)}(a)}}(e)}finally{o.length=R.__r=0}}function P(e,t,n,o,i,a,s,c,u,l,d){var f,p,h,y,b,v,E=o&&o.__k||m,x=t.length;for(u=function(e,t,n,o,i){var a,s,c,u,l,d=n.length,f=d,p=0;for(e.__k=Array(i),a=0;a<i;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]=S(null,s,null,null,null):_(s)?s=e.__k[a]=S(k,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?s=e.__k[a]=S(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,u=a+p,s.__=e,s.__b=e.__b+1,c=null,-1!=(l=s.__i=function(e,t,r,n){var o,i,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(o=r-1,i=r+1;o>=0||i<t.length;)if(null!=(u=t[a=o>=0?o--:i++])&&0==(2&u.__u)&&s==u.key&&c==u.type)return a}return -1}(s,n,u,f))&&(f--,(c=n[l])&&(c.__u|=2)),null==c||null==c.__v?(-1==l&&(i>d?p--:i<d&&p++),"function"!=typeof s.type&&(s.__u|=4)):l!=u&&(l==u-1?p--:l==u+1?p++:(l>u?p--:p++,s.__u|=4))):e.__k[a]=null;if(f)for(a=0;a<d;a++)null!=(c=n[a])&&0==(2&c.__u)&&(c.__e==o&&(o=A(c)),function e(t,n,o){var i,a;if(r.unmount&&r.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||M(i,null,n)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){r.__e(e,n)}i.base=i.__P=i.__n=null}if(i=t.__k)for(a=0;a<i.length;a++)i[a]&&e(i[a],n,o||"function"!=typeof t.type);o||w(t.__e),t.__c=t.__=t.__e=void 0}(c,c));return o}(n,t,E,u,x),f=0;f<x;f++)null!=(h=n.__k[f])&&(p=-1!=h.__i&&E[h.__i]||g,h.__i=f,v=I(e,h,p,i,a,s,c,u,l,d),y=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&M(p.ref,null,h),d.push(h.ref,h.__c||y,h)),null==b&&null!=y&&(b=y),4&h.__u?(u=function e(t,r,n){var o,i;if("function"==typeof t.type){for(o=t.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=t,r=e(o[i],r,n));return r}t.__e!=r&&(r&&t.type&&!r.parentNode&&(r=A(t)),r=n.insertBefore(t.__e,r||null));do r=r&&r.nextSibling;while(null!=r&&8==r.nodeType)return r}(h,u,e),p.__e&&(p.__e=null)):"function"==typeof h.type&&void 0!==v?u=v:y&&(u=y.nextSibling),h.__u&=-7);return n.__e=b,u}function T(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||b.test(t)?r:r+"px"}function j(e,t,r,n,o){var i,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])i=t!=(t=t.replace(d,"$1")),t=(a=t.toLowerCase())in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r[l]=n[l]:(r[l]=f,e.addEventListener(t,i?h:p,i)):e.removeEventListener(t,i?h:p,i);else{if("http://www.w3.org/2000/svg"==o)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 C(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t[u])t[u]=f++;else if(t[u]<n[l])return;return n(r.event?r.event(t):t)}}}function I(e,n,o,i,a,s,c,u,l,d){var f,p,h,y,b,E,S,O,R,T,C,I,D,M,U,H,$=n.type;if(void 0!==n.constructor)return null;128&o.__u&&(l=!!(32&o.__u),s=[u=n.__e=o.__e]),(f=r.__b)&&f(n);e:if("function"==typeof $){p=c.length;try{if(R=n.props,T=$.prototype&&$.prototype.render,C=(f=$.contextType)&&i[f.__c],I=f?C?C.props.value:f.__:i,o.__c?O=(h=n.__c=o.__c).__=h.__E:(T?n.__c=h=new $(R,I):(n.__c=h=new x(R,I),h.constructor=$,h.render=N),C&&C.sub(h),h.state||(h.state={}),h.__n=i,y=h.__d=!0,h.__h=[],h._sb=[]),T&&null==h.__s&&(h.__s=h.state),T&&null!=$.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=v({},h.__s)),v(h.__s,$.getDerivedStateFromProps(R,h.__s))),b=h.props,E=h.state,h.__v=n,y)T&&null==$.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),T&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(T&&null==$.getDerivedStateFromProps&&R!==b&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(R,I),n.__v==o.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(R,h.__s,I)){n.__v!=o.__v&&(h.props=R,h.state=h.__s,h.__d=!1),n.__e=o.__e,n.__k=o.__k,n.__k.some(function(e){e&&(e.__=n)}),m.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&c.push(h),u=A(o);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(R,h.__s,I),T&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(b,E,S)})}if(h.context=I,h.props=R,h.__P=e,h.__e=!1,D=r.__r,M=0,T)h.state=h.__s,h.__d=!1,D&&D(n),f=h.render(h.props,h.state,h.context),m.push.apply(h.__h,h._sb),h._sb=[];else do h.__d=!1,D&&D(n),f=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++M<25)h.state=h.__s,null!=h.getChildContext&&(i=v(v({},i),h.getChildContext())),T&&!y&&null!=h.getSnapshotBeforeUpdate&&(S=h.getSnapshotBeforeUpdate(b,E)),U=null!=f&&f.type===k&&null==f.key?function e(t){return"object"!=typeof t||null==t||t.__b>0?t:_(t)?t.map(e):void 0!==t.constructor?null:v({},t)}(f.props.children):f,u=P(e,_(U)?U:[U],n,o,i,a,s,c,u,l,d),h.base=n.__e,n.__u&=-161,h.__h.length&&c.push(h),O&&(h.__E=h.__=null)}catch(e){if(c.length=p,n.__v=null,l||null!=s){if(e.then){for(n.__u|=l?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;null!=s&&(s[s.indexOf(u)]=null),n.__e=u}else if(null!=s)for(H=s.length;H--;)w(s[H])}else n.__e=o.__e;null==n.__k&&(n.__k=o.__k||[]),e.then||function e(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(e))}(n),r.__e(e,n,o)}}else null==s&&n.__v==o.__v?(n.__k=o.__k,n.__e=o.__e):u=n.__e=function(e,n,o,i,a,s,c,u,l){var d,f,p,h,y,m,b,v=o.props||g,E=n.props,S=n.type;if("svg"==S?a="http://www.w3.org/2000/svg":"math"==S?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((y=s[d])&&"setAttribute"in y==!!S&&(S?y.localName==S:3==y.nodeType)){e=y,s[d]=null;break}}if(null==e){if(null==S)return document.createTextNode(E);e=document.createElementNS(a,S,E.is&&E),u&&(r.__m&&r.__m(n,s),u=!1),s=null}if(null==S)v===E||u&&e.data==E||(e.data=E);else{if(s="textarea"==S&&null!=E.defaultValue?null:s&&t.call(e.childNodes),!u&&null!=s)for(v={},d=0;d<e.attributes.length;d++)v[(y=e.attributes[d]).name]=y.value;for(d in v)y=v[d],"dangerouslySetInnerHTML"==d?p=y:"children"==d||d in E||"value"==d&&"defaultValue"in E||"checked"==d&&"defaultChecked"in E||j(e,d,null,y,a);for(d in E)y=E[d],"children"==d?h=y:"dangerouslySetInnerHTML"==d?f=y:"value"==d?m=y:"checked"==d?b=y:u&&"function"!=typeof y||v[d]===y||j(e,d,y,v[d],a);if(f)u||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),n.__k=[];else if(p&&(e.innerHTML=""),P("template"==n.type?e.content:e,_(h)?h:[h],n,o,i,"foreignObject"==S?"http://www.w3.org/1999/xhtml":a,s,c,s?s[0]:o.__k&&A(o,0),u,l),null!=s)for(d=s.length;d--;)w(s[d]);u&&"textarea"!=S||(d="value","progress"==S&&null==m?e.removeAttribute("value"):null==m||m===e[d]&&("progress"!=S||m)&&("option"!=S||m==v[d])||j(e,d,m,v[d],a),d="checked",null!=b&&b!=e[d]&&j(e,d,b,v[d],a))}return e}(o.__e,n,o,i,a,s,c,l,d);return(f=r.diffed)&&f(n),128&n.__u?void 0:u}function D(e,t,n){for(var o=0;o<n.length;o++)M(n[o],n[++o],n[++o]);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 M(e,t,n){try{if("function"==typeof e){var o="function"==typeof e.__u;o&&e.__u(),o&&null==t||(e.__u=e(t))}else e.current=t}catch(e){r.__e(e,n)}}function N(e,t,r){return this.constructor(e,r)}function U(e,n,o){var i,a,s,c;n==document&&(n=document.documentElement),r.__&&r.__(e,n),a=(i="function"==typeof o)?null:o&&o.__k||n.__k,s=[],c=[],I(n,e=(!i&&o||n).__k=E(k,null,[e]),a||g,g,n.namespaceURI,!i&&o?[o]:a?null:n.firstChild?t.call(n.childNodes):null,
13s,!i&&o?o:a?a.__e:n.firstChild,i,c),D(s,e,c),e.props.children=null}t=m.slice,r={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},n=0,x.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},r),this.props)),e&&v(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),O(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),O(this))},x.prototype.render=k,o=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},R.__r=0,u="__d"+(c=Math.random().toString(8)),l="__a"+c,d=/(PointerCapture)$|Capture$/i,f=0,p=C(!1),h=C(!0),y=0,e.s(["Component",0,x,"Fragment",0,k,"cloneElement",0,function(e,r,n){var o,i,a,s,c=v({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),r)"key"==a?o=r[a]:"ref"==a?i=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),S(e.type,c,o||e.key,i||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,O(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"+y++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t},"createElement",0,E,"createRef",0,function(){return{current:null}},"h",0,E,"hydrate",0,function e(t,r){U(t,r,e)},"isValidElement",0,function(e){return null!=e&&void 0===e.constructor},"options",0,r,"render",0,U,"toChildArray",0,function e(t,r){return r=r||[],null==t||"boolean"==typeof t||(_(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)$/,o=/[\s\n\\/='"\0<>]/,i=/^xlink:?./,a=/["&<]/;function s(e){if(!1===a.test(e+=""))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o=""";break;case 38:o="&";break;case 60:o="<";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,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 f(e){var t="";for(var n in e){var o=e[n];null!=o&&""!==o&&(t&&(t+=" "),t+="-"==n[0]?n:l[n]||(l[n]=n.replace(d,"-$1").toLowerCase()),t="number"==typeof o&&!1===r.test(n)?t+": "+o+"px;":t+": "+o+";")}return t||void 0}function p(e,t){return Array.isArray(t)?t.reduce(p,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=[],b={shallow:!0};w.render=w;var _=function(e,t){return w(e,t,b)},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,b){if(null==r||"boolean"==typeof r)return"";if("object"!=typeof r)return"function"==typeof r?"":s(r);var _=l.pretty,v=_&&"string"==typeof _?_:" ";if(Array.isArray(r)){for(var w="",E=0;E<r.length;E++)_&&E>0&&(w+="\n"),w+=e(r[E],a,l,d,h,b);return w}if(void 0!==r.constructor)return"";var S,k=r.type,x=r.props,A=!1;if("function"==typeof k){if(A=!0,!l.shallow||!d&&!1!==l.renderRootComponent){if(k===t.Fragment){var O=[];return p(O,r.props.children),e(O,a,l,!1!==l.shallowHighOrder,h,b)}var R,P=r.__c=y(r,a);t.options.__b&&t.options.__b(r);var T=t.options.__r;if(k.prototype&&"function"==typeof k.prototype.render){var j=g(k,a);(P=r.__c=new k(x,j)).__v=r,P._dirty=P.__d=!0,P.props=x,null==P.state&&(P.state={}),null==P._nextState&&null==P.__s&&(P._nextState=P.__s=P.state),P.context=j,k.getDerivedStateFromProps?P.state=Object.assign({},P.state,k.getDerivedStateFromProps(P.props,P.state)):P.componentWillMount&&(P.componentWillMount(),P.state=P._nextState!==P.state?P._nextState:P.__s!==P.state?P.__s:P.state),T&&T(r),R=P.render(P.props,P.state,P.context)}else for(var C=g(k,a),I=0;P.__d&&I++<25;)P.__d=!1,T&&T(r),R=k.call(r.__c,x,C);return P.getChildContext&&(a=Object.assign({},a,P.getChildContext())),t.options.diffed&&t.options.diffed(r),e(R,a,l,!1!==l.shallowHighOrder,h,b)}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 D,M,N="<"+k;
13if(x){var U=Object.keys(x);l&&!0===l.sortAttributes&&U.sort();for(var H=0;H<U.length;H++){var $=U[H],L=x[$];if("children"!==$){if(!o.test($)&&(l&&l.allAttributes||"key"!==$&&"ref"!==$&&"__self"!==$&&"__source"!==$)){if("defaultValue"===$)$="value";else if("defaultChecked"===$)$="checked";else if("defaultSelected"===$)$="selected";else if("className"===$){if(void 0!==x.class)continue;$="class"}else h&&i.test($)&&($=$.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===$){if(x.for)continue;$="for"}"style"===$&&L&&"object"==typeof L&&(L=f(L)),"a"===$[0]&&"r"===$[1]&&"boolean"==typeof L&&(L=String(L));var W=l.attributeHook&&l.attributeHook($,L,a,l,A);if(W||""===W)N+=W;else if("dangerouslySetInnerHTML"===$)M=L&&L.__html;else if("textarea"===k&&"value"===$)D=L;else if((L||0===L||""===L)&&"function"!=typeof L){if(!(!0!==L&&""!==L||(L=$,l&&l.xml))){N=N+" "+$;continue}if("value"===$){if("select"===k){b=L;continue}"option"===k&&b==L&&void 0===x.selected&&(N+=" selected")}N=N+" "+$+'="'+s(L)+'"'}}}else D=L}}if(_){var B=N.replace(/\n\s*/," ");B===N||~B.indexOf("\n")?_&&~N.indexOf("\n")&&(N+="\n"):N=B}if(N+=">",o.test(k))throw Error(k+" is not a valid HTML tag name in "+N);var K,Z=n.test(k)||l.voidElements&&l.voidElements.test(k),F=[];if(M)_&&u(M)&&(M="\n"+v+c(M,v)),N+=M;else if(null!=D&&p(K=[],D).length){for(var q=_&&~N.indexOf("\n"),J=!1,z=0;z<K.length;z++){var V=K[z];if(null!=V&&!1!==V){var G=e(V,a,l,!0,"svg"===k||"foreignObject"!==k&&h,b);if(_&&!q&&u(G)&&(q=!0),G)if(_){var X=G.length>0&&"<"!=G[0];J&&X?F[F.length-1]+=G:F.push(G),J=X}else F.push(G)}}if(_&&q)for(var Y=F.length;Y--;)F[Y]="\n"+v+c(F[Y],v)}if(F.length||M)N+=F.join("");else if(l&&l.xml)return N.substring(0,N.length-1)+" />";return!Z||K||M?(_&&~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 p=0;p<r.length;p++)d+=e(r[p],a,c,u,l),r[p]=E(r[p]);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)A=m.children;else{var b,_,v,w,x,A=h.prototype&&"function"==typeof h.prototype.render?(b=a,v=g(_=r.type,b),w=new _(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,_.getDerivedStateFromProps?w.state=k({},w.state,_.getDerivedStateFromProps(w.props,w.state)):w.componentWillMount&&(w.componentWillMount(),w.state=w.__s!==w.state?w.__s:w.state),(x=t.options.__r)&&x(r),w.render(w.props,w.state,w.context)):function(e,r){var n,o=y(e,r),i=g(e.type,r);e.__c=o;for(var a=t.options.__r,s=0;o.__d&&s++<25;)o.__d=!1,a&&a(e),n=e.type.call(o,e.props,i);return n}(r,a),O=r.__c;O.getChildContext&&(a=k({},a,O.getChildContext()))}var R=e(A=null!=A&&A.type===t.Fragment&&null==A.key?A.props.children:A,a,c,u,r);return t.options.diffed&&t.options.diffed(r),r.__=void 0,t.options.unmount&&t.options.unmount(r),R}var P,T,j="<";if(j+=h,m)for(var C in P=m.children,m){var I,D,M,N=m[C];if(!("key"===C||"ref"===C||"__self"===C||"__source"===C||"children"===C||"className"===C&&"class"in m||"htmlFor"===C&&"for"in m||o.test(C))){if(D=C="className"===(I=C)?"class":"htmlFor"===I?"for":"defaultValue"===I?"value":"defaultChecked"===I?"checked":"defaultSelected"===I?"selected":c&&i.test(I)?I.toLowerCase().replace(/^xlink:?/,"xlink:"):I,M=N,N="style"===D&&null!=M&&"object"==typeof M?f(M):"a"===D[0]&&"r"===D[1]&&"boolean"==typeof M?String(M):M,"dangerouslySetInnerHTML"===C)T=N&&N.__html;else if("textarea"===h&&"value"===C)P=N;else if((N||0===N||""===N)&&"function"!=typeof N){if(!0===N||""===N){N=C,j=j+" "+C;continue}if("value"===C){if("select"===h){u=N;continue}"option"!==h||u!=N||"selected"in m||(j+=" selected")}j=j+" "+C+'="'+s(N)+'"'}}}var U=j;if(j+=">",o.test(h))throw Error(h+" is not a valid HTML tag name in "+j);var H="",$=!1;if(T)H+=T,$=!0;else if("string"==typeof P)H+=s(P),$=!0;else if(S(P)){r.__k=P;for(var L=0;L<P.length;L++){var W=P[L];if(P[L]=E(W),null!=W&&!1!==W){var B=e(W,a,"svg"===h||"foreignObject"!==h&&c,u,r);B&&(H+=B,$=!0)}}}else if(null!=P&&!1!==P&&!0!==P){r.__k=[E(P)];var K=e(P,a,"svg"===h||"foreignObject"!==h&&c,u,r);K&&(H+=K,$=!0)}if(t.options.diffed&&t.options.diffed(r),r.__=void 0,t.options.unmount&&t.options.unmount(r),$)j+=H;else if(n.test(h))return U+" />";return j+"</"+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=_,e.s(["default",0,w,"render",0,w,"renderToStaticMarkup",0,w,"renderToString",0,w,"shallowRender",0,_])},343676,(e,t,r)=>{function n(){return t.exports=n=Object.assign.bind(),t.exports.__esModule=!0,t.exp
13orts.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 f={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."},p=l&&(null!=(t=f[l])?t:f.default),h="https://authjs.dev/img/providers";return(0,o.h)("div",{className:"signin"},c.brandColor&&(0,o.h)("style",{dangerouslySetInnerHTML:{__html:` 14 :root { 15 --brand-color: ${c.brandColor} 16 } 17 `}}),c.buttonText&&(0,o.h)("style",{dangerouslySetInnerHTML:{__html:` 18 :root { 19 --button-text-color: ${c.buttonText} 20 } 21 `}}),(0,o.h)("div",{className:"card"},c.logo&&(0,o.h)("img",{src:c.logo,alt:"Logo",className:"logo"}),p&&(0,o.h)("div",{className:"error"},(0,o.h)("p",null,p)),d.map((e,t)=>{let n,c,l,f,p,y;if("oauth"===e.type){var g;({bg:n="",text:c="",logo:l="",bgDark:p=n,textDark:y=c,logoDark:f=""}=null!=(g=e.style)?g:{}),l=l.startsWith("/")?`${h}${l}`:l,(f=f.startsWith("/")?`${h}${f}`:f||l)||(f=l)}return(0,o.h)("div",{key:e.id,className:"provider"},"oauth"===e.type&&(0,o.h)("form",{action:e.signinUrl,method:"POST"},(0,o.h)("input",{type:"hidden",name:"csrfToken",value:r}),s&&(0,o.h)("input",{type:"hidden",name:"callbackUrl",value:s}),(0,o.h)("button",{type:"submit",className:"button",style:{"--provider-bg":n,"--provider-dark-bg":p,"--provider-color":c,"--provider-dark-color":y,"--provider-bg-hover":a(n,.8),"--provider-dark-bg-hover":a(p,.8)}},l&&(0,o.h)("img",{loading:"lazy",height:24,width:24,id:"provider-logo",src:`${l.startsWith("/")?h:""}${l}`}),f&&(0,o.h)("img",{loading:"lazy",height:24,width:24,id:"provider-logo-dark",src:`${l.startsWith("/")?h:""}${f}`}),(0,o.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,o.h)("hr",null),"email"===e.type&&(0,o.h)("form",{action:e.signinUrl,method:"POST"},(0,o.h)("input",{type:"hidden",name:"csrfToken",value:r}),(0,o.h)("label",{className:"section-header",htmlFor:`input-email-for-${e.id}-provider`},"Email"),(0,o.h)("input",{id:`input-email-for-${e.id}-provider`,autoFocus:!0,type:"email",name:"email",value:u,placeholder:"[email protected]",required:!0}),(0,o.h)("button",{id:"submitButton",type:"submit"},"Sign in with ",e.name)),"credentials"===e.type&&(0,o.h)("form",{action:e.callbackUrl,method:"POST"},(0,o.h)("input",{type:"hidden",name:"csrfToken",value:r}),Object.keys(e.credentials).map(t=>{var r,n,a;return(0,o.h)("div",{key:`input-group-${e.id}`},(0,o.h)("label",{className:"section-header",htmlFor:`input-${t}-for-${e.id}-provider`},null!=(r=e.credentials[t].label)?r:t),(0,o.h)("input",(0,i.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,o.h)("button",{type:"submit"},"Sign in with ",e.name)),("email"===e.type||"credentials"===e.type)&&t+1<d.length&&(0,o.h)("hr",null))})))};var o=e.r(928020),i=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:o}=e;return(0,n.h)("div",{className:"signout"},o.brandColor&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:` 22 :root { 23 --brand-color: ${o.brandColor} 24 } 25 `}}),o.buttonText&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:` 26 :root { 27 --button-text-color: ${o.buttonText} 28 } 29 `}}),(0,n.h)("div",{className:"card"},o.logo&&(0,n.h)("img",{src:o.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:o="default",theme:i}=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[o.toLowerCase()])?t:s.default;return{status:c,html:(0,n.h)("div",{className:"error"},(null==i?void 0:i.brandColor)&&(0,n.h)("style",{dangerouslySetInnerHTML:{__html:` 34 :root { 35 --brand-color: ${null==i?void 0:i.brandColor} 36 } 37 `}}),(0,n.h)("div",{className:"card"},(null==i?void 0:i.logo)&&(0,n.h)("img",{src:i.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 i;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!=(i=null==r?void 0:r.colorScheme)?i:"auto"}"><div class="page">${(0,o.default)(e)}</div></body></html>`}}return{signin:t=>d({html:(0,i.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 o=n(e.r(874820)),i=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 o=r.shift();if(n(t)&&n(o))for(let r in o)n(o[r])?(t[r]||Object.assign(t,{[r]:{}}),e(t[r],o[r])):Object.assign(t,{[r]:o[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,i=e.providers.map(({options:e,...r})=>{var i,a;if("oauth"===r.type){let i=o(r),s=o(e,!0),c=null!=(a=null==s?void 0:s.id)?a:r.id;return(0,n.merge)(i,{...s,signinUrl:`${t}/signin/${c}`,callbackUrl:`${t}/callback/${c}`})}let s=null!=(i=null==e?void 0:e.id)?i:r.id;return(0,n.merge)(r,{...e,signinUrl:`${t}/signin/${s}`,callbackUrl:`${t}/callback/${s}`})});return{providers:i,provider:i.find(({id:e})=>e===r)}};var n=e.r(80975);function o(e,t=!1){var r,n,i,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 o=new URL(r);e[t]={url:`${o.origin}${o.pathname}`,params:Object.fromEntries(null!=(n=o.searchParams)?n:[])}}else e[t]=r;return e},{});return t||null!=(r=c.version)&&r.startsWith("1.")||(c.idToken=!!(null!=(n=null!=(i=c.idToken)?i: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:o}){if(t){let[i,a]=t.split("|");if(a===(0,n.createHash)("sha256").update(`${i}${e.secret}`).digest("hex"))return{csrfTokenVerified:r&&i===o,csrfToken:i}}let i=(0,n.randomBytes)(32).toString("hex"),a=(0,n.createHash)("sha256").update(`${i}${e.secret}`).digest("hex");return{cookie:`${i}|${a}`,csrfToken:i}};var n=e.r(586914)},986169,(e,t,r)=>{"use strict";async function n({options:e,paramValue:t,cookieValue:r}){let{url:o,callbacks:i}=e,a=o.origin;return t?a=await i.redirect({url:t,baseUrl:o.origin}):r&&(a=await i.redirect({url:r,baseUrl:o.origin})),{callbackUrl:a,callbackUrlCookie:a!==r?a:void 0}}Object.defineProperty(r,"__esModule",{value:!0}),r.createCallbackUrl=n},343954,(e,t,r)=>{!function(){"use strict";var e={922:function(e){e.exports=function(e,r,n,o){r=r||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(r);var s=1e3;o&&"number"==typeof o.maxKeys&&(s=o.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var u=0;u<c;++u){var l,d,f,p,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=""),f=decodeURIComponent(l),p=decodeURIComponent(d),Object.prototype.hasOwnProperty.call(i,f))?t(i[f])?i[f].push(p):i[f]=[i[f],p]:i[f]=p}return i};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},790: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,i,a,s){return(i=i||"&",a=a||"=",null===e&&(e=void 0),"object"==typeof e)?n(o(e),function(o){var s=encodeURIComponent(t(o))+a;return r(e[o])?n(e[o],function(e){return s+encodeURIComponent(t(e))}).join(i):s+encodeURIComponent(t(e[o]))}).join(i):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 o=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 o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}},a=!0;try{e[t](i,i.exports,n),a=!1}finally{a&&delete r[t]}return i.exports}n.ab="/ROOT/node_modules/next/dist/compiled/querystring-es3/";var o={};
37o.decode=o.parse=n(922),o.encode=o.stringify=n(790),t.exports=o}()},421342,(e,t,r)=>{var n={221:function(t){"use strict";t.exports=e.r(343954)}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},a=!0;try{n[e](r,r.exports,i),a=!1}finally{a&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/next/dist/compiled/native-url/";var a={};!function(){var e,t=(e=i(221))&&"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,o,i,a,s,c,u,l,d,f=(o=(n=e).auth,i=n.hostname,a=n.protocol||"",s=n.pathname||"",c=n.hash||"",u=n.query||"",l=!1,o=o?encodeURIComponent(o).replace(/%3A/i,":")+"@":"",n.host?l=o+n.host:i&&(l=o+(~i.indexOf(":")?"["+i+"]":i),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""+f.protocol+f.host+f.pathname+f.search+f.hash}var o="http://",s=o+"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 i=m(t),a="";r.protocol&&!r.slashes&&(a=r.protocol,e=e.replace(r.protocol,""),a+="/"===t[0]||"/"===e[0]?"/":""),a&&i.protocol&&(a="",i.slashes||(a=i.protocol,t=t.replace(i.protocol,"")));var l=e.match(c);l&&!i.protocol&&(e=e.substr((a=l[1]+(l[2]||"")).length),/^\/\/[^/]/.test(t)&&(a=a.slice(0,-1)));var d=new URL(e,s+"/"),f=new URL(t,d).toString().replace(s,""),p=i.protocol||r.protocol;return p+=r.slashes||i.slashes?"//":"",!a&&p?f=f.replace(o,p):a&&(f=f.replace(o,"")),u.test(f)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==f.slice(-1)||(f=f.slice(0,-1)),a&&(f=a+("/"===f[0]?f.substr(1):f)),f}function d(){}d.prototype.parse=m,d.prototype.format=n,d.prototype.resolve=l,d.prototype.resolveObject=l;var f=/^https?|ftp|gopher|file/,p=/^(.*?)([#?].*)/,h=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,y=/^([a-z0-9.+-]*:)?\/\/\/*/i,g=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function m(e,r,o){if(void 0===r&&(r=!1),void 0===o&&(o=!1),e&&"object"==typeof e&&e instanceof d)return e;var i=(e=e.trim()).match(p);e=i?i[1].replace(/\\/g,"/")+i[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&&(f.test(a[1])||(u=a[1].toLowerCase(),e=""+a[2]+a[3]),a[2]||(c=!1,f.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=(i?i[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),b=m&&m[1],_=new d,v="",w="";try{l=new URL(e)}catch(t){v=t,u||o||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(w="/",e=e.substr(1));try{l=new URL(e,s)}catch(e){return _.protocol=u,_.href=u,_}}_.slashes=c&&!w,_.host="w.w"===l.host?"":l.host,_.hostname="w.w"===l.hostname?"":l.hostname.replace(/(\[|\])/g,""),_.protocol=v?u||null:l.protocol,_.search=l.search.replace(/\\/g,"%5C"),_.hash=l.hash.replace(/\\/g,"%5C");var E=e.split("#");!_.search&&~E[0].indexOf("?")&&(_.search="?"),_.hash||""!==E[1]||(_.hash="#"),_.query=r?t.decode(l.search.substr(1)):_.search.substr(1),_.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:"===_.protocol&&"blank"===_.pathname&&(_.protocol="",_.pathname=""),v&&"/"!==e[0]&&(_.pathname=_.pathname.substr(1)),u&&!f.test(u)&&"/"!==e.slice(-1)&&"/"===_.pathname&&(_.pathname=""),_.path=_.pathname+_.search,_.auth=[l.username,l.password].map(decodeURIComponent).filter(Boolean).join(":"),_.port=l.port,b&&!_.host.endsWith(b)&&(_.host+=b,_.port=b.slice(1)),_.href=w?""+_.pathname+_.search+_.hash:n(_);var S=/^(file)/.test(_.href)?["host","hostname"]:[];return Object.keys(_).forEach(function(e){~S.indexOf(e)||(_[e]=_[e]||null)}),_}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);
37t.exports={OPError:class extends Error{constructor({error_description:e,error:t,error_uri:r,session_state:n,state:o,scope:i},a){super(e?`${t} (${e})`:t),Object.assign(this,{error:t},e&&{error_description:e},r&&{error_uri:r},o&&{state:o},i&&{scope:i},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:o,...i}=e[0];r?super(n(...r)):super(t),Object.assign(this,i),o&&Object.defineProperty(this,"response",{value:o})}this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor)}}}},465524,(e,t,r)=>{var n=e.i(247167),o=e.i(467034),i={514: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"}},638: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}}},329:function(e){"use strict";let t={};function r(e,r,n){n||(n=Error);class o extends n{constructor(e,t,n){super(function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(e,t,n))}}o.prototype.name=n.name,o.prototype.code=e,t[e]=o}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 o,i,a,s;let c,u;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(c="must not be",t=t.replace(/^not /,"")):c="must be",i=" argument",(void 0===a||a>e.length)&&(a=e.length),e.substring(a-i.length,a)===i)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.F=t},686:function(e,t,r){"use strict";var o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var i=r(276),a=r(732);r(638)(l,i);for(var s=o(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);i.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(f,this)}function f(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)}})},512:function(e,t,r){"use strict";e.exports=o;var n=r(586);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}r(638)(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},276:function(t,r,o){"use strict";
37t.exports=A,A.ReadableState=x,o(434).EventEmitter;var i,a,s,c,u,l=function(e,t){return e.listeners(t).length},d=o(120),f=o(181).Buffer,p=e.g.Uint8Array||function(){},h=o(23);a=h&&h.debuglog?h.debuglog("stream"):function(){};var y=o(137),g=o(528),m=o(771).getHighWaterMark,b=o(329).F,_=b.ERR_INVALID_ARG_TYPE,v=b.ERR_STREAM_PUSH_AFTER_EOF,w=b.ERR_METHOD_NOT_IMPLEMENTED,E=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;o(638)(A,d);var S=g.errorOrDestroy,k=["error","close","destroy","pause","resume"];function x(e,t,r){i=i||o(686),e=e||{},"boolean"!=typeof r&&(r=t instanceof i),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=o(319).I),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function A(e){if(i=i||o(686),!(this instanceof A))return new A(e);var t=this instanceof i;this._readableState=new x(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 O(e,t,r,n,o){a("readableAddChunk",t);var i,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?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}}(e,c);else if(o||(s=function(e,t){var r;return f.isBuffer(t)||t instanceof p||"string"==typeof t||void 0===t||e.objectMode||(r=new _("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)===f.prototype||(i=t,t=f.from(i)),n)c.endEmitted?S(e,new E):R(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?R(e,c,t,!1):C(e,c)):R(e,c,t,!1)}else n||(c.reading=!1,C(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function R(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&&T(e)),C(e,t)}function P(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 T(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(j,e))}function j(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,U(e)}function C(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 D(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 M(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"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function H(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 $(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.default.nextTick(L,t,e))}function L(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 W(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(e,t){t(e)},A.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=f.from(e,t),t=""),r=!0),O(this,e,t,!1,r)},A.prototype.unshift=function(e){return O(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){s||(s=o(319).I);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;
37for(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},A.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?$(this):T(this),null;if(0===(e=P(e,r))&&r.ended)return 0===r.length&&$(this),null;var o=r.needReadable;return a("need readable",o),(0===r.length||r.length-e<r.highWaterMark)&&a("length less than watermark",o=!0),r.ended||r.reading?a("reading or ended",o=!1):o&&(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=P(n,r))),null===(t=e>0?H(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&&$(this)),null!==t&&this.emit("data",t),t},A.prototype._read=function(e){S(this,new w("_read()"))},A.prototype.pipe=function(e,t){var r,o=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,a("pipe count=%d opts=%j",i.pipesCount,t);var s=t&&!1===t.end||e===n.default.stdout||e===n.default.stderr?g:c;function c(){a("onend"),e.end()}i.endEmitted?n.default.nextTick(s):o.once("end",s),e.on("unpipe",function t(r,n){a("onunpipe"),r===o&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,a("cleanup"),e.removeListener("close",h),e.removeListener("finish",y),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",t),o.removeListener("end",c),o.removeListener("end",g),o.removeListener("data",f),d=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u())});var u=(r=o,function(){var e=r._readableState;a("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&l(r,"data")&&(e.flowing=!0,U(r))});e.on("drain",u);var d=!1;function f(t){a("ondata");var r=e.write(t);a("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==W(i.pipes,e))&&!d&&(a("false write response, pause",i.awaitDrain),i.awaitDrain++),o.pause())}function p(t){a("onerror",t),g(),e.removeListener("error",p),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"),o.unpipe(e)}return o.on("data",f),!function(e,t,r){if("function"==typeof e.prependListener)return e.prepe
37ndListener(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",p),e.once("close",h),e.once("finish",y),e.emit("pipe",o),i.flowing||(a("pipe resume"),o.resume()),e},A.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,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=W(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},A.prototype.on=function(e,t){var r=d.prototype.on.call(this,e,t),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"!==e||o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,a("on readable",o.length,o.reading),o.length?T(this):o.reading||n.default.nextTick(M,this)),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=d.prototype.removeListener.call(this,e,t);return"readable"===e&&n.default.nextTick(D,this),r},A.prototype.removeAllListeners=function(e){var t=d.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&n.default.nextTick(D,this),t},A.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},A.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},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o 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(o){a("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<k.length;
37i++)e.on(k[i],this.emit.bind(this,k[i]));return this._read=function(t){a("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=o(531)),c(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=H,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===u&&(u=o(812)),u(A,e,t)})},586:function(e,t,r){"use strict";e.exports=l;var n=r(329).F,o=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(686);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.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?f(this,null,null):this._flush(function(t,r){f(e,t,r)})}function f(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(638)(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 o("_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 o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.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)})}},732:function(t,r,o){"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var r=t,n=e,o=r.entry;for(r.entry=null;o;){var i=o.callback;n.pendingcb--,i(void 0),o=o.next}n.corkedRequestsFree.next=r}}t.exports=A,A.WritableState=x;var a,s,c={deprecate:o(774)},u=o(120),l=o(181).Buffer,d=e.g.Uint8Array||function(){},f=o(528),p=o(771).getHighWaterMark,h=o(329).F,y=h.ERR_INVALID_ARG_TYPE,g=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_MULTIPLE_CALLBACK,b=h.ERR_STREAM_CANNOT_PIPE,_=h.ERR_STREAM_DESTROYED,v=h.ERR_STREAM_NULL_VALUES,w=h.ERR_STREAM_WRITE_AFTER_END,E=h.ERR_UNKNOWN_ENCODING,S=f.errorOrDestroy;function k(){}function x(e,t,r){a=a||o(686),e=e||{},"boolean"!=typeof r&&(r=t instanceof a),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=p(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,o=r.sync,i=r.writecb;if("function"!=typeof i)throw new m;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,o?(n.default.nextTick(i,t),n.default.nextTick(C,e,r),e._writableState.errorEmitted=!0,S(e,t)):(i(t),e._writableState.errorEmitted=!0,S(e,t),C(e,r));else{var a=T(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||P(e,r),o?n.default.nextTick(R,e,r,a,i):R(e,r,a,i)}}(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 i(this)}o(638)(A,u),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(x.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}
37function A(e){var t=this instanceof(a=a||o(686));if(!t&&!s.call(A,this))return new A(e);this._writableState=new x(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 O(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new _("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function R(e,t,r,n){var o,i;r||(o=e,0===(i=t).length&&i.needDrain&&(i.needDrain=!1,o.emit("drain"))),t.pendingcb--,n(),C(e,t)}function P(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,O(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,l=r.callback,d=t.objectMode?1:c.length;if(O(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 T(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final(function(r){t.pendingcb--,r&&S(e,r),t.prefinished=!0,e.emit("prefinish"),C(e,t)})}function C(e,t){var r=T(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(j,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var o=e._readableState;(!o||o.autoDestroy&&o.endEmitted)&&e.destroy()}return r}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===A&&e&&e._writableState instanceof x}})):s=function(e){return e instanceof this},A.prototype.pipe=function(){S(this,new b)},A.prototype.write=function(e,t,r){var o,i,a,s,c,u,f,p=this._writableState,h=!1,g=!p.objectMode&&(o=e,l.isBuffer(o)||o instanceof d);return(g&&!l.isBuffer(e)&&(i=e,e=l.from(i)),"function"==typeof t&&(r=t,t=null),g?t="buffer":t||(t=p.defaultEncoding),"function"!=typeof r&&(r=k),p.ending)?(a=r,S(this,s=new w),n.default.nextTick(a,s)):(g||(c=e,u=r,null===c?f=new v:"string"==typeof c||p.objectMode||(f=new y("chunk",["string","Buffer"],c)),!f||(S(this,f),n.default.nextTick(u,f),0)))&&(p.pendingcb++,h=function(e,t,r,n,o,i){if(!r){var a,s,c=(a=n,s=o,t.objectMode||!1===t.decodeStrings||"string"!=typeof a||(a=l.from(a,s)),a);n!==c&&(r=!0,o="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 f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:i,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else O(e,t,!1,u,n,o,i);return d}(this,p,g,e,t,r)),h},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||P(this,e))},A.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(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new g("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var o,i,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||(o=this,i=s,a=r,i.ending=!0,C(o,i),a&&(i.finished?n.default.nextTick(a):o.once("finish",a)),i.ended=!0,o.writable=!1),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(e,t){t(e)}},531:function(e,t,r){"use strict";function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i,a=r(134),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),d=Symbol("lastPromise"),f=Symbol("handlePromise"),p=Symbol("stream");function h(e,t){return{value:e,done:t}}function y(e){var t=e[s];if(null!==t){var r=e[p].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(){}),b=Object.setPrototypeOf((o(i={get stream(){return this[p]},next:function(){var e,t,r=this,o=this[u];if(null!==o)return Promise.reject(o);if(this[l])return Promise.resolve(h(void 0,!0));if(this[p].destroyed)return new Promise(function(e,t){n.default.nextTick(function(){r[u]?t(r[u]):e(h(void 0,!0))})});var i=this[d];
37if(i)t=new Promise((e=this,function(t,r){i.then(function(){e[l]?t(h(void 0,!0)):e[f](t,r)},r)}));else{var a=this[p].read();if(null!==a)return Promise.resolve(h(a,!1));t=new Promise(this[f])}return this[d]=t,t}},Symbol.asyncIterator,function(){return this}),o(i,"return",function(){var e=this;return new Promise(function(t,r){e[p].destroy(null,function(e){e?r(e):t(h(void 0,!0))})})}),i),m);e.exports=function(e){var t,r=Object.create(b,(o(t={},p,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,l,{value:e._readableState.endEmitted,writable:!0}),o(t,f,{value:function(e,t){var n=r[p].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}),e.on("readable",g.bind(null,r)),r}},137: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 o=r(181).Buffer,i=r(23).inspect,a=i&&i.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 o.alloc(0);for(var t,r,n=o.allocUnsafe(e>>>0),i=this.head,a=0;i;)t=i.data,r=a,o.prototype.copy.call(t,n,r),a+=i.data.length,i=i.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 o=t.data,i=e>o.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),0==(e-=i)){i===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:a,value:function(e,t){return i(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,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):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}()},528:function(e){"use strict";function t(e,t){o(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var a=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.default.nextTick(o,this,e)):n.default.nextTick(o,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!i&&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):i?(n.default.nextTick(r,a),i(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)}}},134:function(e,t,r){"use strict";var n=r(329).F.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),a=i||o,s=!1,i=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||f()},d=t._writableState&&t._writableState.finished,f=function(){u=!1,d=!0,c||i.call(t)},p=t._readableState&&t._readableState.endEmitted,h=function(){c=!1,p=!0,u||i.call(t)},y=function(e){i.call(t,e)},g=function(){var e;return c&&!p?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):u&&!d?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},m=function(){t.req.on("finish",f)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",f),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",f),!1!==r.error&&t.on("error",y),t.on("close",g),function(){t.removeListener("complete",f),t.removeListener("abort",g),t.removeListener("request",m),t.req&&t.req.removeListener("finish",f),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",f),t.removeListener("end",h),t.removeListener("error",y),t.removeListener("close",g)}}},812:function(e,t,r){"use strict";function n(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,o)}function o(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(329).F.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 i("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]:{};
37t%2?o(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(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(o,i){var a=e.apply(t,r);function s(e){n(a,o,i,s,c,"next",e)}function c(e){n(a,o,i,s,c,"throw",e)}s(void 0)})}).apply(this,arguments)}return s._read=function(){c||(c=!0,u())},s}},694:function(e,t,r){"use strict";var n,o=r(329).F,i=o.ERR_MISSING_ARGS,a=o.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,o=arguments.length,l=Array(o),d=0;d<o;d++)l[d]=arguments[d];var f=(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 i("streams");var p=l.map(function(e,o){var i,s,u,d,h,y,g=o<l.length-1;return i=o>0,u=s=function(e){t||(t=e),e&&p.forEach(c),g||(p.forEach(c),f(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(134)),n(e,{readable:g,writable:i},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)}},771:function(e,t,r){"use strict";var n=r(329).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var i=null!=t.highWaterMark?t.highWaterMark:o?t[r]:null;if(null!=i){if(!(isFinite(i)&&Math.floor(i)===i)||i<0)throw new n(o?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},120:function(e,t,r){e.exports=r(203)},486:function(e,t,r){var o=r(203);"disable"===n.default.env.READABLE_STREAM&&o?(e.exports=o.Readable,Object.assign(e.exports,o),e.exports.Stream=o):((t=e.exp
37orts=r(276)).Stream=o||t,t.Readable=t,t.Writable=r(732),t.Duplex=r(686),t.Transform=r(586),t.PassThrough=r(512),t.finished=r(134),t.pipeline=r(694))},56:function(e,t,r){var n=r(181),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=o(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 o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},534:function(t,r,n){var o=n(291),i=n(935),a=n(663),s=n(514),c=n(16);r.request=function(t,r){t="string"==typeof t?c.parse(t):a(t);var n=-1===e.g.location.protocol.search(/^https?:$/)?"http:":"",i=t.protocol||n,s=t.hostname||t.host,u=t.port,l=t.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),t.url=(s?i+"//"+s:"")+(u?":"+u:"")+l,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var d=new o(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=o,r.IncomingMessage=i.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"]},102:function(t,r){var n;function o(){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 i(e){var t=o();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||i("arraybuffer"),r.msstream=!r.fetch&&i("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&i("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!o()&&a(o().overrideMimeType),n=null},291:function(t,r,i){var a=i(102),s=i(638),c=i(935),u=i(486),l=c.IncomingMessage,d=c.readyStates,f=t.exports=function(e){var t,r,n,i=this;u.Writable.call(i),i._opts=e,i._body=[],i._headers={},e.auth&&i.setHeader("Authorization","Basic "+o.Buffer.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){i.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,i._mode=a.fetch&&r?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&t?"arraybuffer":"text",i._fetchTimer=null,i.on("finish",function(){i._onFinish()})};s(f,u.Writable),f.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.prototype._onFinish=function(){var t=this;if(!t._destroyed){var r=t._opts,o=t._headers,i=null;"GET"!==r.method&&"HEAD"!==r.method&&(i=new Blob(t._body,{type:(o["content-type"]||{}).value||""}));var s=[];if(Object.keys(o).forEach(function(e){var t=o[e].name,r=o[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:i||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;
37 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(i)}catch(e){n.default.nextTick(function(){t.emit("error",e)});return}}}},f.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())},f.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))},f.prototype._write=function(e,t,r){this._body.push(e),r()},f.prototype.abort=f.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()},f.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},f.prototype.flushHeaders=function(){},f.prototype.setTimeout=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var p=["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"]},935:function(t,r,i){var a=i(102),s=i(638),c=i(486),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=r.IncomingMessage=function(t,r,i,s){var u=this;if(c.Readable.call(u),u._mode=i,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",function(){n.default.nextTick(function(){u.emit("close")})}),"fetch"===i){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(o.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(o.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/).forEach(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 f=u.rawHeaders["mime-type"];if(f){var p=f.match(/;\s*charset=([^;])(;|$)/);p&&(u._charset=p[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 i=n.substr(t._pos);if("x-user-defined"===t._charset){for(var a=o.Buffer.alloc(i.length),s=0;s<i.length;s++)a[s]=255&i.charCodeAt(s);t.push(a)}else t.push(i,t._charset);t._pos=n.length}break;case"arraybuffer":if(r.readyState!==u.DONE||!r.response)break;n=r.response,t.push(o.Buffer.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=r.response,r.readyState!==u.LOADING||!n)break;t.push(o.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(o.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)}},319:function(e,t,r){"use strict";var n=r(56).Buffer,o=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 i(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";
37case"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===o||!o(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=f,this.end=p;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 f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.I=i,i.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||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=a(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||-2===o?0:(o=a(t[n]))>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||-2===o?0:(o=a(t[n]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):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)},i.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}},774:function(t){t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return 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()}},663:function(e){e.exports=function(){for(var e={},r=0;r<arguments.length;r++){var n=arguments[r];for(var o in n)t.call(n,o)&&(e[o]=n[o])}return e};var t=Object.prototype.hasOwnProperty},181:function(t){"use strict";t.exports=e.r(467034)},434:function(t){"use strict";t.exports=e.r(430662)},203:function(t){"use strict";t.exports=e.r(612569)},16:function(t){"use strict";t.exports=e.r(421342)},23: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{i[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(534)},729419,(e,t,r)=>{"use strict";var n=e.i(247167);
37Object.defineProperty(r,"__esModule",{value:!0});var o={atLeastOneTask:function(){return c},scheduleImmediate:function(){return s},scheduleOnNextTick:function(){return a},waitAtLeastOneReactRenderTask:function(){return u}};for(var i in o)Object.defineProperty(r,i,{enumerable:!0,get:o[i]});let a=e=>{Promise.resolve().then(()=>{n.default.nextTick(e)})},s=e=>{setImmediate(e)};function c(){return new Promise(e=>s(e))}function u(){return new Promise(e=>setImmediate(e))}},134457,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"actionAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(90317).createAsyncLocalStorage)()},362266,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"actionAsyncStorage",{enumerable:!0,get:function(){return n.actionAsyncStorageInstance}});let n=e.r(134457)},783066,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"afterTaskAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(90317).createAsyncLocalStorage)()},341643,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"afterTaskAsyncStorage",{enumerable:!0,get:function(){return n.afterTaskAsyncStorageInstance}});let n=e.r(783066)},850999,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={isRequestApiAllowedInCurrentPhase:function(){return l},throwForSearchParamsAccessInUseCache:function(){return u},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return c}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(643248),a=e.r(362266),s=e.r(341643);function c(e,t){throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${e} with \`dynamic = "error"\` couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function u(e,t){let r=Object.defineProperty(Error(`Route ${e.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(r,t),e.invalidDynamicUsageError??=r,r}function l(e){switch(e.phase){case"action":case"render":return!0;case"after":{let e=a.actionAsyncStorage.getStore();if(e&&(e.isAppRoute||e.isAction))return!0;let t=s.afterTaskAsyncStorage.getStore();if(t)return"action"===t.rootTaskSpawnPhase;return!1}}}},90317,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={bindSnapshot:function(){return u},createAsyncLocalStorage:function(){return c},createSnapshot:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class a{disable(){throw i}getStore(){}run(){throw i}exit(){throw i}enterWith(){throw i}static bind(e){return e}}let s="u">typeof globalThis&&globalThis.AsyncLocalStorage;function c(){return s?new s:new a}function u(e){return s?s.bind(e):a.bind(e)}function l(){return s?s.snapshot():function(e,...t){return e(...t)}}},164758,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={createDynamicBodyError:function(){return a},createDynamicBodyErrorInNavigation:function(){return u},createDynamicMetadataError:function(){return p},createDynamicOrRuntimeBodyError:function(){return l},createDynamicOrRuntimeMetadataError:function(){return b},createDynamicOrRuntimeViewportError:function(){return m},createDynamicViewportError:function(){return g},createLinkBodyErrorInNavigation:function(){return c},createLinkMetadataError:function(){return d},createLinkViewportError:function(){return h}
37,createRuntimeBodyError:function(){return i},createRuntimeBodyErrorInNavigation:function(){return s},createRuntimeMetadataError:function(){return f},createRuntimeViewportError:function(){return y},logBuildDebugHint:function(){return _}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function i(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered runtime data during prerendering. 38 39\`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` accessed outside of \`<Suspense>\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience. 40 41Ways to fix this: 42 - [stream] Provide a placeholder with \`<Suspense fallback={...}>\` around the data access 43 - [block] Set \`export const instant = false\` to allow a blocking route 44 45Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`),"__NEXT_ERROR_CODE",{value:"E1427",enumerable:!1,configurable:!0})}function a(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered uncached data during prerendering. 46 47\`fetch(...)\` or \`connection()\` accessed outside of \`<Suspense>\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience. 48 49Ways to fix this: 50 - [stream] Provide a placeholder with \`<Suspense fallback={...}>\` around the data access 51 - [cache] Cache the data access with \`"use cache"\` (does not apply to \`connection()\`) 52 - [block] Set \`export const instant = false\` to allow a blocking route 53 54Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`),"__NEXT_ERROR_CODE",{value:"E1440",enumerable:!1,configurable:!0})}function s(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered runtime data during prerendering or a navigation. 55 56\`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` accessed outside of \`<Suspense>\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience. 57 58Ways to fix this: 59 - [stream] Provide a placeholder with \`<Suspense fallback={...}>\` around the data access 60 - [block] Set \`export const instant = false\` to allow a blocking route 61 62Learn more: https://nextjs.org/docs/messages/blocking-prerender-runtime`),"__NEXT_ERROR_CODE",{value:"E1430",enumerable:!1,configurable:!0})}function c(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered URL data during prerendering or a navigation. 63 64\`params\` or \`searchParams\` accessed outside of \`<Suspense>\` may prevent the navigation from being instant, leading to a slower user experience. 65 66Ways to fix this: 67 - [stream] Provide a placeholder with \`<Suspense fallback={...}>\` around the data access 68 - [block] Set \`export const instant = false\` to allow a blocking route 69 70Learn more: https://nextjs.org/docs/messages/instant-shell-url-data`),"__NEXT_ERROR_CODE",{value:"E1439",enumerable:!1,configurable:!0})}function u(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered uncached data during prerendering or a navigation. 71 72\`fetch(...)\` or \`connection()\` accessed outside of \`<Suspense>\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience. 73 74Ways to fix this: 75 - [stream] Provide a placeholder with \`<Suspense fallback={...}>\` around the data access 76 - [cache] Cache the data access with \`"use cache"\` (does not apply to \`connection()\`) 77 - [block] Set \`export const instant = false\` to allow a blocking route 78 79Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`),"__NEXT_ERROR_CODE",{value:"E1437",enumerable:!1,configurable:!0})}function l(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered uncached or runtime data during prerendering. 80 81\`fetch(...)\`, \`cookies()\`, \`headers()\`, \`params\`, \`searchParams\`, or \`connection()\` accessed outside of \`<Suspense>\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience. 82 83Ways to fix this: 84 - [stream] Provide a placeholder with \`<Suspense fallback={...}>\` around the data access 85 - [cache] For uncached data (\`fetch\`, database calls): cache the access with \`"use cache"\` (does not apply to \`connection()\`) 86 - [block] Set \`export const instant = false\` to allow a blocking route 87 88Learn more: https://nextjs.org/docs/messages/blocking-prerender-dynamic`),"__NEXT_ERROR_CODE",{value:"E1428",enumerable:!1,
88configurable:!0})}function d(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered URL data in \`generateMetadata()\`. 89 90This route's metadata is blocked, but the rest of its content can be prefetched. \`params\` or \`searchParams\` accessed in \`generateMetadata()\` prevent it from being prefetched. 91 92Ways to fix this: 93 - [static] Use a static metadata export instead of \`generateMetadata()\` 94 - [dynamic] Render a marker component that calls \`await connection()\` inside \`<Suspense>\` on the page 95 96Learn more: https://nextjs.org/docs/messages/blocking-prerender-metadata-runtime`),"__NEXT_ERROR_CODE",{value:"E1429",enumerable:!1,configurable:!0})}function f(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered runtime data in \`generateMetadata()\`. 97 98This route's metadata is blocked, but the rest of its content can be prerendered. \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` accessed in \`generateMetadata()\` cause it to run dynamically. 99 100Ways to fix this: 101 - [static] Use a static metadata export instead of \`generateMetadata()\` 102 - [dynamic] Render a marker component that calls \`await connection()\` inside \`<Suspense>\` on the page 103 104Learn more: https://nextjs.org/docs/messages/blocking-prerender-metadata-runtime`),"__NEXT_ERROR_CODE",{value:"E1423",enumerable:!1,configurable:!0})}function p(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered uncached data in \`generateMetadata()\`. 105 106This route's metadata is blocked, but the rest of its content can be prerendered. \`fetch(...)\` or \`connection()\` accessed in \`generateMetadata()\` cause it to run dynamically. 107 108Ways to fix this: 109 - [cache] Cache the metadata with \`"use cache"\` in \`generateMetadata()\` (does not apply to \`connection()\`) 110 - [dynamic] Render a marker component that calls \`await connection()\` inside \`<Suspense>\` on the page 111 112Learn more: https://nextjs.org/docs/messages/blocking-prerender-metadata-dynamic`),"__NEXT_ERROR_CODE",{value:"E1425",enumerable:!1,configurable:!0})}function h(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered URL data in \`generateViewport()\`. 113 114\`params\` or \`searchParams\` in \`generateViewport()\` prevents the page from being prerendered, leading to a slower user experience. 115 116Ways to fix this: 117 - [static] Use a static viewport export instead of \`generateViewport()\` 118 - [block] Set \`export const instant = false\` to allow a blocking route 119 120Learn more: https://nextjs.org/docs/messages/blocking-prerender-viewport-runtime`),"__NEXT_ERROR_CODE",{value:"E1431",enumerable:!1,configurable:!0})}function y(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered runtime data in \`generateViewport()\`. 121 122\`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` in \`generateViewport()\` prevents the page from being prerendered, leading to a slower user experience. 123 124Ways to fix this: 125 - [static] Use a static viewport export instead of \`generateViewport()\` 126 - [block] Set \`export const instant = false\` to allow a blocking route 127 128Learn more: https://nextjs.org/docs/messages/blocking-prerender-viewport-runtime`),"__NEXT_ERROR_CODE",{value:"E1424",enumerable:!1,configurable:!0})}function g(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered uncached data in \`generateViewport()\`. 129 130\`fetch(...)\` or \`connection()\` in \`generateViewport()\` prevents the page from being prerendered, leading to a slower user experience. 131 132Ways to fix this: 133 - [cache] Cache the viewport data with \`"use cache"\` in \`generateViewport()\` (does not apply to \`connection()\`) 134 - [block] Set \`export const instant = false\` to allow a blocking route 135 136Learn more: https://nextjs.org/docs/messages/blocking-prerender-viewport-dynamic`),"__NEXT_ERROR_CODE",{value:"E1438",enumerable:!1,configurable:!0})}function m(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered uncached or runtime data in \`generateViewport()\`. 137 138This prevents the page from being prerendered, leading to a slower user experience. Unlike metadata, viewport cannot be streamed behind \`<Suspense>\` because it affects the initial page load. 139 140Ways to fix this: 141 - [static] Use a static viewport export instead of \`generateViewport()\` 142 - [cache] For uncached data (\`fetch\`, database calls): cache the viewport with \`"use cache"\` in \`generateViewport()\` (does not apply to \`connection()\`) 143 - [block] Set \`export const instant = false\` to allow a blocking route 144 145Learn more: https://nextjs.org/docs/messages/blocking-prerender-viewport-runtime`),"__NEXT_ERROR_CODE",{value:"E1436",enumerable:!1,
145configurable:!0})}function b(e){return Object.defineProperty(Error(`Route "${e}": Next.js encountered uncached or runtime data in \`generateMetadata()\`. 146 147This route's metadata is blocked, but the rest of its content can be prerendered. 148 149Ways to fix this: 150 - [static] Use a static metadata export instead of \`generateMetadata()\` 151 - [cache] Cache the metadata with \`"use cache"\` in \`generateMetadata()\` (does not apply to \`connection()\`) 152 - [dynamic] Render a marker component that calls \`await connection()\` inside \`<Suspense>\` on the page 153 154Learn more: https://nextjs.org/docs/messages/blocking-prerender-metadata-runtime`),"__NEXT_ERROR_CODE",{value:"E1426",enumerable:!1,configurable:!0})}function _(e){console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: 155 - Start the app in development mode by running \`next dev\`, then open "${e}" in your browser to investigate the error. 156 - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`)}},67673,(e,t,r)=>{"use strict";var n,o,i,a=e.i(247167);Object.defineProperty(r,"__esModule",{value:!0});var s={DynamicHoleKind:function(){return ea},Postpone:function(){return D},PreludeState:function(){return ep},abortAndThrowOnSynchronousRequestDataAccess:function(){return I},abortOnSynchronousPlatformIOAccess:function(){return C},accessedDynamicData:function(){return B},annotateDynamicAccess:function(){return z},consumeDynamicAccess:function(){return K},createDynamicTrackingState:function(){return k},createDynamicValidationState:function(){return x},createHangingInputAbortSignal:function(){return q},createInstantValidationState:function(){return es},createRenderInBrowserAbortSignal:function(){return F},formatDynamicAPIAccesses:function(){return Z},getFirstDynamicReason:function(){return O},getNavigationDisallowedDynamicReasons:function(){return eb},getStaticShellDisallowedDynamicReasons:function(){return em},isDynamicPostpone:function(){return U},isPrerenderInterruptedError:function(){return W},logDisallowedDynamicError:function(){return eh},markCurrentScopeAsDynamic:function(){return R},postponeWithTracking:function(){return M},throwIfDisallowedDynamic:function(){return eg},throwIfSyncIOUsed:function(){return ey},throwToInterruptStaticGeneration:function(){return P},trackAllowedDynamicAccess:function(){return ei},trackDynamicDataInDynamicRender:function(){return T},trackDynamicHoleInNavigation:function(){return ec},trackDynamicHoleInRuntimeShell:function(){return el},trackDynamicHoleInStaticShell:function(){return ed},trackThrownErrorInNavigation:function(){return eu},useDynamicRouteParams:function(){return V},useDynamicSearchParams:function(){return G}};for(var c in s)Object.defineProperty(r,c,{enumerable:!0,get:s[c]});let u=(n=e.r(271645))&&n.__esModule?n:{default:n},l=e.r(476353),d=e.r(643248),f=e.r(662141),p=e.r(563599),h=e.r(963138),y=e.r(954839),g=e.r(729419),m=e.r(132061),b=e.r(164758),_=e.r(312718),v=e.r(102897),w=e.r(139580),E=e.r(644305),S="function"==typeof u.default.unstable_postpone;function k(e){return{isDebugDynamicAccesses:e,dynamicAccesses:[],syncDynamicErrorWithStack:null,syncDynamicErrorWithStackPostMicrotask:!1}}function x(){return{hasSuspenseAboveBody:!1,hasDynamicMetadata:!1,dynamicMetadata:null,hasDynamicViewport:!1,hasAllowedDynamic:!1,dynamicErrors:[]}}function A(e){return e.syncDynamicErrorWithStackPostMicrotask?null:e.syncDynamicErrorWithStack}function O(e){var t;return null==(t=e.dynamicAccesses[0])?void 0:t.expression}function R(e,t,r){if(t)switch(t.type){case"cache":case"unstable-cache":case"private-cache":return}if(!e.forceDynamic&&!e.forceStatic){if(e.dynamicShouldError)throw Object.defineProperty(new d.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${r}\`. 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(t)switch(t.type){case"prerender-ppr":return M(e.route,r,t.dynamicTracking);case"prerender-legacy":t.revalidate=0;let n=Object.defineProperty(new l.DynamicServerError(`Route ${e.route} couldn't be rendered statically because it used ${r}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E550",enumerable:!1,
156configurable:!0});throw e.dynamicUsageDescription=r,e.dynamicUsageStack=n.stack,n}}}function P(e,t,r){let n=Object.defineProperty(new l.DynamicServerError(`Route ${t.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.revalidate=0,t.dynamicUsageDescription=e,t.dynamicUsageStack=n.stack,n}function T(e){switch(e.type){case"cache":case"unstable-cache":case"private-cache":return}}function j(e,t,r){let n=L(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`);r.controller.abort(n);let o=r.dynamicTracking;o&&o.dynamicAccesses.push({stack:o.isDebugDynamicAccesses?Error().stack:void 0,expression:t})}function C(e,t,r,n){let o=n.dynamicTracking;o&&null===o.syncDynamicErrorWithStack&&(o.syncDynamicErrorWithStack=r,queueMicrotask(()=>{o.syncDynamicErrorWithStackPostMicrotask=!0})),j(e,t,n)}function I(e,t,r,n){if((0,h.trackRuntimeDataAccessed)(n),!1===n.controller.signal.aborted){j(e,t,n);let o=n.dynamicTracking;o&&null===o.syncDynamicErrorWithStack&&(o.syncDynamicErrorWithStack=r)}throw L(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`)}function D({reason:e,route:t}){let r=f.workUnitAsyncStorage.getStore();M(t,e,r&&"prerender-ppr"===r.type?r.dynamicTracking:null)}function M(e,t,r){(function(){if(!S)throw Object.defineProperty(Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E224",enumerable:!1,configurable:!0})})(),r&&r.dynamicAccesses.push({stack:r.isDebugDynamicAccesses?Error().stack:void 0,expression:t}),u.default.unstable_postpone(N(e,t))}function N(e,t){return`Route ${e} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`}function U(e){return"object"==typeof e&&null!==e&&"string"==typeof e.message&&H(e.message)}function H(e){return e.includes("needs to bail out of prerendering at this point because it used")&&e.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}if(!1===H(N("%%%","^^^")))throw Object.defineProperty(Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});let $="NEXT_PRERENDER_INTERRUPTED";function L(e){let t=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t.digest=$,t}function W(e){return"object"==typeof e&&null!==e&&e.digest===$&&"name"in e&&"message"in e&&e instanceof Error}function B(e){return e.length>0}function K(e,t){return e.dynamicAccesses.push(...t.dynamicAccesses),e.dynamicAccesses}function Z(e){return e.filter(e=>"string"==typeof e.stack&&e.stack.length>0).map(({expression:e,stack:t})=>(t=t.split("\n").slice(4).filter(e=>!(e.includes("node_modules/next/")||e.includes(" (<anonymous>)")||e.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${e}: 157${t}`))}function F(){let e=new AbortController;return e.abort(Object.defineProperty(new m.BailoutToCSRError("Render in Browser"),"__NEXT_ERROR_CODE",{value:"E721",enumerable:!1,configurable:!0})),e.signal}function q(e){switch(e.type){case"prerender":case"prerender-runtime":let t=new AbortController;if(e.cacheSignal)e.cacheSignal.inputReady().then(()=>{t.abort()});else{let r=(0,f.getStagedRenderingController)(e);r&&null!==r.finalStage?r.waitForStage(r.finalStage).then(()=>(0,g.scheduleOnNextTick)(()=>t.abort()),J):(0,g.scheduleOnNextTick)(()=>t.abort())}return t.signal;case"prerender-client":case"validation-client":case"prerender-ppr":case"prerender-legacy":case"request":case"cache":case"private-cache":case"unstable-cache":case"generate-static-params":return}}function J(){}function z(e,t){let r=t.dynamicTracking;r&&r.dynamicAccesses.push({stack:r.isDebugDynamicAccesses?Error().stack:void 0,expression:e})}function V(e){let t=p.workAsyncStorage.getStore(),r=f.workUnitAsyncStorage.getStore();if(t&&r)switch(r.type){case"prerender-client":{let n=r.fallbackRouteParam
157s;n&&n.size>0&&u.default.use((0,h.makeClientHookHangingPromise)(r.renderSignal,new h.ClientHookDynamicError(t.route,e)));break}case"prerender":throw Object.defineProperty(new _.InvariantError(`\`${e}\` was called from a Server Component. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E795",enumerable:!1,configurable:!0});case"prerender-ppr":{let n=r.fallbackRouteParams;if(n&&n.size>0)return M(t.route,e,r.dynamicTracking);break}case"validation-client":case"prerender-legacy":case"request":case"unstable-cache":break;case"prerender-runtime":throw Object.defineProperty(new _.InvariantError(`\`${e}\` was called during a runtime prerender. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E771",enumerable:!1,configurable:!0});case"cache":case"private-cache":throw Object.defineProperty(new _.InvariantError(`\`${e}\` was called inside a cache scope. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(new _.InvariantError(`\`${e}\` was called in \`generateStaticParams\`. Next.js should be preventing ${e} from being included in server component files statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1130",enumerable:!1,configurable:!0})}}function G(e){let t=p.workAsyncStorage.getStore(),r=f.workUnitAsyncStorage.getStore();if(t)switch(!r&&(0,f.throwForMissingRequestStore)(e),r.type){case"validation-client":case"request":return;case"prerender-client":u.default.use((0,h.makeClientHookHangingPromise)(r.renderSignal,new h.ClientHookDynamicError(t.route,e)));break;case"prerender-legacy":case"prerender-ppr":if(t.forceStatic)return;throw Object.defineProperty(new m.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":throw Object.defineProperty(new _.InvariantError(`\`${e}\` was called from a Server Component. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E795",enumerable:!1,configurable:!0});case"cache":case"unstable-cache":case"private-cache":throw Object.defineProperty(new _.InvariantError(`\`${e}\` was called inside a cache scope. Next.js should be preventing ${e} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(new _.InvariantError(`\`${e}\` was called in \`generateStaticParams\`. Next.js should be preventing ${e} from being included in server component files statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1130",enumerable:!1,configurable:!0})}}let X=/\n\s+at Suspense \(<anonymous>\)/,Y=RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${y.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`),Q=RegExp(`\\n\\s+at ${y.METADATA_BOUNDARY_NAME}[\\n\\s]`),ee=RegExp(`\\n\\s+at ${y.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`),et=RegExp(`\\n\\s+at ${y.OUTLET_BOUNDARY_NAME}[\\n\\s]`),er=RegExp(`\\n\\s+at ${v.INSTANT_VALIDATION_BOUNDARY_NAME}[\\n\\s]`),en=RegExp(`\\n\\s+at ${v.INSTANT_SLOT_MARKER_PREFIX}(\\d+)${v.INSTANT_SLOT_MARKER_SUFFIX}[\\n\\s]`);function eo(e,t){Y.test(e)&&(t.hasSuspenseAboveBody=!0)}function ei(e,t,r,n,o){let i=A(o);if(et.test(r))return void eo(r,n);if(Q.test(r)){n.hasDynamicMetadata=!0;return}if(ee.test(r)){n.hasDynamicViewport=!0;return}if(Y.test(r)){n.hasAllowedDynamic=!0,n.hasSuspenseAboveBody=!0;return}if(X.test(r)){n.hasAllowedDynamic=!0;return}else if(i)return void n.dynamicErrors.push(i);if((0,h.isClientHookDynamicError)(e))return void n.dynamicErrors.push(ef(e,r,null));let a=ef((0,b.createDynamicOrRuntimeBodyError)(t.route),r,null);n.dynamicErrors.push(a)}var ea=((o={})[o.Link=1]="Link",o[o.Runtime=2]="Runtime",o[o.Dynamic=3]="Dynamic",o);function es(e){return{hasDynamicMetadata:!1,hasAllowedClientDynamicAboveBoundary:!1,dynamicMetadata:null,hasDynamicViewport:!1,hasAllowedDynamic:!1,dynamicErrors:[],validationPreventingErrors:[],thrownErrorsOutsideBoundary:[],slotStacks:e}}function ec(e,t,r,n,o,i,a){let s=A(o);if(et.test(r))return;let c=function(e,t){let{slotStacks:r}=t;if(r.length>1){let t=en.exec(e);if(t){let e=r[parseInt(t[1],10)+1];if(null!=e)return e}}return r[0]??null}(r,n);if(Q.test(r)){n.dynamicMetadata=ef(1===i?(0,b.createLinkMetadataError)(t.route):2===i?(0,b.createRu
157ntimeMetadataError)(t.route):(0,b.createDynamicMetadataError)(t.route),r,c);return}if(ee.test(r)){let e=ef(1===i?(0,b.createLinkViewportError)(t.route):2===i?(0,b.createRuntimeViewportError)(t.route):(0,b.createDynamicViewportError)(t.route),r,c);n.dynamicErrors.push(e);return}let u=er.exec(r);if(u){let e=X.exec(r);if(e&&e.index<u.index){n.hasAllowedDynamic=!0;return}}else if((0,w.allRequiredBoundariesRendered)(a)){n.hasAllowedClientDynamicAboveBoundary=!0,n.hasAllowedDynamic=!0;return}else{let e=ef(Object.defineProperty(Error(`Route "${t.route}": Could not validate \`instant\` because a Client Component in a parent segment prevented the page from rendering.`),"__NEXT_ERROR_CODE",{value:"E1331",enumerable:!1,configurable:!0}),r,c);n.validationPreventingErrors.push(e);return}if(s){null!==c&&void 0===s.cause&&(s.cause=c()),n.dynamicErrors.push(s);return}if((0,h.isClientHookDynamicError)(e))return void n.dynamicErrors.push(ef(e,r,c));let l=ef(1===i?(0,b.createLinkBodyErrorInNavigation)(t.route):2===i?(0,b.createRuntimeBodyErrorInNavigation)(t.route):(0,b.createDynamicBodyErrorInNavigation)(t.route),r,c);n.dynamicErrors.push(l)}function eu(e,t,r,n){let o=er.exec(n);if(o){let i=X.exec(n);if(i&&i.index<o.index)return;let a=ef(Object.defineProperty(Error(`Route "${e.route}": Could not validate \`instant\` because an error prevented the target segment from rendering.`,{cause:r}),"__NEXT_ERROR_CODE",{value:"E1338",enumerable:!1,configurable:!0}),n,null);t.validationPreventingErrors.push(a)}else{let e=ef(Object.defineProperty(Error("An error occurred while attempting to validate instant UI. This error may be preventing the validation from completing.",{cause:r}),"__NEXT_ERROR_CODE",{value:"E1118",enumerable:!1,configurable:!0}),n,null);t.thrownErrorsOutsideBoundary.push(e)}}function el(e,t,r,n,o){let i=A(o);if(et.test(r))return void eo(r,n);if(Q.test(r)){n.dynamicMetadata=ef((0,b.createDynamicMetadataError)(t.route),r,null);return}if(ee.test(r)){let e=ef((0,b.createDynamicViewportError)(t.route),r,null);n.dynamicErrors.push(e);return}if(Y.test(r)){n.hasAllowedDynamic=!0,n.hasSuspenseAboveBody=!0;return}if(X.test(r)){n.hasAllowedDynamic=!0;return}else if(i)return void n.dynamicErrors.push(i);if((0,h.isClientHookDynamicError)(e))return void n.dynamicErrors.push(ef(e,r,null));let a=ef((0,b.createDynamicBodyError)(t.route),r,null);n.dynamicErrors.push(a)}function ed(e,t,r,n,o){let i=A(o);if(et.test(r))return void eo(r,n);if(Q.test(r)){n.dynamicMetadata=ef((0,b.createRuntimeMetadataError)(t.route),r,null);return}if(ee.test(r)){let e=ef((0,b.createRuntimeViewportError)(t.route),r,null);n.dynamicErrors.push(e);return}if(Y.test(r)){n.hasAllowedDynamic=!0,n.hasSuspenseAboveBody=!0;return}if(X.test(r)){n.hasAllowedDynamic=!0;return}else if(i)return void n.dynamicErrors.push(i);if((0,h.isClientHookDynamicError)(e))return void n.dynamicErrors.push(ef(e,r,null));let a=ef((0,b.createRuntimeBodyError)(t.route),r,null);n.dynamicErrors.push(a)}function ef(e,t,r){return null!==r&&(e.cause=r()),e.stack=e.name+": "+e.message+t,e}var ep=((i={})[i.Full=0]="Full",i[i.Empty=1]="Empty",i[i.Errored=2]="Errored",i);function eh(e,t){console.error(t),(0,b.logBuildDebugHint)(e.route)}function ey(e,t){if(t.syncDynamicErrorWithStack)throw eh(e,t.syncDynamicErrorWithStack),new d.StaticGenBailoutError}function eg(e,t,r,n,o){if(ey(e,n),0===t&&!1===r.hasAllowedDynamic&&r.hasDynamicMetadata)throw console.error((0,b.createDynamicOrRuntimeMetadataError)(e.route).message),new d.StaticGenBailoutError;if(!o&&!r.hasSuspenseAboveBody&&0!==t){let n=r.dynamicErrors;if(n.length>0){for(let t=0;t<n.length;t++)eh(e,n[t]);throw new d.StaticGenBailoutError}if(r.hasDynamicViewport)throw console.error((0,b.createDynamicOrRuntimeViewportError)(e.route).message),new d.StaticGenBailoutError;if(1===t)throw console.error(`Route "${e.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`),new d.StaticGenBailoutError}}function em(e,t,r,n){if(0===t&&!1===r.hasAllowedDynamic&&0===r.dynamicErrors.length&&r.dynamicMetadata)return[r.dynamicMetadata];if(n||r.hasSuspenseAboveBody)return[];if(0!==t){let n=r.dynamicErrors;if(n.length>0)return n;if(1===t)return[Object.defineProperty(new _.InvariantError(`Route "${e.route}
157" did not produce a static shell and Next.js was unable to determine a reason.`),"__NEXT_ERROR_CODE",{value:"E936",enumerable:!1,configurable:!0})]}return[]}function eb(e,t,r,n,o,i){if(n){let{missingSampleErrors:e}=n;if(e.length>0)return e}let{validationPreventingErrors:s}=r;if(s.length>0)return s;if(0!==t){let n=r.dynamicErrors;if(n.length>0)return n;if(1===t&&!r.hasAllowedClientDynamicAboveBoundary&&(0,w.allRequiredBoundariesRendered)(o))return Object.defineProperty(new _.InvariantError(`Route "${e.route}" failed to render during instant validation and Next.js was unable to determine a reason.`),"__NEXT_ERROR_CODE",{value:"E1055",enumerable:!1,configurable:!0})}else{let e=r.dynamicErrors;if(e.length>0)return e;if(!1===r.hasAllowedDynamic&&r.dynamicMetadata)return[r.dynamicMetadata]}if(!(0,w.allRequiredBoundariesRendered)(o)){let{thrownErrorsOutsideBoundary:t}=r,n=r.slotStacks[0];if(0===t.length){let t=[];for(let[e,r]of o.requiredIds)if(!o.renderedIds.has(e))for(let e of r){let r=e.replace(/^\[project\][\\/]?/,"").replace(a.default.cwd()+"/","").replace(a.default.cwd()+"\\","");t.push(r)}return t.sort(),(0,E.createUnrenderedSegmentError)(e.route,t)}if(1===t.length){let r=`Route "${e.route}": Could not validate \`instant\` because the target segment was prevented from rendering, likely due to the following error.`,o=null!==n?n():Error();return o.name="Error",o.message=r,AggregateError([o,t[0]])}{let r=`Route "${e.route}": Could not validate \`instant\` because the target segment was prevented from rendering, likely due to one of the following errors.`,o=null!==n?n():Error();return o.name="Error",o.message=r,AggregateError([o,...t])}}return[]}},102897,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={INSTANT_SLOT_MARKER_PREFIX:function(){return a},INSTANT_SLOT_MARKER_SUFFIX:function(){return s},INSTANT_VALIDATION_BOUNDARY_NAME:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i="__next_instant_validation_boundary__",a="__next_instant_slot_",s="__"},139580,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={allRequiredBoundariesRendered:function(){return a},createValidationBoundaryTracking:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function i(){return{requiredIds:new Map,renderedIds:new Set}}function a(e){for(let t of e.requiredIds.keys())if(!e.renderedIds.has(t))return!1;return!0}},142852,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,o,i={RENDER_STAGE_ADVANCE_ORDER:function(){return l},RenderStage:function(){return u},StagedRenderingController:function(){return h},SyncIOMode:function(){return p},getNextStage:function(){return d},isAdvanceableRenderStage:function(){return f}};for(var a in i)Object.defineProperty(r,a,{enumerable:!0,get:i[a]});let s=e.r(312718),c=e.r(839470);var u=((n={})[n.Before=1]="Before",n[n.ShellStatic=11]="ShellStatic",n[n.Static=13]="Static",n[n.ShellRuntime=21]="ShellRuntime",n[n.Runtime=23]="Runtime",n[n.Dynamic=30]="Dynamic",n[n.Abandoned=40]="Abandoned",n);let l=[11,13,21,23,30];function d(e){return l[l.indexOf(e)+1]}function f(e){return 1<e&&e<=30}var p=((o={})[o.Untracked=1]="Untracked",o[o.AllowedInRuntimeOrDynamic=2]="AllowedInRuntimeOrDynamic",o[o.AllowedInDynamic=3]="AllowedInDynamic",o);class h{constructor({abortSignal:e,abandonController:t,syncIO:r,finalStage:n}){this.currentStage=1,this.syncInterruptReason=null,this.triggers={11:g(),13:g(),21:g(),23:g(),30:g()},this.abortSignal=e,this.abandonController=t,this.syncIOMode=r,this.finalStage=n,e&&e.addEventListener("abort",()=>{let{reason:t}=e;for(let e of Object.values(this.triggers)){var r,n;r=e,n=t,"pending"===r.state&&(r.state="cancelled",r._listeners.length=0,r.promise.catch(y),r._rejectPromise(n))}},{once:!0}),t&&t.signal.addEventListener("abort",()=>{this.abandonRender()},{once:!0})}onStage(e,t){var r,n;r=this.triggers[e],n=t,"pending"===r.state?r._listeners.push(n):n()}shouldTrackSyncInterrupt(){if(1===this.syncIOMode)return!1;switch(this.currentStage){case 1:return!1;case 11:case 13:return!0;case 21:case 23:switch(this.syncIOMode){case 2:return!1;case 3:return!0}case 30:case 40:return!1;default:return this.currentStage,!1}}syncInterruptCurrentStageWithReason(e){let{currentStage:t}=this;if(1!==t&&30!==t&&40!==t){if(this.abandonController)return void this.abandonController.abort();
157if(this.abortSignal){this.syncInterruptReason=e,this.currentStage=40;return}this.syncInterruptReason=e,this.advanceStage(30)}}getSyncInterruptReason(){return this.syncInterruptReason}getStageEndTime(e){return this.triggers[d(e)].triggeredAt??1/0}abandonRender(){let{currentStage:e}=this;if(1===e)throw Object.defineProperty(new s.InvariantError("A render that hasn't started yet cannot be abandoned"),"__NEXT_ERROR_CODE",{value:"E1300",enumerable:!1,configurable:!0});if(30===e||40===e)return;let t=l.indexOf(e)+1,r=l.indexOf(30);for(let e=t;e<r;e++)this.resolveStage(l[e]);this.currentStage=40}advanceStage(e){if(null!==this.finalStage&&e>this.finalStage)throw Object.defineProperty(new s.InvariantError(`Attempted to advance to stage ${u[e]} but the render is limited to ${u[this.finalStage]}`),"__NEXT_ERROR_CODE",{value:"E1302",enumerable:!1,configurable:!0});let{currentStage:t}=this;if(30===t||40===t||e<=t)return;this.currentStage=e;let r=1===t?0:l.indexOf(t)+1,n=l.indexOf(e);for(let e=r;e<=n;e++)this.resolveStage(l[e])}resolveStage(e){var t=this.triggers[e];if("pending"===t.state){t.state="triggered",t.triggeredAt=performance.now()+performance.timeOrigin;try{let{_listeners:e}=t;for(let t=0;t<e.length;t++)e[t]();e.length=0}finally{t._resolvePromise()}}}getStagePromise(e){return this.triggers[e].promise}waitForStage(e){return this.getStagePromise(e)}delayUntilStage(e,t,r){let n=this.getStagePromise(e).then(()=>r);return this.abortSignal&&n.catch(y),n}}function y(){}function g(){let{promise:e,resolve:t,reject:r}=(0,c.createPromiseWithResolvers)();return{state:"pending",triggeredAt:null,promise:e,_listeners:[],_resolvePromise:t,_rejectPromise:r}}},242344,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(90317).createAsyncLocalStorage)()},563599,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=e.r(242344)},245955,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workUnitAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(90317).createAsyncLocalStorage)()},662141,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={getCacheSignal:function(){return y},getDraftModeProviderForCacheScope:function(){return p},getHmrRefreshHash:function(){return l},getResumeDataCache:function(){return u},getServerComponentsHmrCache:function(){return f},getStagedRenderingController:function(){return h},getVaryParamsAccumulator:function(){return g},isHmrRefresh:function(){return d},throwForMissingRequestStore:function(){return s},throwInvariantForMissingStore:function(){return c},workUnitAsyncStorage:function(){return i.workUnitAsyncStorageInstance}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(245955),a=e.r(312718);function s(e){throw Object.defineProperty(Error(`\`${e}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E251",enumerable:!1,configurable:!0})}function c(){throw Object.defineProperty(new a.InvariantError("Expected workUnitAsyncStorage to have a store."),"__NEXT_ERROR_CODE",{value:"E696",enumerable:!1,configurable:!0})}function u(e){switch(e.type){case"request":case"prerender":case"prerender-runtime":case"prerender-client":case"validation-client":case"prerender-ppr":return e.resumeDataCache;case"cache":case"private-cache":case"unstable-cache":case"prerender-legacy":case"generate-static-params":return null;default:return e}}function l(e){}function d(e){return!1}function f(e){}function p(e,t){if(e.isDraftMode)switch(t.type){case"cache":case"private-cache":case"unstable-cache":case"prerender-runtime":case"request":return t.draftMode}}function h(e){switch(e.type){case"request":case"prerender-runtime":case"prerender":return e.stagedRendering??null;case"prerender-client":case"validation-client":case"prerender-ppr":case"prerender-legacy":case"cache":case"private-cache":case"unstable-cache":case"generate-static-params":return null;default:return e}}function y(e){switch(e.type){case"prerender":case"prerender-client":case"validation-client":case"prerender-runtime":return e.cacheSignal;case"request":if(e.cacheSignal)return e.cacheSignal;case"prerender-ppr":case"prerender-legacy":case"cache":case"private-cache":case"unstable-cache":case"generate-static-params":return null;default:return e}}function g(e){switch(e.type){case"prerender":case"prerender-runtime":case"request":return e.varyParamsAccumulator??null;default:return null}}},876361,(e,t,r)=>{"use strict";
157Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return c}});let n=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&&Object.prototype.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(271645));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)}let i={current:null},a="function"==typeof n.cache?n.cache:e=>e,s=console.warn;function c(e){return function(...t){s(e(...t))}}a(e=>{try{s(i.current)}finally{i.current=null}})},232124,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"cookies",{enumerable:!0,get:function(){return p}});let n=e.r(397270),o=e.r(196883),i=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),f=e.r(312718);function p(){let e="cookies",t=i.workAsyncStorage.getStore(),r=a.workUnitAsyncStorage.getStore();if(t){if(r&&!(0,d.isRequestApiAllowedInCurrentPhase)(r))throw Object.defineProperty(Error(`Route ${t.route} used \`cookies()\` inside \`after()\` while rendering. 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/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E1381",enumerable:!1,configurable:!0});if(t.forceStatic)return y(n.RequestCookiesAdapter.seal(new o.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 i=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(i,p),(0,u.applyOwnerStack)(i),t.invalidDynamicUsageError??=i,i;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 a=h.get(g);if(a)return a;let m=(0,u.makeRuntimeHangingPromise)(g.renderSignal,l.route,"`cookies()`",g);return h.set(g,m),m;case"prerender-client":case"validation-client":let b="`cookies`";throw Object.defineProperty(new f.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,
157configurable:!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":{let{stagedRendering:e}=r;if(e)return e.delayUntilStage(u.RENDER_STAGES_BY_DATA_KIND.sessionData,"cookies",r.cookies);return y(r.cookies)}case"private-cache":return y(r.cookies);case"request":let _;if((0,s.trackDynamicDataInDynamicRender)(r),_=(0,n.areCookiesMutableInCurrentPhase)(r)?r.userspaceMutableCookies:r.cookies,!r.asyncApiPromises)return y(_);if(_===r.mutableCookies)return r.asyncApiPromises.mutableCookies;return r.asyncApiPromises.cookies}}(0,a.throwForMissingRequestStore)(e)}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})})},687720,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={HeadersAdapter:function(){return s},ReadonlyHeadersError:function(){return a}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(242715);class a extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers"),Object.defineProperty(this,"__NEXT_ERROR_CODE",{value:"E1176",enumerable:!1,configurable:!0})}static callable(){throw new a}}class s extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,n){if("symbol"==typeof r)return i.ReflectAdapter.get(t,r,n);let o=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===o);if(void 0!==a)return i.ReflectAdapter.get(t,a,n)},set(t,r,n,o){if("symbol"==typeof r)return i.ReflectAdapter.set(t,r,n,o);let a=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===a);return i.ReflectAdapter.set(t,s??r,n,o)},has(t,r){if("symbol"==typeof r)return i.ReflectAdapter.has(t,r);let n=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0!==o&&i.ReflectAdapter.has(t,o)},deleteProperty(t,r){if("symbol"==typeof r)return i.ReflectAdapter.deleteProperty(t,r);let n=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0===o||i.ReflectAdapter.deleteProperty(t,o)}})}static seal(e,t){let r,n=t&&t.size>0?e=>t.has(e.toLowerCase()):null,o=new Proxy(e,{get(e,t,n){switch(t){case"append":case"delete":case"set":return a.callable;case Symbol.iterator:return r[Symbol.iterator];case"get":case"has":case"getSetCookie":case"keys":case"values":case"entries":case"forEach":return r[t];default:return i.ReflectAdapter.get(e,t,n)}}});return r=n?function(e,t,r){function*n(){for(let t of e.entries())r(t[0])||(yield t)}return{entries:n,[Symbol.iterator]:n,get:t=>r(t)?null:e.get(t),has:t=>!r(t)&&e.has(t),getSetCookie:()=>r("set-cookie")?[]:e.getSetCookie(),*keys(){for(let t of e.keys())r(t)||(yield t)},*values(){for(let[,e]of n())yield e},forEach(e,r){for(let[o,i]of n())e.call(r,i,o,t)}}}(e,o,n):{get:e.get.bind(e),has:e.has.bind(e),getSetCookie:e.getSetCookie.bind(e),keys:e.keys.bind(e),values:e.values.bind(e),entries:e.entries.bind(e),[Symbol.iterator]:e[Symbol.iterator].bind(e),forEach(t,r){for(let[n,i]of e.entries())t.call(r,i,n,o)}},o}static fresh(e){return new Proxy(e,{get:(e,t,r)=>i.ReflectAdapter.get(e,t,r)})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new s(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}},835407,(e,t,r)=>{"use strict";
157Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"headers",{enumerable:!0,get:function(){return f}});let n=e.r(687720),o=e.r(563599),i=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 f(){let e="headers",t=o.workAsyncStorage.getStore(),r=i.workUnitAsyncStorage.getStore();if(t){if(r&&!(0,l.isRequestApiAllowedInCurrentPhase)(r))throw Object.defineProperty(Error(`Route ${t.route} used \`headers()\` inside \`after()\` while rendering. 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/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E1378",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,f),(0,c.applyOwnerStack)(e),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 o=p.get(y);if(o)return o;let i=(0,c.makeRuntimeHangingPromise)(y.renderSignal,u.route,"`headers()`",y);return p.set(y,i),i;case"prerender-client":case"validation-client":let g="`headers`";throw Object.defineProperty(new d.InvariantError(`${g} must not be used within a client component. Next.js should be preventing ${g} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1017",enumerable:!1,configurable:!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":{let{stagedRendering:e}=r;if(e)return e.delayUntilStage(c.RENDER_STAGES_BY_DATA_KIND.sessionData,"headers",r.headers);return h(r.headers)}case"private-cache":return h(r.headers);case"request":if((0,a.trackDynamicDataInDynamicRender)(r),r.asyncApiPromises)return r.asyncApiPromises.headers;return h(r.headers)}}(0,i.throwForMissingRequestStore)(e)}let p=new WeakMap;function h(e){let t=p.get(e);if(t)return t;let r=Promise.resolve(e);return p.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,
157configurable:!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),o=e.r(563599),i=e.r(67673),a=e.r(876361),s=e.r(643248),c=e.r(476353),u=e.r(312718);e.r(242715);let l=e.r(963138);function d(){let e="draftMode",t=o.workAsyncStorage.getStore(),r=n.workUnitAsyncStorage.getStore();switch((!t||!r)&&(0,n.throwForMissingRequestStore)(e),r.type){case"prerender-runtime":{let{stagedRendering:e}=r;if(e)return e.delayUntilStage(l.RENDER_STAGES_BY_DATA_KIND.sessionData,"draftMode",new y(r.draftMode));return f(r.draftMode,t)}case"request":return f(r.draftMode,t);case"cache":case"private-cache":case"unstable-cache":let i=(0,n.getDraftModeProviderForCacheScope)(t,r);if(i)return f(i,t);case"prerender":case"prerender-ppr":case"prerender-legacy":return f(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 f(e,t){let r=h.get(e??p);return r||Promise.resolve(new y(e))}let p={},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=o.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,configurable:!0});throw Error.captureStackTrace(n,t),(0,l.applyOwnerStack)(n),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,i.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,
157configurable:!0});case"prerender-ppr":return(0,i.postponeWithTracking)(r.route,e,a.dynamicTracking);case"prerender-legacy":a.revalidate=0;let o=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=o.stack,o;case"request":(0,i.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 o=e.r(319001),i=e.r(456095);async function a(e,t,r){var a,s,c,u,l,d,f,p;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,o.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,i.setCookie)(t,e)),null==(f=g.headers)||f.forEach(e=>t.setHeader(e.key,e.value)),g.redirect){if((null==(p=e.body)?void 0:p.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),f=null==(c=await r.params)?void 0:c.nextauth,p=Object.fromEntries(t.nextUrl.searchParams),h=await (0,i.getBody)(t),y=await (0,o.AuthHandler)({req:{body:h,query:p,cookies:Object.fromEntries((await d()).getAll().map(e=>[e.name,e.value])),headers:Object.fromEntries(await l()),method:t.method,action:null==f?void 0:f[0],providerId:null==f?void 0:f[1],error:null!=(u=p.error)?u:null==f?void 0:f[1]},options:a}),g=(0,i.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:f,cookies:p,status:h=200}=await (0,o.AuthHandler)({options:l,req:{action:"session",method:"GET",cookies:s.cookies,headers:s.headers}});if(null==p||p.forEach(e=>(0,i.setCookie)(u,e)),f&&"string"!=typeof f&&Object.keys(f).length){if(200===h)return d&&delete f.expires,f;throw Error(f.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";
157Object.defineProperty(r,"__esModule",{value:!0});var n={};Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i.default}});var o=e.r(445959);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]}})});var i=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 o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}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(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]}})})},984561,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={getClientReact:function(){return s},getServerReact:function(){return l},registerClientReact:function(){return a},registerServerReact:function(){return u}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=null;function a(e){i=e}function s(){return i}let c=null;function u(e){c=e}function l(){return c}},963138,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ClientHookDynamicError:function(){return l},RENDER_STAGES_BY_DATA_KIND:function(){return A},applyOwnerStack:function(){return O},isClientHookDynamicError:function(){return d},isHangingPromiseRejectionError:function(){return a},makeClientHookHangingPromise:function(){return w},makeDevtoolsIOAwarePromise:function(){return x},makeDynamicHangingPromise:function(){return p},makeFallbackParamsHangingPromise:function(){return g},makePromiseFromTrigger:function(){return k},makeRuntimeHangingPromise:function(){return y},makeStageHangingPromise:function(){return m},makeUntrackedHangingPromise:function(){return h},trackFallbackParamsAccessed:function(){return _},trackRuntimeDataAccessed:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(142852);function a(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===s}e.r(662141),e.r(984561);let s="HANGING_PROMISE_REJECTION";class c extends Error{constructor(e,t){super(`During prerendering, ${t} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${t} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${e}".`),this.route=e,this.expression=t,this.digest=s}}let u="CLIENT_HOOK_DYNAMIC";class l extends Error{constructor(e,t){super(`Route "${e}": Next.js encountered URL data \`${t}\` in a Client Component outside of \`<Suspense>\`. 158 159This blocks prerendering because the value is only available at runtime. 160 161Ways to fix this: 162 - [stream] Wrap the component in \`<Suspense fallback={...}>\` so the hook value streams in after prerendering 163 - [block] Set \`export const instant = false\` to allow a blocking route 164 165Learn more: https://nextjs.org/docs/messages/blocking-prerender-client-hook`),this.digest=u,Object.defineProperty(this,"__NEXT_ERROR_CODE",{value:"E1433",enumerable:!1,configurable:!0})}}function d(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===u}let f=new WeakMap;function p(e,t,r){return E(e,new c(t,r))}function h(e,t,r){return E(e,new c(t,r))}function y(e,t,r,n){return null!==n&&b(n),E(e,new c(t,r))}function g(e,t,r,n){return null!==n&&_(n),E(e,new c(t,r))}function m(e,t,r,n){return b(n),E(e,new c(t,r))}function b(e){v(e,!1)}function _(e){v(e,!0)}function v(e,t){if("prerender"===e.type){var r;null==(r=e.runtimeDataAccessed)||r.resolve(!0);let n=e.shouldAttemptStaticPrefetch;null===n||t&&e.isFallbackUpgradeable||(n.current=!1)}}function w(e,t){return E(e,t)}function E(e,t){if(e.aborted)return Promise.reject(t);{let r=new Promise((r,n)=>{let o=n.bind(null,t),i=f.get(e);if(i)i.push(o);else{let t=[o];f.set(e,t),e.addEventListener("abort",()=>{for(let e=0;e<t.length;e++)t[e]()},{once:!0})}});return r.catch(S),r}}function S(){}function k(e,t){let r=e.then(()=>t);return r.catch(S),r}function x(e,t,r){return t.stagedRendering?t.stagedRendering.delayUntil
165Stage(r,void 0,e):new Promise(t=>{setTimeout(()=>{t(e)},0)})}let A={sessionData:i.RenderStage.ShellRuntime,staticLinkData:i.RenderStage.Static,runtimeLinkData:i.RenderStage.Runtime};function O(e){return e}},242715,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ReflectAdapter",{enumerable:!0,get:function(){return n}});class n{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},397270,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={MutableRequestCookiesAdapter:function(){return h},ReadonlyRequestCookiesError:function(){return u},RequestCookiesAdapter:function(){return l},appendMutableCookies:function(){return p},areCookiesMutableInCurrentPhase:function(){return g},createCookiesWithMutableAccessCheck:function(){return y},getModifiedCookieValues:function(){return f},responseCookiesToRequestCookies:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(196883),a=e.r(242715),s=e.r(563599),c=e.r(339146);class u extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options"),Object.defineProperty(this,"__NEXT_ERROR_CODE",{value:"E1180",enumerable:!1,configurable:!0})}static callable(){throw new u}}class l{static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"clear":case"delete":case"set":return u.callable;default:return a.ReflectAdapter.get(e,t,r)}}})}static fresh(e){return new Proxy(e,{get:(e,t,r)=>a.ReflectAdapter.get(e,t,r)})}}let d=Symbol.for("next.mutated.cookies");function f(e){let t=e[d];return t&&Array.isArray(t)&&0!==t.length?t:[]}function p(e,t){let r=f(t);if(0===r.length)return!1;let n=new i.ResponseCookies(e),o=n.getAll();for(let e of r)n.set(e);for(let e of o)n.set(e);return!0}class h{static wrap(e,t){let r=new i.ResponseCookies(new Headers);for(let t of e.getAll())r.set(t);let n=[],o=new Set,u=()=>{let e=s.workAsyncStorage.getStore();if(e&&(e.pathWasRevalidated=c.ActionDidRevalidateStaticAndDynamic),n=r.getAll().filter(e=>o.has(e.name)),t){let e=[];for(let t of n){let r=new i.ResponseCookies(new Headers);r.set(t),e.push(r.toString())}t(e)}},l=new Proxy(r,{get(e,t,r){switch(t){case d:return n;case"delete":return function(...t){o.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.delete(...t),l}finally{u()}};case"set":return function(...t){o.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.set(...t),l}finally{u()}};default:return a.ReflectAdapter.get(e,t,r)}}});return l}}function y(e){let t=new Proxy(e.mutableCookies,{get(r,n,o){switch(n){case"delete":return function(...n){return m(e,"cookies().delete"),r.delete(...n),t};case"set":return function(...n){return m(e,"cookies().set"),r.set(...n),t};default:return a.ReflectAdapter.get(r,n,o)}}});return t}function g(e){return"action"===e.phase}function m(e,t){if(!g(e))throw new u}function b(e){let t=new i.RequestCookies(new Headers);for(let r of e.getAll())t.set(r);return t}},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 o=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,o,"getParsedType",0,e=>{switch(typeof e){case"undefined":return o.undefined;case"string":return o.string;case"number":return Number.isNaN(e)?o.nan:o.number;case"boolean":return o.boolean;case"function":return o.function;case"bigint":return o.bigint;case"symbol":return o.symbol;case"object":if(Array.isArray(e))return o.array;if(null===e)return o.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return o.promise;if("u">typeof Map&&e instanceof Map)return o.map;if("u">typeof Set&&e instanceof Set)return o.set;if("u">typeof Date&&e instanceof Date)return o.date;return o.object;default:return o.unknown}},"objectUtil",0,r,"util",0,t],904783);
165let i=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 o of e.issues)if("invalid_union"===o.code)o.unionErrors.map(n);else if("invalid_return_type"===o.code)n(o.returnTypeError);else if("invalid_arguments"===o.code)n(o.argumentsError);else if(0===o.path.length)r._errors.push(t(o));else{let e=r,n=0;for(;n<o.path.length;){let r=o.path[n];n===o.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(o))):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,i,"quotelessJson",0,e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:")],169790)},50270,894706,e=>{"use strict";let t;e.i(38570);var r,n,o,i,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
1650),e.i(277290);let f=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],a={...o,path:i};if(void 0!==o.message)return{...o,path:i,message:o.message};let s="";for(let e of n.filter(e=>!!e).slice().reverse())s=e(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}},p=[];function h(e,t){let r=d(),n=f({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:o}=n;if("aborted"===t.status||"aborted"===o.status)return g;"dirty"===t.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==o.value||n.alwaysSet)&&(r[t.value]=o.value)}return{status:e.value,value:r}}}let g=Object.freeze({status:"aborted"}),m=e=>({status:"dirty",value:e}),b=e=>({status:"valid",value:e}),_=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,p,"INVALID",0,g,"OK",0,b,"ParseStatus",0,y,"addIssueToContext",0,h,"isAborted",0,_,"isAsync",0,E,"isDirty",0,v,"isValid",0,w,"makeIssue",0,f],665354),e.i(665354),e.s([],527404),e.i(527404),(r=o||(o={})).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 x(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=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:o}:{errorMap:(t,o)=>{let{message:i}=e;return"invalid_enum_value"===t.code?{message:i??o.defaultError}:void 0===o.data?{message:i??n??o.defaultError}:"invalid_type"!==t.code?{message:o.defaultError}:{message:i??r??o.defaultError}},description:o}}class A{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 o=e(r),i=()=>n.addIssue({code:a.ZodIssueCode.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"u">typeof Promise&&o instanceof Promise?o.then(e=>!!e||(i(),!1)):!!o||(i(),!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:i.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 e_.create(this,this._def)}or(e){return ei.create([this,e],this._def)}and(e){return ec.create(this,e,this._def)}transform(e){return new ev({...x(this._def),schema:this,typeName:i.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eS({...x(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:i.ZodDefault})}brand(){return new eO({typeName:i.ZodBranded,type:this,...x(this._def)})}catch(e){return new ek({...x(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:i.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eR.create(this,e)}readonly(){return eP.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let O=/^c[^\s-]{8,}
165$/i,R=/^[0-9a-z]+$/,P=/^[0-9A-HJKMNP-TV-Z]{26}$/i,T=/^[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,j=/^[a-z0-9_-]{21}$/i,C=/^[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)?)??$/,D=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,M=/^(?:(?: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])$/,U=/^(([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]))$/,H=/^(([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])$/,$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,L=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,W="((\\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])))",B=RegExp(`^${W}$`);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 Z(e){let t=`${W}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 F extends A{_parse(e){var r,n,o,i;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)D.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)T.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)j.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)O.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)R.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)P.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),{
165code: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?Z(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?B.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)&&M.test(r)||("v6"===n||!n)&&U.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(!C.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,"="),o=JSON.parse(atob(n));if("object"!=typeof o||null===o||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.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?(o=e.data,!(("v4"===(i=l.version)||!i)&&N.test(o)||("v6"===i||!i)&&H.test(o))&&1&&(h(c=this._getOrReturnCtx(e,c),{validation:"cidr",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty())):"base64"===l.kind?$.test(e.data)||(h(c=this._getOrReturnCtx(e,c),{validation:"base64",code:a.ZodIssueCode.invalid_string,message:l.message}),u.dirty()):"base64url"===l.kind?L.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,...o.errToObj(r)})}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...o.errToObj(e)})}url(e){return this._addCheck({kind:"url",...o.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...o.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...o.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...o.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...o.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...o.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...o.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...o.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...o.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...o.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...o.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...o.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,...o.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,...o.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...o.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...o.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...o.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...o.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...o.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...o.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...o.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...o.errToObj(t)})}nonempty(e){return this.min(1,o.errToObj(e))}trim(){return new F({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new F({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new F({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}
vendor: 6,096 bytes, line 165
165get 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}}F.create=e=>new F({checks:[],typeName:i.ZodString,coerce:e?.coerce??!1,...x(e)});class q extends A{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,o=r>n?r:n;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}(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,o.toString(t))}gt(e,t){return this.setLimit("min",e,!1,o.toString(t))}lte(e,t){return this.setLimit("max",e,!0,o.toString(t))}lt(e,t){return this.setLimit("max",e,!1,o.toString(t))}setLimit(e,t,r,n){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:o.toString(n)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:o.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:o.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:o.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:o.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:o.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:o.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:o.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:o.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:o.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:i.ZodNumber,coerce:e?.coerce||!1,...x(e)});class J extends A{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,o.toString(t))}gt(e,t){return this.setLimit("min",e,!1,o.toString(t))}lte(e,t){return this.setLimit("max",e,!0,o.toString(t))}lt(e,t){return this.setLimit("max",e,!1,o.toString(t))}
165setLimit(e,t,r,n){return new J({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:o.toString(n)}]})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:o.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:o.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:o.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:o.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:o.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}}J.create=e=>new J({checks:[],typeName:i.ZodBigInt,coerce:e?.coerce??!1,...x(e)});class z extends A{_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 b(e.data)}}z.create=e=>new z({typeName:i.ZodBoolean,coerce:e?.coerce||!1,...x(e)});class V extends A{_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 V({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:o.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:o.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}}V.create=e=>new V({checks:[],coerce:e?.coerce||!1,typeName:i.ZodDate,...x(e)});class G extends A{_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 b(e.data)}}G.create=e=>new G({typeName:i.ZodSymbol,...x(e)});class X extends A{_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 b(e.data)}}X.create=e=>new X({typeName:i.ZodUndefined,...x(e)});class Y extends A{_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 b(e.data)}}Y.create=e=>new Y({typeName:i.ZodNull,...x(e)});class Q extends A{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}Q.create=e=>new Q({typeName:i.ZodAny,...x(e)});class ee extends A{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}ee.create=e=>new ee({typeName:i.ZodUnknown,...x(e)});class et extends A{_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:i.ZodNever,...x(e)});class er extends A{_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 b(e.data)}}er.create=e=>new er({typeName:i.ZodVoid,...x(e)});class en extends A{_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,o=t.data.length<n.exactLength.value;(e||o)&&(h(t,{code:e?a.ZodIssueCode.too_big:a.ZodIssueCode.too_small,minimum:o?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 o=[...t.data].map((e,r)=>n.type._parseSync(new S(t,e,t.path,r)));return y.mergeArray(r,o)}
vendor: 5,228 bytes, line 165
165get element(){return this._def.type}min(e,t){return new en({...this._def,minLength:{value:e,message:o.toString(t)}})}max(e,t){return new en({...this._def,maxLength:{value:e,message:o.toString(t)}})}length(e,t){return new en({...this._def,exactLength:{value:e,message:o.toString(t)}})}nonempty(e){return this.min(1,e)}}en.create=(e,t)=>new en({type:e,minLength:null,maxLength:null,exactLength:null,typeName:i.ZodArray,...x(t)});class eo extends A{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:o}=this._getCached(),i=[];if(!(this._def.catchall instanceof et&&"strip"===this._def.unknownKeys))for(let e in r.data)o.includes(e)||i.push(e);let c=[];for(let e of o){let t=n[e],o=r.data[e];c.push({key:{status:"valid",value:e},value:t._parse(new S(r,o,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 i)c.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)i.length>0&&(h(r,{code:a.ZodIssueCode.unrecognized_keys,keys:i}),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 i){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 o.errToObj,new eo({...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:o.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new eo({...this._def,unknownKeys:"strip"})}passthrough(){return new eo({...this._def,unknownKeys:"passthrough"})}extend(e){return new eo({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new eo({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:i.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new eo({...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 eo({...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 eo({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof eo){let r={};for(let n in t.shape){let o=t.shape[n];r[n]=ew.create(e(o))}return new eo({...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 eo({...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 eo({...this._def,shape:()=>t})}keyof(){return eg(s.util.objectKeys(this.shape))}}eo.create=(e,t)=>new eo({shape:()=>e,unknownKeys:"strip",catchall:et.create(),typeName:i.ZodObject,...x(t)}),eo.strictCreate=(e,t)=>new eo({shape:()=>e,unknownKeys:"strict",catchall:et.create(),typeName:i.ZodObject,...x(t)}),eo.lazycreate=(e,t)=>new eo({shape:e,unknownKeys:"strip",catchall:et.create(),typeName:i.ZodObject,...x(t)});class ei extends A{_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 o of r){let r={...t,common:{...t.common,issues:[]},parent:null},i=o._parseSync({data:t.data,path:t.path,parent:r});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,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 o=n.map(e=>new a.ZodError(e));return h(t,{code:a.ZodIssueCode.invalid_union,unionErrors:o}),g}}get options(){return this._def.options}}ei.create=(e,t)=>
165new ei({options:e,typeName:i.ZodUnion,...x(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 eb)return s.util.objectValues(e.enum);else if(e instanceof eS)return ea(e._def.innerType);else if(e instanceof X)return[void 0];else if(e instanceof Y)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 eO)return ea(e.unwrap());else if(e instanceof eP)return ea(e.unwrap());else if(e instanceof ek)return ea(e._def.innerType);else return[]};class es extends A{_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],o=this.optionsMap.get(n);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._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 o of t){if(n.has(o))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,r)}}return new es({typeName:i.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...x(r)})}}class ec extends A{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(_(e)||_(n))return g;let o=function e(t,r){let n=(0,s.getParsedType)(t),o=(0,s.getParsedType)(r);if(t===r)return{valid:!0,data:t};if(n===s.ZodParsedType.object&&o===s.ZodParsedType.object){let n=s.util.objectKeys(r),o=s.util.objectKeys(t).filter(e=>-1!==n.indexOf(e)),i={...t,...r};for(let n of o){let o=e(t[n],r[n]);if(!o.valid)return{valid:!1};i[n]=o.data}return{valid:!0,data:i}}if(n===s.ZodParsedType.array&&o===s.ZodParsedType.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let o=0;o<t.length;o++){let i=e(t[o],r[o]);if(!i.valid)return{valid:!1};n.push(i.data)}return{valid:!0,data:n}}if(n===s.ZodParsedType.date&&o===s.ZodParsedType.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,n.value);return o.valid?((v(e)||v(n))&&t.dirty(),{status:t.value,value:o.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:i.ZodIntersection,...x(r)});class eu extends A{_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:i.ZodTuple,rest:null,...x(t)})};class el extends A{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=[],o=this._def.keyType,i=this._def.valueType;for(let e in r.data)n.push({key:o._parse(new S(r,e,r.path,e)),value:i._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)}
165get element(){return this._def.valueType}static create(e,t,r){return new el(t instanceof A?{keyType:e,valueType:t,typeName:i.ZodRecord,...x(r)}:{keyType:F.create(),valueType:e,typeName:i.ZodRecord,...x(t)})}}class ed extends A{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,o=this._def.valueType,i=[...r.data.entries()].map(([e,t],i)=>({key:n._parse(new S(r,e,r.path,[i,"key"])),value:o._parse(new S(r,t,r.path,[i,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of i){let n=await r.key,o=await r.value;if("aborted"===n.status||"aborted"===o.status)return g;("dirty"===n.status||"dirty"===o.status)&&t.dirty(),e.set(n.value,o.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of i){let n=r.key,o=r.value;if("aborted"===n.status||"aborted"===o.status)return g;("dirty"===n.status||"dirty"===o.status)&&t.dirty(),e.set(n.value,o.value)}return{status:t.value,value:e}}}}ed.create=(e,t,r)=>new ed({valueType:t,keyType:e,typeName:i.ZodMap,...x(r)});class ef extends A{_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 o=this._def.valueType;function i(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)=>o._parse(new S(r,e,r.path,t)));return r.common.async?Promise.all(c).then(e=>i(e)):i(c)}min(e,t){return new ef({...this._def,minSize:{value:e,message:o.toString(t)}})}max(e,t){return new ef({...this._def,maxSize:{value:e,message:o.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ef.create=(e,t)=>new ef({valueType:e,minSize:null,maxSize:null,typeName:i.ZodSet,...x(t)});class ep extends A{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 f({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 f({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 o={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof e_){let e=this;return b(async function(...t){let s=new a.ZodError([]),c=await e._def.args.parseAsync(t,o).catch(e=>{throw s.addIssue(r(t,e)),s}),u=await Reflect.apply(i,this,c);return await e._def.returns._def.type.parseAsync(u,o).catch(e=>{throw s.addIssue(n(u,e)),s})})}{let e=this;return b(function(...t){let s=e._def.args.safeParse(t,o);if(!s.success)throw new a.ZodError([r(t,s.error)]);let c=Reflect.apply(i,this,s.data),u=e._def.returns.safeParse(c,o);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 ep({...this._def,args:eu.create(e).rest(ee.create())})}returns(e){return new ep({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new ep({args:e||eu.create([]).rest(ee.create()),returns:t||ee.create(),typeName:i.ZodFunction,...x(r)})}}class eh extends A{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)=>
165new eh({getter:e,typeName:i.ZodLazy,...x(t)});class ey extends A{_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:i.ZodEnum,...x(t)})}ey.create=(e,t)=>new ey({value:e,typeName:i.ZodLiteral,...x(t)});class em extends A{_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 b(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 eb extends A{_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 b(e.data)}get enum(){return this._def.values}}eb.create=(e,t)=>new eb({values:e,typeName:i.ZodNativeEnum,...x(t)});class e_ extends A{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):b((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})))}}e_.create=(e,t)=>new e_({type:e,typeName:i.ZodPromise,...x(t)});class ev extends A{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===i.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:e=>{h(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),"preprocess"===n.type){let e=n.transform(r.data,o);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,o);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,o)).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 i=n.transform(e.value,o);if(i instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}s.util.assertNever(n)}}ev.create=(e,t,r)=>new ev({schema:e,typeName:i.ZodEffects,effect:t,...x(r)}),ev.createWithPreprocess=(e,t,r)=>new ev({schema:t,effect:{type:"preprocess",transform:e},typeName:i.ZodEffects,...x(r)});class ew extends A{_parse(e){return this._getType(e)===s.ZodParsedType.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ew.create=(e,t)=>
165new ew({innerType:e,typeName:i.ZodOptional,...x(t)});class eE extends A{_parse(e){return this._getType(e)===s.ZodParsedType.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eE.create=(e,t)=>new eE({innerType:e,typeName:i.ZodNullable,...x(t)});class eS extends A{_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:i.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...x(t)});class ek extends A{_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:i.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...x(t)});class ex extends A{_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}}}ex.create=e=>new ex({typeName:i.ZodNaN,...x(e)});let eA=Symbol("zod_brand");class eO extends A{_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 eR extends A{_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 eR({in:e,out:t,typeName:i.ZodPipeline})}}class eP extends A{_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 eT(e,t){let r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function ej(e,t={},r){return e?Q.create().superRefine((n,o)=>{let i=e(n);if(i instanceof Promise)return i.then(e=>{if(!e){let e=eT(t,n),i=e.fatal??r??!0;o.addIssue({code:"custom",...e,fatal:i})}});if(!i){let e=eT(t,n),i=e.fatal??r??!0;o.addIssue({code:"custom",...e,fatal:i})}}):Q.create()}eP.create=(e,t)=>new eP({innerType:e,typeName:i.ZodReadonly,...x(t)});let eC={object:eo.lazycreate};(n=i||(i={})).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",
165n.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}`})=>ej(t=>t instanceof e,t),eD=F.create,eM=q.create,eN=ex.create,eU=J.create,eH=z.create,e$=V.create,eL=G.create,eW=X.create,eB=Y.create,eK=Q.create,eZ=ee.create,eF=et.create,eq=er.create,eJ=en.create,ez=eo.create,eV=eo.strictCreate,eG=ei.create,eX=es.create,eY=ec.create,eQ=eu.create,e0=el.create,e1=ed.create,e2=ef.create,e5=ep.create,e4=eh.create,e6=ey.create,e3=em.create,e8=eb.create,e9=e_.create,e7=ev.create,te=ew.create,tt=eE.create,tr=ev.createWithPreprocess,tn=eR.create,to=()=>eD().optional(),ti=()=>eM().optional(),ta=()=>eH().optional(),ts={string:e=>F.create({...e,coerce:!0}),number:e=>q.create({...e,coerce:!0}),boolean:e=>z.create({...e,coerce:!0}),bigint:e=>J.create({...e,coerce:!0}),date:e=>V.create({...e,coerce:!0})};e.s(["BRAND",0,eA,"NEVER",0,g,"Schema",0,A,"ZodAny",0,Q,"ZodArray",0,en,"ZodBigInt",0,J,"ZodBoolean",0,z,"ZodBranded",0,eO,"ZodCatch",0,ek,"ZodDate",0,V,"ZodDefault",0,eS,"ZodDiscriminatedUnion",0,es,"ZodEffects",0,ev,"ZodEnum",0,em,"ZodFirstPartyTypeKind",0,i,"ZodFunction",0,ep,"ZodIntersection",0,ec,"ZodLazy",0,eh,"ZodLiteral",0,ey,"ZodMap",0,ed,"ZodNaN",0,ex,"ZodNativeEnum",0,eb,"ZodNever",0,et,"ZodNull",0,Y,"ZodNullable",0,eE,"ZodNumber",0,q,"ZodObject",0,eo,"ZodOptional",0,ew,"ZodPipeline",0,eR,"ZodPromise",0,e_,"ZodReadonly",0,eP,"ZodRecord",0,el,"ZodSchema",0,A,"ZodSet",0,ef,"ZodString",0,F,"ZodSymbol",0,G,"ZodTransformer",0,ev,"ZodTuple",0,eu,"ZodType",0,A,"ZodUndefined",0,X,"ZodUnion",0,ei,"ZodUnknown",0,ee,"ZodVoid",0,er,"any",0,eK,"array",0,eJ,"bigint",0,eU,"boolean",0,eH,"coerce",0,ts,"custom",0,ej,"date",0,e$,"datetimeRegex",0,Z,"discriminatedUnion",0,eX,"effect",0,e7,"enum",0,e3,"function",0,e5,"instanceof",0,eI,"intersection",0,eY,"late",0,eC,"lazy",0,e4,"literal",0,e6,"map",0,e1,"nan",0,eN,"nativeEnum",0,e8,"never",0,eF,"null",0,eB,"nullable",0,tt,"number",0,eM,"object",0,ez,"oboolean",0,ta,"onumber",0,ti,"optional",0,te,"ostring",0,to,"pipeline",0,tn,"preprocess",0,tr,"promise",0,e9,"record",0,e0,"set",0,e2,"strictObject",0,eV,"string",0,eD,"symbol",0,eL,"transformer",0,e7,"tuple",0,eQ,"undefined",0,eW,"union",0,eG,"unknown",0,eZ,"void",0,eq],965638),e.i(965638),e.s(["BRAND",0,eA,"DIRTY",0,m,"EMPTY_PATH",0,p,"INVALID",0,g,"NEVER",0,g,"OK",0,b,"ParseStatus",0,y,"Schema",0,A,"ZodAny",0,Q,"ZodArray",0,en,"ZodBigInt",0,J,"ZodBoolean",0,z,"ZodBranded",0,eO,"ZodCatch",0,ek,"ZodDate",0,V,"ZodDefault",0,eS,"ZodDiscriminatedUnion",0,es,"ZodEffects",0,ev,"ZodEnum",0,em,"ZodError",()=>a.ZodError,"ZodFirstPartyTypeKind",0,i,"ZodFunction",0,ep,"ZodIntersection",0,ec,"ZodIssueCode",()=>a.ZodIssueCode,"ZodLazy",0,eh,"ZodLiteral",0,ey,"ZodMap",0,ed,"ZodNaN",0,ex,"ZodNativeEnum",0,eb,"ZodNever",0,et,"ZodNull",0,Y,"ZodNullable",0,eE,"ZodNumber",0,q,"ZodObject",0,eo,"ZodOptional",0,ew,"ZodParsedType",()=>s.ZodParsedType,"ZodPipeline",0,eR,"ZodPromise",0,e_,"ZodReadonly",0,eP,"ZodRecord",0,el,"ZodSchema",0,A,"ZodSet",0,ef,"ZodString",0,F,"ZodSymbol",0,G,"ZodTransformer",0,ev,"ZodTuple",0,eu,"ZodType",0,A,"ZodUndefined",0,X,"ZodUnion",0,ei,"ZodUnknown",0,ee,"ZodVoid",0,er,"addIssueToContext",0,h,"any",0,eK,"array",0,eJ,"bigint",0,eU,"boolean",0,eH,"coerce",0,ts,"custom",0,ej,"date",0,e$,"datetimeRegex",0,Z,"defaultErrorMap",0,c,"discriminatedUnion",0,eX,"effect",0,e7,"enum",0,e3,"function",0,e5,"getErrorMap",0,d,"getParsedType",()=>s.getParsedType,"instanceof",0,eI,"intersection",0,eY,"isAborted",0,_,"isAsync",0,E,"isDirty",0,v,"isValid",0,w,"late",0,eC,"lazy",0,e4,"literal",0,e6,"makeIssue",0,f,"map",0,e1,"nan",0,eN,"nativeEnum",0,e8,"never",0,eF,"null",0,eB,"nullable",0,tt,"number",0,eM,"object",0,ez,"objectUtil",()=>s.objectUtil,"oboolean",0,ta,"onumber",0,ti,"optional",0,te,"ostring",0,to,"pipeline",0,tn,"preprocess",0,tr,"promise",0,e9,"quotelessJson",()=>a.quotelessJson,"record",0,e0,"set",0,e2,"setErrorMap",0,l,"strictObject",0,eV,"string",0,eD,"symbol",0,eL,"transformer",0,e7,"tuple",0,eQ,"undefined",0,eW,"union",0,eG,"unknown",0,eZ,"util",()=>s.util,"void",0,eq],788685);var tc=e.i(788685);e.s(["z",0,tc],50270),e.s(["default",0,tc],894706)}]); 166 167//# debugId=4da258f3-7d55-66ed-a23e-40bc6ae43dd5
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.