PageSourceSearch

https://joomaltory.com/_next/static/chunks/311-bd64e772d8c33462.js

js joomaltory.com collected 2026-10-07 11:58:55 UTC 368,880 bytes, 415 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[311],{17802:function(e,t,r){e=r.nmd(e);var n,i,o,a=r(24358);!function(r,a){i=[],void 0!==(o="function"==typeof(n=a)?n.apply(t,i):n)&&(e.exports=o)}(0,function(){"use strict";var t={},n=null;function i(t){if(e&&e.exports)try{return r(38336).randomBytes(t)}catch(e){}try{var i;return(self.crypto||self.msCrypto).getRandomValues(i=new Uint32Array(t)),Array.prototype.slice.call(i)}catch(e){}if(!n)throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");return n(t)}var o=!1;try{i(1),o=!0}catch(e){}function s(e,t){for(var r=0,n=0,i=0,o=e.length;i<o;++i)e.charCodeAt(i)===t.charCodeAt(i)?++r:++n;return!(r<0)&&0===n}n=null,t.setRandomFallback=function(e){n=e},t.genSaltSync=function(e,t){if("number"!=typeof(e=e||g))throw Error("Illegal arguments: "+typeof e+", "+typeof t);e<4?e=4:e>31&&(e=31);var r=[];return r.push("$2a$"),e<10&&r.push("0"),r.push(e.toString()),r.push("$"),r.push(d(i(m),m)),r.join("")},t.genSalt=function(e,r,n){if("function"==typeof r&&(n=r,r=void 0),"function"==typeof e&&(n=e,e=void 0),void 0===e)e=g;else if("number"!=typeof e)throw Error("illegal arguments: "+typeof e);function i(r){c(function(){try{r(null,t.genSaltSync(e))}catch(e){r(e)}})}if(!n)return new Promise(function(e,t){i(function(r,n){if(r){t(r);return}e(n)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);i(n)},t.hashSync=function(e,r){if(void 0===r&&(r=g),"number"==typeof r&&(r=t.genSaltSync(r)),"string"!=typeof e||"string"!=typeof r)throw Error("Illegal arguments: "+typeof e+", "+typeof r);return R(e,r)},t.hash=function(e,r,n,i){function o(n){"string"==typeof e&&"number"==typeof r?t.genSalt(r,function(t,r){R(e,r,n,i)}):"string"==typeof e&&"string"==typeof r?R(e,r,n,i):c(n.bind(this,Error("Illegal arguments: "+typeof e+", "+typeof r)))}if(!n)return new Promise(function(e,t){o(function(r,n){if(r){t(r);return}e(n)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);o(n)},t.compareSync=function(e,r){if("string"!=typeof e||"string"!=typeof r)throw Error("Illegal arguments: "+typeof e+", "+typeof r);return 60===r.length&&s(t.hashSync(e,r.substr(0,r.length-31)),r)},t.compare=function(e,r,n,i){function o(n){if("string"!=typeof e||"string"!=typeof r){c(n.bind(this,Error("Illegal arguments: "+typeof e+", "+typeof r)));return}if(60!==r.length){c(n.bind(this,null,!1));return}t.hash(e,r.substr(0,29),function(e,t){e?n(e):n(null,s(t,r))},i)}if(!n)return new Promise(function(e,t){o(function(r,n){if(r){t(r);return}e(n)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);o(n)},t.getRounds=function(e){if("string"!=typeof e)throw Error("Illegal arguments: "+typeof e);return parseInt(e.split("$")[2],10)},t.getSalt=function(e){if("string"!=typeof e)throw Error("Illegal arguments: "+typeof e);if(60!==e.length)throw Error("Illegal hash length: "+e.length+" != 60");return e.substring(0,29)};var c=void 0!==a&&a&&"function"==typeof a.nextTick?"function"==typeof setImmediate?setImmediate:a.nextTick:setTimeout;function l(e){var t=[],r=0;return y.encodeUTF16toUTF8(function(){return r>=e.length?null:e.charCodeAt(r++)},function(e){t.push(e)}),t}var u="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),f=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1],p=String.fromCharCode;function d(e,t){var r,n,i=0,o=[];if(t<=0||t>e.length)throw Error("Illegal len: "+t);for(;i<t;){if(r=255&e[i++],o.push(u[r>>2&63]),r=(3&r)<<4,i>=t||(r|=(n=255&e[i++])>>4&15,o.push(u[63&r]),r=(15&n)<<2,i>=t)){o.push(u[63&r]);break}r|=(n=255&e[i++])>>6&3,o.push(u[63&r]),o.push(u[63&n])}return o.join("")}function h(e,t){var r,n,i,o,a,s=0,c=e.length,l=0,u=[];if(t<=0)throw Error("Illegal len: "+t);for(;s<c-1&&l<t&&(r=(a=e.charCodeAt(s++))<f.length?f[a]:-1,n=(a=e.charCodeAt(s++))<f.length?f[a]:-1,-1!=r&&-1!=n)&&(o=r<<2>>>0|(48&n)>>4,u.push(p(o)),!(++l>=t||s>=c||-1==(i=(a=e.charCodeAt(s++))<f.length?f[a]:-1)||(o=(15&n)<<4>>>0|(60&i)>>2,u.push(p(o)),++l>=t||s>=c)));)o=(3&i)<<6>>>0|((a=e.charCodeAt(s++))<f.length?f[a]:-1),u.push(p(o)),++l;var d=[];for(s=0;s<l;
1s++)d.push(u[s].charCodeAt(0));return d}var y=function(){var e={};return e.MAX_CODEPOINT=1114111,e.encodeUTF8=function(e,t){var r=null;for("number"==typeof e&&(r=e,e=function(){return null});null!==r||null!==(r=e());)r<128?t(127&r):(r<2048?t(r>>6&31|192):(r<65536?t(r>>12&15|224):(t(r>>18&7|240),t(r>>12&63|128)),t(r>>6&63|128)),t(63&r|128)),r=null},e.decodeUTF8=function(e,t){for(var r,n,i,o,a=function(e){var t=Error((e=e.slice(0,e.indexOf(null))).toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(r=e());)if((128&r)==0)t(r);else if((224&r)==192)null===(n=e())&&a([r,n]),t((31&r)<<6|63&n);else if((240&r)==224)(null===(n=e())||null===(i=e()))&&a([r,n,i]),t((15&r)<<12|(63&n)<<6|63&i);else if((248&r)==240)(null===(n=e())||null===(i=e())||null===(o=e()))&&a([r,n,i,o]),t((7&r)<<18|(63&n)<<12|(63&i)<<6|63&o);else throw RangeError("Illegal starting byte: "+r)},e.UTF16toUTF8=function(e,t){for(var r,n=null;null!==(r=null!==n?n:e());){if(r>=55296&&r<=57343&&null!==(n=e())&&n>=56320&&n<=57343){t((r-55296)*1024+n-56320+65536),n=null;continue}t(r)}null!==n&&t(n)},e.UTF8toUTF16=function(e,t){var r=null;for("number"==typeof e&&(r=e,e=function(){return null});null!==r||null!==(r=e());)r<=65535?t(r):(t(((r-=65536)>>10)+55296),t(r%1024+56320)),r=null},e.encodeUTF16toUTF8=function(t,r){e.UTF16toUTF8(t,function(t){e.encodeUTF8(t,r)})},e.decodeUTF8toUTF16=function(t,r){e.decodeUTF8(t,function(t){e.UTF8toUTF16(t,r)})},e.calculateCodePoint=function(e){return e<128?1:e<2048?2:e<65536?3:4},e.calculateUTF8=function(t){for(var r,n=0;null!==(r=t());)n+=e.calculateCodePoint(r);return n},e.calculateUTF16asUTF8=function(t){var r=0,n=0;return e.UTF16toUTF8(t,function(t){++r,n+=e.calculateCodePoint(t)}),[r,n]},e}();Date.now=Date.now||function(){return+new Date};var m=16,g=10,b=16,w=100,v=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],_=[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850
1592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946,1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055,3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,
11797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504,976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],S=[1332899944,1700884034,1701343084,1684370003,1668446532,1869963892];function E(e,t,r,n){var i,o=e[t],a=e[t+1];return o^=r[0],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[1],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[2],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[3],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[4],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[5],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[6],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[7],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[8],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[9],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[10],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[11],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[12],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[13],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[14],a^=(i=(n[o>>>24]+n[256|o>>16&255]^n[512|o>>8&255])+n[768|255&o])^r[15],o^=(i=(n[a>>>24]+n[256|a>>16&255]^n[512|a>>8&255])+n[768|255&a])^r[16],e[t]=a^r[b+1],e[t+1]=o,e}function A(e,t){for(var r=0,n=0;r<4;++r)n=n<<8|255&e[t],t=(t+1)%e.length;return{key:n,offp:t}}function k(e,t,r){for(var n,i=0,o=[0,0],a=t.length,s=r.length,c=0;c<a;
1c++)i=(n=A(e,i)).offp,t[c]=t[c]^n.key;for(c=0;c<a;c+=2)o=E(o,0,t,r),t[c]=o[0],t[c+1]=o[1];for(c=0;c<s;c+=2)o=E(o,0,t,r),r[c]=o[0],r[c+1]=o[1]}function x(e,t,r,n){for(var i,o=0,a=[0,0],s=r.length,c=n.length,l=0;l<s;l++)o=(i=A(t,o)).offp,r[l]=r[l]^i.key;for(l=0,o=0;l<s;l+=2)o=(i=A(e,o)).offp,a[0]^=i.key,o=(i=A(e,o)).offp,a[1]^=i.key,a=E(a,0,r,n),r[l]=a[0],r[l+1]=a[1];for(l=0;l<c;l+=2)o=(i=A(e,o)).offp,a[0]^=i.key,o=(i=A(e,o)).offp,a[1]^=i.key,a=E(a,0,r,n),n[l]=a[0],n[l+1]=a[1]}function P(e,t,r,n,i){var o,a,s=S.slice(),l=s.length;if(r<4||r>31){if(a=Error("Illegal number of rounds (4-31): "+r),n){c(n.bind(this,a));return}throw a}if(t.length!==m){if(a=Error("Illegal salt length: "+t.length+" != "+m),n){c(n.bind(this,a));return}throw a}r=1<<r>>>0;var u,f,p,d=0;function h(){if(i&&i(d/r),d<r)for(var o=Date.now();d<r&&(d+=1,k(e,u,f),k(t,u,f),!(Date.now()-o>w)););else{for(d=0;d<64;d++)for(p=0;p<l>>1;p++)E(s,p<<1,u,f);var a=[];for(d=0;d<l;d++)a.push((s[d]>>24&255)>>>0),a.push((s[d]>>16&255)>>>0),a.push((s[d]>>8&255)>>>0),a.push((255&s[d])>>>0);return n?void n(null,a):a}n&&c(h)}if(Int32Array?(u=new Int32Array(v),f=new Int32Array(_)):(u=v.slice(),f=_.slice()),x(t,e,u,f),void 0!==n)h();else for(;;)if(void 0!==(o=h()))return o||[]}function R(e,t,r,n){if("string"!=typeof e||"string"!=typeof t){if(i=Error("Invalid string / salt: Not a string"),r){c(r.bind(this,i));return}throw i}if("$"!==t.charAt(0)||"2"!==t.charAt(1)){if(i=Error("Invalid salt version: "+t.substring(0,2)),r){c(r.bind(this,i));return}throw i}if("$"===t.charAt(2))o="\0",a=3;else{if("a"!==(o=t.charAt(2))&&"b"!==o&&"y"!==o||"$"!==t.charAt(3)){if(i=Error("Invalid salt revision: "+t.substring(2,4)),r){c(r.bind(this,i));return}throw i}a=4}if(t.charAt(a+2)>"$"){if(i=Error("Missing salt rounds"),r){c(r.bind(this,i));return}throw i}var i,o,a,s=10*parseInt(t.substring(a,a+1),10)+parseInt(t.substring(a+1,a+2),10),u=t.substring(a+3,a+25),f=l(e+=o>="a"?"\0":""),p=h(u,m);function y(e){var t=[];return t.push("$2"),o>="a"&&t.push(o),t.push("$"),s<10&&t.push("0"),t.push(s.toString()),t.push("$"),t.push(d(p,p.length)),t.push(d(e,4*S.length-1)),t.join("")}if(void 0===r)return y(P(f,p,s));P(f,p,s,function(e,t){e?r(e,null):r(null,y(t))},n)}return t.encodeBase64=d,t.decodeBase64=h,t})},99362:function(e,t,r){"use strict";var n=r(8916).Buffer,i=r(8916).SlowBuffer;function o(e,t){if(!n.isBuffer(e)||!n.isBuffer(t)||e.length!==t.length)return!1;for(var r=0,i=0;i<e.length;i++)r|=e[i]^t[i];return 0===r}e.exports=o,o.install=function(){n.prototype.equal=i.prototype.equal=function(e){return o(this,e)}};var a=n.prototype.equal,s=i.prototype.equal;o.restore=function(){n.prototype.equal=a,i.prototype.equal=s}},23730:function(e,t,r){"use strict";var n=r(66766).Buffer,i=r(1118),o=128,a=48,s=2;function c(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function l(e){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function u(e,t){e=l(e);var r=i(t),u=r+1,f=e.length,p=0;if(e[p++]!==a)throw Error('Could not find expected "seq"');var d=e[p++];if(d===(1|o)&&(d=e[p++]),f-p<d)throw Error('"seq" specified length of "'+d+'", only "'+(f-p)+'" remaining');if(e[p++]!==s)throw Error('Could not find expected "int" for "r"');var h=e[p++];if(f-p-2<h)throw Error('"r" specified length of "'+h+'", only "'+(f-p-2)+'" available');if(u<h)throw Error('"r" specified length of "'+h+'", max of "'+u+'" is acceptable');var y=p;if(p+=h,e[p++]!==s)throw Error('Could not find expected "int" for "s"');var m=e[p++];if(f-p!==m)throw Error('"s" specified length of "'+m+'", expected "'+(f-p)+'"');if(u<m)throw Error('"s" specified length of "'+m+'", max of "'+u+'" is acceptable');var g=p;if((p+=m)!==f)throw Error('Expected to consume entire buffer, but "'+(f-p)+'" bytes remain');var b=r-h,w=r-m,v=n.allocUnsafe(b+h+w+m);for(p=0;p<b;++p)v[p]=0;e.copy(v,p,y+Math.max(-b,0),y+h),p=r;for(var _=p;p<_+w;++p)v[p]=0;return e.copy(v,p,g+Math.max(-w,0),g+m),v=c(v=v.toString("base64"))}function f(e,t,r){for(var n=0;t+n<r&&0===e[t+n];)++n;return e[t+n]>=o&&--n,n}function p(e,t){e=l(e);var r=i(t),c=e.length;if(c!==2*r)throw TypeError('"'+t+'" signatures must be "'+2*r+'" bytes, saw "'+c+'"');var u=f(e,0,r),p=f(e,r,e.length),d=r-u,h=r-p,y=2+d+1+1+h,m=y<o,g=n.allocUnsafe((m?2:3)+y),b=0;return g[b++]=a,m?g[b++]=y:(g[b++]=1|o,g[b++]=255&y),g[b++]=s,g[b++]=d,u<0?(g[b++]=0,b+=e.copy(g,b,0,r)):b+=e.copy(g,b,u,r),g[b++]=s,g[b++]=h,p<0?(g[b++]=0,e.copy(g,b,r)):e.copy(g,b,r+p),g}
1e.exports={derToJose:u,joseToDer:p}},1118:function(e){"use strict";function t(e){return(e/8|0)+(e%8==0?0:1)}var r={ES256:t(256),ES384:t(384),ES512:t(521)};function n(e){var t=r[e];if(t)return t;throw Error('Unknown algorithm "'+e+'"')}e.exports=n},66016:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};function i(e){}t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=b,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){if(c(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var i,o,a,s=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length}return e}function f(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?g(i):y(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function g(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function b(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&w(e,i,{once:!0})})}function w(e,t,r){"function"==typeof e.on&&v(e,"error",t,r)}function v(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else for(var l=c.length,u=y(c,l),r=0;r<l;++r)n(u[r],this,t);return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,i,o,a;if(c(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit
1("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():m(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},33848:function(e,t,r){var n=r(12138);e.exports=function(e,t){t=t||{};var r=n.decode(e,t);if(!r)return null;var i=r.payload;if("string"==typeof i)try{var o=JSON.parse(i);null!==o&&"object"==typeof o&&(i=o)}catch(e){}return!0===t.complete?{header:r.header,payload:i,signature:r.signature}:i}},65480:function(e,t,r){e.exports={decode:r(33848),verify:r(91020),sign:r(44776),JsonWebTokenError:r(58632),NotBeforeError:r(79986),TokenExpiredError:r(42462)}},58632:function(e){var t=function(e,t){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,t&&(this.inner=t)};t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,e.exports=t},79986:function(e,t,r){var n=r(58632),i=function(e,t){n.call(this,e),this.name="NotBeforeError",this.date=t};i.prototype=Object.create(n.prototype),i.prototype.constructor=i,e.exports=i},42462:function(e,t,r){var n=r(58632),i=function(e,t){n.call(this,e),this.name="TokenExpiredError",this.expiredAt=t};i.prototype=Object.create(n.prototype),i.prototype.constructor=i,e.exports=i},33768:function(e,t,r){var n=r(24358);let i=r(25839);e.exports=i.satisfies(n.version,">=15.7.0")},25503:function(e,t,r){var n=r(24358),i=r(25839);e.exports=i.satisfies(n.version,"^6.12.0 || >=8.0.0")},8337:function(e,t,r){var n=r(24358);let i=r(25839);e.exports=i.satisfies(n.version,">=16.9.0")},63470:function(e,t,r){var n=r(40865);e.exports=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var i=n(e);if(void 0===i)return;return Math.floor(r+i/1e3)}if("number"==typeof e)return r+e}},2492:function(e,t,r){let n=r(33768),i=r(8337),o={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},a={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};e.exports=function(e,t){if(!e||!t)return;let r=t.asymmetricKeyType;if(!r)return;let s=o[r];if(!s)throw Error(`Unknown key type "${r}".`);if(!s.includes(e))throw Error(`"alg" parameter for "${r}" key type must be one of: ${s.join(", ")}.`);if(n)switch(r){case"ec":let c=t.asymmetricKeyDetails.namedCurve,l=a[e];if(c!==l)throw Error(`"alg" parameter "${e}" requires curve "${l}".`);break;case"rsa-pss":if(i){let r=parseInt(e.slice(-3),10),{hashAlgorithm:n,mgf1HashAlgorithm:i,saltLength:o}=t.asymmetricKeyDetails;if(n!==`sha${r}`||i!==n)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(void 0!==o&&o>r>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}}}},44776:function(e,t,r){var n=r(8916).Buffer;let i=r(63470),o=r(25503),a=r(2492),s=r(12138),c=r(60216),l=r(22063),u=r(35224),f=r(46154),p=r(42080),d=r(50532),h=r(89474),{KeyObject:y,createSecretKey:m,createPrivateKey:g}=r(38336),b=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];o&&b.splice(3,0,"PS256","PS384","PS512");
1let w={expiresIn:{isValid:function(e){return u(e)||d(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return u(e)||d(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return d(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:c.bind(null,b),message:'"algorithm" must be a valid string enum value'},header:{isValid:p,message:'"header" must be an object'},encoding:{isValid:d,message:'"encoding" must be a string'},issuer:{isValid:d,message:'"issuer" must be a string'},subject:{isValid:d,message:'"subject" must be a string'},jwtid:{isValid:d,message:'"jwtid" must be a string'},noTimestamp:{isValid:l,message:'"noTimestamp" must be a boolean'},keyid:{isValid:d,message:'"keyid" must be a string'},mutatePayload:{isValid:l,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:l,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:l,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},v={iat:{isValid:f,message:'"iat" should be a number of seconds'},exp:{isValid:f,message:'"exp" should be a number of seconds'},nbf:{isValid:f,message:'"nbf" should be a number of seconds'}};function _(e,t,r,n){if(!p(r))throw Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach(function(i){let o=e[i];if(!o){if(!t)throw Error('"'+i+'" is not allowed in "'+n+'"');return}if(!o.isValid(r[i]))throw Error(o.message)})}function S(e){return _(w,!1,e,"options")}function E(e){return _(v,!0,e,"payload")}let A={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},k=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,t,r,o){"function"==typeof r?(o=r,r={}):r=r||{};let c="object"==typeof e&&!n.isBuffer(e),l=Object.assign({alg:r.algorithm||"HS256",typ:c?"JWT":void 0,kid:r.keyid},r.header);function u(e){if(o)return o(e);throw e}if(!t&&"none"!==r.algorithm)return u(Error("secretOrPrivateKey must have a value"));if(null!=t&&!(t instanceof y))try{t=g(t)}catch(e){try{t=m("string"==typeof t?n.from(t):t)}catch(e){return u(Error("secretOrPrivateKey is not valid key material"))}}if(l.alg.startsWith("HS")&&"secret"!==t.type)return u(Error(`secretOrPrivateKey must be a symmetric key when using ${l.alg}`));if(/^(?:RS|PS|ES)/.test(l.alg)){if("private"!==t.type)return u(Error(`secretOrPrivateKey must be an asymmetric key when using ${l.alg}`));if(!r.allowInsecureKeySizes&&!l.alg.startsWith("ES")&&void 0!==t.asymmetricKeyDetails&&t.asymmetricKeyDetails.modulusLength<2048)return u(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${l.alg}`))}if(void 0===e)return u(Error("payload is required"));if(c){try{E(e)}catch(e){return u(e)}r.mutatePayload||(e=Object.assign({},e))}else{let t=k.filter(function(e){return void 0!==r[e]});if(t.length>0)return u(Error("invalid "+t.join(",")+" option for "+typeof e+" payload"))}
1if(void 0!==e.exp&&void 0!==r.expiresIn)return u(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==r.notBefore)return u(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{S(r)}catch(e){return u(e)}if(!r.allowInvalidAsymmetricKeyTypes)try{a(l.alg,t)}catch(e){return u(e)}let f=e.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete e.iat:c&&(e.iat=f),void 0!==r.notBefore){try{e.nbf=i(r.notBefore,f)}catch(e){return u(e)}if(void 0===e.nbf)return u(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof e){try{e.exp=i(r.expiresIn,f)}catch(e){return u(e)}if(void 0===e.exp)return u(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(A).forEach(function(t){let n=A[t];if(void 0!==r[t]){if(void 0!==e[n])return u(Error('Bad "options.'+t+'" option. The payload already has an "'+n+'" property.'));e[n]=r[t]}});let p=r.encoding||"utf8";if("function"==typeof o)o=o&&h(o),s.createSign({header:l,privateKey:t,payload:e,encoding:p}).once("error",o).once("done",function(e){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(l.alg)&&e.length<256)return o(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${l.alg}`));o(null,e)});else{let n=s.sign({header:l,payload:e,secret:t,encoding:p});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(l.alg)&&n.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${l.alg}`);return n}}},91020:function(e,t,r){var n=r(8916).Buffer;let i=r(58632),o=r(79986),a=r(42462),s=r(33848),c=r(63470),l=r(2492),u=r(25503),f=r(12138),{KeyObject:p,createSecretKey:d,createPublicKey:h}=r(38336),y=["RS256","RS384","RS512"],m=["ES256","ES384","ES512"],g=["RS256","RS384","RS512"],b=["HS256","HS384","HS512"];u&&(y.splice(y.length,0,"PS256","PS384","PS512"),g.splice(g.length,0,"PS256","PS384","PS512")),e.exports=function(e,t,r,u){let w,v,_;if("function"!=typeof r||u||(u=r,r={}),r||(r={}),r=Object.assign({},r),w=u||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return w(new i("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return w(new i("nonce must be a non-empty string"));if(void 0!==r.allowInvalidAsymmetricKeyTypes&&"boolean"!=typeof r.allowInvalidAsymmetricKeyTypes)return w(new i("allowInvalidAsymmetricKeyTypes must be a boolean"));let S=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return w(new i("jwt must be provided"));if("string"!=typeof e)return w(new i("jwt must be a string"));let E=e.split(".");if(3!==E.length)return w(new i("jwt malformed"));try{v=s(e,{complete:!0})}catch(e){return w(e)}if(!v)return w(new i("invalid token"));let A=v.header;if("function"==typeof t){if(!u)return w(new i("verify must be called asynchronous if secret or public key is provided as a callback"));_=t}else _=function(e,r){return r(null,t)};return _(A,function(t,s){let u;if(t)return w(new i("error in secret or public key callback: "+t.message));let _=""!==E[2].trim();if(!_&&s)return w(new i("jwt signature is required"));if(_&&!s)return w(new i("secret or public key must be provided"));if(!_&&!r.algorithms)return w(new i('please specify "none" in "algorithms" to verify unsigned tokens'));if(null!=s&&!(s instanceof p))try{s=h(s)}catch(e){try{s=d("string"==typeof s?n.from(s):s)}catch(e){return w(new i("secretOrPublicKey is not valid key material"))}}if(r.algorithms||("secret"===s.type?r.algorithms=b:["rsa","rsa-pss"].includes(s.asymmetricKeyType)?r.algorithms=g:"ec"===s.asymmetricKeyType?r.algorithms=m:r.algorithms=y),-1===r.algorithms.indexOf(v.header.alg))return w(new i("invalid algorithm"));if(A.alg.startsWith("HS")&&"secret"!==s.type)return w(new i(`secretOrPublicKey must be a symmetric key when using ${A.alg}`));if(/^(?:RS|PS|ES)/.test(A.alg)&&"public"!==s.type)return w(new i(`secretOrPublicKey must be an asymmetric key when using ${A.alg}`));
1if(!r.allowInvalidAsymmetricKeyTypes)try{l(A.alg,s)}catch(e){return w(e)}try{u=f.verify(e,v.header.alg,s)}catch(e){return w(e)}if(!u)return w(new i("invalid signature"));let k=v.payload;if(void 0!==k.nbf&&!r.ignoreNotBefore){if("number"!=typeof k.nbf)return w(new i("invalid nbf value"));if(k.nbf>S+(r.clockTolerance||0))return w(new o("jwt not active",new Date(1e3*k.nbf)))}if(void 0!==k.exp&&!r.ignoreExpiration){if("number"!=typeof k.exp)return w(new i("invalid exp value"));if(S>=k.exp+(r.clockTolerance||0))return w(new a("jwt expired",new Date(1e3*k.exp)))}if(r.audience){let e=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(k.aud)?k.aud:[k.aud]).some(function(t){return e.some(function(e){return e instanceof RegExp?e.test(t):e===t})}))return w(new i("jwt audience invalid. expected: "+e.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&k.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(k.iss)))return w(new i("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&k.sub!==r.subject)return w(new i("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&k.jti!==r.jwtid)return w(new i("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&k.nonce!==r.nonce)return w(new i("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof k.iat)return w(new i("iat required when maxAge is specified"));let e=c(r.maxAge,k.iat);if(void 0===e)return w(new i('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(S>=e+(r.clockTolerance||0))return w(new a("maxAge exceeded",new Date(1e3*e)))}return!0===r.complete?w(null,{header:A,payload:k,signature:v.signature}):w(null,k)})}},20265:function(e,t,r){var n,i=r(66766).Buffer,o=r(38336),a=r(23730),s=r(79270),c='"%s" is not a valid algorithm.\n  Supported algorithms are:\n  "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',l="secret must be a string or buffer",u="key must be a string or a buffer",f="key must be a string, a buffer or an object",p="function"==typeof o.createPublicKey;function d(e){if(!i.isBuffer(e)&&"string"!=typeof e&&(!p||"object"!=typeof e||"string"!=typeof e.type||"string"!=typeof e.asymmetricKeyType||"function"!=typeof e.export))throw b(u)}function h(e){if(!i.isBuffer(e)&&"string"!=typeof e&&"object"!=typeof e)throw b(f)}function y(e){if(!i.isBuffer(e)){if("string"==typeof e)return e;if(!p||"object"!=typeof e||"secret"!==e.type||"function"!=typeof e.export)throw b(l)}}function m(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function g(e){var t=4-(e=e.toString()).length%4;if(4!==t)for(var r=0;r<t;++r)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function b(e){var t=[].slice.call(arguments,1);return TypeError(s.format.bind(s,e).apply(null,t))}function w(e){return i.isBuffer(e)||"string"==typeof e}function v(e){return w(e)||(e=JSON.stringify(e)),e}function _(e){return function(t,r){y(r),t=v(t);var n=o.createHmac("sha"+e,r);return m((n.update(t),n.digest("base64")))}}p&&(u+=" or a KeyObject",l+="or a KeyObject");var S="timingSafeEqual"in o?function(e,t){return e.byteLength===t.byteLength&&o.timingSafeEqual(e,t)}:function(e,t){return n||(n=r(99362)),n(e,t)};function E(e){return function(t,r,n){var o=_(e)(t,n);return S(i.from(r),i.from(o))}}function A(e){return function(t,r){h(r),t=v(t);var n=o.createSign("RSA-SHA"+e);return m((n.update(t),n.sign(r,"base64")))}}function k(e){return function(t,r,n){d(n),t=v(t),r=g(r);var i=o.createVerify("RSA-SHA"+e);return i.update(t),i.verify(n,r,"base64")}}function x(e){return function(t,r){h(r),t=v(t);var n=o.createSign("RSA-SHA"+e);return m((n.update(t),n.sign({key:r,padding:o.constants.RSA_PKCS1_PSS_PADDING,saltLength:o.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function P(e){return function(t,r,n){d(n),t=v(t),r=g(r);var i=o.createVerify("RSA-SHA"+e);return i.update(t),i.verify({key:n,padding:o.constants.RSA_PKCS1_PSS_PADDING,saltLength:o.constants.RSA_PSS_SALTLEN_DIGEST},r,"base64")}}function R(e){var t=A(e);return function(){var r=t.apply(null,arguments);return a.derToJose(r,"ES"+e)}}function O(e){var t=k(e);return function(r,n,i){return t(r,n=a.joseToDer(n,"ES"+e).toString("base64"),i)}}function T(){return function(){return""}}function I(){return function(e,t){return""===t}}e.exports=function(e){var t={hs:_,rs:A,ps:x,es:R,none:T},r={hs:E,rs:k,ps:P,es:O,none:I},n=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);if(!n)throw b(c,e);var i=(n[1]||n[3]).toLowerCase(),o=n[2];return{sign:t[i](o),verify:r[i](o)}}},12138:function(e,t,r){var n=r(58562),i=r(7406),o=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];t.ALGORITHMS=o,t.sign=n.sign,t.verify=i.verify,t.decode=i.decode,t.isValid=i.isValid,t.createSign=function(e){return new n(e)},t.createVerify=function(e){return new i(e)}},20684:function(e,t,r){var n=r(24358),i=r(66766).Buffer,o=r(69594);function a(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=i.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=i.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,n.nextTick((function(){this.emit
1("end",e),this.readable=!1,this.emit("close")}).bind(this)),this;throw TypeError("Unexpected data type ("+typeof e+")")}r(79270).inherits(a,o),a.prototype.write=function(e){this.buffer=i.concat([this.buffer,i.from(e)]),this.emit("data",e)},a.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},e.exports=a},58562:function(e,t,r){var n=r(66766).Buffer,i=r(20684),o=r(20265),a=r(69594),s=r(77199),c=r(79270);function l(e,t){return n.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function u(e,t,r){r=r||"utf8";var n=l(s(e),"binary"),i=l(s(t),r);return c.format("%s.%s",n,i)}function f(e){var t=e.header,r=e.payload,n=e.secret||e.privateKey,i=e.encoding,a=o(t.alg),s=u(t,r,i),l=a.sign(s,n);return c.format("%s.%s",s,l)}function p(e){var t=new i(e.secret||e.privateKey||e.key);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=t,this.payload=new i(e.payload),this.secret.once("close",(function(){!this.payload.writable&&this.readable&&this.sign()}).bind(this)),this.payload.once("close",(function(){!this.secret.writable&&this.readable&&this.sign()}).bind(this))}c.inherits(p,a),p.prototype.sign=function(){try{var e=f({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},p.sign=f,e.exports=p},77199:function(e,t,r){var n=r(8916).Buffer;e.exports=function(e){return"string"==typeof e?e:"number"==typeof e||n.isBuffer(e)?e.toString():JSON.stringify(e)}},7406:function(e,t,r){var n=r(66766).Buffer,i=r(20684),o=r(20265),a=r(69594),s=r(77199),c=r(79270),l=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function u(e){return"[object Object]"===Object.prototype.toString.call(e)}function f(e){if(u(e))return e;try{return JSON.parse(e)}catch(e){return}}function p(e){var t=e.split(".",1)[0];return f(n.from(t,"base64").toString("binary"))}function d(e){return e.split(".",2).join(".")}function h(e){return e.split(".")[2]}function y(e,t){t=t||"utf8";var r=e.split(".")[1];return n.from(r,"base64").toString(t)}function m(e){return l.test(e)&&!!p(e)}function g(e,t,r){if(!t){var n=Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}var i=h(e=s(e)),a=d(e);return o(t).verify(a,i,r)}function b(e,t){if(t=t||{},!m(e=s(e)))return null;var r=p(e);if(!r)return null;var n=y(e);return("JWT"===r.typ||t.json)&&(n=JSON.parse(n,t.encoding)),{header:r,payload:n,signature:h(e)}}function w(e){var t=new i((e=e||{}).secret||e.publicKey||e.key);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=t,this.signature=new i(e.signature),this.secret.once("close",(function(){!this.signature.writable&&this.readable&&this.verify()}).bind(this)),this.signature.once("close",(function(){!this.secret.writable&&this.readable&&this.verify()}).bind(this))}c.inherits(w,a),w.prototype.verify=function(){try{var e=g(this.signature.buffer,this.algorithm,this.key.buffer),t=b(this.signature.buffer,this.encoding);return this.emit("done",e,t),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},w.decode=b,w.isValid=m,w.verify=g,e.exports=w},60216:function(e){var t=1/0,r=9007199254740991,n=17976931348623157e292,i=0/0,o="[object Arguments]",a="[object Function]",s="[object GeneratorFunction]",c="[object String]",l="[object Symbol]",u=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=/^(?:0|[1-9]\d*)$/,y=parseInt;function m(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function g(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return -1}function b(e,t,r){if(t!=t)return g(e,w,r);for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1}function w(e){return e!=e}function v(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function _(e,t){return m(t,function(t){return e[t]})}function S(e,t){return function(r){return e(t(r))}}var E=Object.prototype,A=E.hasOwnProperty,k=E.toString,x=E.propertyIsEnumerable,P=S(Object.keys,Object),R=Math.max;function O(e,t){var r=$(e)||U(e)?v(e.length,String):[],n=r.length,i=!!n;for(var o in e)(t||A.call(e,o))&&!(i&&("length"==o||I(o,n)))&&r.push(o);return r}function T(e){if(!C(e))return P(e);var t=[];for(var r in Object(e))A.call(e,r)&&"constructor"!=r&&t.push(r);return t}function I(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e<t}function C(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||E)}function j(e,t,r,n){e=L(e)?e:G(e),r=r&&!n?z(r):0;var i=e.length;return r<0&&(r=R(i+r,0)),B(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&b(e,t,r)>-1}function U(e){return N(e)&&A.call(e,"callee")&&(!x.call(e,"callee")||k.call(e)==o)}var $=Array.isArray;function L(e){return null!=e&&M(e.length)&&!D(e)}function N(e){return W(e)&&L(e)}function D(e){var t=H(e)?k.call(e):"";return t==a||t==s}function M(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function W(e){return!!e&&"object"==typeof e}function B(e){return"string"==typeof e||!$(e)&&W(e)&&k.call(e)==c}function F(e){return"symbol"==typeof e||W(e)&&k.call(e)==l}function K(e){return e?(e=J(e))===t||e===-t?(e<0?-1:1)*n:e==e?e:0:0===e?e:0}function z(e){var t=K(e),r=t%1;return t==t?r?t-r:t:0}function J(e){if("number"==typeof e)return e;if(F(e))return i;if(H(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=H(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(u,"");var r=p.test(e);return r||d.test(e)?y(e.slice(2),r?2:8):f.test(e)?i:+e}function q(e){return L(e)?O(e):T(e)}function G(e){return e?_(e,q(e)):[]}e.exports=j},22063:function(e){var t="[object Boolean]",r=Object.prototype.toString;function n(e){return!0===e||!1===e||i(e)&&r.call(e)==t}function i(e){return!!e&&"object"==typeof e}e.exports=n},35224:function(e){var t=1/0,r=17976931348623157e292,n=0/0,i="[object Symbol]",o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,u=Object.prototype.toString;function f(e){return"number"==typeof e&&e==m(e)}function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function d(e){return!!e&&"object"==typeof e}function h(e){return"symbol"==typeof e||d(e)&&u.call(e)==i}function y(e){return e?(e=g(e))===t||e===-t?(e<0?-1:1)*r:e==e?e:0:0===e?e:0}function m(e){var t=y(e),r=t%1;return t==t?r?t-r:t:0}function g(e){if("number"==typeof e)return e;if(h(e))return n;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=s.test(e);return r||c.test(e)?l(e.slice(2),r?2:8):a.test(e)?n:+e}e.exports=f},46154:function(e){var t="[object Number]",r=Object.prototype.toString;function n(e){return!!e&&"object"==typeof e}function i(e){return"number"==typeof e||n(e)&&r.call(e)==t}e.exports=i},42080:function(e){var t="[object Object]";function r(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function n(e,t){return function(r){return e(t(r))}}var i=Object.prototype,o=Function.prototype.toString,a=i.hasOwnProperty,s=o.call(Object),c=i.toString,l=n(Object.getPrototypeOf,Object);function u(e){return!!e&&"object"==typeof e}function f(e){if(!u(e)||c.call(e)!=t||r(e))return!1;var n=l(e);if(null===n)return!0;var i=a.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&o.call(i)==s}e.exports=f},50532:function(e){var t="[object String]",r=Object.prototype.toString,n=Array.isArray;function i(e){return!!e&&"object"==typeof e}function o(e){return"string"==typeof e||!n(e)&&i(e)&&r.call(e)==t}e.exports=o},89474:function(e){var t="Expected a function",r=1/0,n=17976931348623157e292,i=0/0,o="[object Symbol]",a=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt,f=Object.prototype.toString;function p(e,r){var n;if("function"!=typeof r)throw TypeError(t);return e=b(e),function(){return--e>0&&(n=r.apply(this,arguments)),e<=1&&(r=void 0),n}}function d(e){return p(2,e)}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){return!!e&&"object"==typeof e}function m(e){return"symbol"==typeof e||y(e)&&f.call(e)==o}function g(e){return e?(e=w(e))===r||e===-r?(e<0?-1:1)*n:e==e?e:0:0===e?e:0}function b(e){var t=g(e),r=t%1;return t==t?r?t-r:t:0}function w(e){if("number"==typeof e)return e;if(m(e))return i;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var r=c.test(e);return r||l.test(e)?u(e.slice(2),r?2:8):s.test(e)?i:+e}e.exports=d},40865:function(e){var t=1e3,r=6e4,n=36e5,i=864e5,o=6048e5,a=315576e5;function s(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}function c(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=n?Math.round(e/n)+"h":o>=r?Math.round(e/r)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}function l(e){var o=Math.abs(e);return o>=i?u(e,o,i,"day"):o>=n?u(e,o,n,"hour"):o>=r?u(e,o,r,"minute"):o>=t?u(e,o,t,"second"):e+" ms"}function u(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return s(e);if("number"===r&&isFinite(e))return t.long?l(e):c(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7758:function(e,t,r){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraftMode",{enumerable:!0,get:function(){return o}});let n=r(88404),i=r(19622);class o{get isEnabled(){return this._provider.isEnabled}enable(){let e=n.staticGenerationAsyncStorage.getStore();return e&&(0,i.trackDynamicDataAccessed)(e,"draftMode().enable()"),this._provider.enable()}disable(){let e=n.staticGenerationAsyncStorage.getStore();return e&&(0,i.trackDynamicDataAccessed)(e,"draftMode().disable()"),this._provider.disable()}constructor(e){this._provider=e}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},48884:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cookies:function(){return p},draftMode:function(){return d},headers:function(){return f}});let n=r(67643),i=r(51305),o=r(35149),a=r(54680),s=r(7758),c=r(19622),l=r(88404),u=r(66726);function f(){let e="headers",t=l.staticGenerationAsyncStorage.getStore();if(t){if(t.forceStatic)return i.HeadersAdapter.seal(new Headers({}));(0,c.trackDynamicDataAccessed)(t,e)}return(0,u.getExpectedRequestStore)(e).headers}function p(){let e="cookies",t=l.staticGenerationAsyncStorage.getStore();if(t){if(t.forceStatic)return n.RequestCookiesAdapter.seal(new o.RequestCookies(new Headers({})));(0,c.trackDynamicDataAccessed)(t,e)}let r=(0,u.getExpectedRequestStore)(e),i=a.actionAsyncStorage.getStore();return(null==i?void 0:i.isAction)||(null==i?void 0:i.isAppRoute)?r.mutableCookies:r.cookies}function d(){let e="draftMode",t=(0,u.getExpectedRequestStore)(e);return new s.DraftMode(t.draftMode)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},39092:function(e){"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=(e,o,a,s)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let c of n(o))i.call(e,c)||c===a||t(e,c,{get:()=>o[c],enumerable:!(s=r(o,c))||s.enumerable});return e},a=e=>o(t({},"__esModule",{value:!0}),e),s={};function c(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 l(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,i]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=i?i:"true"))}catch{}}return t}function u(e){if(!e)return;let[[t,r],...n]=l(e),{domain:i,expires:o,httponly:a,maxage:s,path:c,samesite:u,secure:p,partitioned:h,priority:m}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase(),t]));return f({name:t,value:decodeURIComponent(r),domain:i,...o&&{expires:new Date(o)},...a&&{httpOnly:!0},..."string"==typeof s&&{maxAge:Number(s)},path:c,...u&&{sameSite:d(u)},...p&&{secure:!0},...m&&{priority:y(m)},...h&&{partitioned:!0}})}function f(e){let t={};for(let r in e)e[r]&&(t[r]=e[r]);return t}((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(s,{RequestCookies:()=>g,ResponseCookies:()=>b,parseCookie:()=>l,parseSetCookie:()=>u,stringifyCookie:()=>c}),e.exports=a(s);var p=["strict","lax","none"];function d(e){return e=e.toLowerCase(),p.includes(e)?e:void 0}var h=["low","medium","high"];function y(e){return e=e.toLowerCase(),h.includes(e)?e:void 0}function m(e){if(!e)return[];var t,r,n,i,o,a=[],s=0;function c(){for(;s<e.length&&/\s/.test(e.charAt(s));)s+=1;return s<e.length}function l(){return"="!==(r=e.charAt(s))&&";"!==r&&","!==r}for(;s<e.length;){for(t=s,o=!1;c();)if(","===(r=e.charAt(s))){for(n=s,s+=1,c(),i=s;s<e.length&&l();)s+=1;s<e.length&&"="===e.charAt(s)?(o=!0,s=i,a.push(e.substring(t,n)),t=s):s=n+1}else s+=1;(!o||s>=e.length)&&a.push(e.substring(t,e.length))}return a}var g=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.get("cookie");if(t)for(let[e,r]of l(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)}
1has(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])=>c(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])=>c(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("; ")}},b=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;let i=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(let e of Array.isArray(i)?i:m(i)){let t=u(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,i=this._parsed;return i.set(t,v({name:t,value:r,...n})),w(i,this._headers),this}delete(...e){let[t,r,n]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0].path,e[0].domain];return this.set({name:t,path:r,domain:n,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(c).join("; ")}};function w(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=c(r);t.append("set-cookie",e)}}function v(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}},69594:function(e,t,r){var n="/",i=r(24358);!function(){var t={782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},646:function(e){"use strict";let t={};function r(e,r,n){function i(e,t,n){return"string"==typeof r?r:r(e,t,n)}n||(n=Error);class o extends n{constructor(e,t,r){super(i(e,t,r))}}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]}`}}function i(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function o(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function a(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}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){let s,c;if("string"==typeof t&&i(t,"not ")?(s="must not be",t=t.replace(/^not /,"")):s="must be",o(e," argument"))c=`The ${e} ${s} ${n(t,"type")}`;else{let r=a(e,".")?"property":"argument";c=`The "${e}" ${r} ${s} ${n(t,"type")}`}return c+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},403:function(e,t,r){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var o=r(709),a=r(337);r(782)(u,o);for(var s=n(a.prototype),c=0;c<s.length;c++){var l=s[c];u.prototype[l]||(u.prototype[l]=a.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||i.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},889:function(e,t,r){"use strict";e.exports=i;var n=r(170);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(782)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},709:function(e,t,n){"use strict";e.exports=O,O.ReadableState=R,n(361).EventEmitter;var o,a,s,c,l,u=function(e,t){return e.listeners(t).length},f=n(678),p=n(300).Buffer,d=r.g.Uint8Array||function(){};function h(e){return p.from(e)}function y(e){return p.isBuffer(e)||e instanceof d}var m=n(837);a=m&&m.debuglog?m.debuglog("stream"):function(){};var g=n(379),b=n(25),w=n(776).getHighWaterMark,v=n(646).q,_=v.ERR_INVALID_ARG_TYPE,S=v.ERR_STREAM_PUSH_AFTER_EOF,E=v.ERR_METHOD_NOT_IMPLEMENT
vendor: 26,831 bytes, line 1
1ED,A=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(782)(O,f);var k=b.errorOrDestroy,x=["error","close","destroy","pause","resume"];function P(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(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)}function R(e,t,r){o=o||n(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=w(this,e,"readableHighWaterMark",r),this.buffer=new g,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=n(704).s),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function O(e){if(o=o||n(403),!(this instanceof O))return new O(e);var t=this instanceof o;this._readableState=new R(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),f.call(this)}function T(e,t,r,n,i){a("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,L(e,s);else if(i||(o=C(s,t)),o)k(e,o);else if(s.objectMode||t&&t.length>0){if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===p.prototype||(t=h(t)),n)s.endEmitted?k(e,new A):I(e,s,t,!0);else if(s.ended)k(e,new S);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?I(e,s,t,!1):M(e,s)):I(e,s,t,!1)}}else n||(s.reading=!1,M(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function I(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&&N(e)),M(e,t)}function C(e,t){var r;return y(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new _("chunk",["string","Buffer","Uint8Array"],t)),r}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),O.prototype.destroy=b.destroy,O.prototype._undestroy=b.undestroy,O.prototype._destroy=function(e,t){t(e)},O.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=p.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},O.prototype.unshift=function(e){return T(this,e,null,!0,!1)},O.prototype.isPaused=function(){return!1===this._readableState.flowing},O.prototype.setEncoding=function(e){s||(s=n(704).s);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var j=1073741824;function U(e){return e>=j?e=j:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function $(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=U(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function L(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?N(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,D(e)))}}function N(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(D,e))}function D(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,J(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(H,e,t))}function H(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 W(e){return function(){var t=e._readableState;a("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,J(e))}}function B(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 F(e){a("readable nexttick read 0"),e.read(0)}function K(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(z,e,t))}function z(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),J(e),t.flowing&&!t.reading&&e.read(0)}function J(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function q(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 G(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(V,t,e))}function V(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 X(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}O.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?G(this):N(this),null;if(0===(e=$(e,r))&&r.ended)return 0===r.length&&G(this),null;var i=r.needReadable;return a("need readable",i),(0===r.length||r.length-e<r.highWaterMark)&&a("length less than watermark",i=!0),r.ended||r.reading?a("reading or ended",i=!1):i&&(a("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=$(n,r))),null===(t=e>0?q(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&&G(this)),null!==t&&this.emit("data",t),t},O.prototype._read=function(e){k(this,new E("_read()"))},O.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,a("pipe count=%d opts=%j",n.pipesCount,t);var o=t&&!1===t.end||e===i.stdout||e===i.stderr?g:c;function s(e,t){a("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){a("onend"),e.end()}n.endEmitted?i.nextTick(o):r.once("end",o),e.on("unpipe",s);var l=W(r);e.on("drain",l);var f=!1;function p(){a("cleanup"),e.removeListener("close",y),e.removeListener("finish",m),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",c),r.removeListener("end",g),r.removeListener("data",d),f=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}function d(t){a("ondata");var i=e.write(t);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==X(n.pipes,e))&&!f&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){a("onerror",t),g(),e.removeListener("error",h),0===u(e,"error")&&k(e,t)}function y(){e.removeListener("finish",m),g()}function m(){a("onfinish"),e.removeListener("close",y),g()}function g(){a("unpipe"),r.unpipe(e)}return r.on("data",d),P(e,"error",h),e.once("close",y),e.once("finish",m),e.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),e},O.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=X(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},O.prototype.on=function(e,t){var r=f.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?N(this):n.reading||i.nextTick(F,this)),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(e,t){var r=f.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(B,this),r},O.prototype.removeAllListeners=function(e){var t=f.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&i.nextTick(B,this),t},O.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,K(this,e)),e.paused=!1,this},O.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},O.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),(!r.objectMode||null!=i)&&(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<x.length;o++)e.on(x[o],this.emit.bind(this,x[o]));return this._read=function(t){a("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(O.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=n(871)),c(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),O._fromList=q,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(O.from=function(e,t){return void 0===l&&(l=n(727)),l(O,e,t)})},170:function(e,t,r){"use strict";e.exports=u;var n=r(646).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(403);function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);c.call(this,e),this._transformState={afterTransform:l.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",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush(function(t,r){p(e,t,r)})}function p(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(782)(u,c),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,r){r(new i("_transform()"))},u.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.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))},u.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,function(e){t(e)})}},337:function(e,t,n){"use strict";function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){z(t,e)}}e.exports=R,R.WritableState=P;var a,s,c={deprecate:n(769)},l=n(678),u=n(300).Buffer,f=r.g.Uint8Array||function(){};function p(e){return u.from(e)}function d(e){return u.isBuffer(e)||e instanceof f}var h=n(25),y=n(776).getHighWaterMark,m=n(646).q,g=m.ERR_INVALID_ARG_TYPE,b=m.ERR_METHOD_NOT_IMPLEMENTED,w=m.ERR_MULTIPLE_CALLBACK,v=m.ERR_STREAM_CANNOT_PIPE,_=m.ERR_STREAM_DESTROYED,S=m.ERR_STREAM_NULL_VALUES,E=m.ERR_STREAM_WRITE_AFTER_END,A=m.ERR_UNKNOWN_ENCODING,k=h.errorOrDestroy;function x(){}function P(e,t,r){a=a||n(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof a),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=y(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){L(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function R(e){var t=this instanceof(a=a||n(403));if(!t&&!s.call(R,this))return new R(e);this._writableState=new P(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)),l.call(this)}function O(e,t){var r=new E;k(e,r),i.nextTick(t,r)}function T(e,t,r,n){var o;return null===r?o=new S:"string"==typeof r||t.objectMode||(o=new g("chunk",["string","Buffer"],r)),!o||(k(e,o),i.nextTick(n,o),!1)}function I(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r)),t}function C(e,t,r,n,i,o){if(!r){var a=I(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else j(e,t,!1,s,n,i,o);return c}function j(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new _("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function U(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(F,e,t),e._writableState.errorEmitted=!0,k(e,n)):(o(n),e._writableState.errorEmitted=!0,k(e,n),F(e,t))}function $(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function L(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new w;if($(r),t)U(e,r,n,t,o);else{var a=H(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||M(e,r),n?i.nextTick(N,e,r,a,o):N(e,r,a,o)}}function N(e,t,r,n){r||D(e,t),t.pendingcb--,n(),F(e,t)}function D(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function M(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),i=t.corkedRequestsFree;i.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,j(e,t,!0,t.length,n,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,u=r.callback,f=t.objectMode?1:c.length;if(j(e,t,!1,f,c,l,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function H(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function W(e,t){e._final(function(r){t.pendingcb--,r&&k(e,r),t.prefinished=!0,e.emit("prefinish"),F(e,t)})}function B(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(W,e,t)))}function F(e,t){var r=H(t);if(r&&(B(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function K(e,t,r){t.ending=!0,F(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function z(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}n(782)(R,l),P.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(P.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===R&&e&&e._writableState instanceof P}})):s=function(e){return e instanceof this},R.prototype.pipe=function(){k(this,new v)},R.prototype.write=function(e,t,r){var n=this._writableState,i=!1,o=!n.objectMode&&d(e);return o&&!u.isBuffer(e)&&(e=p(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=x),n.ending?O(this,r):(o||T(this,n,e,r))&&(n.pendingcb++,i=C(this,n,o,e,t,r)),i},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){var e=this._writableState;!e.corked||(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||M(this,e))},R.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 A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,r){r(new b("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,r){var n=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),n.corked&&(n.corked=1,this.uncork()),n.ending||K(this,n,r),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=h.destroy,R.prototype._undestroy=h.undestroy,R.prototype._destroy=function(e,t){t(e)}},871:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,a=r(698),s=Symbol("lastResolve"),c=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),f=Symbol("lastPromise"),p=Symbol("handlePromise"),d=Symbol("stream");function h(e,t){return{value:e,done:t}}function y(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[f]=null,e[s]=null,e[c]=null,t(h(r,!1)))}}function m(e){i.nextTick(y,e)}function g(e,t){return function(r,n){e.then(function(){if(t[u]){r(h(void 0,!0));return}t[p](r,n)},n)}}var b=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((n(o={get stream(){return this[d]},next:function(){var e,t=this,r=this[l];if(null!==r)return Promise.reject(r);if(this[u])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise(function(e,r){i.nextTick(function(){t[l]?r(t[l]):e(h(void 0,!0))})});var n=this[f];if(n)e=new Promise(g(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(h(o,!1));e=new Promise(this[p])}return this[f]=e,e}},Symbol.asyncIterator,function(){return this}),n(o,"return",function(){var e=this;return new Promise(function(t,r){e[d].destroy(null,function(e){if(e){r(e);return}t(h(void 0,!0))})})}),o),b),v=function(e){var t,r=Object.create(w,(n(t={},d,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,c,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,u,{value:e._readableState.endEmitted,writable:!0}),n(t,p,{value:function(e,t){var n=r[d].read();n?(r[f]=null,r[s]=null,r[c]=null,e(h(n,!1))):(r[s]=e,r[c]=t)},writable:!0}),t));return r[f]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];null!==t&&(r[f]=null,r[s]=null,r[c]=null,t(e)),r[l]=e;return}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[c]=null,n(h(void 0,!0))),r[u]=!0}),e.on("readable",m.bind(null,r)),r};e.exports=v},379:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(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){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}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}function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function s(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)}}function c(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}var l=r(300).Buffer,u=r(837).inspect,f=u&&u.custom||"inspect";function p(e,t,r){l.prototype.copy.call(e,t,r)}e.exports=function(){function e(){a(this,e),this.head=null,this.tail=null,this.length=0}return c(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 l.alloc(0);for(var t=l.allocUnsafe(e>>>0),r=this.head,n=0;r;)p(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return u(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},25:function(e){"use strict";function t(e,t){var o=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(a,this,e)):i.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?o._writableState?o._writableState.errorEmitted?i.nextTick(n,o):(o._writableState.errorEmitted=!0,i.nextTick(r,o,e)):i.nextTick(r,o,e):t?(i.nextTick(n,o),t(e)):i.nextTick(n,o)})),this}function r(e,t){a(e,t),n(e)}function n(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function o(){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)}function a(e,t){e.emit("error",t)}function s(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:t,undestroy:o,errorOrDestroy:s}},698:function(e,t,r){"use strict";
1var n=r(646).q.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function o(){}function a(e){return e.setHeader&&"function"==typeof e.abort}function s(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=i(r||o);var c=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,u=function(){e.writable||p()},f=e._writableState&&e._writableState.finished,p=function(){l=!1,f=!0,c||r.call(e)},d=e._readableState&&e._readableState.endEmitted,h=function(){c=!1,d=!0,l||r.call(e)},y=function(t){r.call(e,t)},m=function(){var t;return c&&!d?(e._readableState&&e._readableState.ended||(t=new n),r.call(e,t)):l&&!f?(e._writableState&&e._writableState.ended||(t=new n),r.call(e,t)):void 0},g=function(){e.req.on("finish",p)};return a(e)?(e.on("complete",p),e.on("abort",m),e.req?g():e.on("request",g)):l&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",h),e.on("finish",p),!1!==t.error&&e.on("error",y),e.on("close",m),function(){e.removeListener("complete",p),e.removeListener("abort",m),e.removeListener("request",g),e.req&&e.req.removeListener("finish",p),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",p),e.removeListener("end",h),e.removeListener("error",y),e.removeListener("close",m)}}e.exports=s},727:function(e,t,r){"use strict";function n(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)})}}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}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=r(646).q.ERR_INVALID_ARG_TYPE;function l(e,t,r){if(t&&"function"==typeof t.next)n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new c("iterable",["Iterable"],t);var n,o=new e(a({objectMode:!0},r)),s=!1;function l(){return u.apply(this,arguments)}function u(){return(u=i(function*(){try{var e=yield n.next(),t=e.value;e.done?o.push(null):o.push((yield t))?l():s=!1}catch(e){o.destroy(e)}})).apply(this,arguments)}return o._read=function(){s||(s=!0,l())},o}e.exports=l},442:function(e,t,r){"use strict";function n(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var i,o=r(646).q,a=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function c(e){if(e)throw e}function l(e){return e.setHeader&&"function"==typeof e.abort}function u(e,t,o,a){a=n(a);var c=!1;e.on("close",function(){c=!0}),void 0===i&&(i=r(698)),i(e,{readable:t,writable:o},function(e){if(e)return a(e);c=!0,a()});var u=!1;return function(t){if(!c&&!u){if(u=!0,l(e))return e.abort();if("function"==typeof e.destroy)return e.destroy();a(t||new s("pipe"))}}}function f(e){e()}function p(e,t){return e.pipe(t)}function d(e){return e.length&&"function"==typeof e[e.length-1]?e.pop():c}function h(){for(var e,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=d(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new a("streams");var o=r.map(function(t,n){var a=n<r.length-1;return u(t,a,n>0,function(t){e||(e=t),t&&o.forEach(f),a||(o.forEach(f),i(e))})});return r.reduce(p)}e.exports=h},776:function(e,t,r){"use strict";var n=r(646).q.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function o(e,t,r,o){var a=i(t,o,r);
1if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(o?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}e.exports={getHighWaterMark:o}},678:function(e,t,r){e.exports=r(781)},55:function(e,t,r){var n=r(300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},173:function(e,t,r){e.exports=i;var n=r(361).EventEmitter;function i(){n.call(this)}r(782)(i,n),i.Readable=r(709),i.Writable=r(337),i.Duplex=r(403),i.Transform=r(170),i.PassThrough=r(889),i.finished=r(698),i.pipeline=r(442),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",c));var a=!1;function s(){a||(a=!0,e.end())}function c(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",c),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("error",l),e.on("error",l),r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}},704:function(e,t,r){"use strict";var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=y,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=m,this.end=g,t=3;break;default:this.write=b,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function c(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e,t,r){var n=t.length-1;if(n<r)return 0;var i=c(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=c(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=c(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function u(e,t,r){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,"�"}}function f(e){var t=this.lastTotal-this.lastNeed,r=u(this,e,t);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 p(e,t){var r=l(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)}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(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 y(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 m(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 g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function w(e){return e&&e.length?this.write(e):""}t.s=s,s.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||""},s.prototype.end=d,s.prototype.text=p,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},769:function(e){function t(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw Error(t);n("traceDeprecation"),r=!0}return e.apply(this,arguments)}}function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}
1e.exports=t},300:function(e){"use strict";e.exports=r(8916)},361:function(e){"use strict";e.exports=r(66016)},781:function(e){"use strict";e.exports=r(66016).EventEmitter},837:function(e){"use strict";e.exports=r(79270)}},o={};function a(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={exports:{}},i=!0;try{t[e](n,n.exports,a),i=!1}finally{i&&delete o[e]}return n.exports}a.ab=n+"/";var s=a(173);e.exports=s}()},54405:function(e,t,r){var n,i="/";(()=>{var o={226:function(i,o){!function(a,s){"use strict";var c="1.0.35",l="",u="?",f="function",p="undefined",d="object",h="string",y="major",m="model",g="name",b="type",w="vendor",v="version",_="architecture",S="console",E="mobile",A="tablet",k="smarttv",x="wearable",P="embedded",R=350,O="Amazon",T="Apple",I="ASUS",C="BlackBerry",j="Browser",U="Chrome",$="Firefox",L="Google",N="Huawei",D="LG",M="Microsoft",H="Motorola",W="Opera",B="Samsung",F="Sharp",K="Sony",z="Xiaomi",J="Zebra",q="Facebook",G="Chromium OS",V="Mac OS",X=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},Z=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},Y=function(e,t){return typeof e===h&&-1!==Q(t).indexOf(Q(e))},Q=function(e){return e.toLowerCase()},ee=function(e){return typeof e===h?e.replace(/[^\d\.]/g,l).split(".")[0]:void 0},et=function(e,t){if(typeof e===h)return e=e.replace(/^\s\s*/,l),typeof t===p?e:e.substring(0,R)},er=function(e,t){for(var r,n,i,o,a,c,l=0;l<t.length&&!a;){var u=t[l],p=t[l+1];for(r=n=0;r<u.length&&!a&&u[r];)if(a=u[r++].exec(e))for(i=0;i<p.length;i++)c=a[++n],typeof(o=p[i])===d&&o.length>0?2===o.length?typeof o[1]==f?this[o[0]]=o[1].call(this,c):this[o[0]]=o[1]:3===o.length?typeof o[1]!==f||o[1].exec&&o[1].test?this[o[0]]=c?c.replace(o[1],o[2]):void 0:this[o[0]]=c?o[1].call(this,c,o[2]):void 0:4===o.length&&(this[o[0]]=c?o[3].call(this,c.replace(o[1],o[2])):s):this[o]=c||s;l+=2}},en=function(e,t){for(var r in t)if(typeof t[r]===d&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(Y(t[r][n],e))return r===u?s:r}else if(Y(t[r],e))return r===u?s:r;return e},ei={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},eo={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[g,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,v],[/opios[\/ ]+([\w\.]+)/i],[v,[g,W+" Mini"]],[/\bopr\/([\w\.]+)/i],[v,[g,W]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[g,v],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[g,"UC"+j]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[v,[g,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[v,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[g,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+j],v],[/\bfocus\/([\w\.]+)/i],[v,[g,$+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[g,W+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[g,W+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[g,"MIUI "+j]],[/fxios\/([-\w\.]+)/i],[v,[g,$]],[/\bqihu|(qi?ho?o?|360)browser/i],[[g,"360 "+j]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1 "+j],v],[/(comodo_dragon)\/([\w\.]+)/i],[[g,/_/g," "],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[g,v],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,q],v],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[g,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[g,"GSA"]],[/musical_ly(?:.
vendor: 4,316 bytes, line 1
1+app_?version\/|_)([\w\.]+)/i],[v,[g,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[g,U+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,U+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[g,"Android "+j]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[g,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[v,en,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[g,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[g,$+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[g,v],[/(cobalt)\/([\w\.]+)/i],[g,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[_,"amd64"]],[/(ia32(?=;))/i],[[_,Q]],[/((?:i[346]|x)86)[;\)]/i],[[_,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[_,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[_,"armhf"]],[/windows (ce|mobile); ppc;/i],[[_,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[_,/ower/,l,Q]],[/(sun4\w)[;\)]/i],[[_,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[_,Q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[m,[w,B],[b,A]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[m,[w,B],[b,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[m,[w,T],[b,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[w,T],[b,A]],[/(macintosh);/i],[m,[w,T]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[m,[w,F],[b,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[m,[w,N],[b,A]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[m,[w,N],[b,E]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[m,/_/g," "],[w,z],[b,E]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[m,/_/g," "],[w,z],[b,A]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[m,[w,"OPPO"],[b,E]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[m,[w,"Vivo"],[b,E]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[m,[w,"Realme"],[b,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[m,[w,H],[b,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[m,[w,H],[b,A]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[m,[w,D],[b,A]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[m,[w,D],[b,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[m,[w,"Lenovo"],[b,A]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[m,/_/g," "],[w,"Nokia"],[b,E]],[/(pixel c)\b/i],[m,[w,L],[b,A]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[m,[w,L],[b,E]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[w,K],[b,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[m,"Xperia Tablet"],[w,K],[b,A]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[m,[w,"OnePlus"],[b,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[m,[w,O],[b,A]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[m,/(.+
vendor: 7,784 bytes, line 1
1)/g,"Fire Phone $1"],[w,O],[b,E]],[/(playbook);[-\w\),; ]+(rim)/i],[m,w,[b,A]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[m,[w,C],[b,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[m,[w,I],[b,A]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[m,[w,I],[b,E]],[/(nexus 9)/i],[m,[w,"HTC"],[b,A]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[w,[m,/_/g," "],[b,E]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[m,[w,"Acer"],[b,A]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[m,[w,"Meizu"],[b,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[w,m,[b,E]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[w,m,[b,A]],[/(surface duo)/i],[m,[w,M],[b,A]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[m,[w,"Fairphone"],[b,E]],[/(u304aa)/i],[m,[w,"AT&T"],[b,E]],[/\bsie-(\w*)/i],[m,[w,"Siemens"],[b,E]],[/\b(rct\w+) b/i],[m,[w,"RCA"],[b,A]],[/\b(venue[\d ]{2,7}) b/i],[m,[w,"Dell"],[b,A]],[/\b(q(?:mv|ta)\w+) b/i],[m,[w,"Verizon"],[b,A]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[m,[w,"Barnes & Noble"],[b,A]],[/\b(tm\d{3}\w+) b/i],[m,[w,"NuVision"],[b,A]],[/\b(k88) b/i],[m,[w,"ZTE"],[b,A]],[/\b(nx\d{3}j) b/i],[m,[w,"ZTE"],[b,E]],[/\b(gen\d{3}) b.+49h/i],[m,[w,"Swiss"],[b,E]],[/\b(zur\d{3}) b/i],[m,[w,"Swiss"],[b,A]],[/\b((zeki)?tb.*\b) b/i],[m,[w,"Zeki"],[b,A]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[w,"Dragon Touch"],m,[b,A]],[/\b(ns-?\w{0,9}) b/i],[m,[w,"Insignia"],[b,A]],[/\b((nxa|next)-?\w{0,9}) b/i],[m,[w,"NextBook"],[b,A]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[w,"Voice"],m,[b,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[w,"LvTel"],m,[b,E]],[/\b(ph-1) /i],[m,[w,"Essential"],[b,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[m,[w,"Envizen"],[b,A]],[/\b(trio[-\w\. ]+) b/i],[m,[w,"MachSpeed"],[b,A]],[/\btu_(1491) b/i],[m,[w,"Rotor"],[b,A]],[/(shield[\w ]+) b/i],[m,[w,"Nvidia"],[b,A]],[/(sprint) (\w+)/i],[w,m,[b,E]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[w,M],[b,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[w,J],[b,A]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[w,J],[b,E]],[/smart-tv.+(samsung)/i],[w,[b,k]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[w,B],[b,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[w,D],[b,k]],[/(apple) ?tv/i],[w,[m,T+" TV"],[b,k]],[/crkey/i],[[m,U+"cast"],[w,L],[b,k]],[/droid.+aft(\w)( bui|\))/i],[m,[w,O],[b,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[m,[w,F],[b,k]],[/(bravia[\w ]+)( bui|\))/i],[m,[w,K],[b,k]],[/(mitv-\w{5}) bui/i],[m,[w,z],[b,k]],[/Hbbtv.*(technisat) (.*);/i],[w,m,[b,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[w,et],[m,et],[b,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[b,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[w,m,[b,S]],[/droid.+; (shield) bui/i],[m,[w,"Nvidia"],[b,S]],[/(playstation [345portablevi]+)/i],[m,[w,K],[b,S]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[m,[w,M],[b,S]],[/((pebble))app/i],[w,m,[b,x]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[m,[w,T],[b,x]],[/droid.+; (glass) \d/i],[m,[w,L],[b,x]],[/droid.+; (wt63?0{2,3})\)/i],[m,[w,J],[b,x]],[/(quest( 2| pro)?)/i],[m,[w,q],[b,x]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[w,[b,P]],[/(aeobc)\b/i],[m,[w,O],[b,P]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[m,[b,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[m,[b,A]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,A]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,E]],[/(android[-\w\. ]{0,9});.+buil/i],[m,[w,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[g,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,g]],os:[[/microsoft (windows) (vista|xp)/i],[g,v],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[g,[v,en,ei]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[g,"Windows"],[v,en,ei]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[g,V],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,g],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[g,v],[/\(bb(10);/i],[v,[g,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[g,$+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[g,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[g,U+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,G],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[g,v],[/(sunos) ?([\w\.\d]*)/i],[[g,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,v]]},ea=function(e,t){if(typeof e===d&&(t=e,e=s),!(this instanceof ea))return new ea(e,t).getResult();var r=typeof a!==p&&a.navigator?a.navigator:s,n=e||(r&&r.userAgent?r.userAgent:l),i=r&&r.userAgentData?r.userAgentData:s,o=t?X(eo,t):eo,c=r&&r.userAgent==n;return this.getBrowser=function(){var e={};return e[g]=s,e[v]=s,er.call(e,n,o.browser),e[y]=ee(e[v]),c&&r&&r.brave&&typeof r.brave.isBrave==f&&(e[g]="Brave"),e},this.getCPU=function(){var e={};return e[_]=s,er.call(e,n,o.cpu),e},this.getDevice=function(){var e={};return e[w]=s,e[m]=s,e[b]=s,er.call(e,n,o.device),c&&!e[b]&&i&&i.mobile&&(e[b]=E),c&&"Macintosh"==e[m]&&r&&typeof r.standalone!==p&&r.maxTouchPoints&&r.maxTouchPoints>2&&(e[m]="iPad",e[b]=A),e},this.getEngine=function(){var e={};return e[g]=s,e[v]=s,er.call(e,n,o.engine),e},this.getOS=function(){var e={};return e[g]=s,e[v]=s,er.call(e,n,o.os),c&&!e[g]&&i&&"Unknown"!=i.platform&&(e[g]=i.platform.replace(/chrome os/i,G).replace(/macos/i,V)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===h&&e.length>R?et(e,R):e,this},this.setUA(n),this};
1ea.VERSION=c,ea.BROWSER=Z([g,v,y]),ea.CPU=Z([_]),ea.DEVICE=Z([m,w,b,S,E,k,A,x,P]),ea.ENGINE=ea.OS=Z([g,v]),typeof o!==p?("object"!==p&&i.exports&&(o=i.exports=ea),o.UAParser=ea):"function"===f&&r.amdO?void 0!==(n=(function(){return ea}).call(t,r,t,e))&&(e.exports=n):typeof a!==p&&(a.UAParser=ea);var es=typeof a!==p&&(a.jQuery||a.Zepto);if(es&&!es.ua){var ec=new ea;es.ua=ec.getResult(),es.ua.get=function(){return ec.getUA()},es.ua.set=function(e){ec.setUA(e);var t=ec.getResult();for(var r in t)es.ua[r]=t[r]}}}("object"==typeof window?window:this)}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}},n=!0;try{o[e].call(r.exports,r,r.exports,s),n=!1}finally{n&&delete a[e]}return r.exports}s.ab=i+"/";var c=s(226);e.exports=c})()},79270:function(e,t,r){var n="/",i=r(8916).Buffer,o=r(24358);!function(){var t={992:function(e){e.exports=function(e,r,n){if(e.filter)return e.filter(r,n);if(null==e||"function"!=typeof r)throw TypeError();for(var i=[],o=0;o<e.length;o++)if(t.call(e,o)){var a=e[o];r.call(n,a,o,e)&&i.push(a)}return i};var t=Object.prototype.hasOwnProperty},256:function(e,t,r){"use strict";var n=r(925),i=r(139),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},139:function(e,t,r){"use strict";var n=r(174),i=r(925),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),c=i("%Object.getOwnPropertyDescriptor%",!0),l=i("%Object.defineProperty%",!0),u=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=s(n,a,arguments);return c&&l&&c(t,"length").configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))}),t};var f=function(){return s(n,o,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f},144:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a<o;a++)n.call(i,e[a],a,e);else for(var s in e)t.call(e,s)&&n.call(i,e[s],s,e)}},426:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";e.exports=function(e){var o,a=this;if("function"!=typeof a||n.call(a)!==i)throw TypeError(t+a);for(var s=r.call(arguments,1),c=function(){if(!(this instanceof o))return a.apply(e,s.concat(r.call(arguments)));var t=a.apply(this,s.concat(r.call(arguments)));return Object(t)===t?t:this},l=Math.max(0,a.length-s.length),u=[],f=0;f<l;f++)u.push("$"+f);if(o=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(c),a.prototype){var p=function(){};p.prototype=a.prototype,o.prototype=new p,p.prototype=null}return o}},174:function(e,t,r){"use strict";var n=r(426);e.exports=Function.prototype.bind||n},500:function(e,t,r){"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var l=function(){throw new a},u=c?function(){try{return arguments.callee,l}catch(e){try{return c(arguments,"callee").get}catch(e){return l}}}():l,f=r(115)(),p=Object.getPrototypeOf||function(e){return e.__proto__},d={},h="undefined"==typeof Uint8Array?n:p(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
1IteratorPrototype%":f?p(p([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?p((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?p((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?p(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":h,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},m=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(r=p(i.prototype))}return y[t]=r,r},g={"%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"]},b=r(174),w=r(101),v=b.call(Function.call,Array.prototype.concat),_=b.call(Function.apply,Array.prototype.splice),S=b.call(Function.call,String.prototype.replace),E=b.call(Function.call,String.prototype.slice),A=b.call(Function.call,RegExp.prototype.exec),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,P=function(e){var t=E(e,0,1),r=E(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return S(e,k,function(e,t,r,i){n[n.length]=r?S(i,x,"$1"):t||e}),n},R=function(e,t){var r,n=e;
vendor: 3,089 bytes, line 1
1if(w(g,n)&&(n="%"+(r=g[n])[0]+"%"),w(y,n)){var o=y[n];if(o===d&&(o=m(n)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/g,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=P(e),n=r.length>0?r[0]:"",o=R("%"+n+"%",t),s=o.name,l=o.value,u=!1,f=o.alias;f&&(n=f[0],_(r,v([0,1],f)));for(var p=1,d=!0;p<r.length;p+=1){var h=r[p],m=E(h,0,1),g=E(h,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new i("property names with quotes must have matching quotes");if("constructor"!==h&&d||(u=!0),n+="."+h,w(y,s="%"+n+"%"))l=y[s];else if(null!=l){if(!(h in l)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(c&&p+1>=r.length){var b=c(l,h);l=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:l[h]}else d=w(l,h),l=l[h];d&&!u&&(y[s]=l)}}return l}},925:function(e,t,r){"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var l=function(){throw new a},u=c?function(){try{return arguments.callee,l}catch(e){try{return c(arguments,"callee").get}catch(e){return l}}}():l,f=r(115)(),p=r(504)(),d=Object.getPrototypeOf||(p?function(e){return e.__proto__}:null),h={},y="undefined"!=typeof Uint8Array&&d?d(Uint8Array):n,m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f&&d?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
1IteratorPrototype%":f&&d?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f&&d?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f&&d?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&d?d(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":y,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(d)try{null.error}catch(e){var g=d(d(e));m["%Error.prototype%"]=g}var b=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&d&&(r=d(i.prototype))}return m[t]=r,r},w={"%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"]},v=r(174),_=r(101),S=v.call(Function.call,Array.prototype.concat),E=v.call(Function.apply,Array.prototype.splice),A=v.call(Function.call,String.prototype.replace),k=v.call(Function.call,String.prototype.slice),x=v.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,O=function(e){var t=k(e,0,1),r=k(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return A(e,P,function(e,t,r,i){n[n.length]=r?A(i,R,"$1"):t||e}),n},T=function(e,t){var r,n=e;if(_(w,n)&&(n="%"+(r=w[n])[0]+"%"),_(m,n)){var o=m[n];if(o===h&&(o=b(n)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===x(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=O(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),s=o.name,l=o.value,u=!1,f=o.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,d=!0;p<r.length;p+=1){var h=r[p],y=k(h,0,1),g=k(h,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new i("property names with quotes must have matching quotes");if("constructor"!==h&&d||(u=!0),n+="."+h,_(m,s="%"+n+"%"))l=m[s];else if(null!=l){if(!(h in l)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(c&&p+1>=r.length){var b=c(l,h);l=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:l[h]}else d=_(l,h),l=l[h];d&&!u&&(m[s]=l)}}return l}},504:function(e){"use strict";var t={foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(({__proto__:null})instanceof r)}},942:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(773);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},773: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;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},115:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(832);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},832: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;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},101:function(e,t,r){"use strict";var n=r(174);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},157:function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(e){return(!t||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===r.call(e)},i=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=i,e.exports=o?n:i},391:function(e){"use strict";var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,o=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?o(a):{};e.exports=function(e){return"function"==typeof e&&(!!n.test(r.call(e))||(i?o(e)===s:"[object GeneratorFunction]"===t.call(e)))}},994:function(e,t,n){"use strict";var i=n(144),o=n(349),a=n(256),s=a("Object.prototype.toString"),c=n(942)()&&"symbol"==typeof Symbol.toStringTag,l=o(),u=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},f=a("String.prototype.slice"),p={},d=n(24),h=Object.getPrototypeOf;c&&d&&h&&i(l,function(e){var t=new r.g[e];
1if(!(Symbol.toStringTag in t))throw EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=h(t),i=d(n,Symbol.toStringTag);i||(i=d(h(n),Symbol.toStringTag)),p[e]=i.get});var y=function(e){var t=!1;return i(p,function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}}),t};e.exports=function(e){return!!e&&"object"==typeof e&&(c?!!d&&y(e):u(l,f(s(e),8,-1))>-1)}},369:function(e){e.exports=function(e){return e instanceof i}},584:function(e,t,r){"use strict";var n=r(157),i=r(391),o=r(490),a=r(994);function s(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,u=s(Object.prototype.toString),f=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);if(c)var h=s(BigInt.prototype.valueOf);if(l)var y=s(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch}function b(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||W(e)}function w(e){return"Uint8Array"===o(e)}function v(e){return"Uint8ClampedArray"===o(e)}function _(e){return"Uint16Array"===o(e)}function S(e){return"Uint32Array"===o(e)}function E(e){return"Int8Array"===o(e)}function A(e){return"Int16Array"===o(e)}function k(e){return"Int32Array"===o(e)}function x(e){return"Float32Array"===o(e)}function P(e){return"Float64Array"===o(e)}function R(e){return"BigInt64Array"===o(e)}function O(e){return"BigUint64Array"===o(e)}function T(e){return"[object Map]"===u(e)}function I(e){return"undefined"!=typeof Map&&(T.working?T(e):e instanceof Map)}function C(e){return"[object Set]"===u(e)}function j(e){return"undefined"!=typeof Set&&(C.working?C(e):e instanceof Set)}function U(e){return"[object WeakMap]"===u(e)}function $(e){return"undefined"!=typeof WeakMap&&(U.working?U(e):e instanceof WeakMap)}function L(e){return"[object WeakSet]"===u(e)}function N(e){return L(e)}function D(e){return"[object ArrayBuffer]"===u(e)}function M(e){return"undefined"!=typeof ArrayBuffer&&(D.working?D(e):e instanceof ArrayBuffer)}function H(e){return"[object DataView]"===u(e)}function W(e){return"undefined"!=typeof DataView&&(H.working?H(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=g,t.isArrayBufferView=b,t.isUint8Array=w,t.isUint8ClampedArray=v,t.isUint16Array=_,t.isUint32Array=S,t.isInt8Array=E,t.isInt16Array=A,t.isInt32Array=k,t.isFloat32Array=x,t.isFloat64Array=P,t.isBigInt64Array=R,t.isBigUint64Array=O,T.working="undefined"!=typeof Map&&T(new Map),t.isMap=I,C.working="undefined"!=typeof Set&&C(new Set),t.isSet=j,U.working="undefined"!=typeof WeakMap&&U(new WeakMap),t.isWeakMap=$,L.working="undefined"!=typeof WeakSet&&L(new WeakSet),t.isWeakSet=N,D.working="undefined"!=typeof ArrayBuffer&&D(new ArrayBuffer),t.isArrayBuffer=M,H.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&H(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=W;var B="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function F(e){return"[object SharedArrayBuffer]"===u(e)}function K(e){return void 0!==B&&(void 0===F.working&&(F.working=F(new B)),F.working?F(e):e instanceof B)}function z(e){return"[object AsyncFunction]"===u(e)}function J(e){return"[object Map Iterator]"===u(e)}function q(e){return"[object Set Iterator]"===u(e)}function G(e){return"[object Generator]"===u(e)}function V(e){return"[object WebAssembly.Module]"===u(e)}function X(e){return m(e,f)}function Z(e){return m(e,p)}function Y(e){return m(e,d)}function Q(e){return c&&m(e,h)}function ee(e){return l&&m(e,y)}function et(e){return X(e)||Z(e)||Y(e)||Q(e)||ee(e)}function er(e){return"undefined"!=typeof Uint8Array&&(M(e)||K(e))}t.isSharedArrayBuffer=K,t.isAsyncFunction=z,t.isMapIterator=J,t.isSetIterator=q,t.isGeneratorObject=G,t.isWebAssemblyCompiledModule=V,t.isNumberObject=X,t.isStringObject=Z,t.isBooleanObject=Y,t.isBigIntObject=Q,t.isSymbolObject=ee,t.isBoxedPrimitive=et,t.isAnyArrayBuffer=er,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},177:function(e,t,r){var n=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(!A(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(l(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])_(s)||!R(s)?a+=" "+s:a+=" "+l(s);return a},t.deprecate=function(e,r){if(void 0!==o&&!0===o.noDeprecation)return e;if(void 0===o)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;
1return function(){if(!n){if(o.throwDeprecation)throw Error(r);o.traceDeprecation,n=!0}return e.apply(this,arguments)}};var a={},s=/^$/;if(o.env.NODE_DEBUG){var c=o.env.NODE_DEBUG;s=RegExp("^"+(c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase())+"$","i")}function l(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(r)?n.showHidden=r:r&&t._extend(n,r),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),d(n,e,n.depth)}function u(e,t){var r=l.styles[t];return r?"\x1b["+l.colors[r][0]+"m"+e+"\x1b["+l.colors[r][1]+"m":e}function f(e,t){return e}function p(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function d(e,r,n){if(e.customInspect&&r&&I(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,o=r.inspect(n,e);return A(o)||(o=d(e,o,n)),o}var a=h(e,r);if(a)return a;var s=Object.keys(r),c=p(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),T(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return y(r);if(0===s.length){if(I(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(P(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(O(r))return e.stylize(Date.prototype.toString.call(r),"date");if(T(r))return y(r)}var u="",f=!1,v=["{","}"];return(w(r)&&(f=!0,v=["[","]"]),I(r)&&(u=" [Function"+(r.name?": "+r.name:"")+"]"),P(r)&&(u=" "+RegExp.prototype.toString.call(r)),O(r)&&(u=" "+Date.prototype.toUTCString.call(r)),T(r)&&(u=" "+y(r)),0!==s.length||f&&0!=r.length)?n<0?P(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),i=f?m(e,r,n,c,s):s.map(function(t){return g(e,r,n,c,t,f)}),e.seen.pop(),b(i,u,v)):v[0]+u+v[1]}function h(e,t){if(x(t))return e.stylize("undefined","undefined");if(A(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return E(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):_(t)?e.stylize("null","null"):void 0}function y(e){return"["+Error.prototype.toString.call(e)+"]"}function m(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)U(t,String(a))?o.push(g(e,t,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(g(e,t,r,n,i,!0))}),o}function g(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),U(n,i)||(a="["+i+"]"),!s&&(0>e.seen.indexOf(c.value)?(s=_(r)?d(e,c.value,null):d(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return"   "+e}).join("\n")):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function b(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function w(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function _(e){return null===e}function S(e){return null==e}function E(e){return"number"==typeof e}function A(e){return"string"==typeof e}function k(e){return"symbol"==typeof e}function x(e){return void 0===e}function P(e){return R(e)&&"[object RegExp]"===j(e)}function R(e){return"object"==typeof e&&null!==e}function O(e){return R(e)&&"[object Date]"===j(e)}function T(e){return R(e)&&("[object Error]"===j(e)||e instanceof Error)}function I(e){return"function"==typeof e}function C(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function j(e){return Object.prototype.toString.call(e)}function U(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.debuglog=function(e){return a[e=e.toUpperCase()]||(s.test(e)?(o.pid,a[e]=function(){t.format.apply(t,arguments)}):a[e]=function(){}),a[e]},t.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(584),t.isArray=w,t.isBoolean=v,t.isNull=_,t.isNullOrUndefined=S,t.isNumber=E,t.isString=A,t.isSymbol
1=k,t.isUndefined=x,t.isRegExp=P,t.types.isRegExp=P,t.isObject=R,t.isDate=O,t.types.isDate=O,t.isError=T,t.types.isNativeError=T,t.isFunction=I,t.isPrimitive=C,t.isBuffer=r(369),t.log=function(){},t.inherits=r(782),t._extend=function(e,t){if(!t||!R(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var $="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function L(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function N(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 n=t.pop();if("function"!=typeof n)throw TypeError("The last argument must be of type Function");var i=this,a=function(){return n.apply(i,arguments)};e.apply(this,t).then(function(e){o.nextTick(a.bind(null,null,e))},function(e){o.nextTick(L.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,n(e)),t}t.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if($&&e[$]){var t=e[$];if("function"!=typeof t)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,$,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(e,n){e?r(e):t(n)});try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),$&&Object.defineProperty(t,$,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=$,t.callbackify=N},490:function(e,t,n){"use strict";var i=n(144),o=n(349),a=n(256),s=a("Object.prototype.toString"),c=n(942)()&&"symbol"==typeof Symbol.toStringTag,l=o(),u=a("String.prototype.slice"),f={},p=n(24),d=Object.getPrototypeOf;c&&p&&d&&i(l,function(e){if("function"==typeof r.g[e]){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=d(t),i=p(n,Symbol.toStringTag);i||(i=p(d(n),Symbol.toStringTag)),f[e]=i.get}});var h=function(e){var t=!1;return i(f,function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}}),t},y=n(994);e.exports=function(e){return!!y(e)&&(c?h(e):u(s(e),8,-1))}},349:function(e,t,n){"use strict";var i=n(992);e.exports=function(){return i(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],function(e){return"function"==typeof r.g[e]})}},24:function(e,t,r){"use strict";var n=r(500)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n}},a={};function s(e){var r=a[e];if(void 0!==r)return r.exports;var n=a[e]={exports:{}},i=!0;try{t[e](n,n.exports,s),i=!1}finally{i&&delete a[e]}return n.exports}s.ab=n+"/";var c=s(177);e.exports=c}()},52454:function(module){var __dirname="/";!function(){var __webpack_modules__={950:function(__unused_webpack_module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return -1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);
1this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(e),function(t){r[t]=e[t]}),forEach(globals,function(t){e[t]&&(r[t]=e[t])});var o=Object_keys(r),a=n.call(r,this.code);return forEach(Object_keys(r),function(t){(t in e||-1===indexOf(o,t))&&(e[t]=r[t])}),forEach(globals,function(t){t in e||defineProp(e,t,r[t])}),document.body.removeChild(t),a},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),function(r){e[r]=t[r]}),r},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}}),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(r){t[r]=e[r]}),t}}};"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var __nested_webpack_exports__={};__webpack_modules__[950](0,__nested_webpack_exports__),module.exports=__nested_webpack_exports__}()},67561:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PageSignatureError:function(){return r},RemovedPageError:function(){return n},RemovedUAError:function(){return i}});class r extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
2  
3  export function middleware(request, event) {
4    return NextResponse.redirect('/new-location')
5  }
6  
7  Read more: https://nextjs.org/docs/messages/middleware-new-signature
8  `)}}class n extends Error{constructor(){super(`The request.page has been deprecated in favour of \`URLPattern\`.
9  Read more: https://nextjs.org/docs/messages/middleware-request-page
10  `)}}class i extends Error{constructor(){super(`The request.ua has been removed in favour of \`userAgent\` function.
11  Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
12  `)}}},125:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ImageResponse:function(){return n.ImageResponse},NextRequest:function(){return i.NextRequest},NextResponse:function(){return o.NextResponse},URLPattern:function(){return s.URLPattern},userAgent:function(){return a.userAgent},userAgentFromString:function(){return a.userAgentFromString}});let n=r(99622),i=r(1532),o=r(1882),a=r(7605),s=r(13466)},57669:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NextURL",{enumerable:!0,get:function(){return u}});let n=r(61994),i=r(55027),o=r(38688),a=r(94232),s=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function c(e,t){return new URL(String(e).replace(s,"localhost"),t&&String(t).replace(s,"localhost"))}let l=Symbol("NextURLInternal");class u{constructor(e,t,r){let n,i;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,i=r||{}):i=r||t||{},this[l]={url:c(e,n??i.base),options:i,basePath:""},this.analyze()}analyze(){var e,t,r,i,s;let c=(0,a.getNextPathnameInfo)(this[l].url.pathname,{nextConfig:this[l].options.nextConfig,parseData:!0,i18nProvider:this[l].options.i18nProvider}),u=(0,o.getHostname)(this[l].url,this[l].options.headers);this[l].domainLocale=this[l].options.i18nProvider?this[l].options.i18nProvider.detectDomainLocale(u):(0,n.detectDomainLocale)(null==(t=this[l].options.nextConfig)?void 0:null==(e=t.i18n)?void 0:e.domains,u);let f=(null==(r=this[l].domainLocale)?void 0:r.defaultLocale)||(null==(s=this[l].options.nextConfig)?void 0:null==(i=s.i18n)?void 0:i.defaultLocale);this[l].url.pathname=c.pathname,this[l].defaultLocale=f,this[l].basePath=c.basePath??"",this[l].buildId=c.buildId,this[l].locale=c.locale??f,this[l].trailingSlash=c.trailingSlash}formatPathname(){return(0,i.formatNextPathnameInfo)({basePath:this[l].basePath,buildId:this[l].buildId,defaultLocale:this[l].options.forceLocale?void 0:this[l].defaultLocale,locale:this[l].locale,pathname:this[l].url.pathname,trailingSlash:this[l].trailingSlash})}formatSearch(){return this[l].url.search}get buildId(){return this[l].buildId}set buildId(e){this[l].buildId=e}get locale(){return this[l].locale??""}set locale(e){var t,r;if(!this[l].locale||!(null==(r=this[l].options.nextConfig)?void 0:null==(t=r.i18n)?void 0:t.locales.includes(e)))throw TypeError(`The NextURL configuration includes no locale "${e}"`);this[l].locale=e}get defaultLocale(){return this[l].defaultLocale}get domainLocale(){return this[l].domainLocale}get searchParams(){return this[l].url.searchParams}get host(){return this[l].url.host}set host(e){this[l].url.host=e}get hostname(){return this[l].url.hostname}set hostname(e){this[l].url.hostname=e}get port(){return this[l].url.port}set port(e){this[l].url.port=e}get protocol(){return this[l].url.protocol}set protocol(e){this[l].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[l].url=c(e),this.analyze()}get origin(){return this[l].url.origin}get pathname(){return this[l].url.pathname}set pathname(e){this[l].url.pathname=e}get hash(){return this[l].url.hash}set hash(e){this[l].url.hash=e}get search(){return this[l].url.search}set search(e){this[l].url.search=e}get password(){return this[l].url.password}set password(e){this[l].url.password=e}get username(){return this[l].url.username}set username(e){this[l].url.username=e}get basePath(){return this[l].basePath}set basePath(e){this[l].basePath=e.startsWith("/")?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new u(String(this),this[l].options)}}},51305:function(e,t,r){"use strict";
12Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{HeadersAdapter:function(){return o},ReadonlyHeadersError:function(){return i}});let n=r(25298);class i extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new i}}class o extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,i){if("symbol"==typeof r)return n.ReflectAdapter.get(t,r,i);let o=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===o);if(void 0!==a)return n.ReflectAdapter.get(t,a,i)},set(t,r,i,o){if("symbol"==typeof r)return n.ReflectAdapter.set(t,r,i,o);let a=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===a);return n.ReflectAdapter.set(t,s??r,i,o)},has(t,r){if("symbol"==typeof r)return n.ReflectAdapter.has(t,r);let i=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0!==o&&n.ReflectAdapter.has(t,o)},deleteProperty(t,r){if("symbol"==typeof r)return n.ReflectAdapter.deleteProperty(t,r);let i=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===i);return void 0===o||n.ReflectAdapter.deleteProperty(t,o)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return i.callable;default:return n.ReflectAdapter.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new o(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()}}},67643:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{MutableRequestCookiesAdapter:function(){return f},ReadonlyRequestCookiesError:function(){return a},RequestCookiesAdapter:function(){return s},appendMutableCookies:function(){return u},getModifiedCookieValues:function(){return l}});
12let n=r(35149),i=r(25298),o=r(88404);class a 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#cookiessetname-value-options")}static callable(){throw new a}}class s{static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"clear":case"delete":case"set":return a.callable;default:return i.ReflectAdapter.get(e,t,r)}}})}}let c=Symbol.for("next.mutated.cookies");function l(e){let t=e[c];return t&&Array.isArray(t)&&0!==t.length?t:[]}function u(e,t){let r=l(t);if(0===r.length)return!1;let i=new n.ResponseCookies(e),o=i.getAll();for(let e of r)i.set(e);for(let e of o)i.set(e);return!0}class f{static wrap(e,t){let r=new n.ResponseCookies(new Headers);for(let t of e.getAll())r.set(t);let a=[],s=new Set,l=()=>{let e=o.staticGenerationAsyncStorage.getStore();if(e&&(e.pathWasRevalidated=!0),a=r.getAll().filter(e=>s.has(e.name)),t){let e=[];for(let t of a){let r=new n.ResponseCookies(new Headers);r.set(t),e.push(r.toString())}t(e)}};return new Proxy(r,{get(e,t,r){switch(t){case c:return a;case"delete":return function(...t){s.add("string"==typeof t[0]?t[0]:t[0].name);try{e.delete(...t)}finally{l()}};case"set":return function(...t){s.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.set(...t)}finally{l()}};default:return i.ReflectAdapter.get(e,t,r)}}})}}},35149:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RequestCookies:function(){return n.RequestCookies},ResponseCookies:function(){return n.ResponseCookies}});let n=r(39092)},99622:function(e,t){"use strict";function r(){throw Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead')}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageResponse",{enumerable:!0,get:function(){return r}})},1532:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERNALS:function(){return s},NextRequest:function(){return c}});let n=r(57669),i=r(73035),o=r(67561),a=r(35149),s=Symbol("internal request");class c extends Request{constructor(e,t={}){let r="string"!=typeof e&&"url"in e?e.url:String(e);(0,i.validateURL)(r),e instanceof Request?super(e,t):super(r,t);let o=new n.NextURL(r,{headers:(0,i.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:t.nextConfig});this[s]={cookies:new a.RequestCookies(this.headers),geo:t.geo||{},ip:t.ip,nextUrl:o,url:o.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,geo:this.geo,ip:this.ip,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[s].cookies}get geo(){return this[s].geo}get ip(){return this[s].ip}get nextUrl(){return this[s].nextUrl}get page(){throw new o.RemovedPageError}get ua(){throw new o.RemovedUAError}get url(){return this[s].url}}},1882:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NextResponse",{enumerable:!0,get:function(){return l}});let n=r(57669),i=r(73035),o=r(35149),a=Symbol("internal response"),s=new Set([301,302,303,307,308]);function c(e,t){var r;if(null==e?void 0:null==(r=e.request)?void 0:r.headers){if(!(e.request.headers instanceof Headers))throw Error("request.headers must be an instance of Headers");let r=[];for(let[n,i]of e.request.headers)t.set("x-middleware-request-"+n,i),r.push(n);t.set("x-middleware-override-headers",r.join(","))}}class l extends Response{constructor(e,t={}){super(e,t),this[a]={cookies:new o.ResponseCookies(this.headers),url:t.url?new n.NextURL(t.url,{headers:(0,i.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:t.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.t
12ype}}get cookies(){return this[a].cookies}static json(e,t){let r=Response.json(e,t);return new l(r.body,r)}static redirect(e,t){let r="number"==typeof t?t:(null==t?void 0:t.status)??307;if(!s.has(r))throw RangeError('Failed to execute "redirect" on "response": Invalid status code');let n="object"==typeof t?t:{},o=new Headers(null==n?void 0:n.headers);return o.set("Location",(0,i.validateURL)(e)),new l(null,{...n,headers:o,status:r})}static rewrite(e,t){let r=new Headers(null==t?void 0:t.headers);return r.set("x-middleware-rewrite",(0,i.validateURL)(e)),c(t,r),new l(null,{...t,headers:r})}static next(e){let t=new Headers(null==e?void 0:e.headers);return t.set("x-middleware-next","1"),c(e,t),new l(null,{...e,headers:t})}}},13466:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"URLPattern",{enumerable:!0,get:function(){return r}});let r="undefined"==typeof URLPattern?void 0:URLPattern},7605:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isBot:function(){return o},userAgent:function(){return s},userAgentFromString:function(){return a}});let n=i(r(54405));function i(e){return e&&e.__esModule?e:{default:e}}function o(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}function a(e){return{...(0,n.default)(e),isBot:void 0!==e&&o(e)}}function s({headers:e}){return a(e.get("user-agent")||void 0)}},73035:function(e,t){"use strict";function r(e){let t=new Headers;for(let[r,n]of Object.entries(e))for(let e of Array.isArray(n)?n:[n])void 0!==e&&("number"==typeof e&&(e=e.toString()),t.append(r,e));return t}function n(e){var t,r,n,i,o,a=[],s=0;function c(){for(;s<e.length&&/\s/.test(e.charAt(s));)s+=1;return s<e.length}function l(){return"="!==(r=e.charAt(s))&&";"!==r&&","!==r}for(;s<e.length;){for(t=s,o=!1;c();)if(","===(r=e.charAt(s))){for(n=s,s+=1,c(),i=s;s<e.length&&l();)s+=1;s<e.length&&"="===e.charAt(s)?(o=!0,s=i,a.push(e.substring(t,n)),t=s):s=n+1}else s+=1;(!o||s>=e.length)&&a.push(e.substring(t,e.length))}return a}function i(e){let t={},r=[];if(e)for(let[i,o]of e.entries())"set-cookie"===i.toLowerCase()?(r.push(...n(o)),t[i]=1===r.length?r[0]:r):t[i]=o;return t}function o(e){try{return String(new URL(String(e)))}catch(t){throw Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t})}}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{fromNodeOutgoingHttpHeaders:function(){return r},splitCookiesString:function(){return n},toNodeOutgoingHttpHeaders:function(){return i},validateURL:function(){return o}})},38688:function(e,t){"use strict";function r(e,t){let r;if((null==t?void 0:t.host)&&!Array.isArray(t.host))r=t.host.toString().split(":",1)[0];else{if(!e.hostname)return;r=e.hostname}return r.toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getHostname",{enumerable:!0,get:function(){return r}})},61994:function(e,t){"use strict";function r(e,t,r){if(e)for(let o of(r&&(r=r.toLowerCase()),e)){var n,i;if(t===(null==(n=o.domain)?void 0:n.split(":",1)[0].toLowerCase())||r===o.defaultLocale.toLowerCase()||(null==(i=o.locales)?void 0:i.some(e=>e.toLowerCase()===r)))return o}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}})},80103:function(e,t){"use strict";function r(e,t){let r;let n=e.split("/");return(t||[]).some(t=>!!n[1]&&n[1].toLowerCase()===t.toLowerCase()&&(r=t,n.splice(1,1),e=n.join("/")||"/",!0)),{pathname:e,detectedLocale:r}}
12Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}})},13343:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return o}});let n=r(22081),i=r(38106);function o(e,t,r,o){if(!t||t===r)return e;let a=e.toLowerCase();return!o&&((0,i.pathHasPrefix)(a,"/api")||(0,i.pathHasPrefix)(a,"/"+t.toLowerCase()))?e:(0,n.addPathPrefix)(e,"/"+t)}},57849:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathSuffix",{enumerable:!0,get:function(){return i}});let n=r(49015);function i(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:i,hash:o}=(0,n.parsePath)(e);return""+r+t+i+o}},55027:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatNextPathnameInfo",{enumerable:!0,get:function(){return s}});let n=r(8725),i=r(22081),o=r(57849),a=r(13343);function s(e){let t=(0,a.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(t=(0,n.removeTrailingSlash)(t)),e.buildId&&(t=(0,o.addPathSuffix)((0,i.addPathPrefix)(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=(0,i.addPathPrefix)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:(0,o.addPathSuffix)(t,"/"):(0,n.removeTrailingSlash)(t)}},94232:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getNextPathnameInfo",{enumerable:!0,get:function(){return a}});let n=r(80103),i=r(73863),o=r(38106);function a(e,t){var r,a;let{basePath:s,i18n:c,trailingSlash:l}=null!=(r=t.nextConfig)?r:{},u={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):l};s&&(0,o.pathHasPrefix)(u.pathname,s)&&(u.pathname=(0,i.removePathPrefix)(u.pathname,s),u.basePath=s);let f=u.pathname;if(u.pathname.startsWith("/_next/data/")&&u.pathname.endsWith(".json")){let e=u.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),r=e[0];u.buildId=r,f="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(u.pathname=f)}if(c){let e=t.i18nProvider?t.i18nProvider.analyze(u.pathname):(0,n.normalizeLocalePath)(u.pathname,c.locales);u.locale=e.detectedLocale,u.pathname=null!=(a=e.pathname)?a:u.pathname,!e.detectedLocale&&u.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(f):(0,n.normalizeLocalePath)(f,c.locales)).detectedLocale&&(u.locale=e.detectedLocale)}return u}},73863:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removePathPrefix",{enumerable:!0,get:function(){return i}});let n=r(38106);function i(e,t){if(!(0,n.pathHasPrefix)(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}},8655:function(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}function r(e,r,n){var i=n&&n.stringify||t,o=1;if("object"==typeof e&&null!==e){var a=r.length+o;if(1===a)return e;var s=Array(a);s[0]=i(e);for(var c=1;c<a;c++)s[c]=i(r[c]);return s.join(" ")}if("string"!=typeof e)return e;var l=r.length;if(0===l)return e;for(var u="",f=1-o,p=-1,d=e&&e.length||0,h=0;h<d;){if(37===e.charCodeAt(h)&&h+1<d){switch(p=p>-1?p:0,e.charCodeAt(h+1)){case 100:case 102:if(f>=l||null==r[f])break;p<h&&(u+=e.slice(p,h)),u+=Number(r[f]),p=h+2,h++;break;case 105:if(f>=l||null==r[f])break;p<h&&(u+=e.slice(p,h)),u+=Math.floor(Number(r[f])),p=h+2,h++;break;case 79:case 111:case 106:if(f>=l||void 0===r[f])break;p<h&&(u+=e.slice(p,h));var y=typeof r[f];if("string"===y){u+="'"+r[f]+"'",p=h+2,h++;break}if("function"===y){u+=r[f].name||"<anonymous>",p=h+2,h++;break}u+=i(r[f]),p=h+2,h++;break;case 115:if(f>=l)break;p<h&&(u+=e.slice(p,h)),u+=String(r[f]),p=h+2,h++;break;case 37:p<h&&(u+=e.slice(p,h)),u+="%",p=h+2,h++,f--}++f}++h}return -1===p?e:(p<d&&(u+=e.slice(p)),u)}e.exports=r},66766:function(e,t,r){var n=r(8916),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},99593:function(e,t,r){"use strict";let n=Symbol("SemVer ANY");
12class i{static get ANY(){return n}constructor(e,t){if(t=o(t),e instanceof i){if(!!t.loose===e.loose)return e;e=e.value}l("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){let t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new f(e.value,t).test(this.value):""===e.operator?""===e.value||new f(this.value,t).test(e.semver):!((t=o(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=i;let o=r(64346),{safeRe:a,t:s}=r(15895),c=r(23696),l=r(42420),u=r(42652),f=r(30657)},30657:function(e,t,r){"use strict";let n=/\s+/g;class i{constructor(e,t){if(t=a(t),e instanceof i){if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;return new i(e.raw,t)}if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!g(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&y)|(this.options.loose&&m))+":"+e,r=o.get(t);if(r)return r;let n=this.options.loose,i=n?u[f.HYPHENRANGELOOSE]:u[f.HYPHENRANGE];c("hyphen replace",e=e.replace(i,T(this.options.includePrerelease))),c("comparator trim",e=e.replace(u[f.COMPARATORTRIM],p)),c("tilde trim",e=e.replace(u[f.TILDETRIM],d)),c("caret trim",e=e.replace(u[f.CARETTRIM],h));let a=e.split(" ").map(e=>v(e,this.options)).join(" ").split(/\s+/).map(e=>O(e,this.options));n&&(a=a.filter(e=>(c("loose invalid filter",e,this.options),!!e.match(u[f.COMPARATORLOOSE])))),c("range list",a);let l=new Map;for(let e of a.map(e=>new s(e,this.options))){if(g(e))return[e];l.set(e.value,e)}l.size>1&&l.has("")&&l.delete("");let b=[...l.values()];return o.set(t,b),b}intersects(e,t){if(!(e instanceof i))throw TypeError("a Range is required");return this.set.some(r=>w(r,t)&&e.set.some(e=>w(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(I(this.set[t],e,this.options))return!0;return!1}}e.exports=i;let o=new(r(49698)),a=r(64346),s=r(99593),c=r(42420),l=r(42652),{safeRe:u,t:f,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:h}=r(15895),{FLAG_INCLUDE_PRERELEASE:y,FLAG_LOOSE:m}=r(64256),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,w=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();for(;r&&n.length;)r=n.every(e=>i.intersects(e,t)),i=n.pop();return r},v=(e,t)=>
12(c("comp",e,t),c("caret",e=A(e,t)),c("tildes",e=S(e,t)),c("xrange",e=x(e,t)),c("stars",e=R(e,t)),e),_=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{let r=t.loose?u[f.TILDELOOSE]:u[f.TILDE];return e.replace(r,(t,r,n,i,o)=>{let a;return c("tilde",e,t,r,n,i,o),_(r)?a="":_(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:_(i)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(c("replaceTilde pr",o),a=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,c("tilde return",a),a})},A=(e,t)=>e.trim().split(/\s+/).map(e=>k(e,t)).join(" "),k=(e,t)=>{c("caret",e,t);let r=t.loose?u[f.CARETLOOSE]:u[f.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,o,a)=>{let s;return c("caret",e,t,r,i,o,a),_(r)?s="":_(i)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:_(o)?s="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:a?(c("replaceCaret pr",a),s="0"===r?"0"===i?`>=${r}.${i}.${o}-${a} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${a} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${a} <${+r+1}.0.0-0`):(c("no pr"),s="0"===r?"0"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),c("caret return",s),s})},x=(e,t)=>(c("replaceXRanges",e,t),e.split(/\s+/).map(e=>P(e,t)).join(" ")),P=(e,t)=>{e=e.trim();let r=t.loose?u[f.XRANGELOOSE]:u[f.XRANGE];return e.replace(r,(r,n,i,o,a,s)=>{c("xRange",e,r,n,i,o,a,s);let l=_(i),u=l||_(o),f=u||_(a),p=f;return"="===n&&p&&(n=""),s=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(u&&(o=0),a=0,">"===n?(n=">=",u?(i=+i+1,o=0):o=+o+1,a=0):"<="===n&&(n="<",u?i=+i+1:o=+o+1),"<"===n&&(s="-0"),r=`${n+i}.${o}.${a}${s}`):u?r=`>=${i}.0.0${s} <${+i+1}.0.0-0`:f&&(r=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`),c("xRange return",r),r})},R=(e,t)=>(c("replaceStars",e,t),e.trim().replace(u[f.STAR],"")),O=(e,t)=>(c("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?f.GTE0PRE:f.GTE0],"")),T=e=>(t,r,n,i,o,a,s,c,l,u,f,p)=>(r=_(n)?"":_(i)?`>=${n}.0.0${e?"-0":""}`:_(o)?`>=${n}.${i}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,c=_(l)?"":_(u)?`<${+l+1}.0.0-0`:_(f)?`<${l}.${+u+1}.0-0`:p?`<=${l}.${u}.${f}-${p}`:e?`<${l}.${u}.${+f+1}-0`:`<=${c}`,`${r} ${c}`.trim()),I=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(c(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},42652:function(e,t,r){"use strict";let n=r(42420),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(64256),{safeRe:a,t:s}=r(15895),c=r(64346),{compareIdentifiers:l}=r(47033);class u{constructor(e,t){if(t=c(t),e instanceof u){if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<o)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];
12if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;if(r===i)continue;else return l(r,i)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(n("build compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;if(r===i)continue;else return l(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?a[s.PRERELEASELOOSE]:a[s.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);
12if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},78119:function(e,t,r){"use strict";let n=r(36322),i=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=i},23696:function(e,t,r){"use strict";let n=r(49590),i=r(65036),o=r(52930),a=r(9126),s=r(37628),c=r(43964),l=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return i(e,r,l);case">":return o(e,r,l);case">=":return a(e,r,l);case"<":return s(e,r,l);case"<=":return c(e,r,l);default:throw TypeError(`Invalid operator: ${t}`)}};e.exports=l},15053:function(e,t,r){"use strict";let n=r(42652),i=r(36322),{safeRe:o,t:a}=r(15895),s=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let n;let i=t.includePrerelease?o[a.COERCERTLFULL]:o[a.COERCERTL];for(;(n=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),i.lastIndex=n.index+n[1].length+n[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?o[a.COERCEFULL]:o[a.COERCE]);if(null===r)return null;let s=r[2],c=r[3]||"0",l=r[4]||"0",u=t.includePrerelease&&r[5]?`-${r[5]}`:"",f=t.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${s}.${c}.${l}${u}${f}`,t)};e.exports=s},59411:function(e,t,r){"use strict";let n=r(42652),i=(e,t,r)=>{let i=new n(e,r),o=new n(t,r);return i.compare(o)||i.compareBuild(o)};e.exports=i},44165:function(e,t,r){"use strict";let n=r(60518),i=(e,t)=>n(e,t,!0);e.exports=i},60518:function(e,t,r){"use strict";let n=r(42652),i=(e,t,r)=>new n(e,r).compare(new n(t,r));e.exports=i},92426:function(e,t,r){"use strict";let n=r(36322),i=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),o=r.compare(i);if(0===o)return null;let a=o>0,s=a?r:i,c=a?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(s))return c.minor&&!c.patch?"minor":"patch"}let u=l?"pre":"";return r.major!==i.major?u+"major":r.minor!==i.minor?u+"minor":r.patch!==i.patch?u+"patch":"prerelease"};e.exports=i},49590:function(e,t,r){"use strict";let n=r(60518),i=(e,t,r)=>0===n(e,t,r);e.exports=i},52930:function(e,t,r){"use strict";let n=r(60518),i=(e,t,r)=>n(e,t,r)>0;e.exports=i},9126:function(e,t,r){"use strict";let n=r(60518),i=(e,t,r)=>n(e,t,r)>=0;e.exports=i},97593:function(e,t,r){"use strict";let n=r(42652),i=(e,t,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,o).version}catch(e){return null}};e.exports=i},37628:function(e,t,r){"use strict";let n=r(60518),i=(e,t,r)=>0>n(e,t,r);e.exports=i},43964:function(e,t,r){"use strict";let n=r(60518),i=(e,t,r)=>0>=n(e,t,r);e.exports=i},1210:function(e,t,r){"use strict";let n=r(42652),i=(e,t)=>new n(e,t).major;e.exports=i},26597:function(e,t,r){"use strict";let n=r(42652),i=(e,t)=>new n(e,t).minor;e.exports=i},65036:function(e,t,r){"use strict";let n=r(60518),i=(e,t,r)=>0!==n(e,t,r);e.exports=i},36322:function(e,t,r){"use strict";let n=r(42652),i=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}};e.exports=i},83641:function(e,t,r){"use strict";let n=r(42652),i=(e,t)=>new n(e,t).patch;e.exports=i},82983:function(e,t,r){"use strict";let n=r(36322),i=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=i},66287:function(e,t,r){"use strict";let n=r(60518),i=(e,t,r)=>n(t,e,r);e.exports=i},7233:function(e,t,r){"use strict";let n=r(59411),i=(e,t)=>e.sort((e,r)=>n(r,e,t));e.exports=i},50703:function(e,t,r){"use strict";let n=r(30657),i=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)};e.exports=i},53217:function(e,t,r){"use strict";let n=r(59411),i=(e,t)=>e.sort((e,r)=>n(e,r,t));e.exports=i},49264:function(e,t,r){"use strict";let n=r(36322),i=(e,t)=>{let r=n(e,t);return r?r.version:null};e.exports=i},25839:function(e,t,r){"use strict";let n=r(15895),i=r(64256),o=r(42652),a=r(47033),s=r(36322),c=r(49264),l=r(78119),u=r(97593),f=r(92426),p=r(1210),d=r(26597),h=r(83641),y=r(82983),m=r(60518),g=r(66287),b=r(44165),w=r(59411),v=r(53217),_=r(7233),S=r(52930),E=r(37628),A=r(49590),k=r(65036),x=r(9126),P=r(43964),R=r(23696),O=r(15053),T=r(99593),I=r(30657),C=r(50703),j=r(99186),U=r(235),$=r(13757),L=r(62150),N=r(498),D=r(88763),M=r(5679),H=r(18575),W=r(22532),B=r(8838),F=r(53789);e.exports={parse:s,valid:c,clean:l,inc:u,diff:f,major:p,minor:d,patch:h,prerelease:y,compare:m,rcompare:g,compareLoose:b,compareBuild:w,sort:v,rsort:_,gt:S,lt:E,eq:A,neq:k,gte:x,lte:P,cmp:R,coerce:O,Comparator:T,Range:I,satisfies:C,toComparators:j,maxSatisfying:U,minSatisfying:$,minVersion:L,validRange:N,outside:D,gtr:M,ltr:H,intersects:W,simplifyRange:B,subset:F,SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},64256:function(e){"use strict";let t="2.0.0",r=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,o=250,a=["major","premajor","minor","preminor","patch","prepatch","prerelease"];e.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:n,RELEASE_TYPES:a,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},42420:function(e,t,r){"use strict";var n=r(24358);let i="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?(...e)=>void 0:()=>{};e.exports=i},47033:function(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{let n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1},n=(e,t)=>r(t,e);e.exports={compareIdentifiers:r,rcompareIdentifiers:n}},49698:function(e){"use strict";class t{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>
12=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}e.exports=t},64346:function(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({}),n=e=>e?"object"!=typeof e?t:e:r;e.exports=n},15895:function(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:o}=r(64256),a=r(42420),s=(t=e.exports={}).re=[],c=t.safeRe=[],l=t.src=[],u=t.safeSrc=[],f=t.t={},p=0,d="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",o],[d,i]],y=e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},m=(e,t,r)=>{let n=y(t),i=p++;a(e,i,t),f[e]=i,l[i]=t,u[i]=n,s[i]=new RegExp(t,r?"g":void 0),c[i]=new RegExp(n,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),m("MAINVERSION",`(${l[f.NUMERICIDENTIFIER]})\\.(${l[f.NUMERICIDENTIFIER]})\\.(${l[f.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[f.NUMERICIDENTIFIERLOOSE]})\\.(${l[f.NUMERICIDENTIFIERLOOSE]})\\.(${l[f.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[f.NONNUMERICIDENTIFIER]}|${l[f.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[f.NONNUMERICIDENTIFIER]}|${l[f.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${l[f.PRERELEASEIDENTIFIER]}(?:\\.${l[f.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[f.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${d}+`),m("BUILD",`(?:\\+(${l[f.BUILDIDENTIFIER]}(?:\\.${l[f.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[f.MAINVERSION]}${l[f.PRERELEASE]}?${l[f.BUILD]}?`),m("FULL",`^${l[f.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[f.MAINVERSIONLOOSE]}${l[f.PRERELEASELOOSE]}?${l[f.BUILD]}?`),m("LOOSE",`^${l[f.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[f.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[f.XRANGEIDENTIFIER]})(?:\\.(${l[f.XRANGEIDENTIFIER]})(?:\\.(${l[f.XRANGEIDENTIFIER]})(?:${l[f.PRERELEASE]})?${l[f.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[f.XRANGEIDENTIFIERLOOSE]})(?:${l[f.PRERELEASELOOSE]})?${l[f.BUILD]}?)?)?`),m("XRANGE",`^${l[f.GTLT]}\\s*${l[f.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[f.GTLT]}\\s*${l[f.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${l[f.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[f.COERCEPLAIN]+`(?:${l[f.PRERELEASE]})?`+`(?:${l[f.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",l[f.COERCE],!0),m("COERCERTLFULL",l[f.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[f.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[f.LONETILDE]}${l[f.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[f.LONETILDE]}${l[f.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[f.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[f.LONECARET]}${l[f.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[f.LONECARET]}${l[f.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[f.GTLT]}\\s*(${l[f.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[f.GTLT]}\\s*(${l[f.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[f.GTLT]}\\s*(${l[f.LOOSEPLAIN]}|${l[f.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[f.XRANGEPLAIN]})\\s+-\\s+(${l[f.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[f.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},5679:function(e,t,r){"use strict";let n=r(88763),i=(e,t,r)=>n(e,t,">",r);e.exports=i},22532:function(e,t,r){"use strict";let n=r(30657),i=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r));e.exports=i},18575:function(e,t,r){"use strict";let n=r(88763),i=(e,t,r)=>n(e,t,"<",r);e.exports=i},235:function(e,t,r){"use strict";let n=r(42652),i=r(30657),o=(e,t,r)=>{let o=null,a=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!o||-1===a.compare(e))&&(a=new n(o=e,r))}),o};e.exports=o},13757:function(e,t,r){"use strict";let n=r(42652),i=r(30657),o=(e,t,r)=>{let o=null,a=null,s=null;try{s=new i(t,r)}catch(e){return null}
12return e.forEach(e=>{s.test(e)&&(!o||1===a.compare(e))&&(a=new n(o=e,r))}),o};e.exports=o},62150:function(e,t,r){"use strict";let n=r(42652),i=r(30657),o=r(52930),a=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r)||(r=new n("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let i=e.set[t],a=null;i.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||o(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||o(r,a))&&(r=a)}return r&&e.test(r)?r:null};e.exports=a},88763:function(e,t,r){"use strict";let n=r(42652),i=r(99593),{ANY:o}=i,a=r(30657),s=r(50703),c=r(52930),l=r(37628),u=r(43964),f=r(9126),p=(e,t,r,p)=>{let d,h,y,m,g;switch(e=new n(e,p),t=new a(t,p),r){case">":d=c,h=u,y=l,m=">",g=">=";break;case"<":d=l,h=f,y=c,m="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,p))return!1;for(let r=0;r<t.set.length;++r){let n=t.set[r],a=null,s=null;if(n.forEach(e=>{e.semver===o&&(e=new i(">=0.0.0")),a=a||e,s=s||e,d(e.semver,a.semver,p)?a=e:y(e.semver,s.semver,p)&&(s=e)}),a.operator===m||a.operator===g||(!s.operator||s.operator===m)&&h(e,s.semver)||s.operator===g&&y(e,s.semver))return!1}return!0};e.exports=p},8838:function(e,t,r){"use strict";let n=r(50703),i=r(60518);e.exports=(e,t,r)=>{let o=[],a=null,s=null,c=e.sort((e,t)=>i(e,t,r));for(let e of c)n(e,t,r)?(s=e,a||(a=e)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);let l=[];for(let[e,t]of o)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");let u=l.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return u.length<f.length?u:t}},53789:function(e,t,r){"use strict";let n=r(30657),i=r(99593),{ANY:o}=i,a=r(50703),s=r(60518),c=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(let n of e.set){for(let e of t.set){let t=f(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0},l=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],f=(e,t,r)=>{let n,i,c,f,h,y,m;if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=r.includePrerelease?l:u}if(1===t.length&&t[0].semver===o){if(r.includePrerelease)return!0;t=u}let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=p(n,t,r):"<"===t.operator||"<="===t.operator?i=d(i,t,r):g.add(t.semver);if(g.size>1||n&&i&&((c=s(n.semver,i.semver,r))>0||0===c&&(">="!==n.operator||"<="!==i.operator)))return null;for(let e of g){if(n&&!a(e,String(n),r)||i&&!a(e,String(i),r))return null;for(let n of t)if(!a(e,String(n),r))return!1;return!0}let b=!!i&&!r.includePrerelease&&!!i.semver.prerelease.length&&i.semver,w=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(b&&1===b.prerelease.length&&"<"===i.operator&&0===b.prerelease[0]&&(b=!1),t)){if(m=m||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,n){if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),">"===e.operator||">="===e.operator){if((f=p(n,e,r))===e&&f!==n)return!1}else if(">="===n.operator&&!a(n.semver,String(e),r))return!1}if(i){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if((h=d(i,e,r))===e&&h!==i)return!1}else if("<="===i.operator&&!a(i.semver,String(e),r))return!1}if(!e.operator&&(i||n)&&0!==c)return!1}return(!n||!y||!!i||0===c)&&(!i||!m||!!n||0===c)&&!w&&!b},p=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n>0?e:n<0?t:">"===t.operator&&">="===e.operator?t:e},d=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n<0?e:n>0?t:"<"===t.operator&&"<="===e.operator?t:e};e.exports=c},99186:function(e,t,r){"use strict";let n=r(30657),i=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "));e.exports=i},498:function(e,t,r){"use strict";let n=r(30657),i=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}};e.exports=i},81561:function(e,t,r){"use strict";var n=r(66766).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;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";
12case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=y,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=m,this.end=g,t=3;break;default:this.write=b,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function c(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e,t,r){var n=t.length-1;if(n<r)return 0;var i=c(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=c(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=c(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function u(e,t,r){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,"�"}}function f(e){var t=this.lastTotal-this.lastNeed,r=u(this,e,t);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 p(e,t){var r=l(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)}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(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 y(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 m(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 g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function w(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.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||""},s.prototype.end=d,s.prototype.text=p,s.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}},38190:function(e,t,r){"use strict";let n=r(8655);e.exports=s;let i=A().console||{},o={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:g,res:g,err:y};function a(e,t){return Array.isArray(e)?e.filter(function(e){return"!stdSerializers.err"!==e}):!0===e&&Object.keys(t)}function s(e){(e=e||{}).browser=e.browser||{};let t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");let r=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=a(e.browser.serialize,n),l=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(l=!1);let u=["error","fatal","warn","info","debug","trace"];"function"==typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===e.enabled&&(e.level="silent");let d=e.level||"info",y=Object.create(r);y.log||(y.log=w),Object.defineProperty(y,"levelVal",{get:b}
12),Object.defineProperty(y,"level",{get:v,set:_});let g={transmit:t,serialize:o,asObject:e.browser.asObject,levels:u,timestamp:m(e)};function b(){return"silent"===this.level?1/0:this.levels.values[this.level]}function v(){return this._level}function _(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,c(g,y,"error","log"),c(g,y,"fatal","error"),c(g,y,"warn","error"),c(g,y,"info","log"),c(g,y,"debug","log"),c(g,y,"trace","log")}function S(r,i){if(!r)throw Error("missing bindings for child Pino");i=i||{},o&&r.serializers&&(i.serializers=r.serializers);let a=i.serializers;if(o&&a){var s=Object.assign({},n,a),c=!0===e.browser.serialize?Object.keys(s):o;delete r.serializers,f([r],c,s,this._stdErrSerialize)}function l(e){this._childLevel=(0|e._childLevel)+1,this.error=p(e,r,"error"),this.fatal=p(e,r,"fatal"),this.warn=p(e,r,"warn"),this.info=p(e,r,"info"),this.debug=p(e,r,"debug"),this.trace=p(e,r,"trace"),s&&(this.serializers=s,this._serialize=c),t&&(this._logEvent=h([].concat(e._logEvent.bindings,r)))}return l.prototype=this,new l(this)}return y.levels=s.levels,y.level=d,y.setMaxListeners=y.getMaxListeners=y.emit=y.addListener=y.on=y.prependListener=y.once=y.prependOnceListener=y.removeListener=y.removeAllListeners=y.listeners=y.listenerCount=y.eventNames=y.write=y.flush=w,y.serializers=n,y._serialize=o,y._stdErrSerialize=l,y.child=S,t&&(y._logEvent=h()),y}function c(e,t,r,n){let o=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?w:o[r]?o[r]:i[r]||i[n]||w,l(e,t,r)}function l(e,t,r){(e.transmit||t[r]!==w)&&(t[r]=function(n){return function(){let o=e.timestamp(),a=Array(arguments.length),c=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var l=0;l<a.length;l++)a[l]=arguments[l];if(e.serialize&&!e.asObject&&f(a,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?n.call(c,u(this,r,a,o)):n.apply(c,a),e.transmit){let n=e.transmit.level||t.level,i=s.levels.values[n],c=s.levels.values[r];if(c<i)return;d(this,{ts:o,methodLevel:r,methodValue:c,transmitLevel:n,transmitValue:s.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},a)}}}(t[r]))}
12function u(e,t,r,i){e._serialize&&f(r,e._serialize,e.serializers,e._stdErrSerialize);let o=r.slice(),a=o[0],c={};i&&(c.time=i),c.level=s.levels.values[t];let l=(0|e._childLevel)+1;if(l<1&&(l=1),null!==a&&"object"==typeof a){for(;l--&&"object"==typeof o[0];)Object.assign(c,o.shift());a=o.length?n(o.shift(),o):void 0}else"string"==typeof a&&(a=n(o.shift(),o));return void 0!==a&&(c.msg=a),c}function f(e,t,r,n){for(let i in e)if(n&&e[i]instanceof Error)e[i]=s.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i]))for(let n in e[i])t&&t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function p(e,t,r){return function(){let n=Array(1+arguments.length);n[0]=t;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return e[r].apply(this,n)}}function d(e,t,r){let n=t.send,i=t.ts,o=t.methodLevel,a=t.methodValue,s=t.val,c=e._logEvent.bindings;f(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(e){return -1===c.indexOf(e)}),e._logEvent.level.label=o,e._logEvent.level.value=a,n(o,e._logEvent,s),e._logEvent=h(c)}function h(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function y(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}function m(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?v:_}function g(){return{}}function b(e){return e}function w(){}function v(){return!1}function _(){return Date.now()}function S(){return Math.round(Date.now()/1e3)}function E(){return new Date(Date.now()).toISOString()}function A(){function e(e){return void 0!==e&&e}try{if("undefined"!=typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}s.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},s.stdSerializers=o,s.stdTimeFunctions=Object.assign({},{nullTime:v,epochTime:_,unixTime:S,isoTime:E})},73122:function(e,t,r){"use strict";r.d(t,{LZ:function(){return i},eD:function(){return n},rK:function(){return o},zS:function(){return a}});let n=Symbol("skip-csrf-check"),i=Symbol("return-type-raw"),o=Symbol("custom-fetch"),a=Symbol("conform-internal")},63568:function(e,t,r){"use strict";function n(e){return{id:"credentials",name:"Credentials",type:"credentials",credentials:{},authorize:()=>null,options:e}}r.d(t,{Z:function(){return n}})},221:function(e,t,r){"use strict";function n(e){return{createUser:t=>e.user.create({data:t}),getUser:t=>e.user.findUnique({where:{id:t}}),getUserByEmail:t=>e.user.findUnique({where:{email:t}}),async getUserByAccount(t){let r=await e.account.findUnique({where:{provider_providerAccountId:t},select:{user:!0}});return r?.user??null},updateUser:({id:t,...r})=>e.user.update({where:{id:t},data:r}),deleteUser:t=>e.user.delete({where:{id:t}}),linkAccount:t=>e.account.create({data:t}),unlinkAccount:t=>e.account.delete({where:{provider_providerAccountId:t}}),async getSessionAndUser(t){let r=await e.session.findUnique({where:{sessionToken:t},include:{user:!0}});if(!r)return null;let{user:n,...i}=r;return{user:n,session:i}},createSession:t=>e.session.create({data:t}),updateSession:t=>e.session.update({where:{sessionToken:t.sessionToken},data:t}),deleteSession:t=>e.session.delete({where:{sessionToken:t}}),async createVerificationToken(t){let r=await e.verificationToken.create({data:t});return r.id&&delete r.id,r},async useVerificationToken(t){try{let r=await e.verificationToken.delete({where:{identifier_token:t}});return r.id&&delete r.id,r}catch(e){if("P2025"===e.code)return null;throw e}}}}r.d(t,{N:function(){return n}})},40365:function(e,t,r){"use strict";let n,i,o,a;r.d(t,{UC:function(){return y.UC},ZP:function(){return aD}});var s={};r.r(s),r.d(s,{parse:function(){return t$},serialize:function(){return tD}});var c=function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},l=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};let u=4096,f=160,p=3936;function d(e){let t=e?"__Secure-":"";return{sessionToken:{name:`${t}authjs.session-token`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}},callbackUrl:{name:`${t}authjs.callback-url`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}},csrfToken:{name:`${e?"__Host-":""}authjs.csrf-token`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}},pkceCodeVerifier:{name:`${t}authjs.pkce.code_verifier`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e,maxAge:900}},state:{name:`${t}authjs.state`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e,maxAge:900}},nonce:{name:`${t}authjs.nonce`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e}},webauthnChallenge:{name:`${t}authjs.challenge`,options:{httpOnly:!0,sameSite:"lax",path:"/",secure:e,maxAge:900}}}}class h{constructor(e,t,r){if(ry.add(this),rm.set(this,{}),rg.set(this,void 0),rb.set(this,void 0),c(this,rb,r,"f"),c(this,rg,e,"f"),!t)return;let{name:n}=e;for(let[e,r]of Object.entries(t))e.startsWith(n)&&r&&(l(this,rm,"f")[e]=r)}get value(){return Object.keys(l(this,rm,"f")).sort((e,t)=>
12parseInt(e.split(".").pop()||"0")-parseInt(t.split(".").pop()||"0")).map(e=>l(this,rm,"f")[e]).join("")}chunk(e,t){let r=l(this,ry,"m",rv).call(this);for(let n of l(this,ry,"m",rw).call(this,{name:l(this,rg,"f").name,value:e,options:{...l(this,rg,"f").options,...t}}))r[n.name]=n;return Object.values(r)}clean(){return Object.values(l(this,ry,"m",rv).call(this))}}rm=new WeakMap,rg=new WeakMap,rb=new WeakMap,ry=new WeakSet,rw=function(e){let t=Math.ceil(e.value.length/p);if(1===t)return l(this,rm,"f")[e.name]=e.value,[e];let r=[];for(let n=0;n<t;n++){let t=`${e.name}.${n}`,i=e.value.substr(n*p,p);r.push({...e,name:t,value:i}),l(this,rm,"f")[t]=i}return l(this,rb,"f").debug("CHUNKING_SESSION_COOKIE",{message:`Session cookie exceeds allowed ${u} bytes.`,emptyCookieSize:f,valueSize:e.value.length,chunks:r.map(e=>e.value.length+f)}),r},rv=function(){let e={};for(let t in l(this,rm,"f"))delete l(this,rm,"f")?.[t],e[t]={name:t,value:"",options:{...l(this,rg,"f").options,maxAge:0}};return e};var y=r(92289);let m=!1;function g(e,t){try{return/^https?:/.test(new URL(e,e.startsWith("/")?t:void 0).protocol)}catch{return!1}}function b(e){return/^v\d+(?:\.\d+){0,2}$/.test(e)}let w=!1,v=!1,_=!1,S=["createVerificationToken","useVerificationToken","getUserByEmail"],E=["createUser","getUser","getUserByEmail","getUserByAccount","updateUser","linkAccount","createSession","getSessionAndUser","updateSession","deleteSession"],A=["createUser","getUser","linkAccount","getAccount","getAuthenticator","createAuthenticator","listAuthenticatorsByUserId","updateAuthenticatorCounter"];function k(e,t){let{url:r}=e,n=[];if(!m&&t.debug&&n.push("debug-enabled"),!t.trustHost)return new y.kA(`Host must be trusted. URL was: ${e.url}`);if(!t.secret?.length)return new y.yv("Please define a `secret`");let i=e.query?.callbackUrl;if(i&&!g(i,r.origin))return new y.k7(`Invalid callback URL. Received: ${i}`);let{callbackUrl:o}=d(t.useSecureCookies??"https:"===r.protocol),a=e.cookies?.[t.cookies?.callbackUrl?.name??o.name];if(a&&!g(a,r.origin))return new y.k7(`Invalid callback URL. Received: ${a}`);let s=!1;for(let e of t.providers){let t="function"==typeof e?e():e;if(("oauth"===t.type||"oidc"===t.type)&&!(t.issuer??t.options?.issuer)){let e;let{authorization:r,token:n,userinfo:i}=t;if("string"==typeof r||r?.url?"string"==typeof n||n?.url?"string"==typeof i||i?.url||(e="userinfo"):e="token":e="authorization",e)return new y.Hi(`Provider "${t.id}" is missing both \`issuer\` and \`${e}\` endpoint config. At least one of them is required`)}if("credentials"===t.type)w=!0;else if("email"===t.type)v=!0;else if("webauthn"===t.type){if(_=!0,t.simpleWebAuthnBrowserVersion&&!b(t.simpleWebAuthnBrowserVersion))return new y.l4(`Invalid provider config for "${t.id}": simpleWebAuthnBrowserVersion "${t.simpleWebAuthnBrowserVersion}" must be a valid semver string.`);if(t.enableConditionalUI){if(s)return new y.j7("Multiple webauthn providers have 'enableConditionalUI' set to True. Only one provider can have this option enabled at a time");if(s=!0,!Object.values(t.formFields).some(e=>e.autocomplete&&e.autocomplete.toString().indexOf("webauthn")>-1))return new y.BX(`Provider "${t.id}" has 'enableConditionalUI' set to True, but none of its formFields have 'webauthn' in their autocomplete param`)}}}if(w){let e=t.session?.strategy==="database",r=!t.providers.some(e=>
12"credentials"!==("function"==typeof e?e():e).type);if(e&&r)return new y.lA("Signing in with credentials only supported if JWT strategy is enabled");if(t.providers.some(e=>{let t="function"==typeof e?e():e;return"credentials"===t.type&&!t.authorize}))return new y.yQ("Must define an authorize() handler to use credentials authentication provider")}let{adapter:c,session:l}=t,u=[];if(v||l?.strategy==="database"||!l?.strategy&&c){if(v){if(!c)return new y.Xp("Email login requires an adapter");u.push(...S)}else{if(!c)return new y.Xp("Database session requires an adapter");u.push(...E)}}if(_){if(!t.experimental?.enableWebAuthn)return new y.dw("WebAuthn is an experimental feature. To enable it, set `experimental.enableWebAuthn` to `true` in your config");if(n.push("experimental-webauthn"),!c)return new y.Xp("WebAuthn requires an adapter");u.push(...A)}if(c){let e=u.filter(e=>!(e in c));if(e.length)return new y.xP(`Required adapter methods were missing: ${e.join(", ")}`)}return m||(m=!0),n}let x=()=>{if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;throw Error("unable to locate global object")};var P=async(e,t,r,n,i)=>{let{crypto:{subtle:o}}=x();return new Uint8Array(await o.deriveBits({name:"HKDF",hash:`SHA-${e.substr(3)}`,salt:r,info:n},await o.importKey("raw",t,"HKDF",!1,["deriveBits"]),i<<3))};function R(e){switch(e){case"sha256":case"sha384":case"sha512":case"sha1":return e;default:throw TypeError('unsupported "digest" value')}}function O(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}function T(e){let t=O(e,"ikm");if(!t.byteLength)throw TypeError('"ikm" must be at least one byte in length');return t}function I(e){let t=O(e,"info");if(t.byteLength>1024)throw TypeError('"info" must not contain more than 1024 bytes');return t}function C(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}async function j(e,t,r,n,i){return P(R(e),T(t),O(r,"salt"),I(n),C(i,e))}var U=async(e,t)=>{let r=`SHA-${e.slice(-3)}`;return new Uint8Array(await crypto.subtle.digest(r,t))};let $=new TextEncoder,L=new TextDecoder,N=4294967296;function D(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}function M(e,t,r){if(t<0||t>=N)throw RangeError(`value must be >= 0 and <= ${N-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function H(e){let t=Math.floor(e/N),r=e%N,n=new Uint8Array(8);return M(n,t,0),M(n,r,4),n}function W(e){let t=new Uint8Array(4);return M(t,e),t}function B(e){if(Uint8Array.prototype.toBase64)return e.toBase64();let t=32768,r=[];for(let n=0;n<e.length;n+=t)r.push(String.fromCharCode.apply(null,e.subarray(n,n+t)));return btoa(r.join(""))}function F(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(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}function K(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:L.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=L.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return F(t)}catch{throw TypeError("The input to be decoded is not correctly encoded.")}}function z(e){let t=e;return("string"==typeof t&&(t=$.encode(t)),Uint8Array.prototype.toBase64)?t.toBase64({alphabet:"base64url",omitPadding:!0}):B(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}class J extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class q extends J{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(e,t,r="unspecified",n="unspecified"){super(e,{cause:{claim:r,reason:n,payload:t}}
12),this.claim=r,this.reason=n,this.payload=t}}class G extends J{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(e,t,r="unspecified",n="unspecified"){super(e,{cause:{claim:r,reason:n,payload:t}}),this.claim=r,this.reason=n,this.payload=t}}class V extends J{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"}class X extends J{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"}class Z extends J{static code="ERR_JWE_DECRYPTION_FAILED";code="ERR_JWE_DECRYPTION_FAILED";constructor(e="decryption operation failed",t){super(e,t)}}class Y extends J{static code="ERR_JWE_INVALID";code="ERR_JWE_INVALID"}class Q extends J{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}class ee extends J{static code="ERR_JWK_INVALID";code="ERR_JWK_INVALID"}class et extends J{[Symbol.asyncIterator];static code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t)}}function er(e){if(!en(e))throw Error("CryptoKey instance expected")}function en(e){return e?.[Symbol.toStringTag]==="CryptoKey"}function ei(e){return e?.[Symbol.toStringTag]==="KeyObject"}var eo=e=>en(e)||ei(e);function ea(e){return"object"==typeof e&&null!==e}var es=e=>{if(!ea(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};function ec(e){return es(e)&&"string"==typeof e.kty}function el(e){return"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d)}function eu(e){return"oct"!==e.kty&&void 0===e.d&&void 0===e.priv}function ef(e){return"oct"===e.kty&&"string"==typeof e.k}function ep(e,t,...r){if((r=r.filter(Boolean)).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?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var ed=(e,...t)=>ep("Key must be ",e,...t);function eh(e,t,...r){return ep(`Key for the ${e} algorithm must be `,t,...r)}async function ey(e){if(ei(e)){if("secret"!==e.type)return e.export({format:"jwk"});e=e.export()}if(e instanceof Uint8Array)return{kty:"oct",k:z(e)};if(!en(e))throw TypeError(ed(e,"CryptoKey","KeyObject","Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:n,use:i,...o}=await crypto.subtle.exportKey("jwk",e);return"AKP"===o.kty&&(o.alg=n),o}async function em(e){return ey(e)}let eg=(e,t)=>{if("string"!=typeof e||!e)throw new ee(`${t} missing or invalid`)};async function eb(e,t){let r,n;if(ec(e))r=e;else if(eo(e))r=await em(e);else throw TypeError(ed(e,"CryptoKey","KeyObject","JSON Web Key"));if("sha256"!==(t??="sha256")&&"sha384"!==t&&"sha512"!==t)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(r.kty){case"AKP":eg(r.alg,'"alg" (Algorithm) Parameter'),eg(r.pub,'"pub" (Public key) Parameter'),n={alg:r.alg,kty:r.kty,pub:r.pub};break;case"EC":eg(r.crv,'"crv" (Curve) Parameter'),eg(r.x,'"x" (X Coordinate) Parameter'),eg(r.y,'"y" (Y Coordinate) Parameter'),n={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":eg(r.crv,'"crv" (Subtype of Key Pair) Parameter'),eg(r.x,'"x" (Public Key) Parameter'),n={crv:r.crv,kty:r.kty,x:r.x};break;case"RSA":eg(r.e,'"e" (Exponent) Parameter'),eg(r.n,'"n" (Modulus) Parameter'),n={e:r.e,kty:r.kty,n:r.n};break;case"oct":eg(r.k,'"k" (Key Value) Parameter'),n={k:r.k,kty:r.kty};break;default:throw new X('"kty" (Key Type) Parameter missing or unsupported')}let i=$.encode(JSON.stringify(n));return z(await U(t,i))}let ew=Symbol();function ev(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 X(`Unsupported JWE Algorithm: ${e}`)}}var e_=e=>crypto.getRandomValues(new Uint8Array(ev(e)>>3)),eS=(e,t)=>{if(t.length<<3!==ev(e))throw new Y("Invalid Initialization Vector length")},eE=(e,t)=>{let r=e.byteLength<<3;if(r!==t)throw new Y(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)};function eA(e,t="algorithm.name"){return TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function ek(e,t){return e.name===t}function ex(e){return parseInt(e.name.slice(4),10)}function eP(e,t){if(t&&!e.usages.includes(t))throw TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function eR(e,t,r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!ek(e.algorithm,"AES-GCM"))throw eA("AES-GCM");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw eA(r,"algorithm.length");break}
12case"A128KW":case"A192KW":case"A256KW":{if(!ek(e.algorithm,"AES-KW"))throw eA("AES-KW");let r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw eA(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":break;default:throw eA("ECDH or X25519")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!ek(e.algorithm,"PBKDF2"))throw eA("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!ek(e.algorithm,"RSA-OAEP"))throw eA("RSA-OAEP");let r=parseInt(t.slice(9),10)||1;if(ex(e.algorithm.hash)!==r)throw eA(`SHA-${r}`,"algorithm.hash");break}default:throw TypeError("CryptoKey does not support this operation")}eP(e,r)}async function eO(e,t,r,n,i){if(!(r instanceof Uint8Array))throw TypeError(ed(r,"Uint8Array"));let o=parseInt(e.slice(1,4),10),a=await crypto.subtle.importKey("raw",r.subarray(o>>3),"AES-CBC",!1,["encrypt"]),s=await crypto.subtle.importKey("raw",r.subarray(0,o>>3),{hash:`SHA-${o<<1}`,name:"HMAC"},!1,["sign"]),c=new Uint8Array(await crypto.subtle.encrypt({iv:n,name:"AES-CBC"},a,t)),l=D(i,n,c,H(i.length<<3));return{ciphertext:c,tag:new Uint8Array((await crypto.subtle.sign("HMAC",s,l)).slice(0,o>>3)),iv:n}}async function eT(e,t,r,n,i){let o;r instanceof Uint8Array?o=await crypto.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(eR(r,e,"encrypt"),o=r);let a=new Uint8Array(await crypto.subtle.encrypt({additionalData:i,iv:n,name:"AES-GCM",tagLength:128},o,t)),s=a.slice(-16);return{ciphertext:a.slice(0,-16),tag:s,iv:n}}var eI=async(e,t,r,n,i)=>{if(!en(r)&&!(r instanceof Uint8Array))throw TypeError(ed(r,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));switch(n?eS(e,n):n=e_(e),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&eE(r,parseInt(e.slice(-3),10)),eO(e,t,r,n,i);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&eE(r,parseInt(e.slice(1,4),10)),eT(e,t,r,n,i);default:throw new X("Unsupported JWE Content Encryption Algorithm")}};function eC(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw TypeError(`Invalid key size for alg: ${t}`)}function ej(e,t,r){return e instanceof Uint8Array?crypto.subtle.importKey("raw",e,"AES-KW",!0,[r]):(eR(e,t,r),e)}async function eU(e,t,r){let n=await ej(t,e,"wrapKey");eC(n,e);let i=await crypto.subtle.importKey("raw",r,{hash:"SHA-256",name:"HMAC"},!0,["sign"]);return new Uint8Array(await crypto.subtle.wrapKey("raw",i,n,"AES-KW"))}async function e$(e,t,r){let n=await ej(t,e,"unwrapKey");eC(n,e);let i=await crypto.subtle.unwrapKey("raw",r,n,"AES-KW",{hash:"SHA-256",name:"HMAC"},!0,["sign"]);return new Uint8Array(await crypto.subtle.exportKey("raw",i))}function eL(e){return D(W(e.length),e)}async function eN(e,t,r){let n=t>>3,i=32,o=Math.ceil(n/32),a=new Uint8Array(32*o);for(let t=1;t<=o;t++){let n=new Uint8Array(4+e.length+r.length);n.set(W(t),0),n.set(e,4),n.set(r,4+e.length);let o=await U("sha256",n);a.set(o,(t-1)*i)}return a.slice(0,n)}async function eD(e,t,r,n,i=new Uint8Array(0),o=new Uint8Array(0)){eR(e,"ECDH"),eR(t,"ECDH","deriveBits");let a=eL($.encode(r)),s=eL(i),c=D(a,s,eL(o),W(n),new Uint8Array(0));return eN(new Uint8Array(await crypto.subtle.deriveBits({name:e.algorithm.name,public:e},t,eM(e))),n,c)}function eM(e){return"X25519"===e.algorithm.name?256:Math.ceil(parseInt(e.algorithm.namedCurve.slice(-3),10)/8)<<3}function eH(e){switch(e.algorithm.namedCurve){case"P-256":case"P-384":case"P-521":return!0;default:return"X25519"===e.algorithm.name}}function eW(e,t){return e instanceof Uint8Array?crypto.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]):(eR(e,t,"deriveBits"),e)}let eB=(e,t)=>D($.encode(e),new Uint8Array([0]),t);async function eF(e,t,r,n){if(!(e instanceof Uint8Array)||e.length<8)throw new Y("PBES2 Salt Input must be 8 or more octets");let i=eB(t,e),o=parseInt(t.slice(13,16),10),a={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:i},s=await eW(n,t);return new Uint8Array(await crypto.subtle.deriveBits(a,s,o))}async function eK(e,t,r,n=2048,i=crypto.getRandomValues(new Uint8Array(16))){let o=await eF(i,e,n,t);return{encryptedKey:await eU(e.slice(-6),o,r),p2c:n,p2s:z(i)}}async function ez(e,t,r,n,i){let o=await eF(i,e,n,t);return e$(e.slice(-6),o,r)}var eJ=(e,t)=>
12{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};let eq=e=>{switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new X(`alg ${e} is not supported either by JOSE or your javascript runtime`)}};async function eG(e,t,r){return eR(t,e,"encrypt"),eJ(e,t),new Uint8Array(await crypto.subtle.encrypt(eq(e),t,r))}async function eV(e,t,r){return eR(t,e,"decrypt"),eJ(e,t),new Uint8Array(await crypto.subtle.decrypt(eq(e),t,r))}function eX(e){let t,r;switch(e.kty){case"AKP":switch(e.alg){case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":t={name:e.alg},r=e.priv?["sign"]:["verify"];break;default:throw new X('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 X('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 X('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;
12case"OKP":switch(e.alg){case"Ed25519":case"EdDSA":t={name:"Ed25519"},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 X('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new X('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}var eZ=async e=>{if(!e.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:t,keyUsages:r}=eX(e),n={...e};return"AKP"!==n.kty&&delete n.alg,delete n.use,crypto.subtle.importKey("jwk",n,t,e.ext??(!e.d&&!e.priv),e.key_ops??r)};let eY=async(e,t,r,i=!1)=>{let o=(n||=new WeakMap).get(e);if(o?.[r])return o[r];let a=await eZ({...t,alg:r});return i&&Object.freeze(e),o?o[r]=a:n.set(e,{[r]:a}),a},eQ=(e,t)=>{let r;let i=(n||=new WeakMap).get(e);if(i?.[t])return i[t];let o="public"===e.type,a=!!o;if("x25519"===e.asymmetricKeyType){switch(t){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw TypeError("given KeyObject instance cannot be used for this algorithm")}r=e.toCryptoKey(e.asymmetricKeyType,a,o?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw TypeError("given KeyObject instance cannot be used for this algorithm");r=e.toCryptoKey(e.asymmetricKeyType,a,[o?"verify":"sign"])}switch(e.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":if(t!==e.asymmetricKeyType.toUpperCase())throw TypeError("given KeyObject instance cannot be used for this algorithm");r=e.toCryptoKey(e.asymmetricKeyType,a,[o?"verify":"sign"])}if("rsa"===e.asymmetricKeyType){let n;switch(t){case"RSA-OAEP":n="SHA-1";break;case"RS256":case"PS256":case"RSA-OAEP-256":n="SHA-256";break;case"RS384":case"PS384":case"RSA-OAEP-384":n="SHA-384";break;case"RS512":case"PS512":case"RSA-OAEP-512":n="SHA-512";break;default:throw TypeError("given KeyObject instance cannot be used for this algorithm")}if(t.startsWith("RSA-OAEP"))return e.toCryptoKey({name:"RSA-OAEP",hash:n},a,o?["encrypt"]:["decrypt"]);r=e.toCryptoKey({name:t.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:n},a,[o?"verify":"sign"])}if("ec"===e.asymmetricKeyType){let n=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get(e.asymmetricKeyDetails?.namedCurve);if(!n)throw TypeError("given KeyObject instance cannot be used for this algorithm");"ES256"===t&&"P-256"===n&&(r=e.toCryptoKey({name:"ECDSA",namedCurve:n},a,[o?"verify":"sign"])),"ES384"===t&&"P-384"===n&&(r=e.toCryptoKey({name:"ECDSA",namedCurve:n},a,[o?"verify":"sign"])),"ES512"===t&&"P-521"===n&&(r=e.toCryptoKey({name:"ECDSA",namedCurve:n},a,[o?"verify":"sign"])),t.startsWith("ECDH-ES")&&(r=e.toCryptoKey({name:"ECDH",namedCurve:n},a,o?[]:["deriveBits"]))}if(!r)throw TypeError("given KeyObject instance cannot be used for this algorithm");return i?i[t]=r:n.set(e,{[t]:r}),r};var e0=async(e,t)=>{if(e instanceof Uint8Array||en(e))return e;if(ei(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return eQ(e,t)}catch(e){if(e instanceof TypeError)throw e}let r=e.export({format:"jwk"});return eY(e,r,t)}if(ec(e))return e.k?K(e.k):eY(e,e,t,!0);throw Error("unreachable")};function e1(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 X(`Unsupported JWE Algorithm: ${e}`)}}var e2=e=>crypto.getRandomValues(new Uint8Array(e1(e)>>3));async function e3(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");let r={name:"HMAC",hash:"SHA-256"},n=await crypto.subtle.generateKey(r,!1,["sign"]),i=new Uint8Array(await crypto.subtle.sign(r,n,e)),o=new Uint8Array(await crypto.subtle.sign(r,n,t)),a=0,s=-1;for(;++s<32;)a|=i[s]^o[s];return 0===a}async function e6(e,t,r,n,i,o){let a,s;if(!(t instanceof Uint8Array))throw TypeError(ed(t,"Uint8Array"));let c=parseInt(e.slice(1,4),10),l=await crypto.subtle.importKey("raw",t.subarray(c>>3),"AES-CBC",!1,["decrypt"]),u=await crypto.subtle.importKey("raw",t.subarray(0,c>>3),{hash:`SHA-${c<<1}`,name:"HMAC"},!1,["sign"]),f=D(o,n,r,H(o.length<<3)),p=new Uint8Array((await crypto.subtle.sign("HMAC",u,f)).slice(0,c>>3));try{a=await e3(i,p)}catch{}if(!a)throw new Z;try{s=new Uint8Array(await crypto.subtle.decrypt({iv:n,name:"AES-CBC"},l,r))}catch{}if(!s)throw new Z;return s}async function e5(e,t,r,n,i,o){let a;t instanceof Uint8Array?a=await crypto.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(eR(t,e,"decrypt"),a=t);try{return new Uint8Array(await crypto.subtle.decrypt({additionalData:o,iv:n,name:"AES-GCM",tagLength:128},a,D(r,i)))}catch{throw new Z}}var e4=async(e,t,r,n,i,o)=>
12{if(!en(t)&&!(t instanceof Uint8Array))throw TypeError(ed(t,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(!n)throw new Y("JWE Initialization Vector missing");if(!i)throw new Y("JWE Authentication Tag missing");switch(eS(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&eE(t,parseInt(e.slice(-3),10)),e6(e,t,r,n,i,o);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&eE(t,parseInt(e.slice(1,4),10)),e5(e,t,r,n,i,o);default:throw new X("Unsupported JWE Content Encryption Algorithm")}};async function e8(e,t,r,n){let i=e.slice(0,7),o=await eI(i,r,t,n,new Uint8Array(0));return{encryptedKey:o.ciphertext,iv:z(o.iv),tag:z(o.tag)}}async function e9(e,t,r,n,i){return e4(e.slice(0,7),t,r,n,i,new Uint8Array(0))}var e7=async(e,t,r,n,i={})=>{let o,a,s;switch(e){case"dir":s=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let c;if(er(r),!eH(r))throw new X("ECDH with the provided key is not allowed or not supported by your javascript runtime");let{apu:l,apv:u}=i;c=i.epk?await e0(i.epk,e):(await crypto.subtle.generateKey(r.algorithm,!0,["deriveBits"])).privateKey;let{x:f,y:p,crv:d,kty:h}=await em(c),y=await eD(r,c,"ECDH-ES"===e?t:e,"ECDH-ES"===e?e1(t):parseInt(e.slice(-5,-2),10),l,u);if(a={epk:{x:f,crv:d,kty:h}},"EC"===h&&(a.epk.y=p),l&&(a.apu=z(l)),u&&(a.apv=z(u)),"ECDH-ES"===e){s=y;break}s=n||e2(t);let m=e.slice(-6);o=await eU(m,y,s);break}case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s=n||e2(t),er(r),o=await eG(e,r,s);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{s=n||e2(t);let{p2c:c,p2s:l}=i;({encryptedKey:o,...a}=await eK(e,r,s,c,l));break}case"A128KW":case"A192KW":case"A256KW":s=n||e2(t),o=await eU(e,r,s);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{s=n||e2(t);let{iv:c}=i;({encryptedKey:o,...a}=await e8(e,r,s,c));break}default:throw new X('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:s,encryptedKey:o,parameters:a}},te=(...e)=>{let t;let 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},tt=(e,t,r,n,i)=>{let o;if(void 0!==i.crit&&n?.crit===void 0)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 a of(o=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t,n.crit)){if(!o.has(a))throw new X(`Extension Header Parameter "${a}" is not recognized`);if(void 0===i[a])throw new e(`Extension Header Parameter "${a}" is missing`);if(o.get(a)&&void 0===n[a])throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(n.crit)};let tr=e=>e?.[Symbol.toStringTag],tn=(e,t,r)=>{if(void 0!==t.use){let e;switch(r){case"sign":case"verify":e="sig";break;case"encrypt":case"decrypt":e="enc"}if(t.use!==e)throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`)}if(void 0!==t.alg&&t.alg!==e)throw TypeError(`Invalid key for this operation, its "alg" must be "${e}" when present`);if(Array.isArray(t.key_ops)){let n;switch(!0){case"sign"===r||"verify"===r:case"dir"===e:case e.includes("CBC-HS"):n=r;break;case e.startsWith("PBES2"):n="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test(e):n=!e.includes("GCM")&&e.endsWith("KW")?"encrypt"===r?"wrapKey":"unwrapKey":r;break;case"encrypt"===r&&e.startsWith("RSA"):n="wrapKey";break;case"decrypt"===r:n=e.startsWith("RSA")?"unwrapKey":"deriveBits"}if(n&&t.key_ops?.includes?.(n)===!1)throw TypeError(`Invalid key for this operation, its "key_ops" must include "${n}" when present`)}return!0},ti=(e,t,r)=>{if(!(t instanceof Uint8Array)){if(ec(t)){if(ef(t)&&tn(e,t,r))return;throw TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!eo(t))throw TypeError(eh(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw TypeError(`${tr(t)} instances for symmetric algorithms must be of type "secret"`)}},to=(e,t,r)=>{if(ec(t))switch(r){case"decrypt":case"sign":if(el(t)&&tn(e,t,r))return;throw TypeError("JSON Web Key for this operation be a private JWK");case"encrypt":case"verify":if(eu(t)&&tn(e,t,r))return;throw TypeError("JSON Web Key for this operation be a public JWK")}if(!eo(t))throw TypeError(eh(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw TypeError(`${tr(t)} instances for asymmetric algorithms must not be of type "secret"`);if("public"===t.type)switch(r){case"sign":throw TypeError(`${tr(t)} instances for asymmetric algorithm signing must be of type "private"`);case"decrypt":throw TypeError(`${tr(t)} instances for asymmetric algorithm decryption must be of type "private"`)}if("private"===t.type)switch(r){case"verify":throw TypeError(`${tr(t)} instances for asymmetric algorithm verifying must be of type "public"`);case"encrypt":throw TypeError(`${tr(t)} instances for asymmetric algorithm encryption must be of type "public"`)}};var ta=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(e)||/^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(e)?ti(e,t,r):to(e,t,r)};class ts{#e;#t;#r;#n;#i;#o;#a;#s;constructor(e){if(!(e instanceof Uint8Array))throw TypeError("plaintext must be an instance of Uint8Array");this.#e=e}setKeyManagementParameters(e){if(this.#s)throw TypeError("setKeyManagementParameters can only be called once");return this.#s=e,this}setProtectedHeader(e){if(this.#t)throw TypeError("setProtectedHeader can only be called once");return this.#t=e,this}setSharedUnprotectedHeader(e){if(this.#r)throw TypeError("setSharedUnprotectedHeader can only be called once");return this.#r=e,this}setUnprotectedHeader(e){if(this.#n)throw TypeError("setUnprotectedHeader can only be called once");return this.#n=e,this}setAdditionalAuthenticatedData(e){return this.#i=e,this}setContentEncryptionKey(e){if(this.#o)throw TypeError("setContentEncryptionKey can only be called once");return this.#o=e,this}setInitializationVector(e){if(this.#a)throw TypeError("setInitializationVector can only be called once");return this.#a=e,this}async encrypt(e,t){let r,n,i,o,a;if(!this.#t&&!this.#n&&!this.#r)throw new Y("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!te(this.#t,this.#n,this.#r))throw new Y("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");let s={...this.#t,...this.#n,...this.#r};if(tt(Y,new Map,t?.crit,this.#t,s),void 0!==s.zip)throw new X('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');let{alg:c,enc:l}=s;if("string"!=typeof c||!c)throw new Y('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof l||!l)throw new Y('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(this.#o&&("dir"===c||"ECDH-ES"===c))throw TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${c}`);ta("dir"===c?l:c,e,"encrypt");{let i;let o=await e0(e,c);({cek:n,encryptedKey:r,parameters:i}=await e7(c,l,o,this.#o,this.#s)),i&&(t&&ew in t?this.#n?this.#n={...this.#n,...i}:this.setUnprotectedHeader(i):this.#t?this.#t={...this.#t,...i}:this.setProtectedHeader(i))}o=this.#t?$.encode(z(JSON.stringify(this.#t))):$.encode(""),this.#i?(a=z(this.#i),i=D(o,$.encode("."),$.encode(a))):i=o;let{ciphertext:u,tag:f,iv:p}=await eI(l,this.#e,n,this.#a,i),d={ciphertext:z(u)};
12return p&&(d.iv=z(p)),f&&(d.tag=z(f)),r&&(d.encrypted_key=z(r)),a&&(d.aad=a),this.#t&&(d.protected=L.decode(o)),this.#r&&(d.unprotected=this.#r),this.#n&&(d.header=this.#n),d}}class tc{#c;constructor(e){this.#c=new ts(e)}setContentEncryptionKey(e){return this.#c.setContentEncryptionKey(e),this}setInitializationVector(e){return this.#c.setInitializationVector(e),this}setProtectedHeader(e){return this.#c.setProtectedHeader(e),this}setKeyManagementParameters(e){return this.#c.setKeyManagementParameters(e),this}async encrypt(e,t){let r=await this.#c.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}var tl=e=>Math.floor(e.getTime()/1e3);let tu=60,tf=3600,tp=86400,td=604800,th=31557600,ty=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;var tm=e=>{let t;let r=ty.exec(e);if(!r||r[4]&&r[1])throw TypeError("Invalid time period format");let n=parseFloat(r[2]);switch(r[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":t=Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":t=Math.round(n*tu);break;case"hour":case"hours":case"hr":case"hrs":case"h":t=Math.round(n*tf);break;case"day":case"days":case"d":t=Math.round(n*tp);break;case"week":case"weeks":case"w":t=Math.round(n*td);break;default:t=Math.round(n*th)}return"-"===r[1]||"ago"===r[4]?-t:t};function tg(e,t){if(!Number.isFinite(t))throw TypeError(`Invalid ${e} input`);return t}let tb=e=>e.includes("/")?e.toLowerCase():`application/${e.toLowerCase()}`,tw=(e,t)=>"string"==typeof e?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e)));function tv(e,t,r={}){let n,i;try{n=JSON.parse(L.decode(t))}catch{}if(!es(n))throw new Q("JWT Claims Set must be a top-level JSON object");let{typ:o}=r;if(o&&("string"!=typeof e.typ||tb(e.typ)!==tb(o)))throw new q('unexpected "typ" JWT header value',n,"typ","check_failed");let{requiredClaims:a=[],issuer:s,subject:c,audience:l,maxTokenAge:u}=r,f=[...a];for(let e of(void 0!==u&&f.push("iat"),void 0!==l&&f.push("aud"),void 0!==c&&f.push("sub"),void 0!==s&&f.push("iss"),new Set(f.reverse())))if(!(e in n))throw new q(`missing required "${e}" claim`,n,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(n.iss))throw new q('unexpected "iss" claim value',n,"iss","check_failed");if(c&&n.sub!==c)throw new q('unexpected "sub" claim value',n,"sub","check_failed");if(l&&!tw(n.aud,"string"==typeof l?[l]:l))throw new q('unexpected "aud" claim value',n,"aud","check_failed");switch(typeof r.clockTolerance){case"string":i=tm(r.clockTolerance);break;case"number":i=r.clockTolerance;break;case"undefined":i=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:p}=r,d=tl(p||new Date);if((void 0!==n.iat||u)&&"number"!=typeof n.iat)throw new q('"iat" claim must be a number',n,"iat","invalid");if(void 0!==n.nbf){if("number"!=typeof n.nbf)throw new q('"nbf" claim must be a number',n,"nbf","invalid");if(n.nbf>d+i)throw new q('"nbf" claim timestamp check failed',n,"nbf","check_failed")}if(void 0!==n.exp){if("number"!=typeof n.exp)throw new q('"exp" claim must be a number',n,"exp","invalid");if(n.exp<=d-i)throw new G('"exp" claim timestamp check failed',n,"exp","check_failed")}if(u){let e=d-n.iat;if(e-i>("number"==typeof u?u:tm(u)))throw new G('"iat" claim timestamp check failed (too far in the past)',n,"iat","check_failed");if(e<0-i)throw new q('"iat" claim timestamp check failed (it should be in the past)',n,"iat","check_failed")}return n}class t_{#l;constructor(e){if(!es(e))throw TypeError("JWT Claims Set MUST be an object");this.#l=structuredClone(e)}data(){return $.encode(JSON.stringify(this.#l))}get iss(){return this.#l.iss}set iss(e){this.#l.iss=e}get sub(){return this.#l.sub}set sub(e){this.#l.sub=e}get aud(){return this.#l.aud}set aud(e){this.#l.aud=e}set jti(e){this.#l.jti=e}set nbf(e){"number"==typeof e?this.#l.nbf=tg("setNotBefore",e):e instanceof Date?this.#l.nbf=tg("setNotBefore",tl(e)):this.#l.nbf=tl(new Date)+tm(e)}set exp(e){"number"==typeof e?this.#l.exp=tg("setExpirationTime",e):e instanceof Date?this.#l.exp=tg("setExpirationTime",tl(e)):this.#l.exp=tl(new Date)+tm(e)}set iat(e){void 0===e?this.#l.iat=tl(new Date):e instanceof Date?this.#l.iat=tg("setIssuedAt",tl(e)):"string"==typeof e?this.#l.iat=tg("setIssuedAt",tl(new Date)+tm(e)):this.#l.iat=tg("setIssuedAt",e)}}class tS{#o;#a;#s;#t;#u;#f;#p;#d;constructor(e={}){this.#d=new t_(e)}setIssuer(e){return this.#d.iss=e,this}setSubject(e){return this.#d.sub=e,this}setAudience(e){return this.#d.aud=e,this}setJti(e){return this.#d.jti=e,this}setNotBefore(e){return this.#d.nbf=e,this}setExpirationTime(e){return this.#d.exp=e,this}setIssuedAt(e){return this.#d.iat=e,this}setProtectedHeader(e){if(this.#t)throw TypeError("setProtectedHeader can only be called once");return this.#t=e,this}setKeyManagementParameters(e){if(this.#s)throw TypeError("setKeyManagementParameters can only be called once");return this.#s=e,this}setContentEncryptionKey(e){if(this.#o)throw TypeError("setContentEncryptionKey can only be called once");return this.#o=e,this}setInitializationVector(e){if(this.#a)throw TypeError("setInitializationVector can only be called once");return this.#a=e,this}replicateIssuerAsHeader(){return this.#u=!0,this}replicateSubjectAsHeader(){return this.#f=!0,this}replicateAudienceAsHeader(){return this.#p=!0,this}async encrypt(e,t){let r=new tc(this.#d.data());return this.#t&&(this.#u||this.#f||this.#p)&&(this.#t={...this.#t,iss:this.#u?this.#d.iss:void 0,sub:this.#f?this.#d.sub:void 0,aud:this.#p?this.#d.aud:void 0}),r.setProtectedHeader(this.#t),this.#a&&r.setInitializationVector(this.#a),this.#o&&r.setContentEncryptionKey(this.#o),this.#s&&r.setKeyManagementParameters(this.#s),r.encrypt(e,t)}}async function tE(e,t,r){let n;if(!es(e))throw TypeError("JWK must be an object");switch(t??=e.alg,n??=r?.extractable??e.ext,e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw TypeError('missing "k" (Key Value) Parameter value');return K(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new X('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return eZ({...e,alg:t,ext:n});case"AKP":if("string"!=typeof e.alg||!e.alg)throw TypeError('missing "alg" (Algorithm) Parameter value');
12if(void 0!==t&&t!==e.alg)throw TypeError("JWK alg and alg option value mismatch");return eZ({...e,ext:n});case"EC":case"OKP":return eZ({...e,alg:t,ext:n});default:throw new X('Unsupported "kty" (Key Type) Parameter value')}}var tA=async(e,t,r,n,i)=>{switch(e){case"dir":if(void 0!==r)throw new Y("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new Y("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{let i,o;if(!es(n.epk))throw new Y('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(er(t),!eH(t))throw new X("ECDH with the provided key is not allowed or not supported by your javascript runtime");let a=await tE(n.epk,e);if(er(a),void 0!==n.apu){if("string"!=typeof n.apu)throw new Y('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{i=K(n.apu)}catch{throw new Y("Failed to base64url decode the apu")}}if(void 0!==n.apv){if("string"!=typeof n.apv)throw new Y('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{o=K(n.apv)}catch{throw new Y("Failed to base64url decode the apv")}}let s=await eD(a,t,"ECDH-ES"===e?n.enc:e,"ECDH-ES"===e?e1(n.enc):parseInt(e.slice(-5,-2),10),i,o);if("ECDH-ES"===e)return s;if(void 0===r)throw new Y("JWE Encrypted Key missing");return e$(e.slice(-6),s,r)}case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new Y("JWE Encrypted Key missing");return er(t),eV(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{let o;if(void 0===r)throw new Y("JWE Encrypted Key missing");if("number"!=typeof n.p2c)throw new Y('JOSE Header "p2c" (PBES2 Count) missing or invalid');let a=i?.maxPBES2Count||1e4;if(n.p2c>a)throw new Y('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof n.p2s)throw new Y('JOSE Header "p2s" (PBES2 Salt) missing or invalid');try{o=K(n.p2s)}catch{throw new Y("Failed to base64url decode the p2s")}return ez(e,t,r,n.p2c,o)}case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new Y("JWE Encrypted Key missing");return e$(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{let i,o;if(void 0===r)throw new Y("JWE Encrypted Key missing");if("string"!=typeof n.iv)throw new Y('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof n.tag)throw new Y('JOSE Header "tag" (Authentication Tag) missing or invalid');try{i=K(n.iv)}catch{throw new Y("Failed to base64url decode the iv")}try{o=K(n.tag)}catch{throw new Y("Failed to base64url decode the tag")}return e9(e,t,r,i,o)}default:throw new X('Invalid or unsupported "alg" (JWE Algorithm) header value')}},tk=(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 tx(e,t,r){let n,i,o,a,s,c,l;if(!es(e))throw new Y("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new Y("JOSE Header missing");if(void 0!==e.iv&&"string"!=typeof e.iv)throw new Y("JWE Initialization Vector incorrect type");if("string"!=typeof e.ciphertext)throw new Y("JWE Ciphertext missing or incorrect type");if(void 0!==e.tag&&"string"!=typeof e.tag)throw new Y("JWE Authentication Tag incorrect type");if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Y("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!=typeof e.encrypted_key)throw new Y("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!=typeof e.aad)throw new Y("JWE AAD incorrect type");if(void 0!==e.header&&!es(e.header))throw new Y("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!es(e.unprotected))throw new Y("JWE Per-Recipient Unprotected Header incorrect type");if(e.protected)try{let t=K(e.protected);n=JSON.parse(L.decode(t))}catch{throw new Y("JWE Protected Header is invalid")}if(!te(n,e.header,e.unprotected))throw new Y("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");let u={...n,...e.header,...e.unprotected};if(tt(Y,new Map,r?.crit,n,u),void 0!==u.zip)throw new X('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');let{alg:f,enc:p}=u;if("string"!=typeof f||!f)throw new Y("missing JWE Algorithm (alg) in JWE Header");if("string"!=typeof p||!p)throw new Y("missing JWE Encryption Algorithm (enc) in JWE Header");let d=r&&tk("keyManagementAlgorithms",r.keyManagementAlgorithms),h=r&&tk("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(d&&!d.has(f)||!d&&f.startsWith("PBES2"))throw new V('"alg" (Algorithm) Header Parameter value not allowed');
12if(h&&!h.has(p))throw new V('"enc" (Encryption Algorithm) Header Parameter value not allowed');if(void 0!==e.encrypted_key)try{i=K(e.encrypted_key)}catch{throw new Y("Failed to base64url decode the encrypted_key")}let y=!1;"function"==typeof t&&(t=await t(n,e),y=!0),ta("dir"===f?p:f,t,"decrypt");let m=await e0(t,f);try{o=await tA(f,m,i,u,r)}catch(e){if(e instanceof TypeError||e instanceof Y||e instanceof X)throw e;o=e2(p)}if(void 0!==e.iv)try{a=K(e.iv)}catch{throw new Y("Failed to base64url decode the iv")}if(void 0!==e.tag)try{s=K(e.tag)}catch{throw new Y("Failed to base64url decode the tag")}let g=$.encode(e.protected??"");c=void 0!==e.aad?D(g,$.encode("."),$.encode(e.aad)):g;try{l=K(e.ciphertext)}catch{throw new Y("Failed to base64url decode the ciphertext")}let b={plaintext:await e4(p,o,l,a,s,c)};if(void 0!==e.protected&&(b.protectedHeader=n),void 0!==e.aad)try{b.additionalAuthenticatedData=K(e.aad)}catch{throw new Y("Failed to base64url decode the aad")}return(void 0!==e.unprotected&&(b.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(b.unprotectedHeader=e.header),y)?{...b,key:m}:b}async function tP(e,t,r){if(e instanceof Uint8Array&&(e=L.decode(e)),"string"!=typeof e)throw new Y("Compact JWE must be a string or Uint8Array");let{0:n,1:i,2:o,3:a,4:s,length:c}=e.split(".");if(5!==c)throw new Y("Invalid Compact JWE");let l=await tx({ciphertext:a,iv:o||void 0,protected:n,tag:s||void 0,encrypted_key:i||void 0},t,r),u={plaintext:l.plaintext,protectedHeader:l.protectedHeader};return"function"==typeof t?{...u,key:l.key}:u}async function tR(e,t,r){let n=await tP(e,t,r),i=tv(n.protectedHeader,n.plaintext,r),{protectedHeader:o}=n;if(void 0!==o.iss&&o.iss!==i.iss)throw new q('replicated "iss" claim header parameter mismatch',i,"iss","mismatch");if(void 0!==o.sub&&o.sub!==i.sub)throw new q('replicated "sub" claim header parameter mismatch',i,"sub","mismatch");if(void 0!==o.aud&&JSON.stringify(o.aud)!==JSON.stringify(i.aud))throw new q('replicated "aud" claim header parameter mismatch',i,"aud","mismatch");let a={payload:i,protectedHeader:o};return"function"==typeof t?{...a,key:n.key}:a}let tO=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,tT=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,tI=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,tC=/^[\u0020-\u003A\u003D-\u007E]*$/,tj=Object.prototype.toString,tU=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function t$(e,t){let r=new tU,n=e.length;if(n<2)return r;let i=t?.decode||tM,o=0;do{let t=e.indexOf("=",o);if(-1===t)break;let a=e.indexOf(";",o),s=-1===a?n:a;if(t>s){o=e.lastIndexOf(";",t-1)+1;continue}let c=tL(e,o,t),l=tN(e,t,c),u=e.slice(c,l);if(void 0===r[u]){let n=tL(e,t+1,s),o=tN(e,s,n),a=i(e.slice(n,o));r[u]=a}o=s+1}while(o<n);return r}function tL(e,t,r){do{let r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function tN(e,t,r){for(;t>r;){let r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function tD(e,t,r){let n=r?.encode||encodeURIComponent;if(!tO.test(e))throw TypeError(`argument name is invalid: ${e}`);let i=n(t);if(!tT.test(i))throw TypeError(`argument val is invalid: ${t}`);let o=e+"="+i;if(!r)return o;if(void 0!==r.maxAge){if(!Number.isInteger(r.maxAge))throw TypeError(`option maxAge is invalid: ${r.maxAge}`);o+="; Max-Age="+r.maxAge}if(r.domain){if(!tI.test(r.domain))throw TypeError(`option domain is invalid: ${r.domain}`);o+="; Domain="+r.domain}if(r.path){if(!tC.test(r.path))throw TypeError(`option path is invalid: ${r.path}`);o+="; Path="+r.path}if(r.expires){if(!tH(r.expires)||!Number.isFinite(r.expires.valueOf()))throw TypeError(`option expires is invali
12d: ${r.expires}`);o+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.partitioned&&(o+="; Partitioned"),r.priority)switch("string"==typeof r.priority?r.priority.toLowerCase():void 0){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw TypeError(`option priority is invalid: ${r.priority}`)}if(r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"none":o+="; SameSite=None";break;default:throw TypeError(`option sameSite is invalid: ${r.sameSite}`)}return o}function tM(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}function tH(e){return"[object Date]"===tj.call(e)}let{parse:tW}=s,tB=2592e3,tF=()=>Date.now()/1e3|0,tK="dir",tz="A256CBC-HS512";async function tJ(e){let{token:t={},secret:r,maxAge:n=tB,salt:i}=e,o=Array.isArray(r)?r:[r],a=await tG(tz,o[0],i),s=await eb({kty:"oct",k:z(a)},`sha${a.byteLength<<3}`);return await new tS(t).setProtectedHeader({alg:tK,enc:tz,kid:s}).setIssuedAt().setExpirationTime(tF()+n).setJti(crypto.randomUUID()).encrypt(a)}async function tq(e){let{token:t,secret:r,salt:n}=e,i=Array.isArray(r)?r:[r];if(!t)return null;let{payload:o}=await tR(t,async({kid:e,enc:t})=>{for(let r of i){let i=await tG(t,r,n);if(void 0===e||e===await eb({kty:"oct",k:z(i)},`sha${i.byteLength<<3}`))return i}throw Error("no matching decryption secret")},{clockTolerance:15,keyManagementAlgorithms:[tK],contentEncryptionAlgorithms:[tz,"A256GCM"]});return o}async function tG(e,t,r){let n;switch(e){case"A256CBC-HS512":n=64;break;case"A256GCM":n=32;break;default:throw Error("Unsupported JWT Content Encryption Algorithm")}return await j("sha256",t,r,`Auth.js Generated Encryption Key (${r})`,n)}async function tV({options:e,paramValue:t,cookieValue:r}){let{url:n,callbacks:i}=e,o=n.origin;return t?o=await i.redirect({url:t,baseUrl:n.origin}):r&&(o=await i.redirect({url:r,baseUrl:n.origin})),{callbackUrl:o,callbackUrlCookie:o!==r?o:void 0}}let tX={error(e){if(e instanceof y.l4?e.type:e.name,e.cause&&"object"==typeof e.cause&&"err"in e.cause&&e.cause.err instanceof Error){let{err:t,...r}=e.cause}else e.stack},warn(e){},debug(e,t){}};function tZ(e){let t={...tX};return e.debug||(t.debug=()=>{}),e.logger?.error&&(t.error=e.logger.error),e.logger?.warn&&(t.warn=e.logger.warn),e.logger?.debug&&(t.debug=e.logger.debug),e.logger??(e.logger=t),t}let tY=["providers","session","csrf","signin","signout","callback","verify-request","error","webauthn-options"];function tQ(e){return tY.includes(e)}let{parse:t0,serialize:t1}=s;async function t2(e){if(!("body"in e)||!e.body||"POST"!==e.method)return;let t=e.headers.get("content-type");return t?.includes("application/json")?await e.json():t?.includes("application/x-www-form-urlencoded")?Object.fromEntries(new URLSearchParams(await e.text())):void 0}async function t3(e,t){try{if("GET"!==e.method&&"POST"!==e.method)throw new y.D7("Only GET and POST requests are supported");t.basePath??(t.basePath="/auth");let r=new URL(e.url),{action:n,providerId:i}=t9(r.pathname,t.basePath);return{url:r,action:n,providerId:i,method:e.method,headers:Object.fromEntries(e.headers),body:e.body?await t2(e):void 0,cookies:t0(e.headers.get("cookie")??"")??{},error:r.searchParams.get("error")??void 0,query:Object.fromEntries(r.searchParams)}}catch(n){let r=tZ(t);r.error(n),r.debug("request",e)}}function t6(e){return new Request(e.url,{headers:e.headers,method:e.method,body:"POST"===e.method?JSON.stringify(e.body??{}):void 0})}function t5(e){let t=new Headers(e.headers);e.cookies?.forEach(e=>{let{name:r,value:n,options:i}=e,o=t1(r,n,i);t.has("Set-Cookie")?t.append("Set-Cookie",o):t.set("Set-Cookie",o)});let r=e.body;"application/json"===t.get("content-type")?r=JSON.stringify(e.body):"application/x-www-form-urlencoded"===t.get("content-type")&&(r=new URLSearchParams(e.body).toString());let n=new Response(r,{headers:t,status:e.redirect?302:e.status??200});return e.redirect&&n.headers.set("Location",e.redirect),n}async function t4(e){let t=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>e.toString(16).padStart(2,"0")).join("").toString()}function t8(e){let t=e=>("0"+e.toString(16)).slice(-2),r=(e,r)=>e+t(r);return Array.from(crypto.getRandomValues(new Uint8Array(e))).reduce(r,"")}function t9(e,t){let r=e.match(RegExp(`^${t}(.+)`));if(null===r)throw new y.D7(`Cannot parse action at ${e}`);
12let n=r.at(-1).replace(/^\//,"").split("/").filter(Boolean);if(1!==n.length&&2!==n.length)throw new y.D7(`Cannot parse action at ${e}`);let[i,o]=n;if(!tQ(i)||o&&!["signin","callback","webauthn-options"].includes(i))throw new y.D7(`Cannot parse action at ${e}`);return{action:i,providerId:"undefined"==o?void 0:o}}async function t7({options:e,cookieValue:t,isPost:r,bodyValue:n}){if(t){let[i,o]=t.split("|");if(o===await t4(`${i}${e.secret}`))return{csrfTokenVerified:r&&i===n,csrfToken:i}}let i=t8(32),o=await t4(`${i}${e.secret}`);return{cookie:`${i}|${o}`,csrfToken:i}}function re(e,t){if(!t)throw new y.Rk(`CSRF token was missing during an action ${e}`)}function rt(e){return null!==e&&"object"==typeof e}function rr(e,...t){if(!t.length)return e;let r=t.shift();if(rt(e)&&rt(r))for(let t in r)rt(r[t])?(rt(e[t])||(e[t]=Array.isArray(r[t])?[]:{}),rr(e[t],r[t])):void 0!==r[t]&&(e[t]=r[t]);return rr(e,...t)}var rn=r(73122);function ri(e){let{providerId:t,config:r}=e,n=new URL(r.basePath??"/auth",e.url.origin),i=r.providers.map(e=>{let t="function"==typeof e?e():e,{options:i,...o}=t,a=i?.id??o.id,s=rr(o,i,{signinUrl:`${n}/signin/${a}`,callbackUrl:`${n}/callback/${a}`});if("oauth"===t.type||"oidc"===t.type){s.redirectProxyUrl??(s.redirectProxyUrl=i?.redirectProxyUrl??r.redirectProxyUrl);let e=ro(s);return e.authorization?.url.searchParams.get("response_mode")==="form_post"&&delete e.redirectProxyUrl,e[rn.rK]??(e[rn.rK]=i?.[rn.rK]),e}return s}),o=i.find(({id:e})=>e===t);if(t&&!o){let e=i.map(e=>e.id).join(", ");throw Error(`Provider with id "${t}" not found. Available providers: [${e}].`)}return{providers:i,provider:o}}function ro(e){e.issuer&&(e.wellKnown??(e.wellKnown=`${e.issuer}/.well-known/openid-configuration`));let t=rl(e.authorization,e.issuer);t&&!t.url?.searchParams.has("scope")&&t.url.searchParams.set("scope","openid profile email");let r=rl(e.token,e.issuer),n=rl(e.userinfo,e.issuer),i=e.checks??["pkce"];return e.redirectProxyUrl&&(i.includes("state")||i.push("state"),e.redirectProxyUrl=`${e.redirectProxyUrl}/callback/${e.id}`),{...e,authorization:t,token:r,checks:i,userinfo:n,profile:e.profile??ra,account:e.account??rs}}let ra=e=>rc({id:e.sub??e.id??crypto.randomUUID(),name:e.name??e.nickname??e.preferred_username,email:e.email,image:e.picture}),rs=e=>rc({access_token:e.access_token,id_token:e.id_token,refresh_token:e.refresh_token,expires_at:e.expires_at,scope:e.scope,token_type:e.token_type,session_state:e.session_state});function rc(e){let t={};for(let[r,n]of Object.entries(e))void 0!==n&&(t[r]=n);return t}function rl(e,t){if(!e&&t)return;if("string"==typeof e)return{url:new URL(e)};let r=new URL(e?.url??"https://authjs.dev");if(e?.params!=null)for(let[t,n]of Object.entries(e.params))"claims"===t&&(n=JSON.stringify(n)),r.searchParams.set(t,String(n));return{url:r,request:e?.request,conform:e?.conform,...e?.clientPrivateKey?{clientPrivateKey:e?.clientPrivateKey}:null}}function ru(e){return"oidc"===e.type}let rf={signIn(){return!0},redirect({url:e,baseUrl:t}){return e.startsWith("/")?`${t}${e}`:new URL(e).origin===t?e:t},session({session:e}){return{user:{name:e.user?.name,email:e.user?.email,image:e.user?.image},expires:e.expires?.toISOString?.()??e.expires}},jwt({token:e}){return e}};async function rp({authOptions:e,providerId:t,action:r,url:n,cookies:i,callbackUrl:o,csrfToken:a,csrfDisabled:s,isPost:c}){let l=tZ(e),{providers:u,provider:f}=ri({url:n,providerId:t,config:e}),p=2592e3,h=!1;if((f?.type==="oauth"||f?.type==="oidc")&&f.redirectProxyUrl)try{h=new URL(f.redirectProxyUrl).origin===n.origin}catch{throw TypeError(`redirectProxyUrl must be a valid URL. Received: ${f.redirectProxyUrl}`)}let y={debug:!1,pages:{},theme:{colorScheme:"auto",logo:"",brandColor:"",buttonText:""},...e,url:n,action:r,provider:f,cookies:rr(d(e.useSecureCookies??"https:"===n.protocol),e.cookies),providers:u,session:{strategy:e.adapter?"database":"jwt",maxAge:p,updateAge:86400,generateSessionToken:()=>crypto.randomUUID(),...e.session},jwt:{secret:e.secret,maxAge:e.session?.maxAge??p,encode:tJ,decode:tq,...e.jwt},events:rd(e.events??{},l),adapter:rh(e.adapter,l),callbacks:{...rf,...e.callbacks},logger:l,callbackUrl:n.origin,isOnRedirectProxy:h,experimental:{...e.experimental}},m=[];
vendor: 7,895 bytes, line 12
12if(s)y.csrfTokenVerified=!0;else{let{csrfToken:e,cookie:t,csrfTokenVerified:r}=await t7({options:y,cookieValue:i?.[y.cookies.csrfToken.name],isPost:c,bodyValue:a});y.csrfToken=e,y.csrfTokenVerified=r,t&&m.push({name:y.cookies.csrfToken.name,value:t,options:y.cookies.csrfToken.options})}let{callbackUrl:g,callbackUrlCookie:b}=await tV({options:y,cookieValue:i?.[y.cookies.callbackUrl.name],paramValue:o});return y.callbackUrl=g,b&&m.push({name:y.cookies.callbackUrl.name,value:b,options:y.cookies.callbackUrl.options}),{options:y,cookies:m}}function rd(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=async(...r)=>{try{let t=e[n];return await t(...r)}catch(e){t.error(new y.xQ(e))}},r),{})}function rh(e,t){if(e)return Object.keys(e).reduce((r,n)=>(r[n]=async(...r)=>{try{t.debug(`adapter_${n}`,{args:r});let i=e[n];return await i(...r)}catch(r){let e=new y.dq(r);throw t.error(e),e}},r),{})}var ry,rm,rg,rb,rw,rv,r_,rS,rE,rA,rk,rx,rP,rR,rO,rT,rI,rC,rj={},rU=[],r$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,rL=Array.isArray;function rN(e,t){for(var r in t)e[r]=t[r];return e}function rD(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function rM(e,t,r){var n,i,o,a={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?r_.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return rH(e,a,n,i,null)}function rH(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++rE:i,__i:-1,__u:0};return null==i&&null!=rS.vnode&&rS.vnode(o),o}function rW(e){return e.children}function rB(e,t){this.props=e,this.context=t}function rF(e,t){if(null==t)return e.__?rF(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?rF(e):null}function rK(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return rK(e)}}function rz(e){(!e.__d&&(e.__d=!0)&&rk.push(e)&&!rJ.__r++||rx!==rS.debounceRendering)&&((rx=rS.debounceRendering)||rP)(rJ)}function rJ(){var e,t,r,n,i,o,a,s;for(rk.sort(rR);e=rk.shift();)e.__d&&(t=rk.length,n=void 0,o=(i=(r=e).__v).__e,a=[],s=[],r.__P&&((n=rN({},i)).__v=i.__v+1,rS.vnode&&rS.vnode(n),r0(r.__P,n,i,r.__n,r.__P.namespaceURI,32&i.__u?[o]:null,a,null==o?rF(i):o,!!(32&i.__u),s),n.__v=i.__v,n.__.__k[n.__i]=n,r1(a,n,s),n.__e!=o&&rK(n)),rk.length>t&&rk.sort(rR));rJ.__r=0}function rq(e,t,r,n,i,o,a,s,c,l,u){var f,p,d,h,y,m=n&&n.__k||rU,g=t.length;for(r.__d=c,rG(r,t,m),c=r.__d,f=0;f<g;f++)null!=(d=r.__k[f])&&(p=-1===d.__i?rj:m[d.__i]||rj,d.__i=f,r0(e,d,p,i,o,a,s,c,l,u),h=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&r3(p.ref,null,d),u.push(d.ref,d.__c||h,d)),null==y&&null!=h&&(y=h),65536&d.__u||p.__k===d.__k?c=rV(d,c,e):"function"==typeof d.type&&void 0!==d.__d?c=d.__d:h&&(c=h.nextSibling),d.__d=void 0,d.__u&=-196609);r.__d=c,r.__e=y}function rG(e,t,r){var n,i,o,a,s,c=t.length,l=r.length,u=l,f=0;for(e.__k=[],n=0;n<c;n++)null!=(i=t[n])&&"boolean"!=typeof i&&"function"!=typeof i?(a=n+f,(i=e.__k[n]="string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?rH(null,i,null,null,null):rL(i)?rH(rW,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?rH(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,o=null,-1!==(s=i.__i=rX(i,r,a,u))&&(u--,(o=r[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&f--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s==a-1?f--:s==a+1?f++:(s>a?f--:f++,i.__u|=65536))):i=e.__k[n]=null;if(u)for(n=0;n<l;n++)null!=(o=r[n])&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=rF(o)),r6(o,o))}function rV(e,t,r){var n,i;if("function"==typeof e.type){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=rV(n[i],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=rF(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(null!=t&&8===t.nodeType);return t}function rX(e,t,r,n){var i=e.key,o=e.type,a=r-1,s=r+1,c=t[r];if(null===c||c&&i==c.key&&o===c.type&&0==(131072&c.__u))return r;if(n>(null!=c&&0==(131072&c.__u)?1:0))for(;a>=0||s<t.length;){if(a>=0){if((c=t[a])&&0==(131072&c.__u)&&i==c.key&&o===c.type)return a;a--}if(s<t.length){if((c=t[s])&&0==(131072&c.__u)&&i==c.key&&o===c.type)return s;s++}}return -1}function rZ(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||r$.test(t)?r:r+"px"}function rY(e,t,r,n,i){var o;t: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||rZ(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||rZ(e.style,t,r[t])}}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase() in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=rO,e.addEventListener(t,o?rI:rT,o)):e.removeEventListener(t,o?rI:rT,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break t}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function rQ(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=rO++;else if(t.t<r.u)return;return r(rS.event?rS.event(t):t)}}}function r0(e,t,r,n,i,o,a,s,c,l){var u,f,p,d,h,y,m,g,b,w,v,_,S,E,A,k,x=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(c=!!(32&r.__u),o=[s=t.__e=r.__e]),(u=rS.__b)&&u(t);t:if("function"==typeof x)try{if(g=t.props,b="prototype"in x&&x.prototype.render,w=(u=x.contextType)&&n[u.__c],v=u?w?w.props.value:u.__:n,r.__c?m=(f=t.__c=r.__c).__=f.__E:(b?t.__c=f=new x(g,v):(t.__c=f=new rB(g,v),f.constructor=x,f.render=r5),w&&w.sub(f),f.props=g,f.state||(f.state={}),f.context=v,f.__n=n,p=f.__d=!0,f.__h=[],f._sb=[]),b&&null==f.__s&&(f.__s=f.state),b&&null!=x.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=rN({},f.__s)),rN(f.__s,x.getDerivedStateFromProps(g,f.__s))),d=f.props,h=f.state,f.__v=t,p)b&&null==x.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),b&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(b&&null==x.getDerivedStateFromProps&&g!==d&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(g,v),!f.__e&&(null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(g,f.__s,v)||t.__v===r.__v)){for(t.__v!==r.__v&&(f.props=g,f.state=f.__s,f.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),_=0;_<f._sb.length;_++)f.__h.push(f._sb[_]);f._sb=[],f.__h.length&&a.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(g,f.__s,v),b&&null!=f.componentDidUpdate&&f.__h.push(function(){f.componentDidUpdate(d,h,y)})}if(f.context=v,f.props=g,f.__P=e,f.__e=!1,S=rS.__r,E=0,b){for(f.state=f.__s,f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),A=0;A<f._sb.length;A++)f.__h.push(f._sb[A]);f._sb=[]}else do f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++E<25);f.state=f.__s,null!=f.getChildContext&&(n=rN(rN({},n),f.getChildContext())),b&&!p&&null!=f.getSnapshotBeforeUpdate&&(y=f.getSnapshotBeforeUpdate(d,h)),rq(e,rL(k=null!=u&&u.type===rW&&null==u.key?u.props.children:u)?k:[k],t,r,n,i,o,a,s,c,l),f.base=t.__e,t.__u&=-161,f.__h.length&&a.push(f),m&&(f.__E=f.__=null)}catch(e){if(t.__v=null,c||null!=o){for(t.__u|=c?160:128;s&&8===s.nodeType&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else t.__e=r.__e,t.__k=r.__k;rS.__e(e,t,r)}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=r2(r.__e,t,r,n,i,o,a,c,l);(u=rS.diffed)&&u(t)}
vendor: 2,987 bytes, line 12
12function r1(e,t,r){t.__d=void 0;for(var n=0;n<r.length;n++)r3(r[n],r[++n],r[++n]);rS.__c&&rS.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){rS.__e(e,t.__v)}})}function r2(e,t,r,n,i,o,a,s,c){var l,u,f,p,d,h,y,m=r.props,g=t.props,b=t.type;if("svg"===b?i="http://www.w3.org/2000/svg":"math"===b?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o){for(l=0;l<o.length;l++)if((d=o[l])&&"setAttribute"in d==!!b&&(b?d.localName===b:3===d.nodeType)){e=d,o[l]=null;break}}if(null==e){if(null===b)return document.createTextNode(g);e=document.createElementNS(i,b,g.is&&g),s&&(rS.__m&&rS.__m(t,o),s=!1),o=null}if(null===b)m===g||s&&e.data===g||(e.data=g);else{if(o=o&&r_.call(e.childNodes),m=r.props||rj,!s&&null!=o)for(m={},l=0;l<e.attributes.length;l++)m[(d=e.attributes[l]).name]=d.value;for(l in m)if(d=m[l],"children"==l);else if("dangerouslySetInnerHTML"==l)f=d;else if(!(l in g)){if("value"==l&&"defaultValue"in g||"checked"==l&&"defaultChecked"in g)continue;rY(e,l,null,d,i)}for(l in g)d=g[l],"children"==l?p=d:"dangerouslySetInnerHTML"==l?u=d:"value"==l?h=d:"checked"==l?y=d:s&&"function"!=typeof d||m[l]===d||rY(e,l,d,m[l],i);if(u)s||f&&(u.__html===f.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(f&&(e.innerHTML=""),rq(e,rL(p)?p:[p],t,r,n,"foreignObject"===b?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:r.__k&&rF(r,0),s,c),null!=o)for(l=o.length;l--;)rD(o[l]);s||(l="value","progress"===b&&null==h?e.removeAttribute("value"):void 0===h||h===e[l]&&("progress"!==b||h)&&("option"!==b||h===m[l])||rY(e,l,h,m[l],i),l="checked",void 0!==y&&y!==e[l]&&rY(e,l,y,m[l],i))}return e}function r3(e,t,r){try{if("function"==typeof e){var n="function"==typeof e.__u;n&&e.__u(),n&&null==t||(e.__u=e(t))}else e.current=t}catch(e){rS.__e(e,r)}}function r6(e,t,r){var n,i;if(rS.unmount&&rS.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||r3(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){rS.__e(e,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&r6(n[i],t,r||"function"!=typeof e.type);r||rD(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function r5(e,t,r){return this.constructor(e,r)}r_=rU.slice,rS={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},rE=0,rA=function(e){return null!=e&&null==e.constructor},rB.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=rN({},this.state),"function"==typeof e&&(e=e(rN({},r),this.props)),e&&rN(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),rz(this))},rB.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),rz(this))},rB.prototype.render=rW,rk=[],rP="function"==typeof Promise?Promise.prototype.then.bind(Prom
12ise.resolve()):setTimeout,rR=function(e,t){return e.__v.__b-t.__v.__b},rJ.__r=0,rO=0,rT=rQ(!1),rI=rQ(!0),rC=0;var r4=/[\s\n\\/='"\0<>]/,r8=/^(xlink|xmlns|xml)([A-Z])/,r9=/^accessK|^auto[A-Z]|^cell|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z]/,r7=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,ne=new Set(["draggable","spellcheck"]),nt=/["&<]/;function nr(e){if(0===e.length||!1===nt.test(e))return e;for(var t=0,r=0,n="",i="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 60:i="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=i,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var nn={},ni=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),no=/[A-Z]/g;function na(e){var t="";for(var r in e){var n=e[r];if(null!=n&&""!==n){var i="-"==r[0]?r:nn[r]||(nn[r]=r.replace(no,"-$&").toLowerCase()),o=";";"number"!=typeof n||i.startsWith("--")||ni.has(i)||(o="px;"),t=t+i+":"+n+o}}return t||void 0}function ns(){this.__d=!0}function nc(e,t){return{__v:e,context:t,props:e.props,setState:ns,forceUpdate:ns,__d:!0,__h:[]}}var nl,nu,nf,np,nd={},nh=[],ny=Array.isArray,nm=Object.assign,ng="";function nb(e,t,r){var n=rS.__s;rS.__s=!0,nl=rS.__b,nu=rS.diffed,nf=rS.__r,np=rS.unmount;var i=rM(rW,null);i.__k=[e];try{var o=nv(e,t||nd,!1,void 0,i,!1,r);return ny(o)?o.join(ng):o}catch(e){if(e.then)throw Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{rS.__c&&rS.__c(e,nh),rS.__s=n,nh.length=0}}function nw(e,t){var r,n=e.type,i=!0;return e.__c?(i=!1,(r=e.__c).state=r.__s):r=new n(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=nd),null==r.__s&&(r.__s=r.state),n.getDerivedStateFromProps?r.state=nm({},r.state,n.getDerivedStateFromProps(r.props,r.state)):i&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!i&&r.componentWillUpdate&&r.componentWillUpdate(),nf&&nf(e),r.render(r.props,r.state,t)}function nv(e,t,r,n,i,o,a){if(null==e||!0===e||!1===e||e===ng)return ng;var s=typeof e;if("object"!=s)return"function"==s?ng:"string"==s?nr(e):e+ng;if(ny(e)){var c,l=ng;i.__k=e;for(var u=0;u<e.length;u++){var f=e[u];if(null!=f&&"boolean"!=typeof f){var p,d=nv(f,t,r,n,i,o,a);"string"==typeof d?l+=d:(c||(c=[]),l&&c.push(l),l=ng,ny(d)?(p=c).push.apply(p,d):c.push(d))}}return c?(l&&c.push(l),c):l}if(void 0!==e.constructor)return ng;e.__=i,nl&&nl(e);var h=e.type,y=e.props;if("function"==typeof h){var m,g,b,w=t;if(h===rW){if("tpl"in y){for(var v=ng,_=0;_<y.tpl.length;_++)if(v+=y.tpl[_],y.exprs&&_<y.exprs.length){var S=y.exprs[_];if(null==S)continue;"object"==typeof S&&(void 0===S.constructor||ny(S))?v+=nv(S,t,r,n,e,o,a):v+=S}return v}if("UNSTABLE_comment"in y)return"<!--"+nr(y.UNSTABLE_comment)+"-->";g=y.children}else{if(null!=(m=h.contextType)){var E=t[m.__c];w=E?E.props.value:m.__}var A=h.prototype&&"function"==typeof h.prototype.render;if(A)g=nw(e,w),b=e.__c;else{e.__c=b=nc(e,w);for(var k=0;b.__d&&k++<25;)b.__d=!1,nf&&nf(e),g=h.call(b,y,w);b.__d=!0}if(null!=b.getChildContext&&(t=nm({},t,b.getChildContext())),A&&rS.errorBoundaries&&(h.getDerivedStateFromError||b.componentDidCatch)){g=null!=g&&g.type===rW&&null==g.key&&null==g.props.tpl?g.props.children:g;try{return nv(g,t,r,n,e,o,a)}catch(i){return h.getDerivedStateFromError&&(b.__s=h.getDerivedStateFromError(i)),b.componentDidCatch&&b.componentDidCatch(i,nd),b.__d?(g=nw(e,t),null!=(b=e.__c).getChildContext&&(t=nm({},t,b.getChildContext())),nv(g=null!=g&&g.type===rW&&null==g.key&&null==g.props.tpl?g.props.children:g,t,r,n,e,o,a)):ng}finally{nu&&nu(e),e.__=null,np&&np(e)}}}g=null!=g&&g.type===rW&&null==g.key&&null==g.props.tpl?g.props.children:g;try{var x=nv(g,t,r,n,e,o,a);return nu&&nu(e),e.__=null,rS.unmount&&rS.unmount(e),x}catch(i){if(!o&&a&&a.onError){var P=a.onError(i,e,function(i){return nv(i,t,r,n,e,o,a)});if(void 0!==P)return P;var R=rS.__e;return R&&R(i,e),ng}if(!o||!i||"function"!=typeof i.then)throw i;return i.then(function i(){try{return nv(g,t,r,n,e,o,a)}catch(s){if(!s||"function"!=typeof s.then)throw s;return s.then(function(){return nv(g,t,r,n,e,o,a)},i)}})}}var O,T="<"+h,I=ng;for(var C in y){var j=y[C];if("function"!=typeof j||"class"===C||"className"===C){switch(C){case"children":O=j;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in y)continue;C="for";break;case"className":if("class"in y)continue;C="class";break;case"defaultChecked":C="checked";break;case"defaultSelected":C="selected";break;case"defaultValue":case"value":switch(C="value",h){case"textarea":O=j;continue;case"select":n=j;continue;case"option":n!=j||"selected"in y||(T+=" selected")}break;case"dangerouslySetInnerHTML":I=j&&j.__html;continue;case"style":"object"==typeof j&&(j=na(j));break;case"acceptCharset":C="accept-charset";break;case"httpEquiv":C="http-equiv";break;default:if(r8.test(C))C=C.replace(r8,"$1:$2").toLowerCase();else{if(r4.test(C))continue;("-"===C[4]||ne.has(C))&&null!=j?j+=ng:r?r7.test(C)&&(C="panose1"===C?"panose-1":C.replace(/([A-Z])/g,"-$1").toLowerCase()):r9.test(C)&&(C=C.toLowerCase())}}null!=j&&!1!==j&&(T=!0===j||j===ng?T+" "+C:T+" "+C+'="'+("string"==typeof j?nr(j):j+ng)+'"')}}if(r4.test(h))throw Error(h+" is not a valid HTML tag name in "+T+">");if(I||("string"==typeof O?I=nr(O):null!=O&&!1!==O&&!0!==O&&(I=nv(O,t,"svg"===h||"foreignObject"!==h&&r,n,e,o,a))),nu&&nu(e),e.__=null,np&&np(e),!I&&n_.has(h))return T+"/>";var U="</"+h+">",$=T+">";return ny(I)?[$].concat(I,[U]):"string"!=typeof I?[$,I,U]:$+I+U}var n_=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),nS=0;function nE(e,t,r,n,i,o){t||(t={});var a,s,c=t;"ref"in t&&(a=t.ref,delete t.ref);var l={type:e,props:c,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--nS,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===c[s]&&(c[s]=a[s]);return rS.vnode&&rS.vnode(l),l}function nA(e){let{url:t,error:r="default",theme:n}=e,i=`${t}/signin`,o={default:{status:200,heading:"Error",message:nE("p",{children:nE("a",{className:"site",href:t?.origin,children:t?.host})})},Configuration:{status:500,heading:"Server error",message:nE("div",{children:[nE("p",{children:"There is a problem with the server configuration."}),nE("p",{children:"Check the server logs for more information."})]})},AccessDenied:{status:403,heading:"Access Denied",message:nE("div",{children:[nE("p",{children:"You do not have permission to sign in."}),nE("p",{children:nE("a",{className:"button",href:i,children:"Sign in"})})]})},Verification:{status:403,heading:"Unable to sign in",message:nE("div",{children:[nE("p",{children:"The sign in link is no longer valid."}),nE("p",{children:"It may have been used already or it may have expired."})]}),signin:nE("a",{className:"button",href:i,children:"Sign in"})}},{status:a,heading:s,message:c,signin:l}=o[r]??o.default;return{status:a,html:nE("div",{className:"error",children:[n?.brandColor&&nE("style",{dangerouslySetInnerHTML:{__html:`
13        :root {
14          --brand-color: ${n?.brandColor}
15        }
16      `}}),nE("div",{className:"card",children:[n?.logo&&nE("img",{src:n?.logo,alt:"Logo",className:"logo"}),nE("h1",{children:s}),nE("div",{className:"message",children:c}),l]})]})}}async function nk(e,t){let r=window.SimpleWebAuthnBrowser;async function n(r){let n=new URL(`${e}/webauthn-options/${t}`);
16r&&n.searchParams.append("action",r),o().forEach(e=>{n.searchParams.append(e.name,e.value)});let i=await fetch(n);if(i.ok)return i.json()}function i(){let e=`#${t}-form`,r=document.querySelector(e);if(!r)throw Error(`Form '${e}' not found`);return r}function o(){return Array.from(i().querySelectorAll("input[data-form-field]"))}async function a(e,t){let r=i();if(e){let t=document.createElement("input");t.type="hidden",t.name="action",t.value=e,r.appendChild(t)}if(t){let e=document.createElement("input");e.type="hidden",e.name="data",e.value=JSON.stringify(t),r.appendChild(e)}return r.submit()}async function s(e,t){let n=await r.startAuthentication(e,t);return await a("authenticate",n)}async function c(e){o().forEach(e=>{if(e.required&&!e.value)throw Error(`Missing required field: ${e.name}`)});let t=await r.startRegistration(e);return await a("register",t)}async function l(){if(!r.browserSupportsWebAuthnAutofill())return;let e=await n("authenticate");if(e)try{await s(e.options,!0)}catch(e){}}(async function(){let e=i();if(!r.browserSupportsWebAuthn()){e.style.display="none";return}e&&e.addEventListener("submit",async e=>{e.preventDefault();let t=await n(void 0);if(t){if("authenticate"===t.action)try{await s(t.options,!1)}catch(e){}else if("register"===t.action)try{await c(t.options)}catch(e){}}})})(),l()}let nx={default:"Unable to sign in.",Signin:"Try signing in with a different account.",OAuthSignin:"Try signing in with a different account.",OAuthCallbackError:"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."};function nP(e){return nE(rW,{children:nE("script",{dangerouslySetInnerHTML:{__html:`
17const currentURL = window.location.href;
18const authURL = currentURL.substring(0, currentURL.lastIndexOf('/'));
19(${nk})(authURL, "${e}");
20`}})})}function nR(e){let{csrfToken:t,providers:r=[],callbackUrl:n,theme:i,email:o,error:a}=e;"undefined"!=typeof document&&i?.brandColor&&document.documentElement.style.setProperty("--brand-color",i.brandColor),"undefined"!=typeof document&&i?.buttonText&&document.documentElement.style.setProperty("--button-text-color",i.buttonText);let s=a&&(nx[a]??nx.default),c="https://authjs.dev/img/providers",l=r.find(e=>"webauthn"===e.type&&e.enableConditionalUI)?.id;return nE("div",{className:"signin",children:[i?.brandColor&&nE("style",{dangerouslySetInnerHTML:{__html:`:root {--brand-color: ${i.brandColor}}`}}),i?.buttonText&&nE("style",{dangerouslySetInnerHTML:{__html:`
21        :root {
22          --button-text-color: ${i.buttonText}
23        }
24      `}}),nE("div",{className:"card",children:[s&&nE("div",{className:"error",children:nE("p",{children:s})}),i?.logo&&nE("img",{src:i.logo,alt:"Logo",className:"logo"}),r.map((e,i)=>{let a,s,l;("oauth"===e.type||"oidc"===e.type)&&({bg:a="#fff",brandColor:s,logo:l=`${c}/${e.id}.svg`}=e.style??{});let u=s??a??"#fff";return nE("div",{className:"provider",children:["oauth"===e.type||"oidc"===e.type?nE("form",{action:e.signinUrl,method:"POST",children:[nE("input",{type:"hidden",name:"csrfToken",value:t}),n&&nE("input",{type:"hidden",name:"callbackUrl",value:n}),nE("button",{type:"submit",className:"button",style:{"--provider-brand-color":u},tabIndex:0,children:[nE("span",{style:{filter:"invert(1) grayscale(1) brightness(1.3) contrast(9000)","mix-blend-mode":"luminosity",opacity:.95},children:["Sign in with ",e.name]}),l&&nE("img",{loading:"lazy",height:24,src:l})]})]}):null,("email"===e.type||"credentials"===e.type||"webauthn"===e.type)&&i>
240&&"email"!==r[i-1].type&&"credentials"!==r[i-1].type&&"webauthn"!==r[i-1].type&&nE("hr",{}),"email"===e.type&&nE("form",{action:e.signinUrl,method:"POST",children:[nE("input",{type:"hidden",name:"csrfToken",value:t}),nE("label",{className:"section-header",htmlFor:`input-email-for-${e.id}-provider`,children:"Email"}),nE("input",{id:`input-email-for-${e.id}-provider`,autoFocus:!0,type:"email",name:"email",value:o,placeholder:"[email protected]",required:!0}),nE("button",{id:"submitButton",type:"submit",tabIndex:0,children:["Sign in with ",e.name]})]}),"credentials"===e.type&&nE("form",{action:e.callbackUrl,method:"POST",children:[nE("input",{type:"hidden",name:"csrfToken",value:t}),Object.keys(e.credentials).map(t=>nE("div",{children:[nE("label",{className:"section-header",htmlFor:`input-${t}-for-${e.id}-provider`,children:e.credentials[t].label??t}),nE("input",{name:t,id:`input-${t}-for-${e.id}-provider`,type:e.credentials[t].type??"text",placeholder:e.credentials[t].placeholder??"",...e.credentials[t]})]},`input-group-${e.id}`)),nE("button",{id:"submitButton",type:"submit",tabIndex:0,children:["Sign in with ",e.name]})]}),"webauthn"===e.type&&nE("form",{action:e.callbackUrl,method:"POST",id:`${e.id}-form`,children:[nE("input",{type:"hidden",name:"csrfToken",value:t}),Object.keys(e.formFields).map(t=>nE("div",{children:[nE("label",{className:"section-header",htmlFor:`input-${t}-for-${e.id}-provider`,children:e.formFields[t].label??t}),nE("input",{name:t,"data-form-field":!0,id:`input-${t}-for-${e.id}-provider`,type:e.formFields[t].type??"text",placeholder:e.formFields[t].placeholder??"",...e.formFields[t]})]},`input-group-${e.id}`)),nE("button",{id:`submitButton-${e.id}`,type:"submit",tabIndex:0,children:["Sign in with ",e.name]})]}),("email"===e.type||"credentials"===e.type||"webauthn"===e.type)&&i+1<r.length&&nE("hr",{})]},e.id)})]}),l&&nP(l)]})}function nO(e){let{url:t,csrfToken:r,theme:n}=e;return nE("div",{className:"signout",children:[n?.brandColor&&nE("style",{dangerouslySetInnerHTML:{__html:`
25        :root {
26          --brand-color: ${n.brandColor}
27        }
28      `}}),n?.buttonText&&nE("style",{dangerouslySetInnerHTML:{__html:`
29        :root {
30          --button-text-color: ${n.buttonText}
31        }
32      `}}),nE("div",{className:"card",children:[n?.logo&&nE("img",{src:n.logo,alt:"Logo",className:"logo"}),nE("h1",{children:"Signout"}),nE("p",{children:"Are you sure you want to sign out?"}),nE("form",{action:t?.toString(),method:"POST",children:[nE("input",{type:"hidden",name:"csrfToken",value:r}),nE("button",{id:"submitButton",type:"submit",children:"Sign out"})]})]})]})}var nT=`:root {
33  --border-width: 1px;
34  --border-radius: 0.5rem;
35  --color-error: #c94b4b;
36  --color-info: #157efb;
37  --color-info-hover: #0f6ddb;
38  --color-info-text: #fff;
39}
40
41.__next-auth-theme-auto,
42.__next-auth-theme-light {
43  --color-background: #ececec;
44  --color-background-hover: rgba(236, 236, 236, 0.8);
45  --color-background-card: #fff;
46  --color-text: #000;
47  --color-primary: #444;
48  --color-control-border: #bbb;
49  --color-button-active-background: #f9f9f9;
50  --color-button-active-border: #aaa;
51  --color-separator: #ccc;
52  --provider-bg: #fff;
53  --provider-bg-hover: color-mix(
54    in srgb,
55    var(--provider-brand-color) 30%,
56    #fff
57  );
58}
59
60.__next-auth-theme-dark {
61  --color-background: #161b22;
62  --color-background-hover: rgba(22, 27, 34, 0.8);
63  --color-background-card: #0d1117;
64  --color-text: #fff;
65  --color-primary: #ccc;
66  --color-control-border: #555;
67  --color-button-active-background: #060606;
68  --color-button-active-border: #666;
69  --color-separator: #444;
70  --provider-bg: #161b22;
71  --provider-bg-hover: color-mix(
72    in srgb,
73    var(--provider-brand-color) 30%,
74    #000
75  );
76}
77
78.__next-auth-theme-dark img[src$="42-school.svg"],
79  .__next-auth-theme-dark img[src$="apple.svg"],
80  .__next-auth-theme-dark img[src$="boxyhq-saml.svg"],
81  .__next-auth-theme-dark img[src$="eveonline.svg"],
82  .__next-auth-theme-dark img[src$="github.svg"],
83  .__next-auth-theme-dark img[src$="mailchimp.svg"],
84  .__next-auth-theme-dark img[src$="medium.svg"],
85  .__next-auth-theme-dark img[src$="okta.svg"],
86  .__next-auth-theme-dark img[src$="patreon.svg"],
87  .__next-auth-theme-dark img[src$="ping-id.svg"],
88  .__next-auth-theme-dark img[src$="roblox.svg"],
89  .__next-auth-theme-dark img[src$="threads.svg"],
90  .__next-auth-theme-dark img[src$="wikimedia.svg"] {
91    filter: invert(1);
92  }
93
94.__next-auth-theme-dark #submitButton {
95    background-color: var(--provider-bg, var(--color-info));
96  }
97
98@media (prefers-color-scheme: dark) {
99  .__next-auth-theme-auto {
100    --color-background: #161b22;
101    --color-background-hover: rgba(22, 27, 34, 0.8);
102    --color-background-card: #0d1117;
103    --color-text: #fff;
104    --color-primary: #ccc;
105    --color-control-border: #555;
106    --color-button-active-background: #060606;
107    --color-button-active-border: #666;
108    --color-separator: #444;
109    --provider-bg: #161b22;
110    --provider-bg-hover: color-mix(
111      in srgb,
112      var(--provider-brand-color) 30%,
113      #000
114    );
115  }
116    .__next-auth-theme-auto img[src$="42-school.svg"],
117    .__next-auth-theme-auto img[src$="apple.svg"],
118    .__next-auth-theme-auto img[src$="boxyhq-saml.svg"],
119    .__next-auth-theme-auto img[src$="eveonline.svg"],
120    .__next-auth-theme-auto img[src$="github.svg"],
121    .__next-auth-theme-auto img[src$="mailchimp.svg"],
122    .__next-auth-theme-auto img[src$="medium.svg"],
123    .__next-auth-theme-auto img[src$="okta.svg"],
124    .__next-auth-theme-auto img[src$="patreon.svg"],
125    .__next-auth-theme-auto img[src$="ping-id.svg"],
126    .__next-auth-theme-auto img[src$="roblox.svg"],
127    .__next-auth-theme-auto img[src$="threads.svg"],
128    .__next-auth-theme-auto img[src$="wikimedia.svg"] {
129      filter: invert(1);
130    }
131    .__next-auth-theme-auto #submitButton {
132      background-color: var(--provider-bg, var(--color-info));
133    }
134}
135
136html {
137  box-sizing: border-box;
138}
139
140*,
141*:before,
142*:after {
143  box-sizing: inherit;
144  margin: 0;
145  padding: 0;
146}
147
148body {
149  background-color: var(--color-background);
150  margin: 0;
151  padding: 0;
152  font-family:
153    ui-sans-serif,
154    system-ui,
155    -apple-system,
156    BlinkMacSystemFont,
157    "Segoe UI",
158    Roboto,
159    "Helvetica Neue",
160    Arial,
161    "Noto Sans",
162    sans-serif,
163    "Apple Color Emoji",
164    "Segoe UI Emoji",
165    "Segoe UI Symbol",
166    "Noto Color Emoji";
167}
168
169h1 {
170  margin-bottom: 1.5rem;
171  padding: 0 1rem;
172  font-weight: 400;
173  color: var(--color-text);
174}
175
176p {
177  margin-bottom: 1.5rem;
178  padding: 0 1rem;
179  color: var(--color-text);
180}
181
182form {
183  margin: 0;
184  padding: 0;
185}
186
187label {
188  font-weight: 500;
189  text-align: left;
190  margin-bottom: 0.25rem;
191  display: block;
192  color: var(--color-text);
193}
194
195input[type] {
196  box-sizing: border-box;
197  display: block;
198  width: 100%;
199  padding: 0.5rem 1rem;
200  border: var(--border-width) solid var(--color-control-border);
201  background: var(--color-background-card);
202  font-size: 1rem;
203  border-radius: var(--border-radius);
204  color: var(--color-text);
205}
206
207p {
208  font-size: 1.1rem;
209  line-height: 2rem;
210}
211
212a.button {
213  text-decoration: none;
214  line-height: 1rem;
215}
216
217a.button:link,
218  a.button:visited {
219    background-color: var(--color-background);
220    color: var(--color-primary);
221  }
222
223button,
224a.button {
225  padding: 0.75rem 1rem;
226  color: var(--provider-color, var(--color-primary));
227  background-color: var(--provider-bg, var(--color-background));
228  border: 1px solid #00000031;
229  font-size: 0.9rem;
230  height: 50px;
231  border-radius: var(--border-radius);
232  transition: background-color 250ms ease-in-out;
233  font-weight: 300;
234  position: relative;
235  display: flex;
236  align-items: center;
237  justify-content: space-between;
238}
239
240:is(button,a.button):hover {
241    background-color: var(--provider-bg-hover, var(--color-background-hover));
242    cursor: pointer;
243  }
244
245:is(button,a.button):active {
246    cursor: pointer;
247  }
248
249:is(button,a.button) span {
250    color: var(--provider-bg);
251  }
252
253#submitButton {
254  color: var(--button-text-color, var(--color-info-text));
255  background-color: var(--brand-color, var(--color-info));
256  width: 100%;
257}
258
259#submitButton:hover {
260    background-color: var(
261      --button-hover-bg,
262      var(--color-info-hover)
263    ) !important;
264  }
265
266a.site {
267  color: var(--color-primary);
268  text-decoration: none;
269  font-size: 1rem;
270  line-height: 2rem;
271}
272
273a.site:hover {
274    text-decoration: underline;
275  }
276
277.page {
278  position: absolute;
279  width: 100%;
280  height: 100%;
281  display: grid;
282  place-items: center;
283  margin: 0;
284  padding: 0;
285  box-sizing: border-box;
286}
287
288.page > div {
289    text-align: center;
290  }
291
292.error a.button {
293    padding-left: 2rem;
294    padding-right: 2rem;
295    margin-top: 0.5rem;
296  }
297
298.error .message {
299    margin-bottom: 1.5rem;
300  }
301
302.signin input[type="text"] {
303    margin-left: auto;
304    margin-right: auto;
305    display: block;
306  }
307
308.signin hr {
309    display: block;
310    border: 0;
311    border-top: 1px solid var(--color-separator);
312    margin: 2rem auto 1rem auto;
313    overflow: visible;
314  }
315
316.signin hr::before {
317      content: "or";
318      background: var(--color-background-card);
319      color: #888;
320      padding: 0 0.4rem;
321      position: relative;
322      top: -0.7rem;
323    }
324
325.signin .error {
326    background: #f5f5f5;
327    font-weight: 500;
328    border-radius: 0.3rem;
329    background: var(--color-error);
330  }
331
332.signin .error p {
333      text-align: left;
334      padding: 0.5rem 1rem;
335      font-size: 0.9rem;
336      line-height: 1.2rem;
337      color: var(--color-info-text);
338    }
339
340.signin > div,
341  .signin form {
342    display: block;
343  }
344
345.signin > div input[type], .signin form input[type] {
346      margin-bottom: 0.5rem;
347    }
348
349.signin > div button, .signin form button {
350      width: 100%;
351    }
352
353.signin .provider + .provider {
354    margin-top: 1rem;
355  }
356
357.logo {
358  display: inline-block;
359  max-width: 150px;
360  margin: 1.25rem 0;
361  max-height: 70px;
362}
363
364.card {
365  background-color: var(--color-background-card);
366  border-radius: 1rem;
367  padding: 1.25rem 2rem;
368}
369
370.card .header {
371    color: var(--color-primary);
372  }
373
374.card input[type]::-moz-placeholder {
375    color: color-mix(
376      in srgb,
377      var(--color-text) 20%,
378      var(--color-button-active-background)
379    );
380  }
381
382.card input[type]::placeholder {
383    color: color-mix(
384      in srgb,
385      var(--color-text) 20%,
386      var(--color-button-active-background)
387    );
388  }
389
390.card input[type] {
391    background: color-mix(in srgb, var(--color-background-card) 95%, black);
392  }
393
394.section-header {
395  color: var(--color-text);
396}
397
398@media screen and (min-width: 450px) {
399  .card {
400    margin: 2rem 0;
401    width: 368px;
402  }
403}
404
405@media screen and (max-width: 450px) {
406  .card {
407    margin: 1rem 0;
408    width: 343px;
409  }
410}
411`;function nI(e){let{url:t,theme:r}=e;return nE("div",{className:"verify-request",children:[r.brandColor&&nE("style",{dangerouslySetInnerHTML:{__html:`
412        :root {
413          --brand-color: ${r.brandColor}
414        }
415      `}}),nE("div",{className:"card",children:[r.logo&&nE("img",{src:r.logo,alt:"Logo",className:"logo"}),nE("h1",{children:"Check your email"}),nE("p",{children:"A sign in link has been sent to your email address."}),nE("p",{children:nE("a",{className:"site",href:t.origin,children:t.host})})]})]})}function nC({html:e,title:t,status:r,cookies:n,theme:i,headTags:o}){return{cookies:n,status:r,headers:{"Content-Type":"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>${nT}</style><title>${t}</title>${o??""}</head><body class="__next-auth-theme-${i?.colorScheme??"auto"}"><div class="page">${nb(e)}</div></body></html>`}}function nj(e){let{url:t,theme:r,query:n,cookies:i,pages:o,providers:a}=e;return{csrf(e,t,r){return e?(t.logger.warn("csrf-disabled"),r.push({name:t.cookies.csrfToken.name,value:"",options:{...t.cookies.csrfToken.options,maxAge:0}}),{status:404,cookies:r}):{headers:{"Content-Type":"application/json","Cache-Control":"private, no-cache, no-store",Expires:"0",Pragma:"no-cache"},body:{csrfToken:t.csrfToken},cookies:r}},providers(e){return{headers:{"Content-Type":"application/json"},body:e.reduce((e,{id:t,name:r,type:n,signinUrl:i,callbackUrl:o})=>(e[t]={id:t,name:r,type:n,signinUrl:i,callbackUrl:o},e),{})}},signin(t,s){if(t)throw new y.D7("Unsupported action");if(o?.signIn){let t=`${o.signIn}${o.signIn.includes("?")?"&":"?"}${new URLSearchParams({callbackUrl:e.callbackUrl??"/"})}`;return s&&(t=`${t}&${new URLSearchParams({error:s})}`),{redirect:t,cookies:i}}let c=a?.find(e=>"webauthn"===e.type&&e.enableConditionalUI&&!!e.simpleWebAuthnBrowserVersion),l="";if(c){let{simpleWebAuthnBrowserVersion:e}=c;l=`<script src="https://unpkg.com/@simplewebauthn/browser@${e}/dist/bundle/index.umd.min.js" crossorigin="anonymous"></script>`}return nC({cookies:i,theme:r,html:nR({csrfToken:e.csrfToken,providers:e.providers?.filter(e=>["email","oauth","oidc"].includes(e.type)||"credentials"===e.type&&e.credentials||"webauthn"===e.type&&e.formFields||!1),callbackUrl:e.callbackUrl,theme:e.theme,error:s,...n}),title:"Sign In",headTags:l})},signout(){return o?.signOut?{redirect:o.signOut,cookies:i}:nC({cookies:i,theme:r,html:nO({csrfToken:e.csrfToken,url:t,theme:r}),title:"Sign Out"})},verifyRequest(e){return o?.verifyRequest?{redirect:`${o.verifyRequest}${t?.search??""}`,cookies:i}:nC({cookies:i,theme:r,html:nI({url:t,theme:r,...e}),title:"Verify Request"})},error(e){return o?.error?{redirect:`${o.error}${o.error.includes("?")?"&":"?"}error=${e}`,cookies:i}:nC({cookies:i,theme:r,...nA({url:t,theme:r,error:e}),title:"Error"})}}}function nU(e,t=Date.now()){return new Date(t+1e3*e)}async function n$(e,t,r,n){if(!r?.providerAccountId||!r.type)throw Error("Missing or invalid provider account");if(!["email","oauth","oidc","webauthn"].includes(r.type))throw Error("Provider not supported");let{adapter:i,jwt:o,events:a,session:{strategy:s,generateSessionToken:c}}=n;
415if(!i)return{user:t,account:r};let l=t,u=r,{createUser:f,updateUser:p,getUser:d,getUserByAccount:h,getUserByEmail:m,linkAccount:g,createSession:b,getSessionAndUser:w,deleteSession:v}=i,_=null,S=null,E=!1,A="jwt"===s;if(e){if(A)try{let t=n.cookies.sessionToken.name;(_=await o.decode({...o,token:e,salt:t}))&&"sub"in _&&_.sub&&(S=await d(_.sub))}catch{}else{let t=await w(e);t&&(_=t.session,S=t.user)}}if("email"===u.type){let t=await m(l.email);return t?(S?.id!==t.id&&!A&&e&&await v(e),S=await p({id:t.id,emailVerified:new Date}),await a.updateUser?.({user:S})):(S=await f({...l,emailVerified:new Date}),await a.createUser?.({user:S}),E=!0),{session:_=A?{}:await b({sessionToken:c(),userId:S.id,expires:nU(n.session.maxAge)}),user:S,isNewUser:E}}if("webauthn"===u.type){let e=await h({providerAccountId:u.providerAccountId,provider:u.provider});if(e){if(S){if(e.id===S.id){let e={...u,userId:S.id};return{session:_,user:S,isNewUser:E,account:e}}throw new y.FW("The account is already associated with another user",{provider:u.provider})}_=A?{}:await b({sessionToken:c(),userId:e.id,expires:nU(n.session.maxAge)});let t={...u,userId:e.id};return{session:_,user:e,isNewUser:E,account:t}}{if(S){await g({...u,userId:S.id}),await a.linkAccount?.({user:S,account:u,profile:l});let e={...u,userId:S.id};return{session:_,user:S,isNewUser:E,account:e}}if(l.email?await m(l.email):null)throw new y.FW("Another account already exists with the same e-mail address",{provider:u.provider});S=await f({...l}),await a.createUser?.({user:S}),await g({...u,userId:S.id}),await a.linkAccount?.({user:S,account:u,profile:l}),_=A?{}:await b({sessionToken:c(),userId:S.id,expires:nU(n.session.maxAge)});let e={...u,userId:S.id};return{session:_,user:S,isNewUser:!0,account:e}}}let k=await h({providerAccountId:u.providerAccountId,provider:u.provider});if(k){if(S){if(k.id===S.id)return{session:_,user:S,isNewUser:E};throw new y.Xw("The account is already associated with another user",{provider:u.provider})}return{session:_=A?{}:await b({sessionToken:c(),userId:k.id,expires:nU(n.session.maxAge)}),user:k,isNewUser:E}}{let{provider:e}=n,{type:t,provider:r,providerAccountId:i,userId:o,...s}=u,p={providerAccountId:i,provider:r,type:t,userId:o};if(u=Object.assign(e.account(s)??{},p),S)return await g({...u,userId:S.id}),await a.linkAccount?.({user:S,account:u,profile:l}),{session:_,user:S,isNewUser:E};let d=l.email?await m(l.email):null;if(d){let e=n.provider;if(e?.allowDangerousEmailAccountLinking)S=d,E=!1;else throw new y.Xw("Another account already exists with the same e-mail address",{provider:u.provider})}else S=await f({...l,emailVerified:null}),E=!0;return await a.createUser?.({user:S}),await g({...u,userId:S.id}),await a.linkAccount?.({user:S,account:u,profile:l}),{session:_=A?{}:await b({sessionToken:c(),userId:S.id,expires:nU(n.session.maxAge)}),user:S,isNewUser:E}}}if("undefined"==typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 ")){let e="oauth4webapi",t="v3.8.1";i=`${e}/${t}`}function nL(e,t){if(null==e)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch{return!1}}let nN="ERR_INVALID_ARG_VALUE",nD="ERR_INVALID_ARG_TYPE";function nM(e,t,r){let n=TypeError(e,{cause:r});return Object.assign(n,{code:t}),n}let nH=Symbol(),nW=Symbol(),nB=Symbol(),nF=Symbol(),nK=Symbol(),nz=Symbol();Symbol();let nJ=new TextEncoder,nq=new TextDecoder;function nG(e){return"string"==typeof e?nJ.encode(e):nq.decode(e)}if(Uint8Array.prototype.toBase64)o=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{let e=32768;o=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));let r=[];for(let n=0;n<t.byteLength;n+=e)r.push(String.fromCharCode.apply(null,t.subarray(n,n+e)));return btoa(r.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}function nV(e){return"string"==typeof e?a(e):o(e)}Uint8Array.fromBase64?a=e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw nM("The input to be decoded is not correctly encoded.",nN,e)}}:a=e=>{try{let t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),r=new 
415Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}catch(e){throw nM("The input to be decoded is not correctly encoded.",nN,e)}};class nX extends Error{code;constructor(e,t){super(e,t),this.name=this.constructor.name,this.code=op,Error.captureStackTrace?.(this,this.constructor)}}class nZ extends Error{code;constructor(e,t){super(e,t),this.name=this.constructor.name,t?.code&&(this.code=t?.code),Error.captureStackTrace?.(this,this.constructor)}}function nY(e,t,r){return new nZ(e,{code:t,cause:r})}function nQ(e,t){if(!(e instanceof CryptoKey))throw nM(`${t} must be a CryptoKey`,nD)}function n0(e,t){if(nQ(e,t),"private"!==e.type)throw nM(`${t} must be a private CryptoKey`,nN)}function n1(e){return!(null===e||"object"!=typeof e||Array.isArray(e))}function n2(e){nL(e,Headers)&&(e=Object.fromEntries(e.entries()));let t=new Headers(e??{});if(i&&!t.has("user-agent")&&t.set("user-agent",i),t.has("authorization"))throw nM('"options.headers" must not include the "authorization" header name',nN);return t}function n3(e,t){if(void 0!==t){if("function"==typeof t&&(t=t(e.href)),!(t instanceof AbortSignal))throw nM('"options.signal" must return or be an instance of AbortSignal',nD);return t}}function n6(e){return e.includes("//")?e.replace("//","/"):e}function n5(e,t,r=!1){return"/"===e.pathname?e.pathname=t:e.pathname=n6(`${t}/${r?e.pathname:e.pathname.replace(/(\/)$/,"")}`),e}function n4(e,t){return e.pathname=n6(`${e.pathname}/${t}`),e}async function n8(e,t,r,n){if(!(e instanceof URL))throw nM(`"${t}" must be an instance of URL`,nD);iO(e,n?.[nH]!==!0);let i=r(new URL(e.href)),o=n2(n?.headers);return o.set("accept","application/json"),(n?.[nF]||fetch)(i.href,{body:void 0,headers:Object.fromEntries(o.entries()),method:"GET",redirect:"manual",signal:n3(i,n?.signal)})}async function n9(e,t){return n8(e,"issuerIdentifier",e=>{switch(t?.algorithm){case void 0:case"oidc":n4(e,".well-known/openid-configuration");break;case"oauth2":n5(e,".well-known/oauth-authorization-server");break;default:throw nM('"options.algorithm" must be "oidc" (default), or "oauth2"',nN)}return e},t)}function n7(e,t,r,n,i){try{if("number"!=typeof e||!Number.isFinite(e))throw nM(`${r} must be a number`,nD,i);if(e>0)return;if(t){if(0!==e)throw nM(`${r} must be a non-negative number`,nN,i);return}throw nM(`${r} must be a positive number`,nN,i)}catch(e){if(n)throw nY(e.message,n,i);throw e}}function ie(e,t,r,n){try{if("string"!=typeof e)throw nM(`${t} must be a string`,nD,n);if(0===e.length)throw nM(`${t} must not be empty`,nN,n)}catch(e){if(r)throw nY(e.message,r,n);throw e}}async function it(e,t){let r=e;if(!(r instanceof URL)&&r!==oN)throw nM('"expectedIssuerIdentifier" must be an instance of URL',nD);if(!nL(t,Response))throw nM('"response" must be an instance of Response',nD);if(200!==t.status)throw nY('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',ob,t);ox(t);let n=await oL(t);if(ie(n.issuer,'"response" body "issuer" property',om,{body:n}),r!==oN&&new URL(n.issuer).href!==r.href)throw nY('"response" body "issuer" property does not match the expected value',oE,{expected:r.href,body:n,attribute:"issuer"});return n}function ir(e){io(e,"application/json")}function ii(e,...t){let r='"response" content-type must be ';if(t.length>2){let e=t.pop();r+=`${t.join(", ")}, or ${e}`}else 2===t.length?r+=`${t[0]} or ${t[1]}`:r+=t[0];return nY(r,og,e)}function io(e,t){if(iX(e)!==t)throw ii(e,t)}function ia(){return nV(crypto.getRandomValues(new Uint8Array(32)))}function is(){return ia()}function ic(){return ia()}function il(){return ia()}async function iu(e){return ie(e,"codeVerifier"),nV(await crypto.subtle.digest("SHA-256",nG(e)))}function ip(e){return e instanceof CryptoKey?{key:e}:e?.key instanceof CryptoKey?(void 0!==e.kid&&ie(e.kid,'"kid"'),{key:e.key,kid:e.kid}):{}}function id(e){switch(e.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new nX("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}function ih(e){switch(e.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new nX("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}function iy(e){switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new nX("unsupported EcKeyAlgorithm namedCurve",{cause:e})}}function im(e){switch(e.algorithm.name){case"RSA-PSS":return id(e);case"RSASSA-PKCS1-v1_5":return ih(e);case"ECDSA":return iy(e);case"Ed25519":case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return e.algorithm.name;case"EdDSA":return"Ed25519";default:throw new nX("unsupported CryptoKey algorithm name",{cause:e})}}function ig(e){let t=e?.[nW];return"number"==typeof t&&Number.isFinite(t)?t:0}function ib(e){let t=e?.[nB];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function iw(){return Math.floor(Date.now()/1e3)}function iv(e){if("object"!=typeof e||null===e)throw nM('"as" must be an object',nD);ie(e.issuer,'"as.issuer"')}function i_(e){if("object"!=typeof e||null===e)throw nM('"client" must be an object',nD);ie(e.client_id,'"client.client_id"')}function iS(e){return ie(e,'"clientSecret"'),(t,r,n,i)=>{n.set("client_id",r.client_id),n.set("client_secret",e)}}function iE(e,t){let r=iw()+ig(t);return{jti:ia(),aud:e.issuer,exp:r+60,iat:r,nbf:r,iss:t.client_id,sub:t.client_id}}function iA(e,t){let{key:r,kid:n}=ip(e);return n0(r,'"clientPrivateKey.key"'),async(e,i,o,a)=>{let s={alg:im(r),kid:n},c=iE(e,i);t?.[nK]?.(s,c),o.set("client_id",i.client_id),o.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),o.set("client_assertion",await iP(s,c,r))}}function ik(e,t){let r;ie(e,'"clientSecret"');let n=t?.[nK];return async(t,i,o,a)=>
415{r||=await crypto.subtle.importKey("raw",nG(e),{hash:"SHA-256",name:"HMAC"},!1,["sign"]);let s={alg:"HS256"},c=iE(t,i);n?.(s,c);let l=`${nV(nG(JSON.stringify(s)))}.${nV(nG(JSON.stringify(c)))}`,u=await crypto.subtle.sign(r.algorithm,r,nG(l));o.set("client_id",i.client_id),o.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),o.set("client_assertion",`${l}.${nV(new Uint8Array(u))}`)}}function ix(){return(e,t,r,n)=>{r.set("client_id",t.client_id)}}async function iP(e,t,r){if(!r.usages.includes("sign"))throw nM('CryptoKey instances used for signing assertions must include "sign" in their "usages"',nN);let n=`${nV(nG(JSON.stringify(e)))}.${nV(nG(JSON.stringify(t)))}`,i=nV(await crypto.subtle.sign(oO(r),r,nG(n)));return`${n}.${i}`}let iR=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch{return null}};function iO(e,t){if(t&&"https:"!==e.protocol)throw nY("only requests to HTTPS are allowed",ow,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw nY("only HTTP and HTTPS requests are allowed",ov,e)}function iT(e,t,r,n){let i;if("string"!=typeof e||!(i=iR(e)))throw nY(`authorization server metadata does not contain a valid ${r?`"as.mtls_endpoint_aliases.${t}"`:`"as.${t}"`}`,void 0===e?oA:ok,{attribute:r?`mtls_endpoint_aliases.${t}`:t});return iO(i,n),i}function iI(e,t,r,n){return r&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?iT(e.mtls_endpoint_aliases[t],t,r,n):iT(e[t],t,r,n)}class iC extends Error{cause;code;error;status;error_description;response;constructor(e,t){super(e,t),this.name=this.constructor.name,this.code=of,this.cause=t.cause,this.error=t.cause.error,this.status=t.response.status,this.error_description=t.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:t.response}),Error.captureStackTrace?.(this,this.constructor)}}
415class ij extends Error{cause;code;error;error_description;constructor(e,t){super(e,t),this.name=this.constructor.name,this.code=od,this.cause=t.cause,this.error=t.cause.get("error"),this.error_description=t.cause.get("error_description")??void 0,Error.captureStackTrace?.(this,this.constructor)}}class iU extends Error{cause;code;response;status;constructor(e,t){super(e,t),this.name=this.constructor.name,this.code=ou,this.cause=t.cause,this.status=t.response.status,this.response=t.response,Object.defineProperty(this,"response",{enumerable:!1}),Error.captureStackTrace?.(this,this.constructor)}}let i$="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",iL="[a-zA-Z0-9\\-\\._\\~\\+\\/]+[=]{0,2}",iN="("+i$+')\\s*=\\s*"((?:[^"\\\\]|\\\\.)*)"',iD="("+i$+")\\s*=\\s*("+i$+")",iM=RegExp("^[,\\s]*("+i$+")\\s(.*)"),iH=RegExp("^[,\\s]*"+iN+"[,\\s]*(.*)"),iW=RegExp("^[,\\s]*"+iD+"[,\\s]*(.*)"),iB=RegExp("^("+iL+")(?:$|[,\\s])(.*)");function iF(e){if(!nL(e,Response))throw nM('"response" must be an instance of Response',nD);let t=e.headers.get("www-authenticate");if(null===t)return;let r=[],n=t;for(;n;){let e,t=n.match(iM),i=t?.["1"].toLowerCase();if(n=t?.["2"],!i)return;let o={};for(;n;){let r,i;if(t=n.match(iH)){if([,r,i,n]=t,i.includes("\\"))try{i=JSON.parse(`"${i}"`)}catch{}o[r.toLowerCase()]=i;continue}if(t=n.match(iW)){[,r,i,n]=t,o[r.toLowerCase()]=i;continue}if(t=n.match(iB)){if(Object.keys(o).length)break;[,e,n]=t;break}return}let a={scheme:i,parameters:o};e&&(a.token68=e),r.push(a)}if(r.length)return r}async function iK(e){if(e.status>399&&e.status<500){ox(e),ir(e);try{let t=await e.clone().json();if(n1(t)&&"string"==typeof t.error&&t.error.length)return t}catch{}}}async function iz(e,t,r){if(e.status!==t){let t;if(i6(e),t=await iK(e))throw await e.body?.cancel(),new iC("server responded with an error in the response body",{cause:t,response:e});throw nY(`"response" is not a conform ${r} response (unexpected HTTP status code)`,ob,e)}}function iJ(e){if(!i7.has(e))throw nM('"options.DPoP" is not a valid DPoPHandle',nN)}async function iq(e,t,r,n,i,o){if(ie(e,'"accessToken"'),!(r instanceof URL))throw nM('"url" must be an instance of URL',nD);iO(r,o?.[nH]!==!0),n=n2(n),o?.DPoP&&(iJ(o.DPoP),await o.DPoP.addProof(r,n,t.toUpperCase(),e)),n.set("authorization",`${n.has("dpop")?"DPoP":"Bearer"} ${e}`);let a=await (o?.[nF]||fetch)(r.href,{body:i,headers:Object.fromEntries(n.entries()),method:t,redirect:"manual",signal:n3(r,o?.signal)});return o?.DPoP?.cacheNonce(a),a}async function iG(e,t,r,n){iv(e),i_(t);let i=iI(e,"userinfo_endpoint",t.use_mtls_endpoint_aliases,n?.[nH]!==!0),o=n2(n?.headers);return t.userinfo_signed_response_alg?o.set("accept","application/jwt"):(o.set("accept","application/json"),o.append("accept","application/jwt")),iq(r,"GET",i,o,null,{...n,[nW]:ig(t)})}let iV=Symbol();function iX(e){return e.headers.get("content-type")?.split(";")[0]}async function iZ(e,t,r,n,i){let o;if(iv(e),i_(t),!nL(n,Response))throw nM('"response" must be an instance of Response',nD);if(i6(n),200!==n.status)throw nY('"response" is not a conform UserInfo Endpoint response (unexpected HTTP status code)',ob,n);if(ox(n),"application/jwt"===iX(n)){let{claims:r,jwt:a}=await oT(await n.text(),oI.bind(void 0,t.userinfo_signed_response_alg,e.userinfo_signing_alg_values_supported,void 0),ig(t),ib(t),i?.[nz]).then(i5.bind(void 0,t.client_id)).then(i8.bind(void 0,e));i1.set(n,a),o=r}else{if(t.userinfo_signed_response_alg)throw nY("JWT UserInfo Response expected",oh,n);o=await oL(n)}if(ie(o.sub,'"response" body "sub" property',om,{body:o}),r===iV);else if(ie(r,'"expectedSubject"'),o.sub!==r)throw nY('unexpected "response" body "sub" property value',oE,{expected:r,body:o,attribute:"sub"});return o}async function iY(e,t,r,n,i,o,a){return await r(e,t,i,o),o.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),(a?.[nF]||fetch)(n.href,{body:i,headers:Object.fromEntries(o.entries()),method:"POST",redirect:"manual",signal:n3(n,a?.signal)})}async function iQ(e,t,r,n,i,o){let a=iI(e,"token_endpoint",t.use_mtls_endpoint_aliases,o?.[nH]!==!0);i.set("grant_type",n);let s=n2(o?.headers);s.set("accept","application/json"),o?.DPoP!==void 0&&(iJ(o.DPoP),await o.DPoP.addProof(a,s,"POST"));let c=await iY(e,t,r,a,i,s,o);return o?.DPoP?.cacheNonce(c),c}let i0=new WeakMap,i1=new WeakMap;function i2(e){if(!e.id_token)return;let t=i0.get(e);if(!t)throw nM('"ref" was already garbage collected or did not resolve from the proper sources',nN);return t}async function i3(e,t,r,n,i,o){if(iv(e),i_(t),!nL(r,Response))throw nM('"response" must be an instance of Response',nD);await iz(r,200,"Token Endpoint"),ox(r);let a=await oL(r);if(ie(a.access_token,'"response" body "access_token" property',om,{body:a}),ie(a.token_type,'"response" body "token_type" property',om,{body:a}),a.token_type=a.token_type.toLowerCase(),void 0!==a.expires_in){let e="number"!=typeof a.expires_in?parseFloat(a.expires_in):a.expires_in;n7(e,!0,'"response" body "expires_in" property',om,{body:a}),a.expires_in=e}if(void 0!==a.refresh_token&&ie(a.refresh_token,'"response" body "refresh_token" property',om,{body:a}),void 0!==a.scope&&"string"!=typeof a.scope)throw nY('"response" body "scope" property must be a string',om,{body:a});if(void 0!==a.id_token){ie(a.id_token,'"response" body "id_token" property',om,{body:a});let o=["aud","exp","iat","iss","sub"];!0===t.require_auth_time&&o.push("auth_time"),void 0!==t.default_max_age&&(n7(t.default_max_age,!0,'"client.default_max_age"'),o.push("auth_time")),n?.length&&o.push(...n);let{claims:s,jwt:c}=await oT(a.id_token,oI.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),ig(t),ib(t),i).then(oi.bind(void 0,o)).then(i9.bind(void 0,e)).then(i4.bind(void 0,t.client_id));if(Array.isArray(s.aud)&&1!==s.aud.length){if(void 0===s.azp)throw nY('ID Token "aud" (audience) claim includes additional untrusted audiences',oS,{claims:s,claim:"aud"});if(s.azp!==t.client_id)throw nY('unexpected ID Token "azp" (authorized party) claim value',oS,{expected:t.client_id,claims:s,claim:"azp"})}void 0!==s.auth_time&&n7(s.auth_time,!0,'ID Token "auth_time" (authentication time)',om,{claims:s}),i1.set(r,c),i0.set(a,s)}
415if(o?.[a.token_type]!==void 0)o[a.token_type](r,a);else if("dpop"!==a.token_type&&"bearer"!==a.token_type)throw new nX("unsupported `token_type` value",{cause:{body:a}});return a}function i6(e){let t;if(t=iF(e))throw new iU("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:t,response:e})}function i5(e,t){return void 0!==t.claims.aud?i4(e,t):t}function i4(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw nY('unexpected JWT "aud" (audience) claim value',oS,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw nY('unexpected JWT "aud" (audience) claim value',oS,{expected:e,claims:t.claims,claim:"aud"});return t}function i8(e,t){return void 0!==t.claims.iss?i9(e,t):t}function i9(e,t){let r=e[oD]?.(t)??e.issuer;if(t.claims.iss!==r)throw nY('unexpected JWT "iss" (issuer) claim value',oS,{expected:r,claims:t.claims,claim:"iss"});return t}let i7=new WeakSet;function oe(e){return i7.add(e),e}let ot=Symbol();async function or(e,t,r,n,i,o,a){if(iv(e),i_(t),!i7.has(n))throw nM('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',nN);ie(i,'"redirectUri"');let s=oC(n,"code");if(!s)throw nY('no authorization code in "callbackParameters"',om);let c=new URLSearchParams(a?.additionalParameters);return c.set("redirect_uri",i),c.set("code",s),o!==ot&&(ie(o,'"codeVerifier"'),c.set("code_verifier",o)),iQ(e,t,r,"authorization_code",c,a)}let on={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function oi(e,t){for(let r of e)if(void 0===t.claims[r])throw nY(`JWT "${r}" (${on[r]}) claim missing`,om,{claims:t.claims});return t}let oo=Symbol(),oa=Symbol();async function os(e,t,r,n){return"string"==typeof n?.expectedNonce||"number"==typeof n?.maxAge||n?.requireIdToken?oc(e,t,r,n.expectedNonce,n.maxAge,n[nz],n.recognizedTokenTypes):ol(e,t,r,n?.[nz],n?.recognizedTokenTypes)}async function oc(e,t,r,n,i,o,a){let s=[];switch(n){case void 0:n=oo;break;case oo:break;default:ie(n,'"expectedNonce" argument'),s.push("nonce")}switch(i??=t.default_max_age){case void 0:i=oa;break;case oa:break;default:n7(i,!0,'"maxAge" argument'),s.push("auth_time")}let c=await i3(e,t,r,s,o,a);ie(c.id_token,'"response" body "id_token" property',om,{body:c});let l=i2(c);if(i!==oa){let e=iw()+ig(t),r=ib(t);if(l.auth_time+i<e-r)throw nY("too much time has elapsed since the last End-User authentication",o_,{claims:l,now:e,tolerance:r,claim:"auth_time"})}if(n===oo){if(void 0!==l.nonce)throw nY('unexpected ID Token "nonce" claim value',oS,{expected:void 0,claims:l,claim:"nonce"})}else if(l.nonce!==n)throw nY('unexpected ID Token "nonce" claim value',oS,{expected:n,claims:l,claim:"nonce"});return c}async function ol(e,t,r,n,i){let o=await i3(e,t,r,void 0,n,i),a=i2(o);if(a){if(void 0!==t.default_max_age){n7(t.default_max_age,!0,'"client.default_max_age"');let e=iw()+ig(t),r=ib(t);if(a.auth_time+t.default_max_age<e-r)throw nY("too much time has elapsed since the last End-User authentication",o_,{claims:a,now:e,tolerance:r,claim:"auth_time"})}if(void 0!==a.nonce)throw nY('unexpected ID Token "nonce" claim value',oS,{expected:void 0,claims:a,claim:"nonce"})}return o}let ou="OAUTH_WWW_AUTHENTICATE_CHALLENGE",of="OAUTH_RESPONSE_BODY_ERROR",op="OAUTH_UNSUPPORTED_OPERATION",od="OAUTH_AUTHORIZATION_RESPONSE_ERROR",oh="OAUTH_JWT_USERINFO_EXPECTED",oy="OAUTH_PARSE_ERROR",om="OAUTH_INVALID_RESPONSE",og="OAUTH_RESPONSE_IS_NOT_JSON",ob="OAUTH_RESPONSE_IS_NOT_CONFORM",ow="OAUTH_HTTP_REQUEST_FORBIDDEN",ov="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",o_="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",oS="OAUTH_JWT_CLAIM_COMPARISON_FAILED",oE="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",oA="OAUTH_MISSING_SERVER_METADATA",ok="OAUTH_INVALID_SERVER_METADATA";function ox(e){if(e.bodyUsed)throw nM('"response" body has been used already',nN)}function oP(e){let{algorithm:t}=e;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new nX(`unsupported ${t.name} modulusLength`,{cause:e})}function oR(e){let{algorithm:t}=e;switch(t.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new nX("unsupported ECDSA namedCurve",{cause:e})}}function oO(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:oR(e)};case"RSA-PSS":switch(oP(e),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new nX("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return oP(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new nX("unsupported CryptoKey algorithm name",{cause:e})}async function oT(e,t,r,n,i){let o,a,{0:s,1:c,length:l}=e.split(".");if(5===l){if(void 0!==i)e=await i(e),{0:s,1:c,length:l}=e.split(".");else throw new nX("JWE decryption is not configured",{cause:e})}if(3!==l)throw nY("Invalid JWT",om,e);try{o=JSON.parse(nG(nV(s)))}catch(e){throw nY("failed to parse JWT Header body as base64url encoded JSON",oy,e)}if(!n1(o))throw nY("JWT Header must be a top level object",om,e);if(t(o),void 0!==o.crit)throw new nX('no JWT "crit" header parameter extensions are supported',{cause:{header:o}});try{a=JSON.parse(nG(nV(c)))}catch(e){throw nY("failed to parse JWT Payload body as base64url encoded JSON",oy,e)}if(!n1(a))throw nY("JWT Payload must be a top level object",om,e);let u=iw()+r;if(void 0!==a.exp){if("number"!=typeof a.exp)throw nY('unexpected JWT "exp" (expiration time) claim type',om,{claims:a});if(a.exp<=u-n)throw nY('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',o_,{claims:a,now:u,tolerance:n,claim:"exp"})}if(void 0!==a.iat&&"number"!=typeof a.iat)throw nY('unexpected JWT "iat" (issued at) claim type',om,{claims:a});if(void 0!==a.iss&&"string"!=typeof a.iss)throw nY('unexpected JWT "iss" (issuer) claim type',om,{claims:a});if(void 0!==a.nbf){if("number"!=typeof a.nbf)throw nY('unexpected JWT "nbf" (not before) claim type',om,{claims:a});if(a.nbf>u+n)throw nY('unexpected JWT "nbf" (not before) claim value',o_,{claims:a,now:u,tolerance:n,claim:"nbf"})}if(void 0!==a.aud&&"string"!=typeof a.aud&&!Array.isArray(a.aud))throw nY('unexpected JWT "aud" (audience) claim type',om,{claims:a});return{header:o,claims:a,jwt:e}}function oI(e,t,r,n){if(void 0!==e){if("string"==typeof e?n.alg!==e:!e.includes(n.alg))throw nY('unexpected JWT "alg" header parameter',om,{header:n,expected:e,reason:"client configuration"});return}if(Array.isArray(t)){if(!t.includes(n.alg))throw nY('unexpected JWT "alg" header parameter',om,{header:n,expected:t,reason:"authorization server metadata"});return}if(void 0!==r){if("string"==typeof r?n.alg!==r:"function"==typeof r?!r(n.alg):!r.includes(n.alg))throw nY('unexpected JWT "alg" header parameter',om,{header:n,expected:r,reason:"default value"});return}throw nY('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:r})}function oC(e,t){let{0:r,length:n}=e.getAll(t);if(n>1)throw nY(`"${t}" parameter must be provided only once`,om);return r}let oj=Symbol(),oU=Symbol();function o$(e,t,r,n){if(iv(e),i_(t),r instanceof URL&&(r=r.searchParams),!(r instanceof URLSearchParams))throw nM('"parameters" must be an instance of URLSearchParams, or URL',nD);if(oC(r,"response"))throw nY('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',om,{parameters:r});let i=oC(r,"iss"),o=oC(r,"state");if(!i&&e.authorization_response_iss_parameter_supported)throw nY('response parameter "iss" (issuer) missing',om,{parameters:r});if(i&&i!==e.issuer)throw nY('unexpected "iss" (issuer) response parameter value',om,{expected:e.issuer,parameters:r});switch(n){case void 0:case oU:if(void 0!==o)throw nY('unexpected "state" response parameter encountered',om,{expected:void 0,parameters:r});break;case oj:break;default:if(ie(n,'"expectedState" argument'),o!==n)throw nY(void 0===o?'response parameter "state" missing':'unexpected "state" response parameter value',om,{expected:n,parameters:r})}if(oC(r,"error"))throw new ij("authorization response from the server is an error",{cause:r});let a=oC(r,"id_token"),s=oC(r,"token");if(void 0!==a||void 0!==s)throw new nX("implicit and hybrid flows are not supported");return oe(new URLSearchParams(r))}async function oL(e,t=ir){let r;try{r=await e.json()}catch(r){throw t(e),nY('failed to parse "response" body as JSON',oy,r)}if(!n1(r))throw nY('"response" body must be a top level object',om,{body:r});return r}let oN=Symbol(),oD=Symbol(),oM=900;
415async function oH(e,t,r){let{cookies:n,logger:i}=r,o=n[e],a=new Date;a.setTime(a.getTime()+1e3*oM),i.debug(`CREATE_${e.toUpperCase()}`,{name:o.name,payload:t,COOKIE_TTL:oM,expires:a});let s=await tJ({...r.jwt,maxAge:oM,token:{value:t},salt:o.name}),c={...o.options,expires:a};return{name:o.name,value:s,options:c}}async function oW(e,t,r){try{let{logger:n,cookies:i,jwt:o}=r;if(n.debug(`PARSE_${e.toUpperCase()}`,{cookie:t}),!t)throw new y.gS(`${e} cookie was missing`);let a=await tq({...o,token:t,salt:i[e].name});if(a?.value)return a.value;throw Error("Invalid cookie")}catch(t){throw new y.gS(`${e} value could not be parsed`,{cause:t})}}function oB(e,t,r){let{logger:n,cookies:i}=t,o=i[e];n.debug(`CLEAR_${e.toUpperCase()}`,{cookie:o}),r.push({name:o.name,value:"",options:{...i[e].options,maxAge:0}})}function oF(e,t){return async function(r,n,i){let{provider:o,logger:a}=i;if(!o?.checks?.includes(e))return;let s=r?.[i.cookies[t].name];a.debug(`USE_${t.toUpperCase()}`,{value:s});let c=await oW(t,s,i);return oB(t,i,n),c}}let oK={async create(e){let t=is(),r=await iu(t);return{cookie:await oH("pkceCodeVerifier",t,e),value:r}},use:oF("pkce","pkceCodeVerifier")},oz=900,oJ="encodedState",oq={async create(e,t){let{provider:r}=e;if(!r.checks.includes("state")){if(t)throw new y.gS("State data was provided but the provider is not configured to use state");return}let n={origin:t,random:ic()},i=await tJ({secret:e.jwt.secret,token:n,salt:oJ,maxAge:oz});return{cookie:await oH("state",i,e),value:i}},use:oF("state","state"),async decode(e,t){try{t.logger.debug("DECODE_STATE",{state:e});let r=await tq({secret:t.jwt.secret,token:e,salt:oJ});if(r)return r;throw Error("Invalid state")}catch(e){throw new y.gS("State could not be decoded",{cause:e})}}},oG={async create(e){if(!e.provider.checks.includes("nonce"))return;let t=il();return{cookie:await oH("nonce",t,e),value:t}},use:oF("nonce","nonce")},oV=900,oX="encodedWebauthnChallenge",oZ={async create(e,t,r){return{cookie:await oH("webauthnChallenge",await tJ({secret:e.jwt.secret,token:{challenge:t,registerData:r},salt:oX,maxAge:oV}),e)}},async use(e,t,r){let n=t?.[e.cookies.webauthnChallenge.name],i=await oW("webauthnChallenge",n,e),o=await tq({secret:e.jwt.secret,token:i,salt:oX});if(oB("webauthnChallenge",e,r),!o)throw new y.gS("WebAuthn challenge was missing");return o}};function oY(e){let t,r;if("string"!=typeof e)throw new Q("JWTs must use Compact JWS serialization, JWT must be a string");let{1:n,length:i}=e.split(".");if(5===i)throw new Q("Only JWTs using Compact JWS serialization can be decoded");if(3!==i)throw new Q("Invalid JWT");if(!n)throw new Q("JWTs must contain a payload");try{t=K(n)}catch{throw new Q("Failed to base64url decode the payload")}try{r=JSON.parse(L.decode(t))}catch{throw new Q("Failed to parse the decoded payload as JSON")}if(!es(r))throw new Q("Invalid JWT Claims Set");return r}function oQ(e){return encodeURIComponent(e).replace(/%20/g,"+")}function o0(e,t){let r=oQ(e),n=oQ(t),i=btoa(`${r}:${n}`);return`Basic ${i}`}async function o1(e,t,r){let n,i,o;let{logger:a,provider:s}=r,{token:c,userinfo:l}=s;if(c?.url&&"authjs.dev"!==c.url.host||l?.url&&"authjs.dev"!==l.url.host)n={issuer:s.issuer??"https://authjs.dev",token_endpoint:c?.url.toString(),userinfo_endpoint:l?.url.toString()};else{let e=new URL(s.issuer),t=await n9(e,{[nH]:!0,[nF]:s[rn.rK]});if(!(n=await it(e,t)).token_endpoint)throw TypeError("TODO: Authorization server did not provide a token endpoint.");if(!n.userinfo_endpoint)throw TypeError("TODO: Authorization server did not provide a userinfo endpoint.")}let u={client_id:s.clientId,...s.client};switch(u.token_endpoint_auth_method){case void 0:case"client_secret_basic":i=(e,t,r,n)=>{n.set("authorization",o0(s.clientId,s.clientSecret))};break;case"client_secret_post":i=iS(s.clientSecret);break;case"client_secret_jwt":i=ik(s.clientSecret);break;case"private_key_jwt":i=iA(s.token.clientPrivateKey,{[nK](e,t){t.aud=[n.issuer,n.token_endpoint]}});break;case"none":i=ix();break;default:throw Error("unsupported client authentication method")}let f=[],p=await oq.use(t,f,r);try{o=o$(n,u,new URLSearchParams(e),s.checks.includes("state")?p:oj)}catch(e){if(e instanceof ij){let t={providerId:s.id,...Object.fromEntries(e.cause.entries())};throw a.debug("OAuthCallbackError",t),new y.iV("OAuth Provider returned an error",t)}throw e}let d=await oK.use(t,f,r),h=s.callbackUrl;!r.isOnRedirectProxy&&s.redirectProxyUrl&&(h=s.redirectProxyUrl);let m=await or(n,u,i,o,h,d??"decoy",{[nH]:!0,[nF]:(...e)=>(s.checks.includes("pkce")||e[1].body.delete("code_verifier"),(s[rn.rK]??fetch)(...e))});s.token?.conform&&(m=await s.token.conform(m.clone())??m);let g={},b=ru(s);if(s[rn.zS])switch(s.id){case"microsoft-entra-id":case"azure-ad":{let e=await m.clone().json();if(e.error){let t={providerId:s.id,...e};throw new y.iV(`OAuth Provider returned an error: ${e.error}`,t)}let{tid:t}=oY(e.id_token);if("string"==typeof t){let e=/microsoftonline\.com\/(\w+)\/v2\.0/,r=n.issuer?.match(e)?.[1]??"common",i=new URL(n.issuer.replace(r,t)),o=await n9(i,{[nF]:s[rn.rK]});n=await it(i,o)}}}let w=await os(n,u,m,{expectedNonce:await oG.use(t,f,r),requireIdToken:b}),v=w;
415if(b){let t=i2(w);if(g=t,s[rn.zS]&&"apple"===s.id)try{g.user=JSON.parse(e?.user)}catch{}if(!1===s.idToken){let e=await iG(n,u,w.access_token,{[nF]:s[rn.rK],[nH]:!0});g=await iZ(n,u,t.sub,e)}}else if(l?.request){let e=await l.request({tokens:v,provider:s});e instanceof Object&&(g=e)}else if(l?.url){let e=await iG(n,u,w.access_token,{[nF]:s[rn.rK],[nH]:!0});g=await e.json()}else throw TypeError("No userinfo endpoint configured");return v.expires_in&&(v.expires_at=Math.floor(Date.now()/1e3)+Number(v.expires_in)),{...await o2(g,s,v,a),profile:g,cookies:f}}async function o2(e,t,r,n){try{let n=await t.profile(e,r);return{user:{...n,id:crypto.randomUUID(),email:n.email?.toLowerCase()},account:{...r,provider:t.id,type:t.type,providerAccountId:n.id??crypto.randomUUID()}}}catch(r){n.debug("getProfile error details",e),n.error(new y.X0(r,{provider:t.id}))}}var o3=r(8916).Buffer;function o6(e,t,r){let{user:n,exists:i=!1}=r??{};switch(e){case"authenticate":return"authenticate";case"register":if(n&&t===i)return"register";break;case void 0:if(!t){if(!n||i)return"authenticate";return"register"}}return null}async function o5(e,t,r,n){let i=await ae(e,t,r),{cookie:o}=await oZ.create(e,i.challenge,r);return{status:200,cookies:[...n??[],o],body:{action:"register",options:i},headers:{"Content-Type":"application/json"}}}async function o4(e,t,r,n){let i=await o7(e,t,r),{cookie:o}=await oZ.create(e,i.challenge);return{status:200,cookies:[...n??[],o],body:{action:"authenticate",options:i},headers:{"Content-Type":"application/json"}}}async function o8(e,t,r){let n;let{adapter:i,provider:o}=e,a=t.body&&"string"==typeof t.body.data?JSON.parse(t.body.data):void 0;if(!a||"object"!=typeof a||!("id"in a)||"string"!=typeof a.id)throw new y.l4("Invalid WebAuthn Authentication response");let s=ai(an(a.id)),c=await i.getAuthenticator(s);if(!c)throw new y.l4(`WebAuthn authenticator not found in database: ${JSON.stringify({credentialID:s})}`);let{challenge:l}=await oZ.use(e,t.cookies,r);try{let r=o.getRelayingParty(e,t);n=await o.simpleWebAuthn.verifyAuthenticationResponse({...o.verifyAuthenticationOptions,expectedChallenge:l,response:a,authenticator:ar(c),expectedOrigin:r.origin,expectedRPID:r.id})}catch(e){throw new y.vV(e)}let{verified:u,authenticationInfo:f}=n;if(!u)throw new y.vV("WebAuthn authentication response could not be verified");try{let{newCounter:e}=f;await i.updateAuthenticatorCounter(c.credentialID,e)}catch(e){throw new y.dq(`Failed to update authenticator counter. This may cause future authentication attempts to fail. ${JSON.stringify({credentialID:s,oldCounter:c.counter,newCounter:f.newCounter})}`,e)}let p=await i.getAccount(c.providerAccountId,o.id);if(!p)throw new y.l4(`WebAuthn account not found in database: ${JSON.stringify({credentialID:s,providerAccountId:c.providerAccountId})}`);let d=await i.getUser(p.userId);if(!d)throw new y.l4(`WebAuthn user not found in database: ${JSON.stringify({credentialID:s,providerAccountId:c.providerAccountId,userID:p.userId})}`);return{account:p,user:d}}async function o9(e,t,r){let n;let{provider:i}=e,o=t.body&&"string"==typeof t.body.data?JSON.parse(t.body.data):void 0;if(!o||"object"!=typeof o||!("id"in o)||"string"!=typeof o.id)throw new y.l4("Invalid WebAuthn Registration response");let{challenge:a,registerData:s}=await oZ.use(e,t.cookies,r);if(!s)throw new y.l4("Missing user registration data in WebAuthn challenge cookie");try{let r=i.getRelayingParty(e,t);n=await i.simpleWebAuthn.verifyRegistrationResponse({...i.verifyRegistrationOptions,expectedChallenge:a,response:o,expectedOrigin:r.origin,expectedRPID:r.id})}catch(e){throw new y.vV(e)}if(!n.verified||!n.registrationInfo)throw new y.vV("WebAuthn registration response could not be verified");let c={providerAccountId:ai(n.registrationInfo.credentialID),provider:e.provider.id,type:i.type},l={providerAccountId:c.providerAccountId,counter:n.registrationInfo.counter,credentialID:ai(n.registrationInfo.credentialID),credentialPublicKey:ai(n.registrationInfo.credentialPublicKey),credentialBackedUp:n.registrationInfo.credentialBackedUp,credentialDeviceType:n.registrationInfo.credentialDeviceType,transports:ao(o.response.transports)};return{user:s,account:c,authenticator:l}}async function o7(e,t,r){let{provider:n,adapter:i}=e,o=r&&r.id?await i.listAuthenticatorsByUserId(r.id):null,a=n.getRelayingParty(e,t);return await n.simpleWebAuthn.generateAuthenticationOptions({...n.authenticationOptions,rpID:a.id,allowCredentials:o?.map(e=>({id:an(e.credentialID),type:"public-key",transports:aa(e.transports)}))})}async function ae(e,t,r){let{provider:n,adapter:i}=e,o=r.id?await i.listAuthenticatorsByUserId(r.id):null,a=t8(32),s=n.getRelayingParty(e,t);return await n.simpleWebAuthn.generateRegistrationOptions({...n.registrationOptions,userID:a,userName:r.email,userDisplayName:r.name??void 0,rpID:s.id,rpName:s.name,excludeCredentials:o?.map(e=>({id:an(e.credentialID),type:"public-key",transports:aa(e.transports)}))})}function at(e){let{provider:t,adapter:r}=e;if(!r)throw new y.Xp("An adapter is required for the WebAuthn provider");if(!t||"webauthn"!==t.type)throw new y.Ab("Provider must be WebAuthn");return{...e,provider:t,adapter:r}}function ar(e){return{...e,credentialDeviceType:e.credentialDeviceType,transports:aa(e.transports),credentialID:an(e.credentialID),credentialPublicKey:an(e.credentialPublicKey)}}function an(e){return new Uint8Array(o3.from(e,"base64"))}function ai(e){return o3.from(e).toString("base64")}function ao(e){return e?.join(",")}function aa(e){return e?e.split(","):void 0}
415async function as(e,t,r,n){if(!t.provider)throw new y.Ab("Callback route called without provider");let{query:i,body:o,method:a,headers:s}=e,{provider:c,adapter:l,url:u,callbackUrl:f,pages:p,jwt:d,events:h,callbacks:m,session:{strategy:g,maxAge:b},logger:w}=t,v="jwt"===g;try{if("oauth"===c.type||"oidc"===c.type){let a;let s=c.authorization?.url.searchParams.get("response_mode")==="form_post"?o:i;if(t.isOnRedirectProxy&&s?.state){let e=await oq.decode(s.state,t);if(e?.origin&&new URL(e.origin).origin!==t.url.origin){let t=`${e.origin}?${new URLSearchParams(s)}`;return w.debug("Proxy redirecting to",t),{redirect:t,cookies:n}}}let y=await o1(s,e.cookies,t);y.cookies.length&&n.push(...y.cookies),w.debug("authorization result",y);let{user:g,account:_,profile:S}=y;if(!g||!_||!S)return{redirect:`${u}/signin`,cookies:n};if(l){let{getUserByAccount:e}=l;a=await e({providerAccountId:_.providerAccountId,provider:c.id})}let E=await ac({user:a??g,account:_,profile:S},t);if(E)return{redirect:E,cookies:n};let{user:A,session:k,isNewUser:x}=await n$(r.value,g,_,t);if(v){let e={name:A.name,email:A.email,picture:A.image,sub:A.id?.toString()},i=await m.jwt({token:e,user:A,account:_,profile:S,isNewUser:x,trigger:x?"signUp":"signIn"});if(null===i)n.push(...r.clean());else{let e=t.cookies.sessionToken.name,o=await d.encode({...d,token:i,salt:e}),a=new Date;a.setTime(a.getTime()+1e3*b);let s=r.chunk(o,{expires:a});n.push(...s)}}else n.push({name:t.cookies.sessionToken.name,value:k.sessionToken,options:{...t.cookies.sessionToken.options,expires:k.expires}});if(await h.signIn?.({user:A,account:_,profile:S,isNewUser:x}),x&&p.newUser)return{redirect:`${p.newUser}${p.newUser.includes("?")?"&":"?"}${new URLSearchParams({callbackUrl:f})}`,cookies:n};return{redirect:f,cookies:n}}if("email"===c.type){let e=i?.token,o=i?.email;if(!e){let t=TypeError("Missing token. The sign-in URL was manually opened without token or the link was not sent correctly in the email.",{cause:{hasToken:!!e}});throw t.name="Configuration",t}let a=c.secret??t.secret,s=await l.useVerificationToken({identifier:o,token:await t4(`${e}${a}`)}),u=!!s,g=u&&s.expires.valueOf()<Date.now();if(!u||g||o&&s.identifier!==o)throw new y.GX({hasInvite:u,expired:g});let{identifier:w}=s,_=await l.getUserByEmail(w)??{id:crypto.randomUUID(),email:w,emailVerified:null},S={providerAccountId:_.email,userId:_.id,type:"email",provider:c.id},E=await ac({user:_,account:S},t);if(E)return{redirect:E,cookies:n};let{user:A,session:k,isNewUser:x}=await n$(r.value,_,S,t);if(v){let e={name:A.name,email:A.email,picture:A.image,sub:A.id?.toString()},i=await m.jwt({token:e,user:A,account:S,isNewUser:x,trigger:x?"signUp":"signIn"});if(null===i)n.push(...r.clean());else{let e=t.cookies.sessionToken.name,o=await d.encode({...d,token:i,salt:e}),a=new Date;a.setTime(a.getTime()+1e3*b);let s=r.chunk(o,{expires:a});n.push(...s)}}else n.push({name:t.cookies.sessionToken.name,value:k.sessionToken,options:{...t.cookies.sessionToken.options,expires:k.expires}});if(await h.signIn?.({user:A,account:S,isNewUser:x}),x&&p.newUser)return{redirect:`${p.newUser}${p.newUser.includes("?")?"&":"?"}${new URLSearchParams({callbackUrl:f})}`,cookies:n};return{redirect:f,cookies:n}}if("credentials"===c.type&&"POST"===a){let e=o??{};Object.entries(i??{}).forEach(([e,t])=>u.searchParams.set(e,t));let l=await c.authorize(e,new Request(u,{headers:s,method:a,body:JSON.stringify(o)}));if(l)l.id=l.id?.toString()??crypto.randomUUID();else throw new y.UC;let p={providerAccountId:l.id,type:"credentials",provider:c.id},g=await ac({user:l,account:p,credentials:e},t);if(g)return{redirect:g,cookies:n};let w={name:l.name,email:l.email,picture:l.image,sub:l.id},v=await m.jwt({token:w,user:l,account:p,isNewUser:!1,trigger:"signIn"});if(null===v)n.push(...r.clean());else{let e=t.cookies.sessionToken.name,i=await d.encode({...d,token:v,salt:e}),o=new Date;o.setTime(o.getTime()+1e3*b);let a=r.chunk(i,{expires:o});n.push(...a)}return await h.signIn?.({user:l,account:p}),{redirect:f,cookies:n}}if("webauthn"===c.type&&"POST"===a){let i,o,a;let s=e.body?.action;if("string"!=typeof s||"authenticate"!==s&&"register"!==s)throw new y.l4("Invalid action parameter");let c=at(t);switch(s){case"authenticate":{let t=await o8(c,e,n);i=t.user,o=t.account;break}case"register":{let r=await o9(t,e,n);i=r.user,o=r.account,a=r.authenticator}}await ac({user:i,account:o},t);let{user:l,isNewUser:u,session:g,account:w}=await n$(r.value,i,o,t);if(!w)throw new y.l4("Error creating or finding account");if(a&&l.id&&await c.adapter.createAuthenticator({...a,userId:l.id}),v){let e={name:l.name,email:l.email,picture:l.image,sub:l.id?.toString()},i=await m.jwt({token:e,user:l,account:w,isNewUser:u,trigger:u?"signUp":"signIn"});if(null===i)n.push(...r.clean());else{let e=t.cookies.sessionToken.name,o=await d.encode({...d,token:i,salt:e}),a=new Date;a.setTime(a.getTime()+1e3*b);let s=r.chunk(o,{expires:a});n.push(...s)}}else n.push({name:t.cookies.sessionToken.name,value:g.sessionToken,options:{...t.cookies.sessionToken.options,expires:g.expires}});if(await h.signIn?.({user:l,account:w,isNewUser:u}),u&&p.newUser)return{redirect:`${p.newUser}${p.newUser.includes("?")?"&":"?"}${new URLSearchParams({callbackUrl:f})}`,cookies:n};return{redirect:f,cookies:n}}throw new y.Ab(`Callback for provider type (${c.type}) is not supported`)}catch(t){if(t instanceof y.l4)throw t;let e=new y.Ng(t,{provider:c.id});throw w.debug("callback route error details",{method:a,query:i,body:o}),e}}async function ac(e,t){let r;let{signIn:n,redirect:i}=t.callbacks;try{r=await n(e)}catch(e){if(e instanceof y.l4)throw e;throw new y.JK(e)}if(!r)throw new y.JK("AccessDenied");if("string"==typeof r)return await i({url:r,baseUrl:t.url.origin})}async function al(e,t,r,n,i){let{adapter:o,jwt:a,events:s,callbacks:c,logger:l,session:{strategy:u,maxAge:f}}=e,p={body:null,headers:{"Content-Type":"application/json",...!n&&{"Cache-Control":"private, no-cache, no-store",Expires:"0",Pragma:"no-cache"}},cookies:r},d=t.value;if(!d)return p;if("jwt"===u){try{let r=e.cookies.sessionToken.name,o=await a.decode({...a,token:d,salt:r});if(!o)throw Error("Invalid JWT");let l=await c.jwt({token:o,...n&&{trigger:"update"},session:i}),u=nU(f);if(null!==l){let e={user:{name:l.name,email:l.email,image:l.picture},expires:u.toISOString()},n=await c.session({session:e,token:l});p.body=n;let i=await a.encode({...a,token:l,salt:r}),o=t.chunk(i,{expires:u});p.cookies?.push(...o),await s.session?.({session:n,token:l})}else p.cookies?.push(...t.clean())}catch(e){l.error(new y.xo(e)),p.cookies?.push(...t.clean())}return p}try{let{getSessionAndUser:r,deleteSession:a,updateSession:l}=o,u=await r(d);if(u&&u.session.expires.valueOf()<Date.now()&&(await a(d),u=null),u){let{user:t,session:r}=u,o=e.session.updateAge,a=r.expires.valueOf()-1e3*f+1e3*o,h=nU(f);a<=Date.now()&&await l({sessionToken:d,expires:h});let y=await c.session({session:{...r,user:t},user:t,newSession:i,...n?{trigger:"update"}:{}});p.body=y,p.cookies?.push({name:e.cookies.sessionToken.name,value:d,options:{...e.cookies.sessionToken.options,expires:h}}),await s.session?.({session:y})}else d&&p.cookies?.push(...t.clean())}catch(e){l.error(new y.li(e))}return p}async function au(e,t){let r,n;let{logger:i,provider:o}=t,a=o.authorization?.url;if(!a||"authjs.dev"===a.host){let e=new URL(o.issuer),t=await n9(e,{[nF]:o[rn.rK],[nH]:!0}),r=await it(e,t).catch(t=>{if(!(t instanceof TypeError)||"Invalid URL"!==t.message)throw t;
415throw TypeError(`Discovery request responded with an invalid issuer. expected: ${e}`)});if(!r.authorization_endpoint)throw TypeError("Authorization server did not provide an authorization endpoint.");a=new URL(r.authorization_endpoint)}let s=a.searchParams,c=o.callbackUrl;!t.isOnRedirectProxy&&o.redirectProxyUrl&&(c=o.redirectProxyUrl,n=o.callbackUrl,i.debug("using redirect proxy",{redirect_uri:c,data:n}));let l=Object.assign({response_type:"code",client_id:o.clientId,redirect_uri:c,...o.authorization?.params},Object.fromEntries(o.authorization?.url.searchParams??[]),e);for(let e in l)s.set(e,l[e]);let u=[];o.authorization?.url.searchParams.get("response_mode")==="form_post"&&(t.cookies.state.options.sameSite="none",t.cookies.state.options.secure=!0,t.cookies.nonce.options.sameSite="none",t.cookies.nonce.options.secure=!0);let f=await oq.create(t,n);if(f&&(s.set("state",f.value),u.push(f.cookie)),o.checks?.includes("pkce")){if(r&&!r.code_challenge_methods_supported?.includes("S256"))"oidc"===o.type&&(o.checks=["nonce"]);else{let{value:e,cookie:r}=await oK.create(t);s.set("code_challenge",e),s.set("code_challenge_method","S256"),u.push(r)}}let p=await oG.create(t);return p&&(s.set("nonce",p.value),u.push(p.cookie)),"oidc"!==o.type||a.searchParams.has("scope")||a.searchParams.set("scope","openid profile email"),i.debug("authorization url is ready",{url:a,cookies:u,provider:o}),{redirect:a.toString(),cookies:u}}async function af(e,t){let r;let{body:n}=e,{provider:i,callbacks:o,adapter:a}=t,s=(i.normalizeIdentifier??ap)(n?.email),c={id:crypto.randomUUID(),email:s,emailVerified:null},l=await a.getUserByEmail(s)??c,u={providerAccountId:s,userId:l.id,type:"email",provider:i.id};try{r=await o.signIn({user:l,account:u,email:{verificationRequest:!0}})}catch(e){throw new y.JK(e)}if(!r)throw new y.JK("AccessDenied");if("string"==typeof r)return{redirect:await o.redirect({url:r,baseUrl:t.url.origin})};let{callbackUrl:f,theme:p}=t,d=await i.generateVerificationToken?.()??t8(32),h=86400,m=new Date(Date.now()+(i.maxAge??h)*1e3),g=i.secret??t.secret,b=new URL(t.basePath,t.url.origin),w=i.sendVerificationRequest({identifier:s,token:d,expires:m,url:`${b}/callback/${i.id}?${new URLSearchParams({callbackUrl:f,token:d,email:s})}`,provider:i,theme:p,request:t6(e)}),v=a.createVerificationToken?.({identifier:s,token:await t4(`${d}${g}`),expires:m});return await Promise.all([w,v]),{redirect:`${b}/verify-request?${new URLSearchParams({provider:i.id,type:i.type})}`}}function ap(e){if(!e)throw Error("Missing email from request body.");let[t,r]=e.toLowerCase().trim().split("@");return r=r.split(",")[0],`${t}@${r}`}async function ad(e,t,r){let n=`${r.url.origin}${r.basePath}/signin`;if(!r.provider)return{redirect:n,cookies:t};switch(r.provider.type){case"oauth":case"oidc":{let{redirect:n,cookies:i}=await au(e.query,r);return i&&t.push(...i),{redirect:n,cookies:t}}case"email":return{...await af(e,r),cookies:t};default:return{redirect:n,cookies:t}}}async function ah(e,t,r){let{jwt:n,events:i,callbackUrl:o,logger:a,session:s}=r,c=t.value;if(!c)return{redirect:o,cookies:e};try{if("jwt"===s.strategy){let e=r.cookies.sessionToken.name,t=await n.decode({...n,token:c,salt:e});await i.signOut?.({token:t})}else{let e=await r.adapter?.deleteSession(c);await i.signOut?.({session:e})}}catch(e){a.error(new y.V1(e))}return e.push(...t.clean()),{redirect:o,cookies:e}}async function ay(e,t){let{adapter:r,jwt:n,session:{strategy:i}}=e,o=t.value;if(!o)return null;if("jwt"===i){let t=e.cookies.sessionToken.name,r=await n.decode({...n,token:o,salt:t});if(r&&r.sub)return{id:r.sub,name:r.name,email:r.email,image:r.picture}}else{let e=await r?.getSessionAndUser(o);if(e)return e.user}return null}async function am(e,t,r,n){let i=at(t),{provider:o}=i,{action:a}=e.query??{};if("register"!==a&&"authenticate"!==a&&void 0!==a)return{status:400,body:{error:"Invalid action"},cookies:n,headers:{"Content-Type":"application/json"}};let s=await ay(t,r),c=s?{user:s,exists:!0}:await o.getUserInfo(t,e),l=c?.user;switch(o6(a,!!s,c)){case"authenticate":return o4(i,e,l,n);case"register":if("string"==typeof l?.email)return o5(i,e,l,n);break;default:return{status:400,body:{error:"Invalid request"},cookies:n,headers:{"Content-Type":"application/json"}}}}async function ag(e,t){let{action:r,providerId:n,error:i,method:o}=e,a=t.skipCSRFCheck===rn.eD,{options:s,cookies:c}=await rp({authOptions:t,action:r,providerId:n,url:e.url,callbackUrl:e.body?.callbackUrl??e.query?.callbackUrl,csrfToken:e.body?.csrfToken,cookies:e.cookies,isPost:"POST"===o,csrfDisabled:a}),l=new h(s.cookies.sessionToken,e.cookies,s.logger);if("GET"===o){let t=nj({...s,query:e.query,cookies:c});switch(r){case"callback":return await as(e,s,l,c);case"csrf":return t.csrf(a,s,c);case"error":return t.error(i);case"providers":return t.providers(s.providers);case"session":return await al(s,l,c);case"signin":return t.signin(n,i);case"signout":return t.signout();case"verify-request":return t.verifyRequest();case"webauthn-options":return await am(e,s,l,c)}}else{let{csrfTokenVerified:t}=s;switch(r){case"callback":return"credentials"===s.provider.type&&re(r,t),await as(e,s,l,c);case"session":return re(r,t),await al(s,l,c,!0,e.body?.data);case"signin":return re(r,t),await ad(e,c,s);case"signout":return re(r,t),await ah(c,l,s)}}throw new y.D7(`Cannot handle action: ${r}`)}function ab(e,t,r=!1){try{let n=e.AUTH_URL;n&&(t.basePath?r||tZ(t).warn("env-url-basepath-redundant"):t.basePath=new URL(n).pathname)}catch{}finally{t.basePath??(t.basePath="/auth")}if(!t.secret?.length){t.secret=[];let r=e.AUTH_SECRET;for(let n of(r&&t.secret.push(r),[1,2,3])){let r=e[`AUTH_SECRET_${n}`];r&&t.secret.unshift(r)}}
415t.redirectProxyUrl??(t.redirectProxyUrl=e.AUTH_REDIRECT_PROXY_URL),t.trustHost??(t.trustHost=!!(e.AUTH_URL??e.AUTH_TRUST_HOST??e.VERCEL??e.CF_PAGES??"production"!==e.NODE_ENV)),t.providers=t.providers.map(t=>{let{id:r}="function"==typeof t?t({}):t,n=r.toUpperCase().replace(/-/g,"_"),i=e[`AUTH_${n}_ID`],o=e[`AUTH_${n}_SECRET`],a=e[`AUTH_${n}_ISSUER`],s=e[`AUTH_${n}_KEY`],c="function"==typeof t?t({clientId:i,clientSecret:o,issuer:a,apiKey:s}):t;return"oauth"===c.type||"oidc"===c.type?(c.clientId??(c.clientId=i),c.clientSecret??(c.clientSecret=o),c.issuer??(c.issuer=a)):"email"===c.type&&(c.apiKey??(c.apiKey=s)),c})}function aw(e,t,r,n,i){let o;let a=i?.basePath,s=n.AUTH_URL??n.NEXTAUTH_URL;if(s)o=new URL(s),a&&"/"!==a&&"/"!==o.pathname&&(o.pathname!==a&&tZ(i).warn("env-url-basepath-mismatch"),o.pathname="/");else{let e=r.get("x-forwarded-host")??r.get("host"),n=r.get("x-forwarded-proto")??t??"https",i=n.endsWith(":")?n:n+":";o=new URL(`${i}//${e}`)}let c=o.toString().replace(/\/$/,"");if(a){let t=a?.replace(/(^\/|\/$)/g,"")??"";return new URL(`${c}/${t}/${e}`)}return new URL(`${c}/${e}`)}async function av(e,t){let r=tZ(t),n=await t3(e,t);if(!n)return Response.json("Bad request.",{status:400});let i=k(n,t);if(Array.isArray(i))i.forEach(r.warn);else if(i){if(r.error(i),!new Set(["signin","signout","error","verify-request"]).has(n.action)||"GET"!==n.method){let e="There was a problem with the server configuration. Check the server logs for more information.";return Response.json({message:e},{status:500})}let{pages:e,theme:o}=t,a=e?.error&&n.url.searchParams.get("callbackUrl")?.startsWith(e.error);if(!e?.error||a)return a&&r.error(new y.Mq(`The error page ${e?.error} should not require authentication`)),t5(nj({theme:o}).error("Configuration"));let s=`${n.url.origin}${e.error}?error=Configuration`;return Response.redirect(s)}let o=e.headers?.has("X-Auth-Return-Redirect"),a=t.raw===rn.LZ;try{let e=await ag(n,t);if(a)return e;let r=t5(e),i=r.headers.get("Location");if(!o||!i)return r;return Response.json({url:i},{headers:r.headers})}catch(p){let i=p;r.error(i);let s=i instanceof y.l4;if(s&&a&&!o)throw i;if("POST"===e.method&&"session"===n.action)return Response.json(null,{status:400});let c=new URLSearchParams({error:(0,y.pI)(i)?i.type:"Configuration"});i instanceof y.UC&&c.set("code",i.code);let l=s&&i.kind||"error",u=t.pages?.[l]??`${t.basePath}/${l.toLowerCase()}`,f=`${n.url.origin}${u}?${c}`;if(o)return Response.json({url:f});return Response.redirect(f)}}var a_=r(125),aS=r(24358);function aE(e){let t=aS.env.AUTH_URL??aS.env.NEXTAUTH_URL;if(!t)return e;let{origin:r}=new URL(t),{href:n,origin:i}=e.nextUrl;return new a_.NextRequest(n.replace(i,r),e)}function aA(e){try{e.secret??(e.secret=aS.env.AUTH_SECRET??aS.env.NEXTAUTH_SECRET);let t=aS.env.AUTH_URL??aS.env.NEXTAUTH_URL;if(!t)return;let{pathname:r}=new URL(t);if("/"===r)return;e.basePath||(e.basePath=r)}catch{}finally{e.basePath||(e.basePath="/api/auth"),ab(aS.env,e,!0)}}var ak=r(48884),ax=r(24358);async function aP(e,t){return av(new Request(aw("session",e.get("x-forwarded-proto"),e,ax.env,t),{headers:{cookie:e.get("cookie")??""}}),{...t,callbacks:{...t.callbacks,async session(...e){let r=await t.callbacks?.session?.(...e)??{...e[0].session,expires:e[0].session.expires?.toISOString?.()??e[0].session.expires};return{user:e[0].user??e[0].token,...r}}}})}function aR(e){return"function"==typeof e}function aO(e,t){return"function"==typeof e?async(...r)=>{if(!r.length){let r=await (0,ak.headers)(),n=await e(void 0);return t?.(n),aP(r,n).then(e=>e.json())}if(r[0]instanceof Request){let n=r[0],i=r[1],o=await e(n);return t?.(o),aT([n,i],o)}if(aR(r[0])){let n=r[0];return async(...r)=>{let i=await e(r[0]);return t?.(i),aT(r,i,n)}}let n="req"in r[0]?r[0].req:r[0],i="res"in r[0]?r[0].res:r[1],o=await e(n);return t?.(o),aP(new Headers(n.headers),o).then(async e=>{let t=await e.json();for(let t of e.headers.getSetCookie())"headers"in i?i.headers.append("set-cookie",t):i.appendHeader("set-cookie",t);return t})}:(...t)=>{if(!t.length)return Promise.resolve((0,ak.headers)()).then(t=>aP(t,e).then(e=>e.json()));if(t[0]instanceof Request)return aT([t[0],t[1]],e);if(aR(t[0])){let r=t[0];return async(...t)=>aT(t,e,r).then(e=>e)}let r="req"in t[0]?t[0].req:t[0],n="res"in t[0]?t[0].res:t[1];return aP(new Headers(r.headers),e).then(async e=>{let t=await e.json();for(let t of e.headers.getSetCookie())"headers"in n?n.headers.append("set-cookie",t):n.appendHeader("set-cookie",t);return t})}}async function aT(e,t,r){let n=aE(e[0]),i=await aP(n.headers,t),o=await i.json(),a=!0;t.callbacks?.authorized&&(a=await t.callbacks.authorized({request:n,auth:o}));let s=a_.NextResponse.next?.();if(a instanceof Response){s=a;let e=a.headers.get("Location"),{pathname:r}=n.nextUrl;e&&aI(r,new URL(e).pathname,t)&&(a=!0)}else if(r){let t=n;t.auth=o,s=await r(t,e[1])??a_.NextResponse.next()}else if(!a){let e=t.pages?.signIn??`${t.basePath}/signin`;if(n.nextUrl.pathname!==e){let t=n.nextUrl.clone();t.pathname=e,t.searchParams.set("callbackUrl",n.nextUrl.href),s=a_.NextResponse.redirect(t)}}let c=new Response(s?.body,s);for(let e of i.headers.getSetCookie())c.headers.append("set-cookie",e);return c}function aI(e,t,r){let n=t.replace(`${e}/`,""),i=Object.values(r.pages??{});return(aC.has(n)||i.includes(t))&&t===e}let aC=new Set(["providers","session","csrf","signin","signout","callback","verify-request","error"]);var aj=r(74459),aU=r(24358);async function a$(e,t={},r,n){let i=new Headers(await (0,ak.headers)()),{redirect:o=!0,redirectTo:a,...s}=t instanceof FormData?Object.fromEntries(t):t,c=a?.toString()??i.get("Referer")??"/",l=aw("signin",i.get("x-forwarded-proto"),i,aU.env,n);if(!e)return l.searchParams.append("callbackUrl",c),o&&(0,aj.redirect)(l.toString()),l.toString();let u=`${l}/${e}?${new URLSearchParams(r)}`,f={};for(let t of n.providers){let{options:r,...n}="function"==typeof t?t():t,i=r?.id??n.id;if(i===e){f={id:i,type:r?.type??n.type};break}}if(!f.id){let e=`${l}?${new URLSearchParams({callbackUrl:c})}`;return o&&(0,aj.redirect)(e),e}"credentials"===f.type&&(u=u.replace("signin","callback")),i.set("Content-Type","application/x-www-form-urlencoded");
415let p=new Request(u,{method:"POST",headers:i,body:new URLSearchParams({...s,callbackUrl:c})}),d=await av(p,{...n,raw:rn.LZ,skipCSRFCheck:rn.eD}),h=await (0,ak.cookies)();for(let e of d?.cookies??[])h.set(e.name,e.value,e.options);let y=(d instanceof Response?d.headers.get("Location"):d.redirect)??u;return o?(0,aj.redirect)(y):y}async function aL(e,t){let r=new Headers(await (0,ak.headers)());r.set("Content-Type","application/x-www-form-urlencoded");let n=aw("signout",r.get("x-forwarded-proto"),r,aU.env,t),i=new URLSearchParams({callbackUrl:e?.redirectTo??r.get("Referer")??"/"}),o=new Request(n,{method:"POST",headers:r,body:i}),a=await av(o,{...t,raw:rn.LZ,skipCSRFCheck:rn.eD}),s=await (0,ak.cookies)();for(let e of a?.cookies??[])s.set(e.name,e.value,e.options);return e?.redirect??!0?(0,aj.redirect)(a.redirect):a}async function aN(e,t){let r=new Headers(await (0,ak.headers)());r.set("Content-Type","application/json");let n=new Request(aw("session",r.get("x-forwarded-proto"),r,aU.env,t),{method:"POST",headers:r,body:JSON.stringify({data:e})}),i=await av(n,{...t,raw:rn.LZ,skipCSRFCheck:rn.eD}),o=await (0,ak.cookies)();for(let e of i?.cookies??[])o.set(e.name,e.value,e.options);return i.body}function aD(e){if("function"==typeof e){let t=async t=>{let r=await e(t);return aA(r),av(aE(t),r)};return{handlers:{GET:t,POST:t},auth:aO(e,e=>aA(e)),signIn:async(t,r,n)=>{let i=await e(void 0);return aA(i),a$(t,r,n,i)},signOut:async t=>{let r=await e(void 0);return aA(r),aL(t,r)},unstable_update:async t=>{let r=await e(void 0);return aA(r),aN(t,r)}}}aA(e);let t=t=>av(aE(t),e);return{handlers:{GET:t,POST:t},auth:aO(e),signIn:(t,r,n)=>a$(t,r,n,e),signOut:t=>aL(t,e),unstable_update:t=>aN(t,e)}}},42452:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(73122);function i(e){return{id:"apple",name:"Apple",type:"oidc",issuer:"https://appleid.apple.com",authorization:{params:{scope:"name email",response_mode:"form_post"}},[n.zS]:!0,profile(e){let t=e.user?`${e.user.name.firstName} ${e.user.name.lastName}`:e.email;return{id:e.sub,name:t,email:e.email,image:null}},async [n.rK](...e){if(new URL(e[0]instanceof Request?e[0].url:e[0]).pathname.endsWith(".well-known/openid-configuration")){let t=await fetch(...e),r=await t.clone().json();return Response.json({...r,userinfo_endpoint:"https://appleid.apple.com/fake_endpoint"})}return fetch(...e)},client:{token_endpoint_auth_method:"client_secret_post"},style:{text:"#fff",bg:"#000"},checks:["nonce","state"],options:e}}}}]);

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.